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.
user2121636
source share