Permalink
Browse files

Remove some __HADDOCK__ CPP

I think it was all to work around problems in old versions of haddock.
  • Loading branch information...
1 parent c6b83d9 commit 3b56ec719afa1010fc3adb2f1983845d8c484d80 @igfoo igfoo committed Feb 28, 2012
Showing with 0 additions and 27 deletions.
  1. +0 −3 Control/Category.hs
  2. +0 −14 Data/Monoid.hs
  3. +0 −2 GHC/Desugar.hs
  4. +0 −2 GHC/Err.lhs
  5. +0 −2 GHC/Read.lhs
  6. +0 −2 Text/ParserCombinators/ReadP.hs
  7. +0 −2 Text/Read/Lex.hs
View
3 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
View
14 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
View
2 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
View
2 GHC/Err.lhs
@@ -34,10 +34,8 @@ module GHC.Err
, undefined -- :: a
) where
-#ifndef __HADDOCK__
import GHC.Types
import GHC.Exception
-#endif
\end{code}
%*********************************************************
View
2 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 ()
View
2 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
View
2 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

0 comments on commit 3b56ec7

Please sign in to comment.