[Haskell-cafe] Re: ANNOUNCE: haskell-src-exts 0.4.4

Lemmih lemmih at gmail.com
Sun Dec 7 16:39:51 EST 2008

On Sun, Dec 7, 2008 at 10:28 PM, Niklas Broberg
<niklas.broberg at gmail.com> wrote:
>> The full list of pragmas supported by 0.4.4 is: SOURCE, RULES,
> The newly released version adds to the list of pragmas
> supported by adding support for the following: LANGUAGE, OPTIONS,
> OPTIONS_{GHC, HUGS, NHC98, YHC, HADDOCK, your tool here}, INCLUDE and
> CFILES. The LANGUAGE pragma is checked for well-formedness (a
> comma-separated list of constructors) but no validation of the
> constructors is done. The other pragmas all have their contents
> unchecked and passed along as is.
> 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!
> The only pragmas supported by GHC that HSE supports are, to my
> knowledge, ANN and LINE. I may add support for these in a near future,
> though I believe the syntax for the ANN pragma is still a bit in flux.
> Note that source files containing these pragmas can still be parsed by
> HSE, just like any other unrecognized pragmas in proper positions.
>> 0.4.4 is backwards incompatible with 0.4.3 for two constructors:
>> * The Module constructor (:: Module) now has an extra argument of type
>> 'Maybe WarningText', used for deprecated modules.
>> * The ImportDecl constructor (:: ImportDecl) now has an extra argument
>> of type Bool, stating whether the SOURCE pragma has been used for the
>> import.
> is backwards incompatible with 0.4.4 by adding yet another
> argument to the Module constructor (:: Module) of type [OptionPragma],
> used to list the pragmas preceding the beginning of the module proper.
> Cheers and happy haskelling,

Are SrcSpan's on the TODO list?


More information about the Haskell-Cafe mailing list