Open capn-freako opened 7 years ago
Ghc-mod has trouble working with projects which use a different version of cabal than that which was used to build ghc-mod. You could check where haskell-vim-now installed ghc-mod (perhaps ~/.local/bin
), and turn ghc-mod into a symlink which you can point at versions that you build with different versions of cabal.
So, I did: stack install ghc-mod
.
And that overwrote the existing executables in ~/.local/bin.
However, I'm still getting the same error, when I try to use ",ht".
Curiously, using ghc-mod
explicitly, from the MacVim command prompt, works:
:!ghc-mod type
Okay, I was able to get ',ht' working, by following the advice given here: Issue 88
However, there's a caveat:
You must be in the directory containing your stack.yaml file, before opening the file in which you wish to use ',ht'.
Note that ':cd'ing into that directory, after opening the file will not work!
Interesting, so it's a pathing issue? Maybe we could tweak https://github.com/begriffs/haskell-vim-now/blob/master/vimrc.haskell#L1-L7 ?
Thanks a lot for continuing to research this, I've been missing the ,ht
functionality which has been broken for a while.
Hi Joe,
I looked at that code, but don't understand it; sorry. I'm happy to chat anytime about this (or, anything else): (408)829-3037
Thanks, -db
Using this simple example:
and with my cursor positioned on the 'n' at the beginning of the first occurrence of the word "name" in the second line, I tried ",ht" in normal mode, but got:
ghcmod#command#type: Cannot guess type.
I'd previously rebuilt, using the
--enable-test
Cabal flag:stack build :hardware-examples --flag *:enable-test
but, apparently, that wasn't the problem.
Does anyone know how I can get ",ht" working?