haskell-src-exts: Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer

[ bsd3, language, library ] [ Propose Tags ]

Haskell-Source with Extensions (HSE, haskell-src-exts) is an extension of the standard haskell-src package, and handles most registered syntactic extensions to Haskell, including:

  • Multi-parameter type classes with functional dependencies

  • Indexed type families (including associated types)

  • Empty data declarations

  • GADTs

  • Implicit parameters

  • Template Haskell

and a few more. All extensions implemented in GHC are supported. Apart from these standard extensions, it also handles regular patterns as per the HaRP extension as well as HSX-style embedded XML syntax.


[Skip to Readme]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Versions [RSS] 0.2.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.7, 0.3.9, 0.3.10, 0.3.11, 0.3.12, 0.4.1, 0.4.2, 0.4.3, 0.4.3.1, 0.4.4, 0.4.4.1, 0.4.5, 0.4.6, 0.4.8, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.5.6, 0.5.7, 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.1.3, 1.1.3.1, 1.1.4, 1.2.0, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.0, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.6.0, 1.6.1, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.3, 1.9.4, 1.9.5, 1.9.6, 1.10.0, 1.10.1, 1.10.2, 1.11.1, 1.12.0, 1.13.0, 1.13.1, 1.13.2, 1.13.3, 1.13.4, 1.13.5, 1.14.0, 1.14.0.1, 1.15.0, 1.15.0.1, 1.16.0, 1.16.0.1, 1.17.0, 1.17.1, 1.18.0, 1.18.1, 1.18.2, 1.19.0, 1.19.1, 1.20.0, 1.20.1, 1.20.2, 1.20.3, 1.21.0, 1.21.1, 1.22.0, 1.23.0, 1.23.1
Change log CHANGELOG
Dependencies array (>=0.1), base (>=4.5 && <4.11), cpphs (>=1.3), ghc-prim, pretty (>=1.0) [details]
License BSD-3-Clause
Author Niklas Broberg
Maintainer Niklas Broberg <niklas.broberg@chalmers.se>, Roman Cheplyaka <roma@ro-che.info>
Revised Revision 1 made by GeorgeWilson at 2018-06-20T03:01:41Z
Category Language
Home page https://github.com/haskell-suite/haskell-src-exts
Source repo head: git clone https://github.com/haskell-suite/haskell-src-exts.git
Uploaded by RomanCheplyaka at 2014-10-31T18:08:20Z
Distributions Arch:1.23.1, Debian:1.23.1, Fedora:1.23.1, FreeBSD:1.16.0.1, LTSHaskell:1.23.1, NixOS:1.23.1, Stackage:1.23.1
Reverse Dependencies 158 direct, 4088 indirect [details]
Downloads 287171 total (436 in the last 30 days)
Rating 2.5 (votes: 5) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for haskell-src-exts-1.16.0.1

[back to package description]

Haskell Source Extensions

haskell-src-exts is a package for handling and manipulating Haskell source code. It is a descendant of the haskell-src package that is part of the standard libraries, but extends this to support a number of syntactic extensions, e.g. MPTCs, fundeps, GADTs, TH etc. The aim is to support all extensions recognized by the community, as determined by what is implemented in compilers and tools.

Apart from the more standard extensions supported by e.g. GHC, haskell-src-exts provides support for HaRP (Haskell Regular Patterns) and HSX (Haskell Source with XML) syntax.

Package structure

The modules that comprise haskell-src-exts all reside in the hierarchic namespace Language.Haskell.Exts, or its more feature-rich sibling Language.Haskell.Exts.Annotated. Notable exposed modules include:

  • Language.Haskell.Exts[.Annotated] - Imports and re-exports all the below, and also defines some functions that combine functionality from several modules.
  • Language.Haskell.Exts[.Annotated].Syntax - The abstract syntax tree that the other modules work on.
  • Language.Haskell.Exts[.Annotated].Build - Combinators for building abstract syntax.
  • Language.Haskell.Exts[.Annotated].Parser - Functions for parsing Haskell source code into an abstract syntax representation.

Non-comprehensive list of supported extensions

  • Multi-parameter type classes (MPTCs)
  • Functional dependencies
  • Associated types, type families
  • Liberal class and instance heads
  • Implicit parameters (ghc and hugs)
  • Explicit kind signatures
  • Pattern guards
  • Generalized algebraic data types (GADTs)
  • Template Haskell (TH)
  • Universal and existential quantification (forall)
  • Empty data type declarations
  • Unboxed tuples (# #)
  • Standalone deriving
  • Regular patterns
  • Haskell XML, HSX style
  • Pragmas

License

The haskell-src-exts Package is distributed under a derived BSD-style license. It derives from several sources, all of which are distributable under BSD-style or compatible licenses. See the file LICENSE for the complete license text.