HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulebase-4.20.2.0Haskell2010

Control.Category

  • 1 class
  • 2 values
  • Packagebase-4.20.2.0
  • Exports3
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceCategory.hs
classclass Category (cat :: k -> k -> Type) where
#

A class for categories. Instances should satisfy the laws

Right identity

f . id = f

Left identity

id . f = f

Associativity

f . (g . h) = (f . g) . h

Methods

  • id :: cat a a

    the identity morphism

  • (.) :: cat b c -> cat a b -> cat a cinfixr 9

    morphism composition

Instances6Category
  • Category OpDefined in base-4.20.2.0 · Data.Functor.Contravariant
  • Monad m => Category (Kleisli m)Defined in ghc-internal-9.1003.0 · GHC.Internal.Control.Arrow
  • Category CoercionDefined in ghc-internal-9.1003.0 · GHC.Internal.Control.Category
  • Category (:~:)Defined in ghc-internal-9.1003.0 · GHC.Internal.Control.Category
  • Category (:~~:)Defined in ghc-internal-9.1003.0 · GHC.Internal.Control.Category
  • Category (->)Defined in ghc-internal-9.1003.0 · GHC.Internal.Control.Category
value(<<<) :: Category cat => cat b c -> cat a b -> cat a c
#

Right-to-left composition

value(>>>) :: Category cat => cat a b -> cat b c -> cat a c
#

Left-to-right composition