Permalink
Browse files

Remove commented types in module export lists

These comments are rather less useful now that haddock can give docs
with the same informatino in the module synopsis.

Having to maintain them when making changes to the library is a pain,
and when people forget about doing so there is nothing that checks that
the comments are right, so mistakes tend to linger.

Of the comments that my script detected, 78 of 684 were already
incorrect in one way or another, e.g. missing context:
    Text.Show.showsPrec
    Comment type: Int -> a -> ShowS
    Actual type:  Show a => Int -> a -> ShowS
wrong context:
    Numeric.readInt
    Comment type: Integral a => a -> (Char -> Bool) -> (Char -> Int) -> ReadS a
    Actual type:  Num a => a -> (Char -> Bool) -> (Char -> Int) -> ReadS a
not following a class change (e.g. Num losing its Eq superclass):
    Text.Read.Lex.readOctP
    Comment type: Num a => ReadP a
    Actual type:  (Eq a, Num a) => ReadP a
not following the Exceptions change:
    GHC.Conc.childHandler
    Comment type: Exception -> IO ()
    Actual type:  SomeException -> IO ()
or just always been wrong:
    GHC.Stable.deRefStablePtr
    Comment type: StablePtr a -> a
    Actual type:  StablePtr a -> IO a
  • Loading branch information...
1 parent 63f6086 commit fff940b16ba589380c7fc538bfccd0094c97583b @igfoo igfoo committed Oct 27, 2012
Showing with 772 additions and 820 deletions.
  1. +4 −4 Control/Concurrent.hs
  2. +8 −8 Control/Concurrent/Chan.hs
  3. +1 −1 Control/Concurrent/MVar.hs
  4. +33 −33 Control/Monad.hs
  5. +2 −4 Control/Monad/Fix.hs
  6. +3 −3 Control/Monad/ST.hs
  7. +6 −6 Control/Monad/ST/Imp.hs
  8. +4 −4 Control/Monad/ST/Safe.hs
  9. +15 −17 Data/Bits.hs
  10. +4 −4 Data/Bool.hs
  11. +8 −8 Data/Char.hs
  12. +8 −17 Data/Complex.hs
  13. +38 −38 Data/Data.hs
  14. +3 −3 Data/Dynamic.hs
  15. +4 −4 Data/Either.hs
  16. +8 −8 Data/IORef.hs
  17. +4 −4 Data/Ix.hs
  18. +97 −97 Data/List.hs
  19. +12 −13 Data/Maybe.hs
  20. +4 −15 Data/Ratio.hs
  21. +6 −6 Data/STRef.hs
  22. +5 −5 Data/STRef/Lazy.hs
  23. +5 −5 Data/Tuple.hs
  24. +32 −32 Data/Typeable.hs
  25. +3 −3 Data/Unique.hs
  26. +2 −2 Debug/Trace.hs
  27. +14 −25 Foreign/C/Error.hs
  28. +29 −29 Foreign/C/String.hs
  29. +9 −9 Foreign/Marshal/Alloc.hs
  30. +20 −20 Foreign/Marshal/Array.hs
  31. +6 −8 Foreign/Marshal/Error.hs
  32. +14 −14 Foreign/Marshal/Pool.hs
  33. +10 −13 Foreign/Marshal/Utils.hs
  34. +12 −12 Foreign/Ptr.hs
  35. +5 −5 Foreign/StablePtr.hs
  36. +8 −8 Foreign/Storable.hs
  37. +42 −42 GHC/Conc.lhs
  38. +10 −10 GHC/Conc/IO.hs
  39. +32 −32 GHC/Conc/Sync.lhs
  40. +5 −5 GHC/Conc/Windows.hs
  41. +6 −6 GHC/Err.lhs
  42. +7 −7 GHC/Foreign.hs
  43. +8 −8 GHC/MVar.hs
  44. +3 −3 GHC/Pack.lhs
  45. +10 −10 GHC/Read.lhs
  46. +5 −5 GHC/Stable.lhs
  47. +18 −19 Numeric.hs
  48. +5 −5 System/Environment.hs
  49. +3 −3 System/Exit.hs
  50. +54 −54 System/IO.hs
  51. +22 −24 System/IO/Error.hs
  52. +3 −3 System/IO/Unsafe.hs
  53. +4 −4 System/Info.hs
  54. +1 −1 System/Mem.hs
  55. +7 −7 System/Mem/Weak.hs
  56. +36 −36 Text/ParserCombinators/ReadP.hs
  57. +17 −17 Text/ParserCombinators/ReadPrec.hs
  58. +12 −12 Text/Read.hs
  59. +9 −9 Text/Read/Lex.hs
  60. +7 −11 Text/Show.hs
View
@@ -55,17 +55,17 @@ module Control.Concurrent (
-- * Scheduling
-- $conc_scheduling
- yield, -- :: IO ()
+ yield,
-- ** Blocking
-- $blocking
#ifdef __GLASGOW_HASKELL__
-- ** Waiting
- threadDelay, -- :: Int -> IO ()
- threadWaitRead, -- :: Int -> IO ()
- threadWaitWrite, -- :: Int -> IO ()
+ threadDelay,
+ threadWaitRead,
+ threadWaitWrite,
#endif
-- * Communication abstractions
View
@@ -24,16 +24,16 @@ module Control.Concurrent.Chan
Chan, -- abstract
-- * Operations
- newChan, -- :: IO (Chan a)
- writeChan, -- :: Chan a -> a -> IO ()
- readChan, -- :: Chan a -> IO a
- dupChan, -- :: Chan a -> IO (Chan a)
- unGetChan, -- :: Chan a -> a -> IO ()
- isEmptyChan, -- :: Chan a -> IO Bool
+ newChan,
+ writeChan,
+ readChan,
+ dupChan,
+ unGetChan,
+ isEmptyChan,
-- * Stream interface
- getChanContents, -- :: Chan a -> IO [a]
- writeList2Chan, -- :: Chan a -> [a] -> IO ()
+ getChanContents,
+ writeList2Chan,
) where
import Prelude
@@ -141,7 +141,7 @@ module Control.Concurrent.MVar
, modifyMVarMasked
#ifndef __HUGS__
, mkWeakMVar
- , addMVarFinalizer -- :: MVar a -> IO () -> IO ()
+ , addMVarFinalizer
#endif
) where
View
@@ -21,9 +21,9 @@ module Control.Monad
Functor(fmap)
, Monad((>>=), (>>), return, fail)
- , MonadPlus ( -- class context: Monad
- mzero -- :: (MonadPlus m) => m a
- , mplus -- :: (MonadPlus m) => m a -> m a -> m a
+ , MonadPlus (
+ mzero
+ , mplus
)
-- * Functions
@@ -32,47 +32,47 @@ module Control.Monad
-- ** Basic @Monad@ functions
- , mapM -- :: (Monad m) => (a -> m b) -> [a] -> m [b]
- , mapM_ -- :: (Monad m) => (a -> m b) -> [a] -> m ()
- , forM -- :: (Monad m) => [a] -> (a -> m b) -> m [b]
- , forM_ -- :: (Monad m) => [a] -> (a -> m b) -> m ()
- , sequence -- :: (Monad m) => [m a] -> m [a]
- , sequence_ -- :: (Monad m) => [m a] -> m ()
- , (=<<) -- :: (Monad m) => (a -> m b) -> m a -> m b
- , (>=>) -- :: (Monad m) => (a -> m b) -> (b -> m c) -> (a -> m c)
- , (<=<) -- :: (Monad m) => (b -> m c) -> (a -> m b) -> (a -> m c)
- , forever -- :: (Monad m) => m a -> m b
+ , mapM
+ , mapM_
+ , forM
+ , forM_
+ , sequence
+ , sequence_
+ , (=<<)
+ , (>=>)
+ , (<=<)
+ , forever
, void
-- ** Generalisations of list functions
- , join -- :: (Monad m) => m (m a) -> m a
- , msum -- :: (MonadPlus m) => [m a] -> m a
- , mfilter -- :: (MonadPlus m) => (a -> Bool) -> m a -> m a
- , filterM -- :: (Monad m) => (a -> m Bool) -> [a] -> m [a]
- , mapAndUnzipM -- :: (Monad m) => (a -> m (b,c)) -> [a] -> m ([b], [c])
- , zipWithM -- :: (Monad m) => (a -> b -> m c) -> [a] -> [b] -> m [c]
- , zipWithM_ -- :: (Monad m) => (a -> b -> m c) -> [a] -> [b] -> m ()
- , foldM -- :: (Monad m) => (a -> b -> m a) -> a -> [b] -> m a
- , foldM_ -- :: (Monad m) => (a -> b -> m a) -> a -> [b] -> m ()
- , replicateM -- :: (Monad m) => Int -> m a -> m [a]
- , replicateM_ -- :: (Monad m) => Int -> m a -> m ()
+ , join
+ , msum
+ , mfilter
+ , filterM
+ , mapAndUnzipM
+ , zipWithM
+ , zipWithM_
+ , foldM
+ , foldM_
+ , replicateM
+ , replicateM_
-- ** Conditional execution of monadic expressions
- , guard -- :: (MonadPlus m) => Bool -> m ()
- , when -- :: (Monad m) => Bool -> m () -> m ()
- , unless -- :: (Monad m) => Bool -> m () -> m ()
+ , guard
+ , when
+ , unless
-- ** Monadic lifting operators
- , liftM -- :: (Monad m) => (a -> b) -> (m a -> m b)
- , liftM2 -- :: (Monad m) => (a -> b -> c) -> (m a -> m b -> m c)
- , liftM3 -- :: ...
- , liftM4 -- :: ...
- , liftM5 -- :: ...
+ , liftM
+ , liftM2
+ , liftM3
+ , liftM4
+ , liftM5
- , ap -- :: (Monad m) => m (a -> b) -> m a -> m b
+ , ap
) where
View
@@ -19,10 +19,8 @@
-----------------------------------------------------------------------------
module Control.Monad.Fix (
- MonadFix(
- mfix -- :: (a -> m a) -> m a
- ),
- fix -- :: (a -> a) -> a
+ MonadFix(mfix),
+ fix
) where
import Prelude
View
@@ -23,12 +23,12 @@
module Control.Monad.ST (
-- * The 'ST' Monad
ST, -- abstract, instance of Functor, Monad, Typeable.
- runST, -- :: (forall s. ST s a) -> a
- fixST, -- :: (a -> ST s a) -> ST s a
+ runST,
+ fixST,
-- * Converting 'ST' to 'IO'
RealWorld, -- abstract
- stToIO, -- :: ST RealWorld a -> IO a
+ stToIO,
-- * Unsafe Functions
unsafeInterleaveST,
View
@@ -22,17 +22,17 @@
module Control.Monad.ST.Imp (
-- * The 'ST' Monad
ST, -- abstract, instance of Functor, Monad, Typeable.
- runST, -- :: (forall s. ST s a) -> a
- fixST, -- :: (a -> ST s a) -> ST s a
+ runST,
+ fixST,
-- * Converting 'ST' to 'IO'
RealWorld, -- abstract
- stToIO, -- :: ST RealWorld a -> IO a
+ stToIO,
-- * Unsafe operations
- unsafeInterleaveST, -- :: ST s a -> ST s a
- unsafeIOToST, -- :: IO a -> ST s a
- unsafeSTToIO -- :: ST s a -> IO a
+ unsafeInterleaveST,
+ unsafeIOToST,
+ unsafeSTToIO
) where
#if !defined(__GLASGOW_HASKELL__)
View
@@ -20,13 +20,13 @@
module Control.Monad.ST.Safe (
-- * The 'ST' Monad
- ST, -- abstract, instance of Functor, Monad, Typeable.
- runST, -- :: (forall s. ST s a) -> a
- fixST, -- :: (a -> ST s a) -> ST s a
+ ST, -- abstract
+ runST,
+ fixST,
-- * Converting 'ST' to 'IO'
RealWorld, -- abstract
- stToIO, -- :: ST RealWorld a -> IO a
+ stToIO,
) where
import Control.Monad.ST.Imp
View
@@ -21,30 +21,28 @@
module Data.Bits (
Bits(
- (.&.), (.|.), xor, -- :: a -> a -> a
- complement, -- :: a -> a
- shift, -- :: a -> Int -> a
- rotate, -- :: a -> Int -> a
- bit, -- :: Int -> a
- setBit, -- :: a -> Int -> a
- clearBit, -- :: a -> Int -> a
- complementBit, -- :: a -> Int -> a
- testBit, -- :: a -> Int -> Bool
+ (.&.), (.|.), xor,
+ complement,
+ shift,
+ rotate,
+ bit,
+ setBit,
+ clearBit,
+ complementBit,
+ testBit,
bitSizeMaybe,
- bitSize, -- :: a -> Int
- isSigned, -- :: a -> Bool
- shiftL, shiftR, -- :: a -> Int -> a
- unsafeShiftL, unsafeShiftR, -- :: a -> Int -> a
- rotateL, rotateR, -- :: a -> Int -> a
- popCount -- :: a -> Int
+ bitSize,
+ isSigned,
+ shiftL, shiftR,
+ unsafeShiftL, unsafeShiftR,
+ rotateL, rotateR,
+ popCount
),
FiniteBits(finiteBitSize),
bitDefault,
testBitDefault,
popCountDefault
- -- instance Bits Int
- -- instance Bits Integer
) where
-- Defines the @Bits@ class containing bit-based operations.
View
@@ -19,10 +19,10 @@ module Data.Bool (
-- * Booleans
Bool(..),
-- ** Operations
- (&&), -- :: Bool -> Bool -> Bool
- (||), -- :: Bool -> Bool -> Bool
- not, -- :: Bool -> Bool
- otherwise, -- :: Bool
+ (&&),
+ (||),
+ not,
+ otherwise,
) where
#ifdef __GLASGOW_HASKELL__
View
@@ -36,20 +36,20 @@ module Data.Char
, GeneralCategory(..), generalCategory
-- * Case conversion
- , toUpper, toLower, toTitle -- :: Char -> Char
+ , toUpper, toLower, toTitle
-- * Single digit characters
- , digitToInt -- :: Char -> Int
- , intToDigit -- :: Int -> Char
+ , digitToInt
+ , intToDigit
-- * Numeric representations
- , ord -- :: Char -> Int
- , chr -- :: Int -> Char
+ , ord
+ , chr
-- * String representations
- , showLitChar -- :: Char -> ShowS
- , lexLitChar -- :: ReadS String
- , readLitChar -- :: ReadS Char
+ , showLitChar
+ , lexLitChar
+ , readLitChar
) where
#ifdef __GLASGOW_HASKELL__
View
@@ -23,25 +23,16 @@ module Data.Complex
-- * Rectangular form
Complex((:+))
- , realPart -- :: (RealFloat a) => Complex a -> a
- , imagPart -- :: (RealFloat a) => Complex a -> a
+ , realPart
+ , imagPart
-- * Polar form
- , mkPolar -- :: (RealFloat a) => a -> a -> Complex a
- , cis -- :: (RealFloat a) => a -> Complex a
- , polar -- :: (RealFloat a) => Complex a -> (a,a)
- , magnitude -- :: (RealFloat a) => Complex a -> a
- , phase -- :: (RealFloat a) => Complex a -> a
+ , mkPolar
+ , cis
+ , polar
+ , magnitude
+ , phase
-- * Conjugate
- , conjugate -- :: (RealFloat a) => Complex a -> Complex a
-
- -- Complex instances:
- --
- -- (RealFloat a) => Eq (Complex a)
- -- (RealFloat a) => Read (Complex a)
- -- (RealFloat a) => Show (Complex a)
- -- (RealFloat a) => Num (Complex a)
- -- (RealFloat a) => Fractional (Complex a)
- -- (RealFloat a) => Floating (Complex a)
+ , conjugate
) where
Oops, something went wrong.

0 comments on commit fff940b

Please sign in to comment.