[Haskell-cafe] Pragmas (was: ANNOUNCE: haskell-src-exts 0.4.4)
roma at ro-che.info
Mon Dec 8 04:37:25 EST 2008
* Neil Mitchell <ndmitchell at gmail.com> [2008-12-08 08:29:03+0000]
> > Apart from this, HSE now also parses any unrecognized pragma in option
> > (e.g. LANGUAGE), declaration (e.g. RULES) or expression (e.g. SCC)
> > position, allowing user-customized pragmas. Unrecognized pragmas in
> > other positions will (unfortunately) give a parse error. If this ever
> > means a problem for you - let me know!
> This is likely to be a problem for me :-)
> I certainly have OPTIONS_DERIVE and CATCH pragmas that I've inserted
> into various programs over time. I think failing on an unrecognised
> pragma is probably a bad idea, when ignoring a pragma is usually
> perfectly safe.
An implementation is not required to respect any pragma, but the pragma
should be ignored if an implementation is not prepared to handle it.
Related question: why does not Language.Haskell.Syntax (from haskell-src)
represent comments or pragmas in any way?
Roman I. Cheplyaka :: http://ro-che.info/
"Don't let school get in the way of your education." - Mark Twain
More information about the Haskell-Cafe