@hackage syntax-trees0.1.2
Convert between different Haskell syntax trees.
Categories
License
BSD-3-Clause
Maintainer
dom.orchard@gmail.com
Links
- Documentation
- No source repository
- Security
Versions
Installation
Dependencies (6)
- base >=3 && <5
- haskell-src-exts >=1.2
- hint
- mtl
- template-haskell
- uniplate Show all…
Dependents (2)
@hackage/acme-everything, @hackage/DSH
Provides an instance that translates haskell-src-exts expression trees into Template Haskell expression trees in a way that depends only on the haskell-src-exts syntax tree and agreement on the pretty-printed representation of Haskell between haskell-src-exts pretty-printer and Template Haskell quotations (as opposed to depending on both TH and haskell-src-exts syntax tree representations).
Instead of converting between data types, haskell-src-exts syntax trees are pretty-printed and wrapped in a TH quotation which is then interpreted as a Haskell program, yielding a TH Exp tree. Free variables in the haskell-src-exts tree are preserved by lifting them to TH splices prior to pretty-printing.