| Copyright | 2008-2010 Edward Kmett |
|---|---|
| License | BSD |
| Maintainer | Edward Kmett <ekmett@gmail.com> |
| Stability | experimental |
| Portability | non-portable (class-associated types) |
| Safe Haskell | Trustworthy |
| Language | Haskell2010 |
Control.Category.Cartesian
Contents
Description
Synopsis
- class (Symmetric k (Product k), Monoidal k (Product k)) => Cartesian (k :: Type -> Type -> Type) where
- bimapProduct :: Cartesian k => k a c -> k b d -> k (Product k a b) (Product k c d)
- braidProduct :: Cartesian k => k (Product k a b) (Product k b a)
- associateProduct :: Cartesian k => k (Product k (Product k a b) c) (Product k a (Product k b c))
- disassociateProduct :: Cartesian k => k (Product k a (Product k b c)) (Product k (Product k a b) c)
- class (Monoidal k (Sum k), Symmetric k (Sum k)) => CoCartesian (k :: Type -> Type -> Type) where
- bimapSum :: CoCartesian k => k a c -> k b d -> k (Sum k a b) (Sum k c d)
- braidSum :: CoCartesian k => k (Sum k a b) (Sum k b a)
- associateSum :: CoCartesian k => k (Sum k (Sum k a b) c) (Sum k a (Sum k b c))
- disassociateSum :: CoCartesian k => k (Sum k a (Sum k b c)) (Sum k (Sum k a b) c)
(Co)Cartesian categories
class (Symmetric k (Product k), Monoidal k (Product k)) => Cartesian (k :: Type -> Type -> Type) where Source #
Minimum definition:
fst, snd, diag fst, snd, (&&&)
Methods
fst :: k (Product k a b) a Source #
snd :: k (Product k a b) b Source #
diag :: k a (Product k a a) Source #
(&&&) :: k a b -> k a c -> k a (Product k b c) infixr 3 Source #
Instances
| Cartesian (->) Source # | |||||
Defined in Control.Category.Cartesian Associated Types
| |||||
associateProduct :: Cartesian k => k (Product k (Product k a b) c) (Product k a (Product k b c)) Source #
free construction of Associative for the product Bifunctor Product k
disassociateProduct :: Cartesian k => k (Product k a (Product k b c)) (Product k (Product k a b) c) Source #
free construction of Disassociative for the product Bifunctor Product k
class (Monoidal k (Sum k), Symmetric k (Sum k)) => CoCartesian (k :: Type -> Type -> Type) where Source #
Methods
inl :: k a (Sum k a b) Source #
inr :: k b (Sum k a b) Source #
codiag :: k (Sum k a a) a Source #
(|||) :: k a c -> k b c -> k (Sum k a b) c infixr 2 Source #
Instances
| CoCartesian (->) Source # | |
associateSum :: CoCartesian k => k (Sum k (Sum k a b) c) (Sum k a (Sum k b c)) Source #
free construction of Associative for the coproduct Bifunctor Sum k
disassociateSum :: CoCartesian k => k (Sum k a (Sum k b c)) (Sum k (Sum k a b) c) Source #
free construction of Disassociative for the coproduct Bifunctor Sum k