| Copyright | (c) 2011 Edwin Westbrook, Nicolas Frisby, and Paul Brauner |
|---|---|
| License | BSD3 |
| Maintainer | emw4@rice.edu |
| Stability | experimental |
| Portability | GHC |
| Safe Haskell | None |
| Language | Haskell98 |
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 Cl type, and [clNuP| P |] works for both simultaneously: Cl (Mb ctx a).
- nuP :: QuasiQuoter
- clP :: QuasiQuoter
- clNuP :: QuasiQuoter
Documentation
nuP :: QuasiQuoter Source
Quasi-quoter for patterns that match over Mb
clP :: QuasiQuoter Source
Quasi-quoter for patterns that match over Cl, built using clKit