Skip to content

Issue using type-at in spacemacs #689

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

Closed
fatlazycat opened this issue Jun 3, 2015 · 20 comments
Closed

Issue using type-at in spacemacs #689

fatlazycat opened this issue Jun 3, 2015 · 20 comments

Comments

@fatlazycat
Copy link

Hi, not sure where the issue lies, within spacemacs or haskell-mode hence this issue.

Have raised syl20bnr/spacemacs#1472

It appears something is sending the wrong columns to the type-at command.

Any ideas ? Could you help point me in the direction to debug this ?

Thanks

@geraldus
Copy link
Contributor

geraldus commented Jun 3, 2015

@fatlazycat can you M-x toggle-debug-on-error to enable debugging, then run type-at command and post here debugger output?

@fatlazycat
Copy link
Author

Would that goto the haskell-process-log ?

Is any different from the output

λ> :type-at /Users/graham/Development/GitHub/fatlazycat/NICTA-course/src/Course/ListZipper.hs 240    29 240 31 xs

*Course.ListZipper| *Course.ListZipper| *Course.ListZipper| xs :: a -> List a -> List a
λ> :type-at /Users/graham/Development/GitHub/fatlazycat/NICTA-course/src/Course/ListZipper.hs 240 31 240 32 xs

*Course.ListZipper| *Course.ListZipper| *Course.ListZipper| <interactive>:1:1-2: Not in scope: ‘xs’

@geraldus
Copy link
Contributor

geraldus commented Jun 3, 2015

@fatlazycat do you have some error messages when invoking type-at command or you just have unexpected result? In first case debugger output would be really helpful.

Also, please clarify output you posed: which command you run manually or both of them? I see different column numbers (29 -> 31, 31 -> 32) in above commands, can you also show me line 240?

@fatlazycat
Copy link
Author

Hmm, apologies seem to be getting myself confused.

They changed the default emacs binding but their standard binding m h t now works showing the output in the haskell-process-log.

It just doesn't appear anywhere else such as the gutter, which I assume is a spacemacs / my config issue.

@geraldus
Copy link
Contributor

geraldus commented Jun 3, 2015

@fatlazycat if it works it's good. I've made some improvements on haskell-process-show-type-at recently, so if it is doesn't work I want to know. Anyway, if you're facing any issues with haskell-mode please feel free to report them!

@wedens
Copy link

wedens commented Jun 5, 2015

I have the same issue with result printed only in haskell-process-log. Nothing is printed at the bottom of emacs (whatever it's called).

@fatlazycat
Copy link
Author

@wedens In a non-spacemacs emacs ?

@wedens
Copy link

wedens commented Jun 5, 2015

@fatlazycat yeah. non-spacemacs

@fatlazycat
Copy link
Author

@geraldus hmm, how do you see the results ?

I'll try a get the most minimal config for emacs sorted to try and narrow it down.

@geraldus
Copy link
Contributor

geraldus commented Jun 5, 2015

Hey guys, sorry I also do not see results. Please excuse me I didn't made proper checks of echo area, I have presentation mode enabled and I can confirm that at least it works (and echo area stuff worked fine just not long ago)! Let me see what's happening and why it's become broken.

@geraldus
Copy link
Contributor

geraldus commented Jun 5, 2015

Well, likely haskell-utils-echo-or-present1 is a culprit, but it is so simple that I have no idea what's going wrong!

@geraldus
Copy link
Contributor

geraldus commented Jun 5, 2015

Cool! I have a hotfix! There was missing parentheses, I'll make a PR right now.

@fatlazycat
Copy link
Author

😀 great thanks!

@geraldus
Copy link
Contributor

geraldus commented Jun 5, 2015

@fatlazycat @wedens thanks for reporting, and excuse me for confusion! Let's wait Travis build

@geraldus
Copy link
Contributor

geraldus commented Jun 5, 2015

Merged! @fatlazycat can you upgrade haskell-mode and check everything is working now?

@fatlazycat
Copy link
Author

Not sure when it makes it to melpa-stable but copying your change into my system fixes it :)

Thanks ! :)

Another point, not sure it it's my config or haskell-mode but when I do haskell-process-show-type-at it moves the point / cursor to a place after the thing you are asking it's type of. Obviously not major.

@geraldus
Copy link
Contributor

geraldus commented Jun 5, 2015

Yeah, I know that, I believe this was so from very beginning. Can you open an issue as a reminder?

@fatlazycat
Copy link
Author

Sure #700

@gracjan
Copy link
Contributor

gracjan commented Jun 5, 2015

Starting last stable release we actually have a workflow for cherry-picks of small fixes from master to stable branches.

Let me find out how this works.

(If it doesn't then you will need to wait for next stable release, this does not have a date forecast yet)

@fatlazycat
Copy link
Author

Actually spacemacs picked up the nightly for haskell-mode so all good, thanks.

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

No branches or pull requests

4 participants