Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Documentation
class (Covariant t, Covariant u) => Adjoint t u where Source #
When providing a new instance, you should ensure it satisfies the four laws: * Left adjunction identity: phi cozero ≡ identity * Right adjunction identity: psi zero ≡ identity * Left adjunction interchange: phi f ≡ comap f . eta * Right adjunction interchange: psi f ≡ epsilon . comap f
(-|) :: a -> (t a -> b) -> u b infixl 4 Source #
Left adjunction
(|-) :: t a -> (a -> u b) -> b infixl 4 Source #
Right adjunction
phi :: (t a -> b) -> a -> u b Source #
Prefix and flipped version of -|
psi :: (a -> u b) -> t a -> b Source #
Prefix and flipped version of |-
eta :: a -> (u :. t) := a Source #
Also known as unit
epsilon :: ((t :. u) := a) -> a Source #
Also known as counit