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

Not handling cabal-dev projects? #6

Open
jwiegley opened this issue Jan 16, 2013 · 11 comments
Open

Not handling cabal-dev projects? #6

jwiegley opened this issue Jan 16, 2013 · 11 comments

Comments

@jwiegley
Copy link

I have a large project that I build with cabal-dev. "hdevtools check" claims that a module installed into my cabal-dev isn't available, while "ghc-mod check" works correctly.

@bitc
Copy link
Owner

bitc commented Jan 17, 2013

I personally use hsenv, rather than cabal-dev, which works great with hdevtools. (And I personally find it more powerful and easier to use, not requiring learning any new commands).

Since I'm not that familiar with cabal-dev, I'm not sure what is necessary to add support for it. I think I remember reading that ghc-mod had to specifically add support for it.

Anyway, cabal-dev support is definitely something that would be good to have in hdevtools.

@jwiegley
Copy link
Author

I would love to use hsenv, but I've never been able to get it to work for any of the meaningful projects I work on on my Mac, while cabal-dev has never given me any problems so far.

@jwiegley
Copy link
Author

I've switched to using hsenv, but am having the exact same problem. It can't find any of my installed packages, while GHC can in the same environment.

@ibotty
Copy link

ibotty commented Sep 12, 2013

when i was still using cabal-dev (i'm using cabal sandboxes now), the following vim snippet worked for me. it should be easy to adopt to your situation/editor. having said that, native integration would be great as well. it might be nice to teach hdevtools to read the cabal file...

function! FindCabalDevRoot()
    return finddir('cabal-dev', './;')
endfunction

function! FindCabalDevRootPackageConf()
    return glob(FindCabalDevRoot().'/packages-*.conf')
endfunction

let g:hdevtools_options = '-g-ilib -g-isrc -g-i. -g-Wall -g-XOverloadedStrings -g-package-conf='.FindCabalDevRootPackageConf()

@gregwebs
Copy link

Use the new cabal sandbox feature. This issue should be able to be deprecated.

@jwiegley
Copy link
Author

Agreed, cabal sandbox has been working great, just need to convert over our tooling to use it.

@mkpankov
Copy link

Looks like hdevtools explicitly searches for *.hs files even when only *.hi are installed:

[hsenv]➜  geometroid git:(master) ✗ hdevtools check -g '-v' Fighting.hs
...
<no location info>: *** Chasing dependencies:
<no location info>: Chasing modules from: *Fighting.hs
Fighting.hs:9:18:
    Could not find module `Data.Random.Extras'
    Perhaps you meant
      Data.Random.RVar (from random-fu-0.2.4.0)
      Data.Random.Source (from random-source-0.3.0.6)
    Locations searched:
      Data/Random/Extras.hs
      Data/Random/Extras.lhs
[hsenv]➜  geometroid git:(master) ✗ ls ../.hsenv/cabal/lib/random-extras-0.19/ghc-7.6.2/Data/Random/          
Distribution  Dovetail.hi  Extras.hi  Show  Shuffle

@bitc
Copy link
Owner

bitc commented Nov 10, 2013

@constantius9 Is this related to this issue #6 "Not handling cabal-dev projects?"? If not, could you please open a new issue for this? Thanks!

@mkpankov
Copy link

@bitc Yes. More like "not handling hsenv properly", but since it all was discussed here, I posted it to this issue.

@tomberek
Copy link

Having a similar issue. *.hi is not seen.

@tomberek
Copy link

Is there any work around to tell hdevtools to check for .hi files?

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

6 participants