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 #
(Case (c r) ((:) Type x ([] Type)), (~) * r (CaseResult * Type (c r) x)) => Reduce (Which ((:) Type x ([] Type))) (Switcher * c r ((:) Type x ([] Type))) Source # | Terminating case of the loop, ensuring that a instance of |
(Case (c r) ((:) Type x ((:) Type x' xs)), Reduce (Which ((:) Type x' xs)) (Switcher * c r ((:) Type x' xs)), Reiterate (c r) ((:) Type x ((:) Type x' xs)), (~) * r (CaseResult * Type (c r) x)) => Reduce (Which ((:) Type x ((:) Type x' xs))) (Switcher * c r ((:) Type x ((:) Type x' xs))) Source # |
|
Reduce (Which ([] Type)) (Switcher k c r ([] Type)) Source # | Allow 'Which '[]' to be |
(Case (c r n) ((:) Type x ([] Type)), (~) * r (CaseResult * Type (c r n) x)) => Reduce (Which ((:) Type x ([] Type))) (SwitcherN * c r n ((:) Type x ([] Type))) Source # | Terminating case of the loop, ensuring that a instance of |
(Case (c r n) ((:) Type x ((:) Type x' xs)), Reduce (Which ((:) Type x' xs)) (SwitcherN * c r ((+) n 1) ((:) Type x' xs)), ReiterateN (c r) n ((:) Type x ((:) Type x' xs)), (~) * r (CaseResult * Type (c r n) x)) => Reduce (Which ((:) Type x ((:) Type x' xs))) (SwitcherN * c r n ((:) Type x ((:) Type x' xs))) Source # |
|