If I ask for the type of an expression, but only select part of it, then that's the only part that appears in the result.
For example, where | delineates my selection, put|StrLn "H|ello!", I'll get StrLn "H :: IO (). This is why the type infos come with spans that say what they refer to.
Of course, if the buffer has been edited since the last compilation, then both the query span and results span may be off. Maybe it would be a good idea to have ide-backend directly provide the text of the code that the type info refers to.
If I ask for the type of an expression, but only select part of it, then that's the only part that appears in the result.
For example, where
|delineates my selection,put|StrLn "H|ello!", I'll getStrLn "H :: IO (). This is why the type infos come with spans that say what they refer to.Of course, if the buffer has been edited since the last compilation, then both the query span and results span may be off. Maybe it would be a good idea to have ide-backend directly provide the text of the code that the type info refers to.