logo       

bugs in happy: msg#00025

lang.haskell.glasgow.bugs

Subject: bugs in happy

Hi Simon,

I tried to write a monadic lexer and parser just to find that:

- omitting %name defaults to happyParse. However this name is used
internally in a different function at a different location, leading to a
"Multiply declarations of `Parser.happyParse'" error form GHC. It doesn't
change if I give any of the -a -c -g flags.

- the documentation on the web is outdated (version 1.11)

- the documentation for monadic parsers (Section 2.5) says that the type
for happyError is [Token] -> P a which I naively believed. It's P a. Later
in the example you deceptively suggest to define

happyError tokens = failE "Parse error"

but, as above, there are not tokens.

That's it,
Axel.


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise