eagletmt / ghcmod-vim

Happy Haskell programming on Vim, powered by ghc-mod
http://www.vim.org/scripts/script.php?script_id=4473
433 stars 59 forks source link

some way to set different per-project paths to ghc-mod #83

Open wolftune opened 8 years ago

wolftune commented 8 years ago

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 then stack 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).

wolftune commented 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

mrak commented 8 years ago

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