vim-hdevtools icon indicating copy to clipboard operation
vim-hdevtools copied to clipboard

hdevtools is ignoring local .ghci files

Open adinapoli opened this issue 13 years ago • 3 comments

Hi,

imagine I'm contributing on a project with has a local .ghci files, i.e. a .ghci files in the project root. Suppose this project hides a package and solves an ambiguity.

If I launch vim from the aforementioned directory, and ask vim-hsdevtools for the type of a function, this is what I get:

Error loading targets src/Snap/Snaplet/Internal/Lensed.hs:10:8: Ambiguous module name `Control.Monad.CatchIO': it was found in multiple packages: MonadCatchIO-transformers-0.3.0.0 MonadCatchIO-mtl-0.3.0.5

The error would be fixed reading the proper option (i.e. hide package) from the local .gchi files, but hdevtools seems to ignore it.

I hope the issue is clear.

Cheers, A.

adinapoli avatar Sep 16 '12 10:09 adinapoli

You can use the variable g:hdevtools_options to configure ghc options. In your case you want -hide-package

So set it to something like this:

let g:hdevtools_options = '-g-hide-package -gtransformers'

Note that there is no space between -g and the name of the package, transformers

Put that line in your project's vimrc file, or in your global vimrc file.

bitc avatar Oct 05 '12 12:10 bitc

Thanks. Any chance to fix it programmatically exploiting the fact options you need are in a local .ghci file?

Cheers, A.

adinapoli avatar Oct 05 '12 13:10 adinapoli

This hdevtools branch, if accepted, will give you the ability to put your GHC options in local .hdevtoolsrc project file. https://github.com/hdevtools/hdevtools/pull/59

jamesdbrock avatar Aug 15 '17 00:08 jamesdbrock