úÎDþ@q1      !"#$%&'()*+,-./0portable experimental#Reiner Pope <reiner.pope@gmail.com>#Concatenation of lists. Instances: $ type instance Nil :++: xs = xs 2 type instance (h:*:t) :++: xs = h :*: (t :++: xs)(:*:) corresponds to cons. The type of empty lists portable experimental#Reiner Pope <reiner.pope@gmail.com>123456789:;<=>?@The API presented by !Data.Pattern.Base.Difference.GADT and  #Data.Pattern.Base.Difference.Coerce. An instance of @ is a = type which converts an inductively-defined type to one with  an efficient append operation. Aconstructs the empty d t. B appends two d ts. Cgiven a "cons"% operation, constructs the singleton d t. Dgiven a "nil" value, "runs" the d t. EFG>@ABCD>@ABCDABCDportable experimental#Reiner Pope <reiner.pope@gmail.com> Tuples with types given by xs. HIJKCurried functions. We have EFun (x1 :*: x2 :*: ... :*: xn :*: Nil) r ~ x1 -> x2 -> ... -> xn -> rThe empty tuple The singleton tuple Concatenation of tuples. +Runs a tuple by applying it to a function.    portable experimental#Reiner Pope <reiner.pope@gmail.com> 8Pattern-match clauses. Typically something of the form  pattern  function Clauses can be constructed with () , run with , and  manipulated by the L and M instances. In  particular, () of the N class is the way to list  multiple cases in a pattern. OP The pattern type. A Pattern vars a is a pattern which matches  against a8s and binds variables with types given by the type-list  vars. :Although this is the basic type used by patterns, many of $ pattern combinators (for instance, Data.Pattern.Base.Common.left) 2 have types better expressed by the type synonyms , ,  , etc,  $, so that nesting of patterns (e.g.  left (tup2  var var)+) can be written as function application. Most "normal"3 pattern matchers (in fact, all of the matchers in  Data.Pattern.Common except var and (/)) can be conveniently  defined using mk0, mk1, etc, mk5.  Constructs a  . "Runs" a  .  #match a c = fromJust (tryMatch a c)    portable experimental#Reiner Pope <reiner.pope@gmail.com>"Variable patterns"6: always succeeds, and binds the value to a variable. "Wildcard patterns"9: always succeeds. (This is written as two underscores.) " And patterns"*. Succeeds only if both patterns succeed. (/\) = ' (a -> (a,a))" Or patterns"1. If first pattern fails, then tries the second.  Matches the Q of an R.  Matches the S of an R. " View patterns": do some computation, # then pattern match on the result. "Partial view patterns". Synonym for &.   elim = flip /Useful for anonymous matching (or for building  eliminators, like T). For example: #either withLeft withRight = elim $ % left var ->> withLeft  <|> right var ->> withRight  mmatch m p = m >>=  p?Useful for applicative-looking monadic pattern matching, as in  ex7 :: IO () ex7 = mmatch getLine $  cst "" ->> return ()  <|> var ->> putStrLn . (" You said " ++)!"Predicate pattern". % but with U instead of V ().  Succeeds if function yields W, fails otherwise. Can be used with ()* for some uses similar to pattern guards:  match a $  left (var /\ is even) ->> id ( ||| left __ ->> const 0 ' ||| right __ ->> const 1""Constant patterns",: tests for equality to the given constant.  cst x = is (==x) #$X"Failure pattern": never succeeds. %&'()*+"0-tuple pattern". A strict match on the (). ,"1-tuple pattern". Rather useless. -"2-tuple pattern" ."3-tuple pattern" /"4-tuple pattern" 0"5-tuple pattern"  !"#$%&'()*+,-./0!" %&'()*+,-./0#$ !"#$%&'()*+,-./0portable experimental#Reiner Pope <reiner.pope@gmail.com>1  !"#$%&'()*+,-./0Y      !"#$%&'()*+,-./01234567899::;<=>?@AABCCDEFGHIJK LLMNOPQRSTUTVTWTXYZ[\]YZ^_`first-class-patterns-0.2.0 Data.PatternData.Pattern.Base.TypeListData.Pattern.Base.TupleData.Pattern.BaseData.Pattern.CommonData.Pattern.Base.DifferencebaseControl.Applicative<|>:++::*:NilTupleFunzeroone<>runTupleClausePat5Pat4Pat3Pat2Pat1Pat0Pattern runPattern->>tryMatchmatchvar__/\\/leftrightviewtryViewelimmmatchiscstnilconsmk0mk1mk2mk3mk4mk5tup0tup1tup2tup3tup4tup5CoerceDListD:==:EqualListclosureassoc rightIdentGadtDProxyD DifferencezeroDplusDmkOneDevalDproxyassoc2 rightIdent2Tuple' runTuple'GHC.BaseMonad Control.Monad MonadPlus Alternative runClause Data.EitherLeftEitherRighteitherghc-primGHC.BoolBool Data.MaybeMaybeTruefail