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
Is your feature request related to a problem? Please describe.
Often, I might want to learn the type of an expression in Haskell. So far I haven't figure out how to do that with hls and while looking through its features I also haven't found this listed as capability. On the other hand, if I remember correctly, Dante (or was it Intero?) has this functionality.
Describe the solution you'd like
If I select a piece of code in my editor (I am in Spacemacs but it shouldn't matter I assume), I would expect lsp to show information (type signature) for that piece of code, if it is a valid Haskell expression. If it is an invalid Haskell expression, it shouldn't show anything.
So for example, if we have myFunc = Just [3] <> Nothing, then currently we have:
cursor on Just -> [Int] -> Maybe [Int]
cursor on [ -> [Int]
cursor on 3 -> Int
If I select Just [3], I would expect to see Maybe [Int]. However, right now lsp doesn't care about the selection, only about the position of the cursor itself, so if cursor is e.g. at the end of that selection, I will get just Int.
I don't know if cause of this is this feature not being implemented in HLS, or Spacemacs not passing the selection/region information to the HLS.
Describe alternatives you've considered
I remember this working either in Dante or Intero, can't remember exactly.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Often, I might want to learn the type of an expression in Haskell. So far I haven't figure out how to do that with hls and while looking through its features I also haven't found this listed as capability. On the other hand, if I remember correctly, Dante (or was it Intero?) has this functionality.
Describe the solution you'd like
If I select a piece of code in my editor (I am in Spacemacs but it shouldn't matter I assume), I would expect lsp to show information (type signature) for that piece of code, if it is a valid Haskell expression. If it is an invalid Haskell expression, it shouldn't show anything.
So for example, if we have
myFunc = Just [3] <> Nothing
, then currently we have:Just
->[Int] -> Maybe [Int]
[
->[Int]
3
->Int
If I select
Just [3]
, I would expect to seeMaybe [Int]
. However, right now lsp doesn't care about the selection, only about the position of the cursor itself, so if cursor is e.g. at the end of that selection, I will get justInt
.I don't know if cause of this is this feature not being implemented in HLS, or Spacemacs not passing the selection/region information to the HLS.
Describe alternatives you've considered
I remember this working either in Dante or Intero, can't remember exactly.
The text was updated successfully, but these errors were encountered: