profunctors-5.2: Profunctors

Safe HaskellNone
LanguageHaskell2010

Data.Profunctor.Traversing

Contents

Synopsis

Documentation

class (Choice p, Strong p) => Traversing p where

Note: Definitions in terms of wander are much more efficient!

Minimal complete definition

wander | traverse'

Methods

traverse' :: Traversable f => p a b -> p (f a) (f b)

wander :: (forall f. Applicative f => (a -> f b) -> s -> f t) -> p a b -> p s t

data FreeTraversing p a b where

FreeTraversing -| CofreeTraversing

Constructors

FreeTraversing :: Traversable f => (f y -> b) -> p x y -> (a -> f x) -> FreeTraversing p a b 

Strong in terms of Traversing

firstTraversing :: Traversing p => p a b -> p (a, c) (b, c)

secondTraversing :: Traversing p => p a b -> p (c, a) (c, b)

Choice in terms of Traversing

leftTraversing :: Traversing p => p a b -> p (Either a c) (Either b c)

rightTraversing :: Traversing p => p a b -> p (Either c a) (Either c b)