doc tweak for Directory file type: file names are '\0'-separated
[ghc-base.git] / Control / Category.hs
index 13fba06..fa73cff 100644 (file)
@@ -12,7 +12,6 @@
 
 module Control.Category where
 
-import Prelude hiding (id,(.))
 import qualified Prelude
 
 infixr 9 .
@@ -21,24 +20,27 @@ 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 .
-               id . p = p
-"identity/right"       forall p .
-               p . id = p
-"association"  forall p q r .
-               (p . q) . r = p . (q . r)
+"identity/left" forall p .
+                id . p = p
+"identity/right"        forall p .
+                p . id = p
+"association"   forall p q r .
+                (p . q) . r = p . (q . r)
  #-}
 
 instance Category (->) where
-       id = Prelude.id
-       (.) = (Prelude..)
+        id = Prelude.id
+#ifndef __HADDOCK__
+-- Haddock 1.x cannot parse this:
+        (.) = (Prelude..)
+#endif
 
 -- | Right-to-left composition
 (<<<) :: Category cat => cat b c -> cat a b -> cat a c