haskell-src-exts-qq: A quasiquoter for haskell-src-exts.
Allows one to write programs that generate Haskell programs much more concisely and legibly. This package supports:
Antiquotations, denoted by stealing the splice syntax of Template Haskell, for example
[hs| $x ++ $(Hs.strE "bar") |]
. Splices may not nested.Antiquoting pattern variables in patterns, using double parentheses. For instance:
let x = Hs.name "n" in [hs| \ ((x)) -> $(Hs.Var (Hs.UnQual x)) + 1 |]
Antiquoting bound names. Names that are antiquoted appear surrounded by double underscores. For instance:
let f = "incr" fE = Hs.Var $ Hs.UnQual $ Hs.name f in [hs| let __f__ x = x + 1 in $fE 10 |]
We need three different syntaxes for antiquotations, because we do not extend the haskell-src-exts parser in any way and the Template Haskell splicing syntax is only available in expression contexts.
Downloads
- haskell-src-exts-qq-0.6.1.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
Versions [RSS] | 0.1, 0.2, 0.2.1, 0.2.2, 0.2.3, 0.3.0, 0.4.0, 0.5.0, 0.6.0, 0.6.1, 0.7 |
---|---|
Dependencies | base (>=4 && <5), haskell-src-exts (>=1.9.0), haskell-src-meta (>=0.3), syb, template-haskell [details] |
Tested with | ghc ==7.0.1 |
License | BSD-3-Clause |
Author | Mathieu Boespflug |
Maintainer | Mathieu Boespflug <mboes@tweag.net> |
Category | Language |
Source repo | head: git clone git://github.com/mboes/haskell-src-exts-qq |
Uploaded | by MathieuBoespflug at 2012-08-23T17:06:38Z |
Distributions | |
Reverse Dependencies | 3 direct, 3661 indirect [details] |
Downloads | 8889 total (6 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs uploaded by user Build status unknown [no reports yet] |