profunctors-5.6.2: Profunctors
Copyright (C) 2017 Edward Kmett
License BSD-style (see the file LICENSE)
Maintainer Edward Kmett <ekmett@gmail.com>
Stability provisional
Portability Rank2Types, TFs
Safe Haskell Trustworthy
Language Haskell2010

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

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

(#.) :: 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 #

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

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

Defined in Data.Profunctor.Yoneda

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 :: forall (a :: k). Yoneda p a a Source #

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

ProfunctorFunctor Yoneda Source #
Instance details

Defined in Data.Profunctor.Yoneda

Functor ( Yoneda p a) Source #
Instance details

Defined in Data.Profunctor.Yoneda

Methods

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

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

data Coyoneda p a b where Source #

Constructors

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

Instances

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

(#.) :: 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 #

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

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

Defined in Data.Profunctor.Yoneda

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 :: forall (a :: k). Coyoneda p a a Source #

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

ProfunctorFunctor Coyoneda Source #
Instance details

Defined in Data.Profunctor.Yoneda

Functor ( Coyoneda p a) Source #
Instance details

Defined in Data.Profunctor.Yoneda

Methods

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

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