haskell-src-exts-simple
A simplified view on the haskell-src-exts AST
https://github.com/int-e/haskell-src-exts-simple
LTS Haskell 23.27: | 1.23.1.0 |
Stackage Nightly 2025-07-12: | 1.23.1.0 |
Latest on Hackage: | 1.23.1.0 |
haskell-src-exts-simple-1.23.1.0@sha256:807b906156a1a2b452587ac85e0529064af5481f9f5ea6ef4497231027d2b6cf,1524
Module documentation for 1.23.1.0
haskell-src-exts-simple
Synopsis
This package provides a shim for haskell-src-exts, exposing the sameAST but without annotations, using ghc’s pattern synonyms.
This package is useful for synthesizing and manipulating HSE ASTsthat don’t carry source location information. It may also aidin porting packages from haskell-src-exts 1.17 to 1.18, but itisnot a drop-in replacement for the old annotation-free AST.See the Compatibility section for details.
Versioning
To be able to track the haskell-src-exts version numbers conveniently,the firstthree components of the version will be treated as themajor version, followed by the minor version as usual. This deviatesfrom the PVP.
Compatibility
Since version 1.18, haskell-src-exts-simple has followed the changes inhaskell-src-exts, without any attempt to keep backward compatibility.
Comparison to haskell-src-exts 1.17 (as of version 1.18):
haskell-src-exts-simple provides a simplified view of the annotatedAST in haskell-src-exts, so there are differences to the unannotatedAST provided by earlier versions of haskell-src-exts:
- some constructors carried
SrcLoc
information, which is no longeravailable, notably- most constructors of the
Decl
,ModulePragma
,ImportDecl
,IPBind
,ClassDecl
,InstDecl
,QualConDecl
,GadtDecl
datatypes - the
Lambda
,ExpTypeSig
andProc
constructors of theExp
type (and a few XML related ones) - the
Generator
constructor ofStmt
- the
Alt
constructor ofAlt
- the
PatTypeSig
constructor ofPat
- most constructors of the
- the second, fourth and fifth fields of the
Module
constructor havebeen combined into a single field of typeModuleHead
(this list is probably incomplete)
ghc compatibility
- haskell-src-exts-simple requires ghc-8.0 or later
Changes
Revision history for haskell-src-exts-simple
1.23.1.0 - 2024-12-27
- add COMPLETE pragmas (courtesy of @ratherforky)
1.23.0.0 — 2020-03-13
- support haskell-src-exts 1.23.0
1.22.0.0 — 2019-11-05
- support haskell-src-exts 1.22.0
- clean up mentions of ghc < 8
1.21.1.0 — 2019-09-13
- support haskell-src-exts 1.21.1
- require base >= 4.9 (and, consequently, ghc >= 8)
1.21.0.0 — 2019-04-27
- support haskell-src-exts 1.21.0
1.20.0.0 — 2017-12-26
- support haskell-src-exts 1.20.0
1.19.0.0 — 2016-11-20
- support haskell-src-exts 1.19.0
- implement
Language.Haskell.Exts.Simple.Syntax.ImportDecl
as a record pattern synonym for ghc-8.0
1.18.0.1.1 — 2016-08-05
- package description should now look fine on hackage
1.18.0.1 — 2016-08-02
- ghc-7.8 compatibility (see COMPATIBILITY.md for caveats)
1.18.0 — 2016-07-31
- Initial release.