Vim-haskellmode and hsenv

I used hsenv (with great success!) To deal with the usual problems associated with bondage.

This is awesome, but there is one glitch that I cannot get around: how to convince (also excellent!) Vim-haskellmode to use the environment variables set by hsenv, namely the path to the GHC, cabal database, etc. when compiling, generating tags, etc.

Does anyone know how to solve this problem?

+7
source share
2 answers

Sorry, press the wrong button - I have to ask questions about how to use SO instead :)

Anyway, an even better trick is to put this in .vimrc

let g:ghc=system("which ghc") 

Thus (assuming g:ghc is bound when vim starts), it will pick up depending on what ghc is currently in use (by hsenv).

Ranjit Jala.

+3
source

One simple solution is to hack one .vimrc to

 let g:ghc="/path/to/hsenv/ghc" 
+1
source

All Articles