Copyright | (C) 2015-2018 Edward Kmett |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Synopsis
- class (Traversing p, Closed p) => Mapping p where
- newtype CofreeMapping p a b = CofreeMapping {
- runCofreeMapping :: forall f. Functor f => p (f a) (f b)
- data FreeMapping p a b where
- FreeMapping :: Functor f => (f y -> b) -> p x y -> (a -> f x) -> FreeMapping p a b
- wanderMapping :: Mapping p => (forall f. Applicative f => (a -> f b) -> s -> f t) -> p a b -> p s t
- traverseMapping :: (Mapping p, Functor f) => p a b -> p (f a) (f b)
- closedMapping :: Mapping p => p a b -> p (x -> a) (x -> b)
Documentation
class (Traversing p, Closed p) => Mapping p where #
Nothing
Instances
(Monad m, Distributive m) => Mapping (Kleisli m) # | |
Mapping (FreeMapping p) # | |
Defined in Data.Profunctor.Mapping map' :: Functor f => FreeMapping p a b -> FreeMapping p (f a) (f b) # roam :: ((a -> b) -> s -> t) -> FreeMapping p a b -> FreeMapping p s t # | |
Profunctor p => Mapping (CofreeMapping p) # | |
Defined in Data.Profunctor.Mapping map' :: Functor f => CofreeMapping p a b -> CofreeMapping p (f a) (f b) # roam :: ((a -> b) -> s -> t) -> CofreeMapping p a b -> CofreeMapping p s t # | |
Mapping p => Mapping (Coyoneda p) # | |
Mapping p => Mapping (Yoneda p) # | |
Mapping ((->) :: Type -> Type -> Type) # | |
(Applicative m, Distributive m) => Mapping (Star m) # | |
(Functor f, Mapping p) => Mapping (Tannen f p) # | |
(Mapping p, Mapping q) => Mapping (Procompose p q) # | |
Defined in Data.Profunctor.Composition map' :: Functor f => Procompose p q a b -> Procompose p q (f a) (f b) # roam :: ((a -> b) -> s -> t) -> Procompose p q a b -> Procompose p q s t # | |
(Functor f, Mapping p) => Mapping (Cayley f p) # | |
newtype CofreeMapping p a b #
CofreeMapping | |
|
Instances
data FreeMapping p a b where #
FreeMapping -| CofreeMapping
FreeMapping :: Functor f => (f y -> b) -> p x y -> (a -> f x) -> FreeMapping p a b |
Instances
Traversing in terms of Mapping
wanderMapping :: Mapping p => (forall f. Applicative f => (a -> f b) -> s -> f t) -> p a b -> p s t #
Closed in terms of Mapping
traverseMapping :: (Mapping p, Functor f) => p a b -> p (f a) (f b) #
closedMapping :: Mapping p => p a b -> p (x -> a) (x -> b) #