Portability | non-portable |
---|---|
Stability | experimental |
Maintainer | sjoerd@w3future.com |
Documentation
class Functor f => HasUnit f whereSource
unitObject :: f -> Obj (Cod f) (Unit f)Source
Category ~> => HasUnit (FunctorCompose ~>) | |
(HasTerminalObject ~>, HasBinaryProducts ~>) => HasUnit (ProductFunctor ~>) | |
(HasInitialObject ~>, HasBinaryCoproducts ~>) => HasUnit (CoproductFunctor ~>) |
class HasUnit f => TensorProduct f whereSource
leftUnitor :: Cod f ~ ~> => f -> Obj ~> a -> (f :% (Unit f, a)) ~> aSource
leftUnitorInv :: Cod f ~ ~> => f -> Obj ~> a -> a ~> (f :% (Unit f, a))Source
rightUnitor :: Cod f ~ ~> => f -> Obj ~> a -> (f :% (a, Unit f)) ~> aSource
rightUnitorInv :: Cod f ~ ~> => f -> Obj ~> a -> a ~> (f :% (a, Unit f))Source
associator :: Cod f ~ ~> => f -> Obj ~> a -> Obj ~> b -> Obj ~> c -> (f :% (f :% (a, b), c)) ~> (f :% (a, f :% (b, c)))Source
associatorInv :: Cod f ~ ~> => f -> Obj ~> a -> Obj ~> b -> Obj ~> c -> (f :% (a, f :% (b, c))) ~> (f :% (f :% (a, b), c))Source
Category ~> => TensorProduct (FunctorCompose ~>) | |
(HasTerminalObject ~>, HasBinaryProducts ~>) => TensorProduct (ProductFunctor ~>) | |
(HasInitialObject ~>, HasBinaryCoproducts ~>) => TensorProduct (CoproductFunctor ~>) |
data MonoidObject f a Source
data ComonoidObject f a Source
preludeMonoid :: Monoid m => MonoidObject (ProductFunctor (->)) mSource
data MonoidAsCategory f m a b whereSource
MonoidValue :: (TensorProduct f, Dom f ~ ~> :**: ~>, Cod f ~ ~>) => f -> MonoidObject f m -> (Unit f ~> m) -> MonoidAsCategory f m m m |
Category (MonoidAsCategory f m) |
type Monad f = MonoidObject (FunctorCompose (Dom f)) fSource
mkMonad :: (Functor f, Dom f ~ ~>, Cod f ~ ~>, Category ~>) => f -> (forall a. Obj ~> a -> Component (Id ~>) f a) -> (forall a. Obj ~> a -> Component (f :.: f) f a) -> Monad fSource
monadFunctor :: forall f. Monad f -> fSource
type Comonad f = ComonoidObject (FunctorCompose (Dom f)) fSource
mkComonad :: (Functor f, Dom f ~ ~>, Cod f ~ ~>, Category ~>) => f -> (forall a. Obj ~> a -> Component f (Id ~>) a) -> (forall a. Obj ~> a -> Component f (f :.: f) a) -> Comonad fSource
adjunctionMonad :: Adjunction c d f g -> Monad (g :.: f)Source
adjunctionComonad :: Adjunction c d f g -> Comonad (f :.: g)Source