[jhc] Parsec -- Module not found

Korcan Hussein korcan_h at hotmail.com
Tue Aug 10 04:35:34 EDT 2010


Yes I can confirm it's just a missing package, "jhc -p parsec ..." works fine for me. Regarding the documentation it was quite clear to me and it was relatively near the top of the page so it's not hard to miss, how about a feature similar to "ghc --make"? that would be quite useful because using more than 3/4 libraries can get unwieldy although I have no idea the complexity of implementing it.

----------------------------------------
> Date: Tue, 10 Aug 2010 01:25:36 -0700
> From: john at repetae.net
> To: jhc at haskell.org
> Subject: Re: [jhc] Parsec -- Module not found
>
> 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-2.1.0.1
>>
>> I've tried to find Parsec on the disk hoping it'd give me a clue about
>> what to import, but I only found
>> /usr/local/share/jhc-0.7/parsec-2.1.0.1.hl
>> 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-2.1.0.1 package, did you forget to put '-p parsec' on the
> command line?"
>
> 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
>
> --
> John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/
> _______________________________________________
> jhc mailing list
> jhc at haskell.org
> http://www.haskell.org/mailman/listinfo/jhc
 		 	   		  


More information about the jhc mailing list