Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.Profunctor.Traversing
- class (Choice p, Strong p) => Traversing p where
- 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
- newtype CofreeTraversing p a b = CofreeTraversing {
- runCofreeTraversing :: forall f. Traversable f => p (f a) (f b)
- data FreeTraversing p a b where
- FreeTraversing :: Traversable f => (f y -> b) -> p x y -> (a -> f x) -> FreeTraversing p a b
- firstTraversing :: Traversing p => p a b -> p (a, c) (b, c)
- secondTraversing :: Traversing p => p a b -> p (c, a) (c, b)
- 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)
Documentation
class (Choice p, Strong p) => Traversing p where Source
Note: Definitions in terms of wander
are much more efficient!
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
Instances
Traversing (->) Source | |
Monad m => Traversing (Kleisli m) Source | |
Applicative m => Traversing (Star m) Source | |
Traversing (FreeTraversing p) Source | |
Profunctor p => Traversing (CofreeTraversing p) Source | |
Traversing (FreeMapping p) Source | |
Profunctor p => Traversing (CofreeMapping p) Source |
newtype CofreeTraversing p a b Source
Constructors
CofreeTraversing | |
Fields
|
Instances
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 |
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
leftTraversing :: Traversing p => p a b -> p (Either a c) (Either b c) Source
rightTraversing :: Traversing p => p a b -> p (Either c a) (Either c b) Source