profunctors-5.6: Profunctors

Copyright(C) 2017 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityprovisional
PortabilityRank2Types, TFs
Safe HaskellTrustworthy
LanguageHaskell2010

Data.Profunctor.Yoneda

Description

 
Synopsis

Documentation

newtype Yoneda p a b Source #

This is the cofree profunctor given a data constructor of kind * -> * -> *

Constructors

Yoneda 

Fields

  • runYoneda :: forall x y. (x -> a) -> (b -> y) -> p x y
     
Instances
ProfunctorComonad Yoneda Source # 
Instance details

Defined in Data.Profunctor.Yoneda

ProfunctorMonad Yoneda Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Profunctor (Yoneda p) Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

dimap :: (a -> b) -> (c -> d) -> Yoneda p b c -> Yoneda p a d Source #

lmap :: (a -> b) -> Yoneda p b c -> Yoneda p a c Source #

rmap :: (b -> c) -> Yoneda p a b -> Yoneda p a c Source #

(#.) :: Coercible c b => q b c -> Yoneda p a b -> Yoneda p a c Source #

(.#) :: Coercible b a => Yoneda p b c -> q a b -> Yoneda p a c Source #

Costrong p => Costrong (Yoneda p) Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

unfirst :: Yoneda p (a, d) (b, d) -> Yoneda p a b Source #

unsecond :: Yoneda p (d, a) (d, b) -> Yoneda p a b Source #

Strong p => Strong (Yoneda p) Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

first' :: Yoneda p a b -> Yoneda p (a, c) (b, c) Source #

second' :: Yoneda p a b -> Yoneda p (c, a) (c, b) Source #

Closed p => Closed (Yoneda p) Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

closed :: Yoneda p a b -> Yoneda p (x -> a) (x -> b) Source #

Cochoice p => Cochoice (Yoneda p) Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

unleft :: Yoneda p (Either a d) (Either b d) -> Yoneda p a b Source #

unright :: Yoneda p (Either d a) (Either d b) -> Yoneda p a b Source #

Choice p => Choice (Yoneda p) Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

left' :: Yoneda p a b -> Yoneda p (Either a c) (Either b c) Source #

right' :: Yoneda p a b -> Yoneda p (Either c a) (Either c b) Source #

Traversing p => Traversing (Yoneda p) Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

traverse' :: Traversable f => Yoneda p a b -> Yoneda p (f a) (f b) Source #

wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> Yoneda p a b -> Yoneda p s t Source #

Mapping p => Mapping (Yoneda p) Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

map' :: Functor f => Yoneda p a b -> Yoneda p (f a) (f b) Source #

roam :: ((a -> b) -> s -> t) -> Yoneda p a b -> Yoneda p s t Source #

(Category p, Profunctor p) => Category (Yoneda p :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

id :: Yoneda p a a #

(.) :: Yoneda p b c -> Yoneda p a b -> Yoneda p a c #

ProfunctorFunctor Yoneda Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

promap :: Profunctor p => (p :-> q) -> Yoneda p :-> Yoneda q Source #

Functor (Yoneda p a) Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

fmap :: (a0 -> b) -> Yoneda p a a0 -> Yoneda p a b #

(<$) :: a0 -> Yoneda p a b -> Yoneda p a a0 #

data Coyoneda p a b where Source #

Constructors

Coyoneda :: (a -> x) -> (y -> b) -> p x y -> Coyoneda p a b 
Instances
ProfunctorComonad Coyoneda Source # 
Instance details

Defined in Data.Profunctor.Yoneda

ProfunctorMonad Coyoneda Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Profunctor (Coyoneda p) Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

dimap :: (a -> b) -> (c -> d) -> Coyoneda p b c -> Coyoneda p a d Source #

lmap :: (a -> b) -> Coyoneda p b c -> Coyoneda p a c Source #

rmap :: (b -> c) -> Coyoneda p a b -> Coyoneda p a c Source #

(#.) :: Coercible c b => q b c -> Coyoneda p a b -> Coyoneda p a c Source #

(.#) :: Coercible b a => Coyoneda p b c -> q a b -> Coyoneda p a c Source #

Costrong p => Costrong (Coyoneda p) Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

unfirst :: Coyoneda p (a, d) (b, d) -> Coyoneda p a b Source #

unsecond :: Coyoneda p (d, a) (d, b) -> Coyoneda p a b Source #

Strong p => Strong (Coyoneda p) Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

first' :: Coyoneda p a b -> Coyoneda p (a, c) (b, c) Source #

second' :: Coyoneda p a b -> Coyoneda p (c, a) (c, b) Source #

Closed p => Closed (Coyoneda p) Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

closed :: Coyoneda p a b -> Coyoneda p (x -> a) (x -> b) Source #

Cochoice p => Cochoice (Coyoneda p) Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

unleft :: Coyoneda p (Either a d) (Either b d) -> Coyoneda p a b Source #

unright :: Coyoneda p (Either d a) (Either d b) -> Coyoneda p a b Source #

Choice p => Choice (Coyoneda p) Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

left' :: Coyoneda p a b -> Coyoneda p (Either a c) (Either b c) Source #

right' :: Coyoneda p a b -> Coyoneda p (Either c a) (Either c b) Source #

Traversing p => Traversing (Coyoneda p) Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

traverse' :: Traversable f => Coyoneda p a b -> Coyoneda p (f a) (f b) Source #

wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> Coyoneda p a b -> Coyoneda p s t Source #

Mapping p => Mapping (Coyoneda p) Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

map' :: Functor f => Coyoneda p a b -> Coyoneda p (f a) (f b) Source #

roam :: ((a -> b) -> s -> t) -> Coyoneda p a b -> Coyoneda p s t Source #

(Category p, Profunctor p) => Category (Coyoneda p :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

id :: Coyoneda p a a #

(.) :: Coyoneda p b c -> Coyoneda p a b -> Coyoneda p a c #

ProfunctorFunctor Coyoneda Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

promap :: Profunctor p => (p :-> q) -> Coyoneda p :-> Coyoneda q Source #