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

Haskell SPC m h bindings not working #3173

Closed
tko opened this issue Sep 28, 2015 · 4 comments
Closed

Haskell SPC m h bindings not working #3173

tko opened this issue Sep 28, 2015 · 4 comments

Comments

@tko
Copy link
Contributor

tko commented Sep 28, 2015

  1. With haskell layer (and shm mode) enabled open a test.hs file with following contents:

    import Control.Monad (when)
    
    main = when True $ putStrLn "Hello"
  2. Move the cursor to the latter when

  3. Press SPC m h t or SPC m h i

Expected result: identifier/type information as documented

Actual result: Error: <interactive>:1:1-4: Not in scope: ‘when’

(This is after executing haskell-session-change as suggested in the first error when trying these keybindings.)

@tko
Copy link
Contributor Author

tko commented Sep 29, 2015

SPC m h T is similar

It looks like those key bindings aren't operating on the code that's in the buffer, but rather the code that's in the repl running in the background, e.g. previously sent with SPC m s b or something.

I must be misunderstanding ghc-mod and/or how the packages are interacting; I have haskell-enable-ghc-mod-support enabled and from what I recall from vim ghc-mod is able to give the type info without any extra steps.

tko added a commit to tko/spacemacs that referenced this issue Sep 29, 2015
ghc-mod can get type / info without having to manually push the code to
REPL first. syl20bnr#3173
@tko
Copy link
Contributor Author

tko commented Sep 30, 2015

There's another PR #3199 to bind the ghc-mod functions to even shorter prefix.

@d12frosted
Copy link
Contributor

When you enable interactive-haskell-mode - those bindings require associated REPL. If you disable it, but still have ghc-mod - C-c C-t will be bound to ghc-show-type function.

@d12frosted
Copy link
Contributor

@syl20bnr this is fixed by #3345 😄

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

5 participants