| Copyright | 2013-2016 Edward Kmett and Dan Doel | 
|---|---|
| License | BSD | 
| Maintainer | Edward Kmett <[email protected]> | 
| Stability | experimental | 
| Portability | rank N types | 
| Safe Haskell | Safe-Inferred | 
| Language | Haskell2010 | 
Data.Functor.Day.Curried
Contents
Description
Synopsis
- newtype Curried g h a = Curried {
- runCurried :: forall r. g (a -> r) -> h r
 
 - toCurried :: (forall x. Day g k x -> h x) -> k a -> Curried g h a
 - fromCurried :: Functor f => (forall a. k a -> Curried f h a) -> Day f k b -> h b
 - applied :: Functor f => Day f (Curried f g) a -> g a
 - unapplied :: g a -> Curried f (Day f g) a
 - adjointToCurried :: Adjunction f u => u a -> Curried f Identity a
 - curriedToAdjoint :: Adjunction f u => Curried f Identity a -> u a
 - composedAdjointToCurried :: (Functor h, Adjunction f u) => u (h a) -> Curried f h a
 - curriedToComposedAdjoint :: Adjunction f u => Curried f h a -> u (h a)
 - liftCurried :: Applicative f => f a -> Curried f f a
 - lowerCurried :: Applicative f => Curried f g a -> g a
 - rap :: Functor f => Curried f g (a -> b) -> Curried g h a -> Curried f h b
 
Right Kan lifts
newtype Curried g h a Source #
Constructors
| Curried | |
Fields 
  | |
Instances
| (Functor g, g ~ h) => Applicative (Curried g h) Source # | |
Defined in Data.Functor.Day.Curried Methods pure :: a -> Curried g h a Source # (<*>) :: Curried g h (a -> b) -> Curried g h a -> Curried g h b Source # liftA2 :: (a -> b -> c) -> Curried g h a -> Curried g h b -> Curried g h c Source # (*>) :: Curried g h a -> Curried g h b -> Curried g h b Source # (<*) :: Curried g h a -> Curried g h b -> Curried g h a Source #  | |
| Functor g => Functor (Curried g h) Source # | |
toCurried :: (forall x. Day g k x -> h x) -> k a -> Curried g h a Source #
The universal property of Curried
fromCurried :: Functor f => (forall a. k a -> Curried f h a) -> Day f k b -> h b Source #
toCurried.fromCurried≡idfromCurried.toCurried≡id
applied :: Functor f => Day f (Curried f g) a -> g a Source #
This is the counit of the Day f -| Curried f adjunction
unapplied :: g a -> Curried f (Day f g) a Source #
This is the unit of the Day f -| Curried f adjunction
adjointToCurried :: Adjunction f u => u a -> Curried f Identity a Source #
Curried f Identity a is isomorphic to the right adjoint to f if one exists.
adjointToCurried.curriedToAdjoint≡idcurriedToAdjoint.adjointToCurried≡id
curriedToAdjoint :: Adjunction f u => Curried f Identity a -> u a Source #
Curried f Identity a is isomorphic to the right adjoint to f if one exists.
composedAdjointToCurried :: (Functor h, Adjunction f u) => u (h a) -> Curried f h a Source #
Curried f h a is isomorphic to the post-composition of the right adjoint of f onto h if such a right adjoint exists.
curriedToComposedAdjoint :: Adjunction f u => Curried f h a -> u (h a) Source #
Curried f h a is isomorphic to the post-composition of the right adjoint of f onto h if such a right adjoint exists.
curriedToComposedAdjoint.composedAdjointToCurried≡idcomposedAdjointToCurried.curriedToComposedAdjoint≡id
liftCurried :: Applicative f => f a -> Curried f f a Source #
The natural isomorphism between f and Curried f f.
 
 lowerCurried . liftCurried ≡ id
 liftCurried . lowerCurried ≡ id
 
lowerCurried(liftCurriedx) -- definitionlowerCurried(Curried(<*>x)) -- definition (<*>x) (pureid) -- beta reductionpureid<*>x -- Applicative identity law x
lowerCurried :: Applicative f => Curried f g a -> g a Source #
Lower Curried by applying pure id to the continuation.
See liftCurried.