Go to definition could work on type constructors used in a value position
#5589
yoshi-monster
started this conversation in
Ideas & suggestions
Replies: 1 comment 1 reply
-
|
Gleam never shares information as fact when it cannot be certain that it correct, so we could not assume what the type is in this case. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I tried to construct a value of type
tom.GetError, but I didn't know which constructors are available. Since most of the time, constructors are named after the type, I began typing something like this:At this point, the compiler helpfully tells me that
GetErroris a type constructor, not a value constructor. So I tried clicking on the type name that I just wrote right there to go to its definition to see which constructors are actually available.But even though the compiler seems to know that there is no value constructor called
tom.GetError, and that is instead a type constructor (so it looked like the compiler knew exactly what was happening here and what I meant), the lsp was still unable to fulfill that request.Anyways I think that would be cool if it worked 😄
~ rebecca 💜
Beta Was this translation helpful? Give feedback.
All reactions