commercialhaskell / commercialhaskell/stack-ide

(stack-mode) Type info should use span yielded by backend

Open
#70 5 comments 0 reactions 0 assignees View on GitHub
stack-mode
Dominant language
Emacs Lisp
Stars
96
Forks
23
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.