[commit: base] master: Remove some __HADDOCK__ CPP (3b56ec7)
Ian Lynagh
igloo at earth.li
Tue Feb 28 23:20:59 CET 2012
Repository : ssh://darcs.haskell.org//srv/darcs/packages/base
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/3b56ec719afa1010fc3adb2f1983845d8c484d80
>---------------------------------------------------------------
commit 3b56ec719afa1010fc3adb2f1983845d8c484d80
Author: Ian Lynagh <igloo at earth.li>
Date: Tue Feb 28 21:39:48 2012 +0000
Remove some __HADDOCK__ CPP
I think it was all to work around problems in old versions of haddock.
>---------------------------------------------------------------
Control/Category.hs | 3 ---
Data/Monoid.hs | 14 --------------
GHC/Desugar.hs | 2 --
GHC/Err.lhs | 2 --
GHC/Read.lhs | 2 --
Text/ParserCombinators/ReadP.hs | 2 --
Text/Read/Lex.hs | 2 --
7 files changed, 0 insertions(+), 27 deletions(-)
diff --git a/Control/Category.hs b/Control/Category.hs
index b06155f..e7eeb1d 100644
--- a/Control/Category.hs
+++ b/Control/Category.hs
@@ -40,10 +40,7 @@ class Category cat where
instance Category (->) where
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
diff --git a/Data/Monoid.hs b/Data/Monoid.hs
index bb3c4ec..90bd437 100644
--- a/Data/Monoid.hs
+++ b/Data/Monoid.hs
@@ -235,14 +235,7 @@ instance Monoid a => Monoid (Maybe a) where
-- | Maybe monoid returning the leftmost non-Nothing value.
newtype First a = First { getFirst :: Maybe a }
-#ifndef __HADDOCK__
deriving (Eq, Ord, Read, Show)
-#else /* __HADDOCK__ */
-instance Eq a => Eq (First a)
-instance Ord a => Ord (First a)
-instance Read a => Read (First a)
-instance Show a => Show (First a)
-#endif
instance Monoid (First a) where
mempty = First Nothing
@@ -251,14 +244,7 @@ instance Monoid (First a) where
-- | Maybe monoid returning the rightmost non-Nothing value.
newtype Last a = Last { getLast :: Maybe a }
-#ifndef __HADDOCK__
deriving (Eq, Ord, Read, Show)
-#else /* __HADDOCK__ */
-instance Eq a => Eq (Last a)
-instance Ord a => Ord (Last a)
-instance Read a => Read (Last a)
-instance Show a => Show (Last a)
-#endif
instance Monoid (Last a) where
mempty = Last Nothing
diff --git a/GHC/Desugar.hs b/GHC/Desugar.hs
index 6a5562f..d4da1c8 100644
--- a/GHC/Desugar.hs
+++ b/GHC/Desugar.hs
@@ -27,9 +27,7 @@ import Control.Category ((.))
import Data.Data (Data)
-- A version of Control.Category.>>> overloaded on Arrow
-#ifndef __HADDOCK__
(>>>) :: forall arr. Arrow arr => forall a b c. arr a b -> arr b c -> arr a c
-#endif
-- NB: the type of this function is the "shape" that GHC expects
-- in tcInstClassOp. So don't put all the foralls at the front!
-- Yes, this is a bit grotesque, but heck it works and the whole
diff --git a/GHC/Err.lhs b/GHC/Err.lhs
index 348f17c..5352a06 100644
--- a/GHC/Err.lhs
+++ b/GHC/Err.lhs
@@ -34,10 +34,8 @@ module GHC.Err
, undefined -- :: a
) where
-#ifndef __HADDOCK__
import GHC.Types
import GHC.Exception
-#endif
\end{code}
%*********************************************************
diff --git a/GHC/Read.lhs b/GHC/Read.lhs
index fcbdb8e..cea761b 100644
--- a/GHC/Read.lhs
+++ b/GHC/Read.lhs
@@ -64,9 +64,7 @@ import Text.ParserCombinators.ReadPrec
import Data.Maybe
-#ifndef __HADDOCK__
import {-# SOURCE #-} GHC.Unicode ( isDigit )
-#endif
import GHC.Num
import GHC.Real
import GHC.Float ()
diff --git a/Text/ParserCombinators/ReadP.hs b/Text/ParserCombinators/ReadP.hs
index 3424712..cfcb3bd 100644
--- a/Text/ParserCombinators/ReadP.hs
+++ b/Text/ParserCombinators/ReadP.hs
@@ -82,9 +82,7 @@ module Text.ParserCombinators.ReadP
import Control.Monad( MonadPlus(..), sequence, liftM2 )
#ifdef __GLASGOW_HASKELL__
-#ifndef __HADDOCK__
import {-# SOURCE #-} GHC.Unicode ( isSpace )
-#endif
import GHC.List ( replicate, null )
import GHC.Base
#else
diff --git a/Text/Read/Lex.hs b/Text/Read/Lex.hs
index e4563b6..e0573bf 100644
--- a/Text/Read/Lex.hs
+++ b/Text/Read/Lex.hs
@@ -37,9 +37,7 @@ import Text.ParserCombinators.ReadP
import GHC.Base
import GHC.Num( Num(..), Integer )
import GHC.Show( Show(..) )
-#ifndef __HADDOCK__
import {-# SOURCE #-} GHC.Unicode ( isSpace, isAlpha, isAlphaNum )
-#endif
import GHC.Real( Integral, Rational, (%), fromIntegral,
toInteger, (^), infinity, notANumber )
import GHC.List
More information about the Cvs-libraries
mailing list