| Portability | GHC |
|---|---|
| Stability | experimental |
| Maintainer | emw4@rice.edu |
| Safe Haskell | None |
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).