Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mgsloan opened this issue Sep 19, 2015 · 5 comments
Open

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

mgsloan opened this issue Sep 19, 2015 · 5 comments

Comments

@mgsloan
Copy link
Contributor

mgsloan commented Sep 19, 2015

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.

@mgsloan
Copy link
Contributor Author

mgsloan commented Sep 19, 2015

Also, (stack-mode-type t) doesn't work for me - it does some insertion and then cond: Wrong type argument: char-or-string-p, nil.

@chrisdone
Copy link
Member

The piggy back issue of (stack-mode-type t) is fixed.

@lukehoersten
Copy link
Contributor

Also in this vein, two issues with (stack-mode-type &optional INSERT-VALUE) where INSERT-VALUE is true:

  1. Insert type on a top-level function/definition incorrectly uses the inline type syntax: (fn :: ...) instead of inserting the type on the line above.
  2. Insert type always seems to never actually put the type after the :: and instead just results in the incomplete literal string (fn ::.

@chrisdone
Copy link
Member

Insert type on a top-level function/definition incorrectly uses the inline type syntax: (fn :: ...) instead of inserting the type on the line above.

Are you selecting the word when you use C-u C-c C-t? Because selecting an expression behaves as though you want to wrap it in a type signature.

@lukehoersten
Copy link
Contributor

Ah yeah that's working. So that solves (1) but (2) still remains. May be related to my other issues regarding the new regressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants