Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hdevtools is ignoring local .ghci files #3

Open
adinapoli opened this issue Sep 16, 2012 · 3 comments
Open

hdevtools is ignoring local .ghci files #3

adinapoli opened this issue Sep 16, 2012 · 3 comments

Comments

@adinapoli
Copy link

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.

@bitc
Copy link
Owner

bitc commented Oct 5, 2012

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.

@adinapoli
Copy link
Author

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

Cheers,
A.

@jamesdbrock
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants