[Haskell-cafe] Parsing pragmas in a Haskell-like language

David Feuer david.feuer at gmail.com
Fri Aug 17 00:30:50 CEST 2012


Where are pragmas treated like comments?
On Aug 16, 2012 6:14 AM, "Björn Peemöller" <bjp at informatik.uni-kiel.de>
wrote:

> 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 at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120816/0d06e7b9/attachment.htm>


More information about the Haskell-Cafe mailing list