Stability | experimental |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
Documentation
class CollectionPattern m t where Source #
Class for collection pattern constructors.
nil :: Pattern () m t () Source #
Pattern that matches with empty collections.
[]
is desugared into nil
by the quasi-quoter.
cons :: Pattern (PP, PP) m t (ElemT t, t) Source #
Pattern that destructs collections into its head and tail.
:
is desugared into cons
by the quasi-quoter.
consM :: m -> t -> (ElemM m, m) Source #
join :: Pattern (PP, PP) m t (t, t) Source #
Pattern that destructs collections into its initial prefix and remaining suffix.
++
is desugared into join
by the quasi-quoter.
Instances
Matcher m t => CollectionPattern (Set m) [t] Source # | |
Defined in Control.Egison.Matcher.Collection | |
Matcher m t => CollectionPattern (Multiset m) [t] Source # | |
Defined in Control.Egison.Matcher.Collection nil :: Pattern () (Multiset m) [t] () Source # nilM :: Multiset m -> [t] -> () Source # cons :: Pattern (PP, PP) (Multiset m) [t] (ElemT [t], [t]) Source # consM :: Multiset m -> [t] -> (ElemM (Multiset m), Multiset m) Source # join :: Pattern (PP, PP) (Multiset m) [t] ([t], [t]) Source # joinM :: Multiset m -> [t] -> (Multiset m, Multiset m) Source # | |
Matcher m t => CollectionPattern (List m) [t] Source # | |
Defined in Control.Egison.Matcher.Collection |
List
matcher is a matcher for collections that matches as if they're normal lists.
List m |
Instances
(Eq a, Matcher m a, ValuePattern m a) => ValuePattern (List m) [a] Source # | |
Matcher m t => CollectionPattern (List m) [t] Source # | |
Defined in Control.Egison.Matcher.Collection | |
Matcher m t => Matcher (List m :: Type) ([t] :: Type) Source # | |
Defined in Control.Egison.Matcher.Collection | |
type ElemM (List m) Source # | |
Defined in Control.Egison.Matcher.Collection |
Multiset m |
Instances
(Eq a, Matcher m a, ValuePattern m a) => ValuePattern (Multiset m) [a] Source # | |
Matcher m t => CollectionPattern (Multiset m) [t] Source # | |
Defined in Control.Egison.Matcher.Collection nil :: Pattern () (Multiset m) [t] () Source # nilM :: Multiset m -> [t] -> () Source # cons :: Pattern (PP, PP) (Multiset m) [t] (ElemT [t], [t]) Source # consM :: Multiset m -> [t] -> (ElemM (Multiset m), Multiset m) Source # join :: Pattern (PP, PP) (Multiset m) [t] ([t], [t]) Source # joinM :: Multiset m -> [t] -> (Multiset m, Multiset m) Source # | |
Matcher m t => Matcher (Multiset m :: Type) ([t] :: Type) Source # | |
Defined in Control.Egison.Matcher.Collection | |
type ElemM (Multiset m) Source # | |
Defined in Control.Egison.Matcher.Collection |
Set m |
Instances
(Eq a, Matcher m a, ValuePattern m a) => ValuePattern (Set m) [a] Source # | |
Matcher m t => CollectionPattern (Set m) [t] Source # | |
Defined in Control.Egison.Matcher.Collection | |
Matcher m t => Matcher (Set m :: Type) ([t] :: Type) Source # | |
Defined in Control.Egison.Matcher.Collection | |
type ElemM (Set m) Source # | |
Defined in Control.Egison.Matcher.Collection |