GHC-mod is looking for the settings file in the wrong directory

I use several Haskell plugins in my editor (Neovim), one of which is ghcmod-vim , which works with syntastic to provide syntax checking when writing Haskell code.

At some point, I installed GHC for Mac OS X as a temporary workaround for a number of problems in my build system configuration. Since then, these problems have been fixed, so I removed the .app package from my /Applications and deleted the lines that he added to my ~/.zshrc .

For some reason, even now when I write a Haskell file and save it to disk, I get an error message in the Neovim message buffer:

 "myfile.hs" 10L, 163C written syntastic: error: checker output: /Applications/ghc-7.8.4.app/Contents/lib/ghc-7.8.4/settings: openFile: does not exist (No such file or directory) syntastic: error: checker haskell/ghc_mod returned abnormal status 1 

The settings file contains a list of key / value pairs with various parameters of the build environment, which is usually stored next to the ghc binary and which exists with the ghc binary in my /usr/local/bin installed using Homebrew.

For some reason, the syntastic or ghc_mod looking for the settings file in the wrong place. This is despite the fact that there are no references to this path in any of my Neovim configuration files or plugins, nor in any environment variables.

How can I get ghc_mod or syntastic to find the GHC settings file in the right place?

+5
source share
1 answer

I decided to reinstall ghc-mod using cabal this morning, and this seems to have solved the problem completely!

Other steps included starting up :PlugUpdate and completely removing and reinstalling the ghcmod-vim and syntastic , although I don’t know if they helped fix the problem indirectly - the problem continued until I ran cabal update and cabal install ghc-mod (which , alone, reinstalled it).

As noted in the commentary, the main reason for this problem was the fact that ghc-mod introduced changes after version 5.4.0, which made the accompanying syntastic refuse support .

+2
source

Source: https://habr.com/ru/post/1239402/


All Articles