profunctors-5.6.2: Profunctors
Safe Haskell Safe
Language Haskell2010

Data.Profunctor.Traversing

Synopsis

Documentation

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

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) Source #

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

This combinator is mutually defined in terms of traverse'

Instances

Instances details
Monad m => Traversing ( Kleisli m) Source #
Instance details

Defined in Data.Profunctor.Traversing

Methods

traverse' :: Traversable f => Kleisli m a b -> Kleisli m (f a) (f b) Source #

wander :: ( forall (f :: Type -> Type ). Applicative f => (a -> f b) -> s -> f t) -> Kleisli m a b -> Kleisli m s t Source #

Traversing ( FreeTraversing p) Source #
Instance details

Defined in Data.Profunctor.Traversing

Methods

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

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

Profunctor p => Traversing ( CofreeTraversing p) Source #
Instance details

Defined in Data.Profunctor.Traversing

Traversing ( FreeMapping p) Source #
Instance details

Defined in Data.Profunctor.Mapping

Methods

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

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

Profunctor p => Traversing ( CofreeMapping p) Source #
Instance details

Defined in Data.Profunctor.Mapping

Methods

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

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

Traversing p => Traversing ( Coyoneda p) Source #
Instance details

Defined in Data.Profunctor.Yoneda

Methods

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

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

Traversing p => Traversing ( Yoneda p) Source #
Instance details

Defined in Data.Profunctor.Yoneda

Methods

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

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

Traversing ((->) :: Type -> Type -> Type ) Source #
Instance details

Defined in Data.Profunctor.Traversing

Methods

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

wander :: ( forall (f :: Type -> Type ). Applicative f => (a -> f b) -> s -> f t) -> (a -> b) -> s -> t Source #

Monoid m => Traversing ( Forget m :: Type -> Type -> Type ) Source #
Instance details

Defined in Data.Profunctor.Traversing

Methods

traverse' :: Traversable f => Forget m a b -> Forget m (f a) (f b) Source #

wander :: ( forall (f :: Type -> Type ). Applicative f => (a -> f b) -> s -> f t) -> Forget m a b -> Forget m s t Source #

Applicative m => Traversing ( Star m) Source #
Instance details

Defined in Data.Profunctor.Traversing

Methods

traverse' :: Traversable f => Star m a b -> Star m (f a) (f b) Source #

wander :: ( forall (f :: Type -> Type ). Applicative f => (a -> f b) -> s -> f t) -> Star m a b -> Star m s t Source #

( Functor f, Traversing p) => Traversing ( Tannen f p) Source #
Instance details

Defined in Data.Profunctor.Traversing

Methods

traverse' :: Traversable f0 => Tannen f p a b -> Tannen f p (f0 a) (f0 b) Source #

wander :: ( forall (f0 :: Type -> Type ). Applicative f0 => (a -> f0 b) -> s -> f0 t) -> Tannen f p a b -> Tannen f p s t Source #

( Traversing p, Traversing q) => Traversing ( Procompose p q) Source #
Instance details

Defined in Data.Profunctor.Composition

Methods

traverse' :: Traversable f => Procompose p q a b -> Procompose p q (f a) (f b) Source #

wander :: ( forall (f :: Type -> Type ). Applicative f => (a -> f b) -> s -> f t) -> Procompose p q a b -> Procompose p q s t Source #

( Functor f, Traversing p) => Traversing ( Cayley f p) Source #
Instance details

Defined in Data.Profunctor.Cayley

Methods

traverse' :: Traversable f0 => Cayley f p a b -> Cayley f p (f0 a) (f0 b) Source #

wander :: ( forall (f0 :: Type -> Type ). Applicative f0 => (a -> f0 b) -> s -> f0 t) -> Cayley f p a b -> Cayley f p s t Source #

newtype CofreeTraversing p a b Source #

Constructors

CofreeTraversing

Fields

Instances

Instances details
ProfunctorComonad CofreeTraversing Source #
Instance details

Defined in Data.Profunctor.Traversing

Profunctor p => Profunctor ( CofreeTraversing p) Source #
Instance details

Defined in Data.Profunctor.Traversing

Profunctor p => Strong ( CofreeTraversing p) Source #
Instance details

Defined in Data.Profunctor.Traversing

Profunctor p => Choice ( CofreeTraversing p) Source #
Instance details

Defined in Data.Profunctor.Traversing

Profunctor p => Traversing ( CofreeTraversing p) Source #
Instance details

Defined in Data.Profunctor.Traversing

ProfunctorFunctor CofreeTraversing Source #
Instance details

Defined in Data.Profunctor.Traversing

data FreeTraversing p a b where Source #

FreeTraversing -| CofreeTraversing

Constructors

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

Instances

Instances details
ProfunctorMonad FreeTraversing Source #
Instance details

Defined in Data.Profunctor.Traversing

Profunctor ( FreeTraversing p) Source #
Instance details

Defined in Data.Profunctor.Traversing

Methods

dimap :: (a -> b) -> (c -> d) -> FreeTraversing p b c -> FreeTraversing p a d Source #

lmap :: (a -> b) -> FreeTraversing p b c -> FreeTraversing p a c Source #

rmap :: (b -> c) -> FreeTraversing p a b -> FreeTraversing p a c Source #

(#.) :: forall a b c q. Coercible c b => q b c -> FreeTraversing p a b -> FreeTraversing p a c Source #

(.#) :: forall a b c q. Coercible b a => FreeTraversing p b c -> q a b -> FreeTraversing p a c Source #

Strong ( FreeTraversing p) Source #
Instance details

Defined in Data.Profunctor.Traversing

Choice ( FreeTraversing p) Source #
Instance details

Defined in Data.Profunctor.Traversing

Traversing ( FreeTraversing p) Source #
Instance details

Defined in Data.Profunctor.Traversing

Methods

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

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

ProfunctorFunctor FreeTraversing Source #
Instance details

Defined in Data.Profunctor.Traversing

Functor ( FreeTraversing p a) Source #
Instance details

Defined in Data.Profunctor.Traversing

Profunctor in terms of Traversing

dimapWandering :: Traversing p => (a' -> a) -> (b -> b') -> p a b -> p a' b' Source #

A definition of dimap for Traversing instances that define an explicit wander .

lmapWandering :: Traversing p => (a -> b) -> p b c -> p a c Source #

lmapWandering may be a more efficient implementation of lmap than the default produced from dimapWandering .

rmapWandering :: Traversing p => (b -> c) -> p a b -> p a c Source #

rmapWandering is the same as the default produced from dimapWandering .

Strong in terms of Traversing

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

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

Choice in terms of Traversing