ionide-vscode-fsharp
ionide-vscode-fsharp copied to clipboard
Add generic parameter constraints in more places / situations
Is your feature request related to a problem? Please describe.
I can currently only see resolved generic constraints in the status bar, it'd be nice to have it closer to where my eyes are naturally.
Describe the solution you'd like
I think it'd be nice to see it in additional places such as Info Panel, Tooltips.
Any defined generic type parameter constraints do appear in the Info Panel and Tooltips for types and methods, so supporting the resolved parameters seems like fitting addition.
Describe alternatives you've considered
Since there could be many constraints, it may be worth formatting them on different lines in the info panel since there's more real estate available.
I thought about Code lens as well, but thought that may be not be a great idea considering potential length and since constraint definitions for function params do not appear in code lens today.
Additional context
I only tested this on experimental and with a dotnet 3.0-preview6 installed, so wasn't sure if this normally worked before.
Hey @johlrich :wave:,
Thanks for backing our project. If possible, We will handle your
issue with priority support. To make sure we don't forget how special
you are, we added a backer
label to your issue.
Thanks again for backing us :tada:!
If this is of interest, I added a test for this scenario and should be able to help implement and add more tests while deciding on UX things https://github.com/johlrich/FsAutoComplete/commit/38e24ddf8d0e6710185a7ba4ed040cd1499b233a
I thought I had a quick fix for the info panel, which did work for that test, but it was really ugly visually and ended up breaking another scenario
Yes, this is interesting... I'm bit worried about size of that things in tooltips.
Info panel is totally different story, we have lot of control over what's happening.
For example we could go with something like:
val combinedEffects:
: unit
-> Eff<'a, int>
Constraints:
'a :> IState<int>
'a :> ILogger
...