pandora-0.3.2: A box of patterns and paradigms

Synopsis

# Documentation

type (-|) = Adjoint infixl 3 Source #

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

Minimal complete definition

Methods

(-|) :: a -> (t a -> b) -> u b infixl 3 Source #

(|-) :: t a -> (a -> u b) -> b infixl 3 Source #

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

#### Instances

Instances details