| 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 | 
Data.Profunctor.Mapping
Description
Synopsis
- class (Traversing p, Closed p) => Mapping (p :: Type -> Type -> Type) where
 - newtype CofreeMapping (p :: Type -> Type -> Type) a b = CofreeMapping {
- runCofreeMapping :: forall (f :: Type -> Type). Functor f => p (f a) (f b)
 
 - data FreeMapping (p :: Type -> Type -> Type) a b where
- FreeMapping :: forall (f :: Type -> Type) y b (p :: Type -> Type -> Type) x a. Functor f => (f y -> b) -> p x y -> (a -> f x) -> FreeMapping p a b
 
 - wanderMapping :: Mapping p => (forall (f :: Type -> Type). 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 :: Type -> Type -> Type) where Source #
Minimal complete definition
Nothing
Methods
Instances
newtype CofreeMapping (p :: Type -> Type -> Type) a b Source #
Constructors
| CofreeMapping | |
Fields 
  | |
Instances
data FreeMapping (p :: Type -> Type -> Type) a b where Source #
FreeMapping -| CofreeMapping
Constructors
| FreeMapping :: forall (f :: Type -> Type) y b (p :: Type -> Type -> Type) x a. 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 :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> p a b -> p s t Source #
Closed in terms of Mapping
traverseMapping :: (Mapping p, Functor f) => p a b -> p (f a) (f b) Source #
closedMapping :: Mapping p => p a b -> p (x -> a) (x -> b) Source #