You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typeGetNumberFromDb= IDbConnection -> int
letgetNumberFromDb:GetNumberFromDb =fun conn ->1letaddNumberFunc' (dbFunc :GetNumberFromDb)otherNumber conn =letnumber= dbFunc conn
printfn "I got a number: %i" number
number + otherNumber
typeAddNumberFunc= int -> IDbConnection -> int
letaddNumberFunc:AddNumberFunc =
addNumberFunc' getNumberFromDb
letsomeHigherOrderFunction' (addNum :AddNumberFunc)num conn =
addNum num conn
// other logic heretypeSomeHigherOrderFunction= int -> IDbConnection -> int
letsomeHigherOrderFunction:SomeHigherOrderFunction =
someHigherOrderFunction' addNumberFunc
When hovering over function parameters with a type signature such as below
You can see the tooltip shows us the alias of the type signature (AddNumberFunc). I would like to propose we add the ability for navigating the type signatures further so you don't have to leave your current spot in the code to read and understand the signature.
Ideas/Suggestions:
Create a 'mathetical proof' style signature. We'd have to account for type aliases for primitive types and other sorts of F# magic. Depending on the size of the 'proof' placing this under the 'Open the documentation' section may prove better. Maybe adding configuration of some sorts as well?
addNumberFunc : AddNumberFunc
addNumberFunc : int -> IDbConnection -> int
If this is found to be a reasonable idea/suggestion, I'd be willing to help contribute. I would just need guidance on areas of the codebase to search and refactor
Checklist
I have looked through existing issues to make sure that this feature has not been requested before
I have provided a descriptive title for this issue
I am aware that even valid feature requests may be rejected if they do not align with the project's goals
I or my company would be willing to contribute this feature
The text was updated successfully, but these errors were encountered:
I agree this would be very nice to have but I think something like this should live in FSharp.Compiler.Service. If it's possible to prototype in FsAutocomplete, I'm for it but I get the feeling you'll hit some pain points and will have to push into FCS.
I also recall reading issues about this becoming extremely complicated as you can compound aliases:
typeFooer= string
typeMyFoo= int -> int
typeFooItAgain= MyFoo -> Task<Fooer>typeSlightlyDifferentFooIt= FooItAgain
I can't recall any direct issues about this from a quick search though.
Details
Assuming we have the following code:
When hovering over function parameters with a type signature such as below
You can see the tooltip shows us the alias of the type signature (AddNumberFunc). I would like to propose we add the ability for navigating the type signatures further so you don't have to leave your current spot in the code to read and understand the signature.
Ideas/Suggestions:
If this is found to be a reasonable idea/suggestion, I'd be willing to help contribute. I would just need guidance on areas of the codebase to search and refactor
Checklist
The text was updated successfully, but these errors were encountered: