Module documentation for 184.108.40.206
This package provides a shim for haskell-src-exts, exposing the same AST but without annotations, using ghc's pattern synonyms.
This package is useful for synthesizing and manipulating HSE ASTs that don't carry source location information. It may also aid in porting packages from haskell-src-exts 1.17 to 1.18, but it is not a drop-in replacement for the old annotation-free AST. See the Compatibility section for details.
To be able to track the haskell-src-exts version numbers conveniently, the first three components of the version will be treated as the major version, followed by the minor version as usual. This deviates from the PVP.
Comparison to haskell-src-exts 1.17 (as of version 1.18):
haskell-src-exts-simple provides a simplified view of the annotated AST in haskell-src-exts, so there are differences to the unannotated AST provided by earlier versions of haskell-src-exts:
- some constructors carried
SrcLocinformation, which is no longer available, notably - most constructors of the
GadtDecldatatypes - the
Procconstructors of the
Exptype (and a few XML related ones) - the
- the second, fourth and fifth fields of the
Moduleconstructor have been combined into a single field of type
(this list is probably incomplete)
- haskell-src-exts-simple requires ghc-7.8 or later
- Note that with ghc-7.8, the constructors of the
Language.Haskell.Exts.Simple.Syntax.Literaltype are only available for pattern matching, because construction relies on explicitly bidirectional pattern synonyms for literals. For ghc-7.8 compatibility, you should use the
intLetc.) functions for constructing
- Support for record pattern synonyms was added in ghc-8.0. Therefore,
with ghc-7.10 and earlier, the constructor of the
Language.Haskell.Exts.Simple.Syntax.ImportDecltype is exported as a plain constructor, and the selectors as functions.
Revision history for haskell-src-exts-simple
220.127.116.11 -- 2016-11-20
- support haskell-src-exts 1.19.0
Language.Haskell.Exts.Simple.Syntax.ImportDeclas a record pattern synonym for ghc-8.0
18.104.22.168.1 -- 2016-08-05
package description should now look fine on hackage
22.214.171.124 -- 2016-08-02
ghc-7.8 compatibility (see COMPATIBILITY.md for caveats)
1.18.0 -- 2016-07-31
- Initial release.