packages feed

haskell-src-exts-qq-0.6.0: haskell-src-exts-qq.cabal

Name:           haskell-src-exts-qq
Version:        0.6.0
Author:         Mathieu Boespflug
Maintainer:     Mathieu Boespflug <mboes@tweag.net>
Synopsis:       A quasiquoter for haskell-src-exts.
Description:
    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.
Category:       Language
License:        BSD3
License-File:   LICENSE
Cabal-Version:  >= 1.10.0
Build-Type:     Simple
Tested-With:    GHC == 7.0.1

source-repository head
  type:     git
  location: git://github.com/mboes/haskell-src-exts-qq

library
  Build-Depends:  base >= 4 && < 5, syb, template-haskell,
                  haskell-src-exts >= 1.9.0,
                  haskell-src-meta >= 0.3
  Default-Language:     Haskell2010
  Default-Extensions:   TemplateHaskell, CPP
  Exposed-Modules:      Language.Haskell.Exts.QQ