X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Control%2FCategory.hs;h=b63fc67c92ed3d86a5680134f1471102567eab25;hb=7a97ec4b12e1fbec5505f82032cf4dc435b5a60c;hp=fa73cff058ee9a17e20d4d6426a0215b57f95f3f;hpb=8afc9fecd586d3c4f7ef9c69fb1686a79e5f441d;p=ghc-base.git diff --git a/Control/Category.hs b/Control/Category.hs index fa73cff..b63fc67 100644 --- a/Control/Category.hs +++ b/Control/Category.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- | -- Module : Control.Category @@ -20,11 +22,11 @@ infixr 1 >>>, <<< -- | A class for categories. -- id and (.) must form a monoid. class Category cat where - -- | the identity morphism - id :: cat a a + -- | the identity morphism + id :: cat a a - -- | morphism composition - (.) :: cat b c -> cat a b -> cat a c + -- | morphism composition + (.) :: cat b c -> cat a b -> cat a c {-# RULES "identity/left" forall p . @@ -36,10 +38,10 @@ class Category cat where #-} instance Category (->) where - id = Prelude.id + id = Prelude.id #ifndef __HADDOCK__ -- Haddock 1.x cannot parse this: - (.) = (Prelude..) + (.) = (Prelude..) #endif -- | Right-to-left composition