Open wolftune opened 8 years ago
this might be something needing to be fixed upstream in ghc-mod and/or stack. I brought it to the attention of the ghc-mod dev already
I would like to be able to do this, too. I prefer not to have a global ghc and ghc-mod and instead use tools from within the current project
Since Stack now supports having projects on the same system use multiple versions of GHC, it would be ideal for ghcmod-vim to recognize somehow which ghc-mod to use for a given project.
Perhaps a dot file in the project directory could be used to pass info? I'm not sure what other approach could make sense.
The process as I imagine it would be this: in the project directory,
stack build ghc-mod
thenstack exec which ghc-mod
will output the full path to the ghc-mod built for that project. Then, that path can be somehow used when working on the particular project and would vary when working on a different project, depending on if it uses a different GHC etc. (Stack shares executables among projects that all use the same Stackage snapshot, which will include ghc-mod after the next LTS version).