Chimeric syntax

Scott Michel at
Tue Apr 28 01:24:31 EDT 2009

I've been hacking along on a NetBeans Haskell plugin (*) Looking at
Parser.y.pp, because both Eclipse and NetBeans work with antlr, it
seems like there are interesting cases in which chimeric constructions
parse correctly. Here's an example:

class ParsedModule m where
  let { a = 1; b = 2; } in a + b :: Int :: Int

This is mostly accepted by ghc, which complains with an invalid type signature.

This got me to thinking that either ghc has issues or I have some
fundamental misunderstanding of Haskell syntax. Or, maybe I should use
someone else's grammar.


(*) Don't tell me about eclipsefp2: I know already. It's the Monty
Python parrot of Haskell IDE support. And the code is about as
Teutonic as one can get. :-)

More information about the Glasgow-haskell-users mailing list