| Copyright | (c) 2011 Edwin Westbrook Nicolas Frisby and Paul Brauner |
|---|---|
| License | BSD3 |
| Maintainer | emw4@rice.edu |
| Stability | experimental |
| Portability | GHC |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Binding.Hobbits.QQ
Description
Defines a quasi-quoter for writing patterns that match the bodies of Mb
multi-bindings. Uses the haskell-src-exts parser. [nuP| P ] defines a
pattern that will match a multi-binding whose body matches P. Any
variables matched by P will remain inside the binding; thus, for example,
in the pattern [nuP| x |], x matches the entire multi-binding.
Examples:
case (nu Left) of [nuP| Left x |] -> x == nu id
[clP| P |] does the same for the Closed type, and [clNuP| P |] works
for both simultaneously: .Closed (Mb ctx a)
Synopsis
- nuP :: QuasiQuoter
- clP :: QuasiQuoter
- clNuP :: QuasiQuoter