kindly-functors-0.1.0.1: A category polymorphic `Functor` typeclass
Safe HaskellSafe-Inferred
LanguageHaskell2010

Kindly.Trifunctor

Description

Three Parameter Functors of arbitrary varience.

Synopsis
  • type Trifunctor cat1 cat2 cat3 p = (MapArg3 cat3 cat2 cat1 p, forall x. MapArg2 cat2 cat1 (p x), forall x y. MapArg1 cat1 (p x y))
  • trimap :: forall cat1 cat2 cat3 p. Trifunctor cat1 cat2 cat3 p => forall a b c a' b' c'. (a `cat3` a') -> (b `cat2` b') -> (c `cat1` c') -> p a b c -> p a' b' c'

Documentation

type Trifunctor cat1 cat2 cat3 p = (MapArg3 cat3 cat2 cat1 p, forall x. MapArg2 cat2 cat1 (p x), forall x y. MapArg1 cat1 (p x y)) Source #

A CategoricalFunctor of kind Type -> Type -> Type mapping from an arbitrary category cat1 to a functor category cat2 ~> cat3 ~> (->).

trimap :: forall cat1 cat2 cat3 p. Trifunctor cat1 cat2 cat3 p => forall a b c a' b' c'. (a `cat3` a') -> (b `cat2` b') -> (c `cat1` c') -> p a b c -> p a' b' c' Source #

Lift a morphism cat1 a a', a morphism cat2 b b', and a morphism cat3 c c' into a -- function p a b c -> p a' b' c'.

Orphan instances

MapArg3 (->) (->) (->) (,,) Source # 
Instance details

Methods

map3 :: forall (a :: from) (b :: from). (a -> b) -> forall (x :: s) (y :: s1). (a, x, y) -> (b, x, y) Source #

MapArg3 (->) (->) (->) ((,,,) x :: Type -> Type -> Type -> Type) Source # 
Instance details

Methods

map3 :: forall (a :: from) (b :: from). (a -> b) -> forall (x0 :: s) (y :: s1). (x, a, x0, y) -> (x, b, x0, y) Source #

MapArg3 (->) (->) (->) ((,,,,) x x' :: Type -> Type -> Type -> Type) Source # 
Instance details

Methods

map3 :: forall (a :: from) (b :: from). (a -> b) -> forall (x0 :: s) (y :: s1). (x, x', a, x0, y) -> (x, x', b, x0, y) Source #

MapArg3 (->) (->) (->) ((,,,,,) x x' x'' :: Type -> Type -> Type -> Type) Source # 
Instance details

Methods

map3 :: forall (a :: from) (b :: from). (a -> b) -> forall (x0 :: s) (y :: s1). (x, x', x'', a, x0, y) -> (x, x', x'', b, x0, y) Source #

MapArg3 (->) (->) (->) ((,,,,,,) x x' x'' x''' :: Type -> Type -> Type -> Type) Source # 
Instance details

Methods

map3 :: forall (a :: from) (b :: from). (a -> b) -> forall (x0 :: s) (y :: s1). (x, x', x'', x''', a, x0, y) -> (x, x', x'', x''', b, x0, y) Source #

CategoricalFunctor (,,) Source # 
Instance details

Associated Types

type Dom (,,) :: from -> from -> Type Source #

type Cod (,,) :: to -> to -> Type Source #

Methods

map :: forall (a :: from) (b :: from). Dom (,,) a b -> Cod (,,) ((,,) a) ((,,) b) Source #

CategoricalFunctor ((,,,) x :: Type -> Type -> Type -> Type) Source # 
Instance details

Associated Types

type Dom ((,,,) x) :: from -> from -> Type Source #

type Cod ((,,,) x) :: to -> to -> Type Source #

Methods

map :: forall (a :: from) (b :: from). Dom ((,,,) x) a b -> Cod ((,,,) x) ((,,,) x a) ((,,,) x b) Source #

CategoricalFunctor ((,,,,) x x' :: Type -> Type -> Type -> Type) Source # 
Instance details

Associated Types

type Dom ((,,,,) x x') :: from -> from -> Type Source #

type Cod ((,,,,) x x') :: to -> to -> Type Source #

Methods

map :: forall (a :: from) (b :: from). Dom ((,,,,) x x') a b -> Cod ((,,,,) x x') ((,,,,) x x' a) ((,,,,) x x' b) Source #

CategoricalFunctor ((,,,,,) x x' x'' :: Type -> Type -> Type -> Type) Source # 
Instance details

Associated Types

type Dom ((,,,,,) x x' x'') :: from -> from -> Type Source #

type Cod ((,,,,,) x x' x'') :: to -> to -> Type Source #

Methods

map :: forall (a :: from) (b :: from). Dom ((,,,,,) x x' x'') a b -> Cod ((,,,,,) x x' x'') ((,,,,,) x x' x'' a) ((,,,,,) x x' x'' b) Source #

CategoricalFunctor ((,,,,,,) x x' x'' x''' :: Type -> Type -> Type -> Type) Source # 
Instance details

Associated Types

type Dom ((,,,,,,) x x' x'' x''') :: from -> from -> Type Source #

type Cod ((,,,,,,) x x' x'' x''') :: to -> to -> Type Source #

Methods

map :: forall (a :: from) (b :: from). Dom ((,,,,,,) x x' x'' x''') a b -> Cod ((,,,,,,) x x' x'' x''') ((,,,,,,) x x' x'' x''' a) ((,,,,,,) x x' x'' x''' b) Source #