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

Moduleghc-internal-9.1003.0Haskell2010

GHC.Internal.Control.Category

  • 1 class
  • 2 values
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

Instances5Category
  • 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