Portability | GHC |
---|---|
Stability | experimental |
Maintainer | emw4@rice.edu |
Defines a quasi-quoter for writing patterns that match the bodies
of Mb
multi-bindings. Uses the
Data.Binding.Hobbits.PatternParser module, and thus only supports
the pattern forms listed there. If P
is a (supported) Haskell
pattern, then [nuQQ| P ]
defines a pattern that will match an
multi-binding whose body matches P
. Any variables matched by P
will remain inside the binding; thus, for example, in the pattern
[nuQQ| x |]
, x
matches the entire multi-binding.
Examples:
case (nu Left) of [nuQQ| Left x |] -> x == nu id