Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- class Case c xs where
Documentation
class Case c xs where Source #
This class allows defining handlers that can handle the Head
type in the xs
typelist.
In conjunction with Reiterate
, you can define handlers that can handle all
the types in the xs
typelist.
See Data.Diverse.CaseFunc and Data.Diverse.Cases.
case' :: c xs -> Head xs -> CaseResult c (Head xs) Source #
Return the handler/continuation when x is observed.
k x => Case (CaseFunc' k) ((:) Type x xs) Source # | |
UniqueMember * (Head * xs -> r) fs => Case (Cases fs r) xs Source # | UndecidableInstances because |
k x => Case (CaseFunc k r) ((:) Type x xs) Source # | |
MemberAt * n (Head * xs -> r) fs => Case (CasesN fs r n) xs Source # | UndecidableInstances because |