[jhc] Parsec with JHC

Agent Zhang agentzh at gmail.com
Fri May 16 02:21:43 EDT 2008

Hi, there

Is it possible to compile Haskell programs using Parsec using JHC? I'm
trying jhc  0.5.20080307 (the rpm downloaded from JHC's homepage) with
the Parsec source tarball downloaded from here:


I'm getting the following errors during compiling:

   $ jhc Main.hs -i ~/tmp/haskell/parsec -o test
   jhc: Syntax error in input, run through a compiler to check.
        ERROR: the precedence of HsVar {hsExpName =
Text.ParserCombinators.Parsec.Prim.<|>} is incompatible with the
precendence of it's argument: HsInfixApp (HsVar {hsExpName =
Text.ParserCombinators.Parsec.Combinator.146_op}) (HsVar {hsExpName =
Jhc.Monad.>>=}) (HsLambda
[HsPVar {hsPatName = Text.ParserCombinators.Parsec.Combinator.149_f}]
(HsInfixApp (HsVar {hsExpName =
Text.ParserCombinators.Parsec.Combinator.145_p}) (HsVar {hsExpName =
Jhc.Monad.>>=}) (HsLambda
[HsPVar {hsPatName = Text.ParserCombinators.Parsec.Combinator.150_y}]
(HsApp (HsVar {hsExpName =
Text.ParserCombinators.Parsec.Combinator.147_rest}) (HsParen (HsApp
(HsApp (HsVar {hsExpName =
Text.ParserCombinators.Parsec.Combinator.149_f}) (HsVar {hsExpName =
Text.ParserCombinators.Parsec.Combinator.148_x})) (HsVar {hsExpName =

Can I work around with it? Thanks in advance :)


More information about the jhc mailing list