License | BSD-style (see the file LICENSE) |
---|---|
Maintainer | sjoerd@w3future.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- class (ECategory (EDom ftag), ECategory (ECod ftag), V (EDom ftag) ~ V (ECod ftag)) => EFunctor ftag where
- type EFunctorOf a b t = (EFunctor t, EDom t ~ a, ECod t ~ b)
- data Id (k :: Type -> Type -> Type) = Id
- data g :.: h where
- data Const (c1 :: Type -> Type -> Type) (c2 :: Type -> Type -> Type) x where
- data Opposite f where
- data f1 :<*>: f2 = f1 :<*>: f2
- data DiagProd (k :: Type -> Type -> Type) = DiagProd
- newtype UnderlyingF f = UnderlyingF f
- newtype InHaskF f = InHaskF f
- newtype InHaskToHask f = InHaskToHask f
- newtype UnderlyingHask (c :: Type -> Type -> Type) (d :: Type -> Type -> Type) f = UnderlyingHask f
- data EHom (k :: Type -> Type -> Type) = EHom
- data EHomX_ k x = EHomX_ (Obj k x)
- data EHom_X k x = EHom_X (Obj (EOp k) x)
- strength :: EFunctorOf (Self v) (Self v) f => f -> Obj v a -> Obj v b -> v (BinaryProduct v a (f :%% b)) (f :%% BinaryProduct v a b)
- data ENat :: (Type -> Type -> Type) -> (Type -> Type -> Type) -> Type -> Type -> Type where
- ENat :: (EFunctorOf c d f, EFunctorOf c d g) => f -> g -> (forall z. Obj c z -> Arr d (f :%% z) (g :%% z)) -> ENat c d f g
Documentation
class (ECategory (EDom ftag), ECategory (ECod ftag), V (EDom ftag) ~ V (ECod ftag)) => EFunctor ftag where Source #
Enriched functors.
type EDom ftag :: Type -> Type -> Type Source #
The domain, or source category, of the functor.
type ECod ftag :: Type -> Type -> Type Source #
The codomain, or target category, of the functor.
type ftag :%% a :: Type Source #
:%%
maps objects at the type level
(%%) :: ftag -> Obj (EDom ftag) a -> Obj (ECod ftag) (ftag :%% a) Source #
%%
maps object at the value level
map :: EDom ftag ~ k => ftag -> Obj k a -> Obj k b -> V k (k $ (a, b)) (ECod ftag $ (ftag :%% a, ftag :%% b)) Source #
map
maps arrows.
Instances
data Id (k :: Type -> Type -> Type) Source #
Instances
ECategory k => EFunctor (Id k) Source # | The identity functor on k |
type ECod (Id k) Source # | |
Defined in Data.Category.Enriched.Functor | |
type EDom (Id k) Source # | |
Defined in Data.Category.Enriched.Functor | |
type (Id k) :%% a Source # | |
Defined in Data.Category.Enriched.Functor |
Instances
(ECategory (ECod g), ECategory (EDom h), V (EDom h) ~ V (ECod g), ECod h ~ EDom g) => EFunctor (g :.: h) Source # | The composition of two functors. |
type ECod (g :.: h) Source # | |
Defined in Data.Category.Enriched.Functor | |
type EDom (g :.: h) Source # | |
Defined in Data.Category.Enriched.Functor | |
type (g :.: h) :%% a Source # | |
Defined in Data.Category.Enriched.Functor |
data Const (c1 :: Type -> Type -> Type) (c2 :: Type -> Type -> Type) x where Source #
Instances
(ECategory c1, ECategory c2, V c1 ~ V c2) => EFunctor (Const c1 c2 x) Source # | The constant functor. |
type ECod (Const c1 c2 x) Source # | |
Defined in Data.Category.Enriched.Functor | |
type EDom (Const c1 c2 x) Source # | |
Defined in Data.Category.Enriched.Functor | |
type (Const c1 c2 x) :%% a Source # | |
Defined in Data.Category.Enriched.Functor |
data Opposite f where Source #
Instances
EFunctor f => EFunctor (Opposite f) Source # | The dual of a functor |
type ECod (Opposite f) Source # | |
Defined in Data.Category.Enriched.Functor | |
type EDom (Opposite f) Source # | |
Defined in Data.Category.Enriched.Functor | |
type (Opposite f) :%% a Source # | |
Defined in Data.Category.Enriched.Functor |
f1 :<*>: f2 |
Instances
(EFunctor f1, EFunctor f2, V (ECod f1) ~ V (ECod f2)) => EFunctor (f1 :<*>: f2) Source # |
|
type ECod (f1 :<*>: f2) Source # | |
type EDom (f1 :<*>: f2) Source # | |
type (f1 :<*>: f2) :%% (a1, a2) Source # | |
Defined in Data.Category.Enriched.Functor |
data DiagProd (k :: Type -> Type -> Type) Source #
Instances
ECategory k => EFunctor (DiagProd k) Source # |
|
type ECod (DiagProd k) Source # | |
Defined in Data.Category.Enriched.Functor | |
type EDom (DiagProd k) Source # | |
Defined in Data.Category.Enriched.Functor | |
type (DiagProd k) :%% a Source # | |
Defined in Data.Category.Enriched.Functor |
newtype UnderlyingF f Source #
Instances
EFunctor f => Functor (UnderlyingF f) Source # | The underlying functor of an enriched functor |
Defined in Data.Category.Enriched.Functor type Dom (UnderlyingF f) :: Type -> Type -> Type Source # type Cod (UnderlyingF f) :: Type -> Type -> Type Source # type (UnderlyingF f) :% a Source # (%) :: UnderlyingF f -> Dom (UnderlyingF f) a b -> Cod (UnderlyingF f) (UnderlyingF f :% a) (UnderlyingF f :% b) Source # | |
type Cod (UnderlyingF f) Source # | |
Defined in Data.Category.Enriched.Functor | |
type Dom (UnderlyingF f) Source # | |
Defined in Data.Category.Enriched.Functor | |
type (UnderlyingF f) :% a Source # | |
Defined in Data.Category.Enriched.Functor |
InHaskF f |
Instances
Functor f => EFunctor (InHaskF f) Source # | A regular functor is a functor enriched in Hask. |
type ECod (InHaskF f) Source # | |
Defined in Data.Category.Enriched.Functor | |
type EDom (InHaskF f) Source # | |
Defined in Data.Category.Enriched.Functor | |
type (InHaskF f) :%% a Source # | |
Defined in Data.Category.Enriched.Functor |
newtype InHaskToHask f Source #
Instances
newtype UnderlyingHask (c :: Type -> Type -> Type) (d :: Type -> Type -> Type) f Source #
Instances
(EFunctor f, EDom f ~ InHask c, ECod f ~ InHask d, Category c, Category d) => Functor (UnderlyingHask c d f) Source # | The underlying functor of an enriched functor |
Defined in Data.Category.Enriched.Functor type Dom (UnderlyingHask c d f) :: Type -> Type -> Type Source # type Cod (UnderlyingHask c d f) :: Type -> Type -> Type Source # type (UnderlyingHask c d f) :% a Source # (%) :: UnderlyingHask c d f -> Dom (UnderlyingHask c d f) a b -> Cod (UnderlyingHask c d f) (UnderlyingHask c d f :% a) (UnderlyingHask c d f :% b) Source # | |
type Cod (UnderlyingHask c d f) Source # | |
Defined in Data.Category.Enriched.Functor | |
type Dom (UnderlyingHask c d f) Source # | |
Defined in Data.Category.Enriched.Functor | |
type (UnderlyingHask c d f) :% a Source # | |
Defined in Data.Category.Enriched.Functor |
data EHom (k :: Type -> Type -> Type) Source #
Instances
ECategory k => EFunctor (EHom k) Source # | |
type ECod (EHom k) Source # | |
Defined in Data.Category.Enriched.Functor | |
type EDom (EHom k) Source # | |
Defined in Data.Category.Enriched.Functor | |
type (EHom k) :%% (a, b) Source # | |
Defined in Data.Category.Enriched.Functor |
The enriched functor k(x, -)
Instances
ECategory k => EFunctor (EHomX_ k x) Source # | |
type ECod (EHomX_ k x) Source # | |
Defined in Data.Category.Enriched.Functor | |
type EDom (EHomX_ k x) Source # | |
Defined in Data.Category.Enriched.Functor | |
type (EHomX_ k x) :%% y Source # | |
Defined in Data.Category.Enriched.Functor |
The enriched functor k(-, x)
Instances
ECategory k => EFunctor (EHom_X k x) Source # | |
type ECod (EHom_X k x) Source # | |
Defined in Data.Category.Enriched.Functor | |
type EDom (EHom_X k x) Source # | |
Defined in Data.Category.Enriched.Functor | |
type (EHom_X k x) :%% y Source # | |
Defined in Data.Category.Enriched.Functor |
strength :: EFunctorOf (Self v) (Self v) f => f -> Obj v a -> Obj v b -> v (BinaryProduct v a (f :%% b)) (f :%% BinaryProduct v a b) Source #
A V-enrichment on a functor F: V -> V
is the same thing as tensorial strength (a, f b) -> f (a, b)
.