profunctors-5.6.2: Profunctors

Copyright | (C) 2014-2015 Edward Kmett
License | BSD-style (see the file LICENSE)
Maintainer | Edward Kmett <ekmett@gmail.com>
Stability | experimental
Portability | portable
Safe Haskell | Trustworthy
Language | Haskell2010

Data.Profunctor.Cayley

Description

Synopsis

- newtype Cayley (f :: k -> Type) (p :: k1 -> k2 -> k) (a :: k1) (b :: k2) = Cayley {
  - runCayley :: f (p a b)
  }
- mapCayley :: forall {k1} {k2} {k3} f g (p :: k2 -> k3 -> k1) (x :: k2) (y :: k3). (forall (a :: k1). f a -> g a) -> Cayley f p x y -> Cayley g p x y

# Documentation

newtype Cayley (f :: k -> Type) (p :: k1 -> k2 -> k) (a :: k1) (b :: k2) #

Static arrows. Lifted by `Applicative`.

`Cayley` has a polymorphic kind since `5.6`.

Constructors

Cayley |

Fields

- runCayley :: f (p a b)

#### Instances

Instances details

Functor f => ProfunctorFunctor (Cayley f :: (Type -> Type -> Type) -> Type -> Type -> Type) # |
Instance details Defined in Data.Profunctor.Cayley Methods promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> Cayley f p :-> Cayley f q #
(Applicative f, Category p) => Category (Cayley f p :: k -> k -> Type) # |
Instance details Defined in Data.Profunctor.Cayley Methods id :: forall (a :: k). Cayley f p a a # (.) :: forall (b :: k) (c :: k) (a :: k). Cayley f p b c -> Cayley f p a b -> Cayley f p a c #
Comonad f => ProfunctorComonad (Cayley f :: (Type -> Type -> Type) -> Type -> Type -> Type) # | Cayley transforms Comonads in `Hask` into comonads on `Prof`
Instance details Defined in Data.Profunctor.Cayley Methods proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Cayley f p :-> p # produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Cayley f p :-> Cayley f (Cayley f p) #
(Functor f, Monad f) => ProfunctorMonad (Cayley f :: (Type -> Type -> Type) -> Type -> Type -> Type) # | Cayley transforms Monads in `Hask` into monads on `Prof`
Instance details Defined in Data.Profunctor.Cayley Methods proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Cayley f p # projoin :: forall (p :: Type -> Type -> Type). Profunctor p => Cayley f (Cayley f p) :-> Cayley f p #
(Applicative f, Arrow p) => Arrow (Cayley f p) # |
Instance details Defined in Data.Profunctor.Cayley Methods arr :: (b -> c) -> Cayley f p b c # first :: Cayley f p b c -> Cayley f p (b, d) (c, d) # second :: Cayley f p b c -> Cayley f p (d, b) (d, c) # (***) :: Cayley f p b c -> Cayley f p b' c' -> Cayley f p (b, b') (c, c') # (&&&) :: Cayley f p b c -> Cayley f p b c' -> Cayley f p b (c, c') #
(Applicative f, ArrowChoice p) => ArrowChoice (Cayley f p) # |
Instance details Defined in Data.Profunctor.Cayley Methods left :: Cayley f p b c -> Cayley f p (Either b d) (Either c d) # right :: Cayley f p b c -> Cayley f p (Either d b) (Either d c) # (+++) :: Cayley f p b c -> Cayley f p b' c' -> Cayley f p (Either b b') (Either c c') # (|||) :: Cayley f p b d -> Cayley f p c d -> Cayley f p (Either b c) d #
(Applicative f, ArrowLoop p) => ArrowLoop (Cayley f p) # |
Instance details Defined in Data.Profunctor.Cayley Methods loop :: Cayley f p (b, d) (c, d) -> Cayley f p b c #
(Applicative f, ArrowPlus p) => ArrowPlus (Cayley f p) # |
Instance details Defined in Data.Profunctor.Cayley Methods (<+>) :: Cayley f p b c -> Cayley f p b c -> Cayley f p b c #
(Applicative f, ArrowZero p) => ArrowZero (Cayley f p) # |
Instance details Defined in Data.Profunctor.Cayley Methods zeroArrow :: Cayley f p b c #
(Functor f, Choice p) => Choice (Cayley f p) # |
Instance details Defined in Data.Profunctor.Cayley Methods left' :: Cayley f p a b -> Cayley f p (Either a c) (Either b c) # right' :: Cayley f p a b -> Cayley f p (Either c a) (Either c b) #
(Functor f, Cochoice p) => Cochoice (Cayley f p) # |
Instance details Defined in Data.Profunctor.Cayley Methods unleft :: Cayley f p (Either a d) (Either b d) -> Cayley f p a b # unright :: Cayley f p (Either d a) (Either d b) -> Cayley f p a b #
(Functor f, Closed p) => Closed (Cayley f p) # |
Instance details Defined in Data.Profunctor.Cayley Methods closed :: Cayley f p a b -> Cayley f p (x -> a) (x -> b) #
(Functor f, Mapping p) => Mapping (Cayley f p) # |
Instance details Defined in Data.Profunctor.Cayley Methods map' :: Functor f0 => Cayley f p a b -> Cayley f p (f0 a) (f0 b) # roam :: ((a -> b) -> s -> t) -> Cayley f p a b -> Cayley f p s t #
(Functor f, Costrong p) => Costrong (Cayley f p) # |
Instance details Defined in Data.Profunctor.Cayley Methods unfirst :: Cayley f p (a, d) (b, d) -> Cayley f p a b # unsecond :: Cayley f p (d, a) (d, b) -> Cayley f p a b #
(Functor f, Strong p) => Strong (Cayley f p) # |
Instance details Defined in Data.Profunctor.Cayley Methods first' :: Cayley f p a b -> Cayley f p (a, c) (b, c) # second' :: Cayley f p a b -> Cayley f p (c, a) (c, b) #
(Functor f, Traversing p) => Traversing (Cayley f p) # |
Instance details Defined in Data.Profunctor.Cayley Methods traverse' :: Traversable f0 => Cayley f p a b -> Cayley f p (f0 a) (f0 b) # wander :: (forall (f0 :: Type -> Type). Applicative f0 => (a -> f0 b) -> s -> f0 t) -> Cayley f p a b -> Cayley f p s t #
(Functor f, Profunctor p) => Profunctor (Cayley f p) # |

Instance details

Defined in Data.Profunctor.Cayley

Methods

dimap :: (a -> b) -> (c -> d) -> Cayley f p b c -> Cayley f p a d #

lmap :: (a -> b) -> Cayley f p b c -> Cayley f p a c #

rmap :: (b -> c) -> Cayley f p a b -> Cayley f p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Cayley f p a b -> Cayley f p a c #

(.#) :: forall a b c q. Coercible b a => Cayley f p b c -> q a b -> Cayley f p a c #

mapCayley :: forall {k1} {k2} {k3} f g (p :: k2 -> k3 -> k1) (x :: k2) (y :: k3). (forall (a :: k1). f a -> g a) -> Cayley f p x y -> Cayley g p x y #