Bug 32604 - Hovering a lambda type has lost docs
Summary: Hovering a lambda type has lost docs
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: F# Add-in ()
Version: 5.9
Hardware: PC Mac OS
: Normal normal
Target Milestone: master
Assignee: Dave Thomas
URL:
Depends on:
Blocks:
 
Reported: 2015-07-30 05:55 UTC by henrik
Modified: 2015-12-08 11:46 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Another screen (122.35 KB, image/png)
2015-07-30 05:56 UTC, henrik
Details
show (25.94 KB, image/png)
2015-07-30 08:06 UTC, henrik
Details
Type alias tooltip (56.83 KB, image/png)
2015-12-08 11:45 UTC, Jason Imison
Details
lambda type tooltip (63.17 KB, image/png)
2015-12-08 11:46 UTC, Jason Imison
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description henrik 2015-07-30 05:55:44 UTC
Create:

type A = int -> int

Hover A. You'll just see the full name, not the actual definition that helps you.

Also see screenshot.
Comment 1 henrik 2015-07-30 05:56:17 UTC
Created attachment 12295 [details]
Another screen

Another screen
Comment 2 henrik 2015-07-30 05:59:48 UTC
This also applies to type aliases:

type Id = string

Hovering just gives the full name of Id.
Comment 3 Dave Thomas 2015-07-30 07:08:49 UTC
How annoying, must be upstream breaking changes in FCS, as nothings changed elsewhere.
Comment 4 Dave Thomas 2015-07-30 07:11:36 UTC
Actually maybe these are entirely new cases that dont have an implementation.

What should be shown for:
type Id = string
Comment 5 henrik 2015-07-30 08:06:47 UTC
Created attachment 12296 [details]
show

Just like the others.
Comment 6 henrik 2015-07-30 08:06:55 UTC
--
Comment 7 henrik 2015-07-30 08:08:33 UTC
What should be shown? Well, perhaps:

type Id = string

Type Alias
Full name: Qvi.Id



And for the lambda:

type F = string -> unit

Type Alias / Function
Full Name: Qvi.F
Comment 8 Dave Thomas 2015-07-30 08:11:17 UTC
afaik type alias don't have any special tips shown in VS, saying that we dont mirror that behaviour for tips in VS anymore now that the tooltips have been overhauled.
Comment 9 henrik 2015-07-30 08:13:00 UTC
Well, to me it's a regression for XS, which used to show them to me... Don't you agree that it's very useful? Especially if you name your functions with type names to make the APIs easier to understand.
Comment 10 Dave Thomas 2015-07-30 08:13:06 UTC
For this reason I don't reccomend using type alias, it leaves you guessing to the real identity of the type.
Comment 11 henrik 2015-07-30 08:14:11 UTC
Not if everything speaks in terms of the type alias and you have factory methods that can create the type alias anew. This is the case when using a library, but not when constructing the library, which is my case.
Comment 12 henrik 2015-07-30 08:16:09 UTC
Besides that, it's a way to safeguard against API changes; as long as I, the consumer of the library return this type alias, and especially if I do so with the library-supplied functions, I can be sure that my code is correct even when the underlying library undergoes changes.

Finally, I believe even Don himself has commented on that he should have used more type alias in the F# compiler to keep track of the string-value/contents easier.

So they absolutely have their use-cases. Just look at how easy and nice WebPart is to use from Suave to see that.
Comment 13 Dave Thomas 2015-07-30 08:37:10 UTC
I think it comes down to personal choice and the power of tools.  I noticed that type alias were not represented well in VS when I first started learning F# in 2010 the the experience was pretty awful.  The tooltips in XS have been carefully redeveloped to try and improve the experience, nothing has changed in the 5.9 line of code for quite some time, so anything you are seeing is from changes in new versions of FCS.   

Its possible that this is not an issue in the XS6.x line as there has been a lot of changes there.
Comment 15 Jason Imison 2015-12-08 11:45:20 UTC
Created attachment 14180 [details]
Type alias tooltip
Comment 16 Jason Imison 2015-12-08 11:46:03 UTC
Created attachment 14181 [details]
lambda type tooltip
Comment 17 Jason Imison 2015-12-08 11:46:41 UTC
Hi Henrik,

These issues are fixed in 6.0

Thanks!