Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
An incomplete implementation of an extension of the Functor
and
Traversable
concepts to three type arguments. I've implemented
enough for our purposes here.
- class Trifunctor f where
- trimap :: (a -> a') -> (b -> b') -> (c -> c') -> f a b c -> f a' b' c'
- class Tritraversable t where
- trisequence :: Monad m => t (m a) (m b) (m c) -> m (t a b c)
Documentation
class Trifunctor f where Source
Extends the Functor
concept to three type arguments. (Note: we
are missing analogies to the functions first
and second
found
in Data.Bifunctor.)
class Tritraversable t where Source
Extends the Traversable
concept to three type arguments.
(Note: we are missing analogies to the functions bitraverse
,
bisequenceA
and bimapM
found in Data.Bitraversable.)
trisequence :: Monad m => t (m a) (m b) (m c) -> m (t a b c) Source
Sequences all the actions in the structure, building a new structure with the same shape using the results of the actions.