|
RE: bugs in happy: msg#00027lang.haskell.glasgow.bugs
> 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. True, thanks for pointing it out. > - the documentation on the web is outdated (version 1.11) The version number is incorrect, the docs are really for version 1.13. > - 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. If you specify %lexer as well as %monad, then the type of happyError becomes P a. I suspect this is what you're doing. Cheers, Simon
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: A bug, Simon Marlow |
|---|---|
| Next by Date: | RE: A bug, Wojtek Moczydlowski |
| Previous by Thread: | bugs in happy, Axel Simon |
| Next by Thread: | [ ghc-Bugs-756454 ] Class op should mention class tyvar, SourceForge.net |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |