Copyright | (C) 2011-2013 Edward Kmett |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | provisional |
Portability | MPTCs |
Safe Haskell | Trustworthy |
Language | Haskell98 |
- class (Contravariant f, Representable g) => Adjunction f g | f -> g, g -> f where
- unit :: a -> g (f a)
- counit :: a -> f (g a)
- leftAdjunct :: (b -> f a) -> a -> g b
- rightAdjunct :: (a -> g b) -> b -> f a
- contrarepAdjunction :: Adjunction f g => (a -> f ()) -> g a
- coindexAdjunction :: Adjunction f g => g a -> a -> f ()
Documentation
class (Contravariant f, Representable g) => Adjunction f g | f -> g, g -> f where Source
An adjunction from Hask^op
to Hask
Op
(f a) b ~Hask
a (g b)
rightAdjunct
unit
=id
leftAdjunct
counit
=id
Any adjunction from Hask
to Hask^op
would indirectly
permit unsafePerformIO
, and therefore does not exist.
Nothing
leftAdjunct :: (b -> f a) -> a -> g b Source
rightAdjunct :: (a -> g b) -> b -> f a Source
Adjunction Predicate Predicate | This gives rise to the |
Adjunction (Op r) (Op r) | This |
contrarepAdjunction :: Adjunction f g => (a -> f ()) -> g a Source
Represent a Contravariant
functor that has a left adjoint
coindexAdjunction :: Adjunction f g => g a -> a -> f () Source