|
Generics.MultiRec.FoldAlg | Portability | non-portable | Stability | experimental | Maintainer | generics@haskell.org |
|
|
|
|
|
Description |
A variant of fold that allows the specification of the algebra in a
convenient way.
|
|
Synopsis |
|
|
|
|
The type family of convenient algebras.
|
|
type family Alg f s r ix :: * | Source |
|
The type family we use to describe the convenient algebras.
|
|
|
type Algebra s r = forall ix. Ix s ix => s ix -> Alg (PF s) s r ix | Source |
|
The algebras passed to the fold have to work for all index types
in the system. The additional witness argument is required only
to make GHC's typechecker happy.
|
|
The class to turn convenient algebras into standard algebras.
|
|
|
The class fold explains how to convert a convenient algebra
Alg back into a function from functor to result, as required
by the standard fold function.
| | Methods | alg :: Ix s ix => Alg f s r ix -> f s r ix -> r ix | Source |
|
| | Instances | |
|
|
Interface
|
|
|
Variant of fold that takes an additional witness argument.
|
|
|
Fold with convenient algebras.
|
|
Construction of algebras
|
|
|
For constructing algebras that are made of nested pairs rather
than n-ary tuples, it is helpful to use this pairing combinator.
|
|
Produced by Haddock version 2.4.2 |