Closed wraithm closed 9 years ago
I'm getting this as well.
I think some of the issue is related to the text that gets printed out when ghc-mod can't build a project. ghcmod-vim can't parse it. I've found that I no longer get errors after I successfully get a project to build. Try running ghc-mod from the command line in your project and getting the project to build.
Indeed, when things build properly it's fine. It would be nice if that didn't happen, but I guess that's more of a problem for vimproc?
The parsing is fine, I think this is a vimproc problem. Try invoking this on vim manually.
call vimproc#system(['ghc-mod'])
Err, so I run make
on my vimproc and it resolves the problem.
I had looked into that. I still have some issues after updating vimproc. Especially when I haven't run cabal build in my project. It definitely seems to be a problem with ghc-mod creating unexpected input for ghcmod-vim.
On Sun, Aug 31, 2014 at 4:43 AM, Evan Sebastian notifications@github.com wrote:
Err, so I run make on my vimproc and it resolves the problem.
See : eagletmt/neco-ghc#33 https://github.com/eagletmt/neco-ghc/issues/33
— Reply to this email directly or view it on GitHub https://github.com/eagletmt/ghcmod-vim/issues/56#issuecomment-53982860.
I tried ghc-mod 5.0.1.1 compiled by GHC 7.8.3 and it seems working for me except for :echo ghcmod#util#ghc_mod_version()
shows [5, 0, 1]
.
@WraithM @alex404 Could you paste the Haskell code that causes ghcmod-vim errors?
@eagletmt
It ignores the last number "1" because the regex that follows captures 3 instead of 4 digits, but as far as I'm concerned, it shouldn't been any problem.
@WraithM @alex404
Maybe you can try playing with the regex below, like changing it more specific to ghc-mod version \(\d\+\)\.\(\d\+\)\.\(\d\+\)\.\(\d\+\)
Yeah, the minor bug of version extraction doesn't cause any problems. I won't fix it.
Fixed in #57 .
When I start up vim with a haskell file, I get the following: