The th-desugar package

[ Tags: bsd3, library, template-haskell ] [ Propose Tags ]

This package provides the Language.Haskell.TH.Desugar module, which desugars Template Haskell's rich encoding of Haskell syntax into a simpler encoding. This desugaring discards surface syntax information (such as the use of infix operators) but retains the original meaning of the TH code. The intended use of this package is as a preprocessor for more advanced code manipulation tools. Note that the input to any of the ds... functions should be produced from a TH quote, using the syntax [| ... |]. If the input to these functions is a hand-coded TH syntax tree, the results may be unpredictable. In particular, it is likely that promoted datatypes will not work as expected.


[Skip to Readme]

Properties

Versions 1.0.0, 1.1.0, 1.1.1, 1.2.0, 1.2.1, 1.3.0, 1.3.1, 1.4.0, 1.4.1, 1.4.2, 1.4.2.1, 1.5, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.4.1, 1.5.5, 1.6, 1.7
Change log CHANGES.md
Dependencies base (==4.*), containers (>=0.5), mtl (>=2.1), syb (>=0.4), template-haskell, th-expand-syns (>=0.3.0.6), th-lift (>=0.6.1), th-orphans (>=0.9.1) [details]
License BSD3
Author Richard Eisenberg <rae@cs.brynmawr.edu>
Maintainer Richard Eisenberg <rae@cs.brynmawr.edu>, Ryan Scott <ryan.gl.scott@gmail.com>
Category Template Haskell
Home page https://github.com/goldfirere/th-desugar
Bug tracker https://github.com/goldfirere/th-desugar/issues
Source repository this: git clone https://github.com/goldfirere/th-desugar.git(tag v1.7)
Uploaded Thu Jun 1 17:21:30 UTC 2017 by RichardEisenberg
Distributions LTSHaskell:1.6, NixOS:1.7, Stackage:1.7, Tumbleweed:1.6
Downloads 10751 total (1751 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-06-01 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for th-desugar-1.7

[back to package description]

th-desugar Package

Build Status

This package provides the Language.Haskell.TH.Desugar module, which desugars Template Haskell's rich encoding of Haskell syntax into a simpler encoding. This desugaring discards surface syntax information (such as the use of infix operators) but retains the original meaning of the TH code. The intended use of this package is as a preprocessor for more advanced code manipulation tools. Note that the input to any of the ds... functions should be produced from a TH quote, using the syntax [| ... |]. If the input to these functions is a hand-coded TH syntax tree, the results may be unpredictable. In particular, it is likely that promoted datatypes will not work as expected.

One explicit goal of this package is to reduce the burden of supporting multiple GHC / TH versions. Thus, the desugared language is the same across all GHC versions, and any inconsistencies are handled internally.

The package was designed for use with the singletons package, so some design decisions are based on that use case, when more than one design choice was possible.

I will try to keep this package up-to-date with respect to changes in GHC.