bugs in happy
Axel Simon
A.Simon at kent.ac.uk
Tue Nov 11 20:18:44 EST 2003
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.
More information about the Glasgow-haskell-bugs
mailing list