profunctors-5.2.1: 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 | Safe
Language | Haskell2010

Data.Profunctor.Cayley

Description

Synopsis

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

# Documentation

newtype Cayley f p a b Source #

Constructors

Cayley |

Fields

- runCayley :: f (p a b)

Instances

Comonad f => ProfunctorComonad (Cayley f) Source # | Cayley transforms Comonads in `Hask` into comonads on `Prof`
Methods proextract :: Profunctor p => Cayley f p :-> p Source # produplicate :: Profunctor p => Cayley f p :-> Cayley f (Cayley f p) Source #
(Functor f, Monad f) => ProfunctorMonad (Cayley f) Source # | Cayley transforms Monads in `Hask` into monads on `Prof`
Methods proreturn :: Profunctor p => p :-> Cayley f p Source # projoin :: Profunctor p => Cayley f (Cayley f p) :-> Cayley f p Source #
Functor f => ProfunctorFunctor (Cayley f) Source # |
Methods promap :: Profunctor p => (p :-> q) -> Cayley f p :-> Cayley f q Source #
(Applicative f, Category * p) => Category * (Cayley f p) Source # |
Methods id :: cat a a # (.) :: cat b c -> cat a b -> cat a c #
(Applicative f, Arrow p) => Arrow (Cayley f p) Source # |
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, ArrowZero p) => ArrowZero (Cayley f p) Source # |
Methods zeroArrow :: Cayley f p b c #
(Applicative f, ArrowPlus p) => ArrowPlus (Cayley f p) Source # |
Methods (<+>) :: Cayley f p b c -> Cayley f p b c -> Cayley f p b c #
(Applicative f, ArrowChoice p) => ArrowChoice (Cayley f p) Source # |
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) Source # |
Methods loop :: Cayley f p (b, d) (c, d) -> Cayley f p b c #
(Functor f, Profunctor p) => Profunctor (Cayley f p) Source # |
Methods dimap :: (a -> b) -> (c -> d) -> Cayley f p b c -> Cayley f p a d Source # lmap :: (a -> b) -> Cayley f p b c -> Cayley f p a c Source # rmap :: (b -> c) -> Cayley f p a b -> Cayley f p a c Source # (#.) :: Coercible * c b => (b -> c) -> Cayley f p a b -> Cayley f p a c Source # (.#) :: Coercible * b a => Cayley f p b c -> (a -> b) -> Cayley f p a c Source #
(Functor f, Strong p) => Strong (Cayley f p) Source # |
Methods first' :: Cayley f p a b -> Cayley f p (a, c) (b, c) Source # second' :: Cayley f p a b -> Cayley f p (c, a) (c, b) Source #
(Functor f, Choice p) => Choice (Cayley f p) Source # |
Methods left' :: Cayley f p a b -> Cayley f p (Either a c) (Either b c) Source # right' :: Cayley f p a b -> Cayley f p (Either c a) (Either c b) Source #

mapCayley :: (forall a. f a -> g a) -> Cayley f p x y -> Cayley g p x y Source #