License | BSD-style (see the file LICENSE) |
---|---|
Maintainer | sjoerd@w3future.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- data Cat :: (* -> * -> *) -> (* -> * -> *) -> * where
- class (Category (Dom ftag), Category (Cod ftag)) => Functor ftag where
- type FunctorOf a b t = (Functor t, Dom t ~ a, Cod t ~ b)
- data Id (k :: * -> * -> *) = Id
- data g :.: h where
- data Const (c1 :: * -> * -> *) (c2 :: * -> * -> *) x where
- type ConstF f = Const (Dom f) (Cod f)
- data Opposite f where
- data OpOp (k :: * -> * -> *) = OpOp
- data OpOpInv (k :: * -> * -> *) = OpOpInv
- newtype Any f = Any f
- data Proj1 (c1 :: * -> * -> *) (c2 :: * -> * -> *) = Proj1
- data Proj2 (c1 :: * -> * -> *) (c2 :: * -> * -> *) = Proj2
- data f1 :***: f2 where
- data DiagProd (k :: * -> * -> *) = DiagProd
- type Tuple1 c1 c2 a = (Const c2 c1 a :***: Id c2) :.: DiagProd c2
- pattern Tuple1 :: (Category c1, Category c2) => Obj c1 a -> Tuple1 c1 c2 a
- type Tuple2 c1 c2 a = Swap c2 c1 :.: Tuple1 c2 c1 a
- pattern Tuple2 :: (Category c1, Category c2) => Obj c2 a -> Tuple2 c1 c2 a
- type Swap (c1 :: * -> * -> *) (c2 :: * -> * -> *) = (Proj2 c1 c2 :***: Proj1 c1 c2) :.: DiagProd (c1 :**: c2)
- pattern Swap :: (Category c1, Category c2) => Swap c1 c2
- data Hom (k :: * -> * -> *) = Hom
- type (:*-:) x k = Hom k :.: Tuple1 (Op k) k x
- pattern HomX_ :: Category k => Obj k x -> x :*-: k
- type (:-*:) k x = Hom k :.: Tuple2 (Op k) k x
- pattern Hom_X :: Category k => Obj k x -> k :-*: x
- type HomF f g = Hom (Cod f) :.: (Opposite f :***: g)
- pattern HomF :: (Functor f, Functor g, Cod f ~ Cod g) => f -> g -> HomF f g
- type Star f = HomF (Id (Cod f)) f
- pattern Star :: Functor f => f -> Star f
- type Costar f = HomF f (Id (Cod f))
- pattern Costar :: Functor f => f -> Costar f
Cat
data Cat :: (* -> * -> *) -> (* -> * -> *) -> * where Source #
Functors are arrows in the category Cat.
CatA :: (Functor ftag, Category (Dom ftag), Category (Cod ftag)) => ftag -> Cat (Dom ftag) (Cod ftag) |
Instances
Functors
class (Category (Dom ftag), Category (Cod ftag)) => Functor ftag where Source #
Functors map objects and arrows.
type Dom ftag :: * -> * -> * Source #
The domain, or source category, of the functor.
type Cod ftag :: * -> * -> * Source #
The codomain, or target category, of the functor.
type ftag :% a :: * infixr 9 Source #
:%
maps objects.
Instances
Functor Add Source # | Ordinal addition is a bifuntor, it concattenates the maps as it were. |
Functor Forget Source # | Turn |
Functor Add Source # | Ordinal addition is a bifuntor, it concattenates the maps as it were. |
Functor Forget Source # | Turn |
Functor M1 Source # | |
Category k => Functor (Hom k) Source # | The Hom functor, Hom(--,--), a bifunctor contravariant in its first argument and covariant in its second argument. |
Category k => Functor (DiagProd k) Source # |
|
Functor f => Functor (Any f) Source # | |
Category k => Functor (OpOpInv k) Source # | The |
Category k => Functor (OpOp k) Source # | The |
(Category (Dom f), Category (Cod f)) => Functor (Opposite f) Source # | The dual of a functor |
Category k => Functor (Id k) Source # | The identity functor on k |
Category k => Functor (CodiagCoprod k) Source # |
|
Defined in Data.Category.Coproduct type Dom (CodiagCoprod k) :: Type -> Type -> Type Source # type Cod (CodiagCoprod k) :: Type -> Type -> Type Source # type (CodiagCoprod k) :% a :: Type Source # (%) :: CodiagCoprod k -> Dom (CodiagCoprod k) a b -> Cod (CodiagCoprod k) (CodiagCoprod k :% a) (CodiagCoprod k :% b) Source # | |
Category k => Functor (Magic k) Source # | Since there is nothing to map in |
HasBinaryCoproducts k => Functor (CoproductFunctor k) Source # | Binary coproduct as a bifunctor. |
Defined in Data.Category.Limit type Dom (CoproductFunctor k) :: Type -> Type -> Type Source # type Cod (CoproductFunctor k) :: Type -> Type -> Type Source # type (CoproductFunctor k) :% a :: Type Source # (%) :: CoproductFunctor k -> Dom (CoproductFunctor k) a b -> Cod (CoproductFunctor k) (CoproductFunctor k :% a) (CoproductFunctor k :% b) Source # | |
HasBinaryProducts k => Functor (ProductFunctor k) Source # | Binary product as a bifunctor. |
Defined in Data.Category.Limit type Dom (ProductFunctor k) :: Type -> Type -> Type Source # type Cod (ProductFunctor k) :: Type -> Type -> Type Source # type (ProductFunctor k) :% a :: Type Source # (%) :: ProductFunctor k -> Dom (ProductFunctor k) a b -> Cod (ProductFunctor k) (ProductFunctor k :% a) (ProductFunctor k :% b) Source # | |
(Functor m, Dom m ~ k, Cod m ~ k) => Functor (KleisliForget m) Source # | |
Defined in Data.Category.Kleisli type Dom (KleisliForget m) :: Type -> Type -> Type Source # type Cod (KleisliForget m) :: Type -> Type -> Type Source # type (KleisliForget m) :% a :: Type Source # (%) :: KleisliForget m -> Dom (KleisliForget m) a b -> Cod (KleisliForget m) (KleisliForget m :% a) (KleisliForget m :% b) Source # | |
(Functor m, Dom m ~ k, Cod m ~ k) => Functor (KleisliFree m) Source # | |
Defined in Data.Category.Kleisli type Dom (KleisliFree m) :: Type -> Type -> Type Source # type Cod (KleisliFree m) :: Type -> Type -> Type Source # type (KleisliFree m) :% a :: Type Source # (%) :: KleisliFree m -> Dom (KleisliFree m) a b -> Cod (KleisliFree m) (KleisliFree m :% a) (KleisliFree m :% b) Source # | |
(Functor m, Dom m ~ k, Cod m ~ k) => Functor (ForgetAlg m) Source # |
|
(Functor m, Dom m ~ k, Cod m ~ k) => Functor (FreeAlg m) Source # |
|
CartesianClosed k => Functor (ExpFunctor k) Source # | The exponential as a bifunctor. |
Defined in Data.Category.CartesianClosed type Dom (ExpFunctor k) :: Type -> Type -> Type Source # type Cod (ExpFunctor k) :: Type -> Type -> Type Source # type (ExpFunctor k) :% a :: Type Source # (%) :: ExpFunctor k -> Dom (ExpFunctor k) a b -> Cod (ExpFunctor k) (ExpFunctor k :% a) (ExpFunctor k :% b) Source # | |
Category (f (Fix f)) => Functor (Unwrap (Fix f)) Source # | The |
Category (f (Fix f)) => Functor (Wrap (Fix f)) Source # | |
HasInitialObject k => Functor (Initializer k) Source # |
|
Defined in Data.Category.Boolean type Dom (Initializer k) :: Type -> Type -> Type Source # type Cod (Initializer k) :: Type -> Type -> Type Source # type (Initializer k) :% a :: Type Source # (%) :: Initializer k -> Dom (Initializer k) a b -> Cod (Initializer k) (Initializer k :% a) (Initializer k :% b) Source # | |
HasTerminalObject k => Functor (Terminator k) Source # |
|
Defined in Data.Category.Boolean type Dom (Terminator k) :: Type -> Type -> Type Source # type Cod (Terminator k) :: Type -> Type -> Type Source # type (Terminator k) :% a :: Type Source # (%) :: Terminator k -> Dom (Terminator k) a b -> Cod (Terminator k) (Terminator k :% a) (Terminator k :% b) Source # | |
EFunctor f => Functor (UnderlyingF f) Source # | The underlying functor of an enriched functor |
Defined in Data.Category.Enriched type Dom (UnderlyingF f) :: Type -> Type -> Type Source # type Cod (UnderlyingF f) :: Type -> Type -> Type Source # type (UnderlyingF f) :% a :: Type Source # (%) :: UnderlyingF f -> Dom (UnderlyingF f) a b -> Cod (UnderlyingF f) (UnderlyingF f :% a) (UnderlyingF f :% b) Source # | |
(Functor f1, Functor f2) => Functor (f1 :***: f2) Source # |
|
(Category c1, Category c2) => Functor (Proj2 c1 c2) Source # |
|
(Category c1, Category c2) => Functor (Proj1 c1 c2) Source # |
|
(Category (Cod g), Category (Dom h)) => Functor (g :.: h) Source # | The composition of two functors. |
(Category c1, Category c2) => Functor (Tuple c1 c2) Source # | |
(Category c1, Category c2) => Functor (Apply c1 c2) Source # |
|
(Functor f, Functor h) => Functor (Wrap f h) Source # |
|
(Functor f, Functor g, Dom f ~ Dom g, Cod f ~ Cod g) => Functor (NatAsFunctor f g) Source # | A natural transformation |
Defined in Data.Category.Coproduct type Dom (NatAsFunctor f g) :: Type -> Type -> Type Source # type Cod (NatAsFunctor f g) :: Type -> Type -> Type Source # type (NatAsFunctor f g) :% a :: Type Source # (%) :: NatAsFunctor f g -> Dom (NatAsFunctor f g) a b -> Cod (NatAsFunctor f g) (NatAsFunctor f g :% a) (NatAsFunctor f g :% b) Source # | |
(Functor f1, Functor f2) => Functor (f1 :+++: f2) Source # |
|
(Category c1, Category c2) => Functor (Inj2 c1 c2) Source # |
|
(Category c1, Category c2) => Functor (Inj1 c1 c2) Source # |
|
(Category (Dom p), Category (Cod p)) => Functor (p :+: q) Source # | The coproduct of two functors, passing the same object to both functors and taking the coproduct of the results. |
(Category (Dom p), Category (Cod p)) => Functor (p :*: q) Source # | The product of two functors, passing the same object to both functors and taking the product of the results. |
HasColimits j k => Functor (ColimitFunctor j k) Source # | If every diagram of type |
Defined in Data.Category.Limit type Dom (ColimitFunctor j k) :: Type -> Type -> Type Source # type Cod (ColimitFunctor j k) :: Type -> Type -> Type Source # type (ColimitFunctor j k) :% a :: Type Source # (%) :: ColimitFunctor j k -> Dom (ColimitFunctor j k) a b -> Cod (ColimitFunctor j k) (ColimitFunctor j k :% a) (ColimitFunctor j k :% b) Source # | |
HasLimits j k => Functor (LimitFunctor j k) Source # | If every diagram of type |
Defined in Data.Category.Limit type Dom (LimitFunctor j k) :: Type -> Type -> Type Source # type Cod (LimitFunctor j k) :: Type -> Type -> Type Source # type (LimitFunctor j k) :% a :: Type Source # (%) :: LimitFunctor j k -> Dom (LimitFunctor j k) a b -> Cod (LimitFunctor j k) (LimitFunctor j k :% a) (LimitFunctor j k :% b) Source # | |
(Category j, Category k) => Functor (Diag j k) Source # | The diagonal functor from (index-) category J to k. |
TensorProduct f => Functor (Replicate f a) Source # | Replicate a monoid a number of times. |
Functor p => Functor (LanHaskF p f) Source # | |
Functor p => Functor (RanHaskF p f) Source # | |
HasLeftKan p k => Functor (LanFunctor p k) Source # | |
Defined in Data.Category.KanExtension type Dom (LanFunctor p k) :: Type -> Type -> Type Source # type Cod (LanFunctor p k) :: Type -> Type -> Type Source # type (LanFunctor p k) :% a :: Type Source # (%) :: LanFunctor p k -> Dom (LanFunctor p k) a b -> Cod (LanFunctor p k) (LanFunctor p k :% a) (LanFunctor p k :% b) Source # | |
HasRightKan p k => Functor (RanFunctor p k) Source # | |
Defined in Data.Category.KanExtension type Dom (RanFunctor p k) :: Type -> Type -> Type Source # type Cod (RanFunctor p k) :: Type -> Type -> Type Source # type (RanFunctor p k) :% a :: Type Source # (%) :: RanFunctor p k -> Dom (RanFunctor p k) a b -> Cod (RanFunctor p k) (RanFunctor p k :% a) (RanFunctor p k :% b) Source # | |
(Category k, Functor f, Dom f ~ Op k, Cod f ~ ((->) :: Type -> Type -> Type)) => Functor (Yoneda k f) Source # |
|
(Category c1, Category c2) => Functor (Const c1 c2 x) Source # | The constant functor. |
(Category c, Category d, Category e) => Functor (FunctorCompose c d e) Source # | Composition of functors is a functor. |
Defined in Data.Category.NaturalTransformation type Dom (FunctorCompose c d e) :: Type -> Type -> Type Source # type Cod (FunctorCompose c d e) :: Type -> Type -> Type Source # type (FunctorCompose c d e) :% a :: Type Source # (%) :: FunctorCompose c d e -> Dom (FunctorCompose c d e) a b -> Cod (FunctorCompose c d e) (FunctorCompose c d e :% a) (FunctorCompose c d e :% b) Source # | |
(Category c1, Category c2) => Functor (Cotuple2 c1 c2 a2) Source # |
|
(Category c1, Category c2) => Functor (Cotuple1 c1 c2 a1) Source # |
|
Category k => Functor (Arrow k a b) Source # | Any functor from the Boolean category points to an arrow in its target category. |
Functor instances
data Id (k :: * -> * -> *) Source #
Instances
Category k => Functor (Id k) Source # | The identity functor on k |
(Category j, Category k) => HasLeftKan (Id j) k Source # | Lan id = id |
(Category j, Category k) => HasRightKan (Id j) k Source # | Ran id = id |
HasInitialObject (Dialg (Tuple1 ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ()) (DiagProd ((->) :: Type -> Type -> Type))) Source # | The category for defining the natural numbers and primitive recursion can be described as
|
Defined in Data.Category.Dialg initialObject :: Obj (Dialg (Tuple1 (->) (->) ()) (DiagProd (->))) (InitialObject (Dialg (Tuple1 (->) (->) ()) (DiagProd (->)))) Source # initialize :: Obj (Dialg (Tuple1 (->) (->) ()) (DiagProd (->))) a -> Dialg (Tuple1 (->) (->) ()) (DiagProd (->)) (InitialObject (Dialg (Tuple1 (->) (->) ()) (DiagProd (->)))) a Source # | |
type Dom (Id k) Source # | |
Defined in Data.Category.Functor | |
type Cod (Id k) Source # | |
Defined in Data.Category.Functor | |
type (Id k) :% a Source # | |
Defined in Data.Category.Functor | |
type LanFam (Id j) k f Source # | |
Defined in Data.Category.KanExtension | |
type RanFam (Id j) k f Source # | |
Defined in Data.Category.KanExtension | |
type InitialObject (Dialg (Tuple1 ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ()) (DiagProd ((->) :: Type -> Type -> Type))) Source # | |
Defined in Data.Category.Dialg type InitialObject (Dialg (Tuple1 ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ()) (DiagProd ((->) :: Type -> Type -> Type))) = NatNum |
Instances
HasInitialObject (Dialg (Tuple1 ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ()) (DiagProd ((->) :: Type -> Type -> Type))) Source # | The category for defining the natural numbers and primitive recursion can be described as
|
Defined in Data.Category.Dialg initialObject :: Obj (Dialg (Tuple1 (->) (->) ()) (DiagProd (->))) (InitialObject (Dialg (Tuple1 (->) (->) ()) (DiagProd (->)))) Source # initialize :: Obj (Dialg (Tuple1 (->) (->) ()) (DiagProd (->))) a -> Dialg (Tuple1 (->) (->) ()) (DiagProd (->)) (InitialObject (Dialg (Tuple1 (->) (->) ()) (DiagProd (->)))) a Source # | |
(Category (Cod g), Category (Dom h)) => Functor (g :.: h) Source # | The composition of two functors. |
(TensorProduct t, Cod t ~ f (Fix f)) => TensorProduct (WrapTensor (Fix f) t) Source # |
|
Defined in Data.Category.Fix type Unit (WrapTensor (Fix f) t) :: Type Source # unitObject :: WrapTensor (Fix f) t -> Obj (Cod (WrapTensor (Fix f) t)) (Unit (WrapTensor (Fix f) t)) Source # leftUnitor :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> k (WrapTensor (Fix f) t :% (Unit (WrapTensor (Fix f) t), a)) a Source # leftUnitorInv :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> k a (WrapTensor (Fix f) t :% (Unit (WrapTensor (Fix f) t), a)) Source # rightUnitor :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> k (WrapTensor (Fix f) t :% (a, Unit (WrapTensor (Fix f) t))) a Source # rightUnitorInv :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> k a (WrapTensor (Fix f) t :% (a, Unit (WrapTensor (Fix f) t))) Source # associator :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> Obj k b -> Obj k c -> k (WrapTensor (Fix f) t :% (WrapTensor (Fix f) t :% (a, b), c)) (WrapTensor (Fix f) t :% (a, WrapTensor (Fix f) t :% (b, c))) Source # associatorInv :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> Obj k b -> Obj k c -> k (WrapTensor (Fix f) t :% (a, WrapTensor (Fix f) t :% (b, c))) (WrapTensor (Fix f) t :% (WrapTensor (Fix f) t :% (a, b), c)) Source # | |
(HasLeftKan q k, HasLeftKan p k) => HasLeftKan (q :.: p) k Source # | Lan (q . p) = Lan q . Lan p |
Defined in Data.Category.KanExtension | |
(HasRightKan q k, HasRightKan p k) => HasRightKan (q :.: p) k Source # | Ran (q . p) = Ran q . Ran p |
Defined in Data.Category.KanExtension | |
type InitialObject (Dialg (Tuple1 ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ()) (DiagProd ((->) :: Type -> Type -> Type))) Source # | |
Defined in Data.Category.Dialg type InitialObject (Dialg (Tuple1 ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ()) (DiagProd ((->) :: Type -> Type -> Type))) = NatNum | |
type Dom (g :.: h) Source # | |
Defined in Data.Category.Functor | |
type Cod (g :.: h) Source # | |
Defined in Data.Category.Functor | |
type Unit (WrapTensor (Fix f) t) Source # | |
Defined in Data.Category.Fix | |
type (g :.: h) :% a Source # | |
Defined in Data.Category.Functor | |
type LanFam (q :.: p) k f Source # | |
Defined in Data.Category.KanExtension | |
type RanFam (q :.: p) k f Source # | |
Defined in Data.Category.KanExtension |
data Const (c1 :: * -> * -> *) (c2 :: * -> * -> *) x where Source #
Instances
HasInitialObject (Dialg (Tuple1 ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ()) (DiagProd ((->) :: Type -> Type -> Type))) Source # | The category for defining the natural numbers and primitive recursion can be described as
|
Defined in Data.Category.Dialg initialObject :: Obj (Dialg (Tuple1 (->) (->) ()) (DiagProd (->))) (InitialObject (Dialg (Tuple1 (->) (->) ()) (DiagProd (->)))) Source # initialize :: Obj (Dialg (Tuple1 (->) (->) ()) (DiagProd (->))) a -> Dialg (Tuple1 (->) (->) ()) (DiagProd (->)) (InitialObject (Dialg (Tuple1 (->) (->) ()) (DiagProd (->)))) a Source # | |
(Category c1, Category c2) => Functor (Const c1 c2 x) Source # | The constant functor. |
HasColimits j k => HasLeftKan (Const j Unit ()) k Source # | The left Kan extension of |
Defined in Data.Category.KanExtension lan :: Const j Unit () -> Obj (Nat (Dom (Const j Unit ())) k) f -> Nat (Dom (Const j Unit ())) k f (LanFam (Const j Unit ()) k f :.: Const j Unit ()) Source # lanFactorizer :: Nat (Dom (Const j Unit ())) k f (h :.: Const j Unit ()) -> Nat (Cod (Const j Unit ())) k (LanFam (Const j Unit ()) k f) h Source # | |
HasLimits j k => HasRightKan (Const j Unit ()) k Source # | The right Kan extension of |
Defined in Data.Category.KanExtension ran :: Const j Unit () -> Obj (Nat (Dom (Const j Unit ())) k) f -> Nat (Dom (Const j Unit ())) k (RanFam (Const j Unit ()) k f :.: Const j Unit ()) f Source # ranFactorizer :: Nat (Dom (Const j Unit ())) k (h :.: Const j Unit ()) f -> Nat (Cod (Const j Unit ())) k h (RanFam (Const j Unit ()) k f) Source # | |
type InitialObject (Dialg (Tuple1 ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ()) (DiagProd ((->) :: Type -> Type -> Type))) Source # | |
Defined in Data.Category.Dialg type InitialObject (Dialg (Tuple1 ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ()) (DiagProd ((->) :: Type -> Type -> Type))) = NatNum | |
type Dom (Const c1 c2 x) Source # | |
Defined in Data.Category.Functor | |
type Cod (Const c1 c2 x) Source # | |
Defined in Data.Category.Functor | |
type (Const c1 c2 x) :% a Source # | |
Defined in Data.Category.Functor | |
type LanFam (Const j Unit ()) k f Source # | |
Defined in Data.Category.KanExtension | |
type RanFam (Const j Unit ()) k f Source # | |
type ConstF f = Const (Dom f) (Cod f) Source #
The constant functor with the same domain and codomain as f.
A functor wrapper in case of conflicting family instance declarations
Any f |
Instances
Functor f => Functor (Any f) Source # | |
Functor p => HasLeftKan (Any p) ((->) :: Type -> Type -> Type) Source # | |
Defined in Data.Category.KanExtension | |
Functor p => HasRightKan (Any p) ((->) :: Type -> Type -> Type) Source # | |
Defined in Data.Category.KanExtension | |
type Dom (Any f) Source # | |
Defined in Data.Category.Functor | |
type Cod (Any f) Source # | |
Defined in Data.Category.Functor | |
type (Any f) :% a Source # | |
Defined in Data.Category.Functor | |
type LanFam (Any p) ((->) :: Type -> Type -> Type) f Source # | |
Defined in Data.Category.KanExtension | |
type RanFam (Any p) ((->) :: Type -> Type -> Type) f Source # | |
Defined in Data.Category.KanExtension |
Related to the product category
data Proj1 (c1 :: * -> * -> *) (c2 :: * -> * -> *) Source #
Instances
(Category c1, Category c2) => Functor (Proj1 c1 c2) Source # |
|
type Dom (Proj1 c1 c2) Source # | |
Defined in Data.Category.Functor | |
type Cod (Proj1 c1 c2) Source # | |
Defined in Data.Category.Functor | |
type (Proj1 c1 c2) :% (a1, a2) Source # | |
Defined in Data.Category.Functor |
data Proj2 (c1 :: * -> * -> *) (c2 :: * -> * -> *) Source #
Instances
(Category c1, Category c2) => Functor (Proj2 c1 c2) Source # |
|
type Dom (Proj2 c1 c2) Source # | |
Defined in Data.Category.Functor | |
type Cod (Proj2 c1 c2) Source # | |
Defined in Data.Category.Functor | |
type (Proj2 c1 c2) :% (a1, a2) Source # | |
Defined in Data.Category.Functor |
data f1 :***: f2 where Source #
Instances
HasInitialObject (Dialg (Tuple1 ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ()) (DiagProd ((->) :: Type -> Type -> Type))) Source # | The category for defining the natural numbers and primitive recursion can be described as
|
Defined in Data.Category.Dialg initialObject :: Obj (Dialg (Tuple1 (->) (->) ()) (DiagProd (->))) (InitialObject (Dialg (Tuple1 (->) (->) ()) (DiagProd (->)))) Source # initialize :: Obj (Dialg (Tuple1 (->) (->) ()) (DiagProd (->))) a -> Dialg (Tuple1 (->) (->) ()) (DiagProd (->)) (InitialObject (Dialg (Tuple1 (->) (->) ()) (DiagProd (->)))) a Source # | |
(Functor f1, Functor f2) => Functor (f1 :***: f2) Source # |
|
(TensorProduct t, Cod t ~ f (Fix f)) => TensorProduct (WrapTensor (Fix f) t) Source # |
|
Defined in Data.Category.Fix type Unit (WrapTensor (Fix f) t) :: Type Source # unitObject :: WrapTensor (Fix f) t -> Obj (Cod (WrapTensor (Fix f) t)) (Unit (WrapTensor (Fix f) t)) Source # leftUnitor :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> k (WrapTensor (Fix f) t :% (Unit (WrapTensor (Fix f) t), a)) a Source # leftUnitorInv :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> k a (WrapTensor (Fix f) t :% (Unit (WrapTensor (Fix f) t), a)) Source # rightUnitor :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> k (WrapTensor (Fix f) t :% (a, Unit (WrapTensor (Fix f) t))) a Source # rightUnitorInv :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> k a (WrapTensor (Fix f) t :% (a, Unit (WrapTensor (Fix f) t))) Source # associator :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> Obj k b -> Obj k c -> k (WrapTensor (Fix f) t :% (WrapTensor (Fix f) t :% (a, b), c)) (WrapTensor (Fix f) t :% (a, WrapTensor (Fix f) t :% (b, c))) Source # associatorInv :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> Obj k b -> Obj k c -> k (WrapTensor (Fix f) t :% (a, WrapTensor (Fix f) t :% (b, c))) (WrapTensor (Fix f) t :% (WrapTensor (Fix f) t :% (a, b), c)) Source # | |
type InitialObject (Dialg (Tuple1 ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ()) (DiagProd ((->) :: Type -> Type -> Type))) Source # | |
Defined in Data.Category.Dialg type InitialObject (Dialg (Tuple1 ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ()) (DiagProd ((->) :: Type -> Type -> Type))) = NatNum | |
type Dom (f1 :***: f2) Source # | |
type Cod (f1 :***: f2) Source # | |
type Unit (WrapTensor (Fix f) t) Source # | |
Defined in Data.Category.Fix | |
type (f1 :***: f2) :% (a1, a2) Source # | |
Defined in Data.Category.Functor |
data DiagProd (k :: * -> * -> *) Source #
Instances
Category k => Functor (DiagProd k) Source # |
|
HasInitialObject (Dialg (Tuple1 ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ()) (DiagProd ((->) :: Type -> Type -> Type))) Source # | The category for defining the natural numbers and primitive recursion can be described as
|
Defined in Data.Category.Dialg initialObject :: Obj (Dialg (Tuple1 (->) (->) ()) (DiagProd (->))) (InitialObject (Dialg (Tuple1 (->) (->) ()) (DiagProd (->)))) Source # initialize :: Obj (Dialg (Tuple1 (->) (->) ()) (DiagProd (->))) a -> Dialg (Tuple1 (->) (->) ()) (DiagProd (->)) (InitialObject (Dialg (Tuple1 (->) (->) ()) (DiagProd (->)))) a Source # | |
type Dom (DiagProd k) Source # | |
Defined in Data.Category.Functor | |
type Cod (DiagProd k) Source # | |
Defined in Data.Category.Functor | |
type (DiagProd k) :% a Source # | |
Defined in Data.Category.Functor | |
type InitialObject (Dialg (Tuple1 ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ()) (DiagProd ((->) :: Type -> Type -> Type))) Source # | |
Defined in Data.Category.Dialg type InitialObject (Dialg (Tuple1 ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ()) (DiagProd ((->) :: Type -> Type -> Type))) = NatNum |
pattern Tuple1 :: (Category c1, Category c2) => Obj c1 a -> Tuple1 c1 c2 a Source #
Tuple1
tuples with a fixed object on the left.
pattern Tuple2 :: (Category c1, Category c2) => Obj c2 a -> Tuple2 c1 c2 a Source #
Tuple2
tuples with a fixed object on the right.
type Swap (c1 :: * -> * -> *) (c2 :: * -> * -> *) = (Proj2 c1 c2 :***: Proj1 c1 c2) :.: DiagProd (c1 :**: c2) Source #
pattern Swap :: (Category c1, Category c2) => Swap c1 c2 Source #
swap
swaps the 2 categories of the product of categories.
Hom functors
data Hom (k :: * -> * -> *) Source #
Instances
Category k => Functor (Hom k) Source # | The Hom functor, Hom(--,--), a bifunctor contravariant in its first argument and covariant in its second argument. |
type Dom (Hom k) Source # | |
Defined in Data.Category.Functor | |
type Cod (Hom k) Source # | |
Defined in Data.Category.Functor | |
type (Hom k) :% (a1, a2) Source # | |
Defined in Data.Category.Functor |