profunctors-5.6.2: 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 :: Type -> Type -> Type) 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

Instances details
ProfunctorComonad Yoneda Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Yoneda p :-> p Source #

produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Yoneda p :-> Yoneda (Yoneda p) Source #

ProfunctorMonad Yoneda Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Yoneda p Source #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => Yoneda (Yoneda p) :-> Yoneda p Source #

ProfunctorFunctor Yoneda Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> Yoneda p :-> Yoneda q 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 #

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 #

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 #

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 #

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 #

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 #

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 #

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 #

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

(.#) :: forall a b c q. Coercible b a => Yoneda p b c -> q a b -> Yoneda p a c 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 :: Type -> Type -> Type) a b where Source #

Constructors

Coyoneda :: forall a x y b (p :: Type -> Type -> Type). (a -> x) -> (y -> b) -> p x y -> Coyoneda p a b 

Instances

Instances details
ProfunctorComonad Coyoneda Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Coyoneda p :-> p Source #

produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Coyoneda p :-> Coyoneda (Coyoneda p) Source #

ProfunctorMonad Coyoneda Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Coyoneda p Source #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => Coyoneda (Coyoneda p) :-> Coyoneda p Source #

ProfunctorFunctor Coyoneda Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> Coyoneda p :-> Coyoneda q 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 #

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 #

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 #

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 #

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 #

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 #

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 #

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 #

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

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

Functor (Coyoneda p a) Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

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

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