| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Data.Diverse.Reduce
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 #
Minimal complete definition
Instances
| Case c ((:) Type x ([] Type)) r => Reduce (Which ((:) Type x ([] Type))) (Switcher c ((:) Type x ([] Type)) r) Source # | Terminating case of the loop, ensuring that a instance of |
| (Case c ((:) Type x ((:) Type x' xs)) r, Reduce (Which ((:) Type x' xs)) (Switcher c ((:) Type x' xs) r), Reiterate * c ((:) Type x ((:) Type x' xs))) => Reduce (Which ((:) Type x ((:) Type x' xs))) (Switcher c ((:) Type x ((:) Type x' xs)) r) Source # |
|
| Case (c n) ((:) Type x ([] Type)) r => Reduce (Which ((:) Type x ([] Type))) (SwitcherN c n ((:) Type x ([] Type)) r) Source # | Terminating case of the loop, ensuring that a instance of |
| (Case (c n) ((:) Type x ((:) Type x' xs)) r, Reduce (Which ((:) Type x' xs)) (SwitcherN c ((+) n 1) ((:) Type x' xs) r), ReiterateN * c n ((:) Type x ((:) Type x' xs))) => Reduce (Which ((:) Type x ((:) Type x' xs))) (SwitcherN c n ((:) Type x ((:) Type x' xs)) r) Source # |
|