Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- cataM :: (Monad m, Traversable (Base t), Recursive t) => (Base t a -> m a) -> t -> m a
- anaM :: (Monad m, Traversable (Base t), Corecursive t) => (a -> m (Base t a)) -> a -> m t
- paraM :: (Monad m, Traversable (Base t), Recursive t) => (Base t (t, a) -> m a) -> t -> m a
- apoM :: (Monad m, Traversable (Base t), Corecursive t) => (a -> m (Base t (Either t a))) -> a -> m t
- histoM :: (Monad m, Traversable (Base t), Recursive t) => (Base t (Cofree (Base t) a) -> m a) -> t -> m a
- futuM :: (Monad m, Traversable (Base t), Corecursive t) => (a -> m (Base t (Free (Base t) a))) -> a -> m t
- histoM' :: (Monad m, Traversable (Base t), Recursive t) => (Base t (Cofree (Base t) a) -> m a) -> t -> m a
- futuM' :: (Monad m, Traversable (Base t), Corecursive t) => (a -> m (Base t (Free (Base t) a))) -> a -> m t
- zygoM :: (Monad m, Traversable (Base t), Recursive t) => (Base t a -> m a) -> (Base t (a, b) -> m b) -> t -> m b
- cozygoM :: (Monad m, Traversable (Base t), Corecursive t) => (a -> m (Base t a)) -> (b -> m (Base t (Either a b))) -> b -> m t
- hyloM :: (Monad m, Traversable t) => (t b -> m b) -> (a -> m (t a)) -> a -> m b
- metaM :: (Monad m, Traversable (Base t), Recursive s, Corecursive t, Base s ~ Base t) => (Base t t -> m t) -> (s -> m (Base s s)) -> s -> m t
- chronoM :: (Monad m, Traversable (Base t), Recursive t, Corecursive t) => (Base t (Cofree (Base t) c) -> m c) -> (a -> m (Base t (Free (Base t) a))) -> a -> m c
- cochronoM :: (Monad m, Corecursive c, Traversable (Base c), Traversable (Base t), Recursive t) => (Base t (Cofree (Base t) a) -> m a) -> (a -> m (Base c (Free (Base c) a))) -> t -> m c
- chronoM' :: (Monad m, Traversable t) => (t (Cofree t b) -> m b) -> (a -> m (t (Free t a))) -> a -> m b
Documentation
:: (Monad m, Traversable (Base t), Recursive t) | |
=> (Base t a -> m a) | algebra |
-> t | |
-> m a |
catamorphism
:: (Monad m, Traversable (Base t), Corecursive t) | |
=> (a -> m (Base t a)) | coalgebra |
-> a | |
-> m t |
anamorphism
:: (Monad m, Traversable (Base t), Recursive t) | |
=> (Base t (t, a) -> m a) | algebra |
-> t | |
-> m a |
paramorphism
:: (Monad m, Traversable (Base t), Corecursive t) | |
=> (a -> m (Base t (Either t a))) | coalgebra |
-> a | |
-> m t |
apomorphism
:: (Monad m, Traversable (Base t), Recursive t) | |
=> (Base t (Cofree (Base t) a) -> m a) | algebra |
-> t | |
-> m a |
histomorphism on anamorphism variant
:: (Monad m, Traversable (Base t), Corecursive t) | |
=> (a -> m (Base t (Free (Base t) a))) | coalgebra |
-> a | |
-> m t |
futumorphism on catamorphism variant
histoM' :: (Monad m, Traversable (Base t), Recursive t) => (Base t (Cofree (Base t) a) -> m a) -> t -> m a Source #
histomorphism on catamorphism variant
:: (Monad m, Traversable (Base t), Corecursive t) | |
=> (a -> m (Base t (Free (Base t) a))) | coalgebra |
-> a | |
-> m t |
futumorphism on anamorphism variant
:: (Monad m, Traversable (Base t), Recursive t) | |
=> (Base t a -> m a) | algebra for fst |
-> (Base t (a, b) -> m b) | algebra for snd from product |
-> t | |
-> m b |
zygomorphism
:: (Monad m, Traversable (Base t), Corecursive t) | |
=> (a -> m (Base t a)) | coalgebra for fst |
-> (b -> m (Base t (Either a b))) | coalgebra for snd to coproduct |
-> b | |
-> m t |
cozygomorphism
:: (Monad m, Traversable t) | |
=> (t b -> m b) | algebra |
-> (a -> m (t a)) | coalgebra |
-> a | |
-> m b |
hylomorphism on recursive variant
metaM :: (Monad m, Traversable (Base t), Recursive s, Corecursive t, Base s ~ Base t) => (Base t t -> m t) -> (s -> m (Base s s)) -> s -> m t Source #
metamorphism on recursive variant
chronoM :: (Monad m, Traversable (Base t), Recursive t, Corecursive t) => (Base t (Cofree (Base t) c) -> m c) -> (a -> m (Base t (Free (Base t) a))) -> a -> m c Source #
chronomorphism on combination variant of futu to hist chronoM' :: (Monad m, Traversable (Base t), Recursive t, Corecursive t) => (Base t (Cofree (Base t) c) -> m c) -- ^ algebra -> (a -> m (Base t (Free (Base t) a))) -- ^ coalgebra -> a -> m c
:: (Monad m, Corecursive c, Traversable (Base c), Traversable (Base t), Recursive t) | |
=> (Base t (Cofree (Base t) a) -> m a) | algebra |
-> (a -> m (Base c (Free (Base c) a))) | coalgebra |
-> t | |
-> m c |