bitc / hdevtools

REPO UNMAINTAINED!!! Try this: https://github.com/hdevtools/hdevtools/
MIT License
171 stars 43 forks source link

Cabal error - why is it failing? #43

Closed skatenerd closed 8 years ago

skatenerd commented 8 years ago

I'm using Stack with GHC 7.10.2 on Ubuntu. I acquired hdevtools via stack install hdevtools.

When I run hdevtools check src/Main.hs, I get the following error, which appears to be coming from Cabal.hs:

Cabal error: '/usr/bin/ghc-pkg' exited with an error:
ghc-pkg: Prelude.chr: bad argument: 1375454

Has anyone seen this before?

We are invoking ghc-pkg, but I am not able to figure out which subcommand we are giving to ghc-pkg, so it's hard to determine why ghc-pkg is blowing up. Is there anything related to ghc-pkg or to cabal that I can purge to make this go more smoothly?

Thanks :-)

skatenerd commented 8 years ago

On an empty project I get

Cabal error: '/usr/bin/ghc-pkg' exited with an error:
ghc-pkg: too few bytes. Failed reading at byte position 2289
skatenerd commented 8 years ago

hdevtools was invoking systemwide GHC, which was different from the version hdevtools was compiled against.