origami-0.0.2: An un-SYB framework for transforming heterogenous data through folds

Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Origami.Internal.Trifunctor

Description

An incomplete implementation of an extension of the Functor and Traversable concepts to three type arguments. I've implemented enough for our purposes here.

Synopsis

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.)

Methods

trimap :: (a -> a') -> (b -> b') -> (c -> c') -> f a b c -> f a' b' c' Source

Maps over all three arguments simultaneously

Instances

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.)

Methods

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.

Instances