Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Documentation
type family Reduced handler Source #
Convert something v
into r
using handlers.
This class is required in order to step through all the different types in a variant.
class Reduce v handler where Source #
Instances
Reduce Void (Switcher c r ([] :: [Type])) Source # | Allow |
(Case (c r) (x ': ([] :: [Type])), r ~ CaseResult (c r) x) => Reduce (Which (x ': ([] :: [Type]))) (Switcher c r (x ': ([] :: [Type]))) Source # | Terminating case of the loop, ensuring that a instance of |
(Case (c r) (x ': (x' ': xs)), Reduce (Which (x' ': xs)) (Switcher c r (x' ': xs)), Reiterate (c r) (x ': (x' ': xs)), r ~ CaseResult (c r) x) => Reduce (Which (x ': (x' ': xs))) (Switcher c r (x ': (x' ': xs))) Source # |
|
Reduce (Which (Void ': ([] :: [Type]))) (Switcher c r ([] :: [Type])) Source # | Allow 'Which '[Void]' to be |
Reduce (Which ([] :: [Type])) (Switcher c r ([] :: [Type])) Source # | Allow 'Which '[]' to be |
(Case (c r n) (x ': ([] :: [Type])), r ~ CaseResult (c r n) x) => Reduce (Which (x ': ([] :: [Type]))) (SwitcherN c r n (x ': ([] :: [Type]))) Source # | Terminating case of the loop, ensuring that a instance of |
(Case (c r n) (x ': (x' ': xs)), Reduce (Which (x' ': xs)) (SwitcherN c r (n + 1) (x' ': xs)), ReiterateN (c r) n (x ': (x' ': xs)), r ~ CaseResult (c r n) x) => Reduce (Which (x ': (x' ': xs))) (SwitcherN c r n (x ': (x' ': xs))) Source # |
|