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 a b #

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 # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

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

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

ProfunctorMonad Yoneda # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

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

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

Profunctor (Yoneda p) # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

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

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

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

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

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

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

Defined in Data.Profunctor.Yoneda

Methods

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

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

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

Defined in Data.Profunctor.Yoneda

Methods

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

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

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

Defined in Data.Profunctor.Yoneda

Methods

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

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

Defined in Data.Profunctor.Yoneda

Methods

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

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

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

Defined in Data.Profunctor.Yoneda

Methods

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

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

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

Defined in Data.Profunctor.Yoneda

Methods

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

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

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

Defined in Data.Profunctor.Yoneda

Methods

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

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

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

Defined in Data.Profunctor.Yoneda

Methods

id :: forall (a :: k). Yoneda p a a #

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

ProfunctorFunctor Yoneda # 
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 #

Functor (Yoneda p a) # 
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 #

Constructors

Coyoneda :: (a -> x) -> (y -> b) -> p x y -> Coyoneda p a b 

Instances

Instances details
ProfunctorComonad Coyoneda # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

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

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

ProfunctorMonad Coyoneda # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

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

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

Profunctor (Coyoneda p) # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

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

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

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

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

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

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

Defined in Data.Profunctor.Yoneda

Methods

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

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

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

Defined in Data.Profunctor.Yoneda

Methods

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

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

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

Defined in Data.Profunctor.Yoneda

Methods

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

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

Defined in Data.Profunctor.Yoneda

Methods

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

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

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

Defined in Data.Profunctor.Yoneda

Methods

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

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

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

Defined in Data.Profunctor.Yoneda

Methods

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

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

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

Defined in Data.Profunctor.Yoneda

Methods

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

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

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

Defined in Data.Profunctor.Yoneda

Methods

id :: forall (a :: k). Coyoneda p a a #

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

ProfunctorFunctor Coyoneda # 
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 #

Functor (Coyoneda p a) # 
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 #