pandora-0.1.9: A box of patterns and paradigms

Safe HaskellSafe
LanguageHaskell2010

Pandora.Pattern.Functor.Adjoint

Synopsis

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

Minimal complete definition

phi, psi

Methods

phi :: (t a -> b) -> a -> u b Source #

Left adjunction

psi :: (a -> u b) -> t a -> b Source #

Right adjunction

eta :: a -> (u :.: t) >< a Source #

epsilon :: ((t :.: u) >< a) -> a Source #

Instances
Adjoint Identity Identity Source # 
Instance details

Defined in Pandora.Paradigm.Basis.Identity

Methods

phi :: (Identity a -> b) -> a -> Identity b Source #

psi :: (a -> Identity b) -> Identity a -> b Source #

eta :: a -> (Identity :.: Identity) >< a Source #

epsilon :: ((Identity :.: Identity) >< a) -> a Source #

(Extractable t, Pointable t, Extractable u, Pointable u) => Adjoint (Yoneda t) (Yoneda u) Source # 
Instance details

Defined in Pandora.Paradigm.Basis.Yoneda

Methods

phi :: (Yoneda t a -> b) -> a -> Yoneda u b Source #

psi :: (a -> Yoneda u b) -> Yoneda t a -> b Source #

eta :: a -> (Yoneda u :.: Yoneda t) >< a Source #

epsilon :: ((Yoneda t :.: Yoneda u) >< a) -> a Source #

Adjoint (Product a) ((->) a :: Type -> Type) Source # 
Instance details

Defined in Pandora.Paradigm.Basis.Product

Methods

phi :: (Product a a0 -> b) -> a0 -> a -> b Source #

psi :: (a0 -> a -> b) -> Product a a0 -> b Source #

eta :: a0 -> ((->) a :.: Product a) >< a0 Source #

epsilon :: ((Product a :.: (->) a) >< a0) -> a0 Source #

(t :-|: u, v :-|: w) => Adjoint (TU Co Co t v) (TU Co Co u w) Source # 
Instance details

Defined in Pandora.Pattern.Junction.Schemes.TU

Methods

phi :: (TU Co Co t v a -> b) -> a -> TU Co Co u w b Source #

psi :: (a -> TU Co Co u w b) -> TU Co Co t v a -> b Source #

eta :: a -> (TU Co Co u w :.: TU Co Co t v) >< a Source #

epsilon :: ((TU Co Co t v :.: TU Co Co u w) >< a) -> a Source #

(t :-|: w, v :-|: x, u :-|: y) => Adjoint (TUV Co Co Co t v u) (TUV Co Co Co w x y) Source # 
Instance details

Defined in Pandora.Pattern.Junction.Schemes.TUV

Methods

phi :: (TUV Co Co Co t v u a -> b) -> a -> TUV Co Co Co w x y b Source #

psi :: (a -> TUV Co Co Co w x y b) -> TUV Co Co Co t v u a -> b Source #

eta :: a -> (TUV Co Co Co w x y :.: TUV Co Co Co t v u) >< a Source #

epsilon :: ((TUV Co Co Co t v u :.: TUV Co Co Co w x y) >< a) -> a Source #

(t :-|: u, v :-|: w, q :-|: q, r :-|: s) => Adjoint (TUVW Co Co Co Co t v q r) (TUVW Co Co Co Co u w q s) Source # 
Instance details

Defined in Pandora.Pattern.Junction.Schemes.TUVW

Methods

phi :: (TUVW Co Co Co Co t v q r a -> b) -> a -> TUVW Co Co Co Co u w q s b Source #

psi :: (a -> TUVW Co Co Co Co u w q s b) -> TUVW Co Co Co Co t v q r a -> b Source #

eta :: a -> (TUVW Co Co Co Co u w q s :.: TUVW Co Co Co Co t v q r) >< a Source #

epsilon :: ((TUVW Co Co Co Co t v q r :.: TUVW Co Co Co Co u w q s) >< a) -> a Source #