bad error message when incorrect format package db is supplied
I built a standalone package using cabal, and then ran:
cabal register --gen-pkg-config="$BUILDDIR/package.conf" --builddir="$BUILDDIR"
When I tried to compile or run a haskell file (using ghc or runghc), with GHC_PACKAGE_PATH="$BUILDDIR/package.conf", I get:
ghc: panic! (the 'impossible' happened)
(GHC version 7.0.4 for x86_64-unknown-linux):
Prelude.read: no parse
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Curiosity and exploration reveals (I think - I am largely guessing) that the thing that's supposed to be in GHC_PACKAGE_PATH is the haskell-syntax "package.conf.inplace", not "package.conf". This took me a while and a lot of frustration however, so a better error would be appreciated for next time I forget how this works.
I'm also not entirely sure where package.conf.inplace comes from, it seems to be a side process of the registration but I can't find any documentation or instructions on building one speicifically (rather than accidentally).
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.0.4 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | ghc-pkg |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |