
Where are pragmas treated like comments?
On Aug 16, 2012 6:14 AM, "Björn Peemöller"
Dear cafe,
I'm experimenting with extending the parser for a Haskell-like language by module pragmas. The parser is written using parser combinators.
Currently, I adapted the lexer to ignore whitespace and comments, but create lexemes for both the pragma start and end (and the pragma's content, of course). While these lexemes are necessary for parsing the pragmas before the module header, they somehow should be ignored (treated like comments) afterwards.
Could anyone give me a hint me how this behaviour (treat pragmas like comments) is achieved in GHC or in haskell-src-exts?
Thanks in advance, Björn
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe