[jhc] Parsec -- Module not found
john at repetae.net
Tue Aug 10 04:25:36 EDT 2010
On Tue, Aug 10, 2010 at 10:08:07AM +0200, David Virebayre wrote:
> I've tried a small program that uses parsec, but I couldn't get it to compile :
> david at pcdavid:/data/code/edimail$ jhc -C DecVersBL.hs
> jhc -C DecVersBL.hs
> jhc 0.7.6 (0.7.6-3)
> Finding Dependencies...
> Using Ho Cache: '/home/david/.jhc/cache'
> DecVersBL [DecVersBL.hs]
> Error: Module not found: Text.ParserCombinators.Parsec
> Error: Module not found: Text.ParserCombinators.Parsec.Char
> Error: Module not found: Text.ParserCombinators.Parsec.Combinator
> I've looked into /home/david/download/jhc-0.7.6/lib/ext/parsec.cabal,
> exposed modules are Text.ParserCombinators.Parsec.xxxx, which is what
> I tried to import.
> Just in case, I've also tried the simpler names Text.Parsec, etc.
> jhc --list-libraries does list parsec-126.96.36.199
> I've tried to find Parsec on the disk hoping it'd give me a clue about
> what to import, but I only found
> which doesn't help at all.
> There must be something really stupid I'm missing here.
are you passing '-p parsec' on the command line? it is the equivalent of
ghc's -package flag more or less.
This is actually the 3rd or 4th time someone has had this issue, clearly
I need to improve the documentation or something. What I was
thinking of was to have it look for unrecognized modules in available
packages and provide a better error message, something like:
"module Text.ParserCombinators.Parsec not found, however it is available
in the parsec-188.8.131.52 package, did you forget to put '-p parsec' on the
I don't want to do the stateful thing ghc does with package registration
and exposed/hidden packages and whatnot, it always felt fairly hacky. In
jhc you get what you specify on the command line and thats it. (though,
you can always create custom profiles in your targets.ini file)
John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/
More information about the jhc