Commit fda30027 authored by ian@well-typed.com's avatar ian@well-typed.com
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
parent 57f65911
......@@ -55,7 +55,7 @@ module Control.Concurrent (
-- * Scheduling
-- $conc_scheduling
yield, -- :: IO ()
yield,
-- ** Blocking
......@@ -63,9 +63,9 @@ module Control.Concurrent (
#ifdef __GLASGOW_HASKELL__
-- ** Waiting
threadDelay, -- :: Int -> IO ()
threadWaitRead, -- :: Int -> IO ()
threadWaitWrite, -- :: Int -> IO ()
threadDelay,
threadWaitRead,
threadWaitWrite,
#endif
-- * Communication abstractions
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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,
......
......@@ -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__)
......
......@@ -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
......
......@@ -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.
......
......@@ -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__
......
......@@ -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__
......
......@@ -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
......
......@@ -32,10 +32,10 @@ module Data.Data (
-- * The Data class for processing constructor applications
Data(
gfoldl, -- :: ... -> a -> c a
gunfold, -- :: ... -> Constr -> c a
toConstr, -- :: a -> Constr
dataTypeOf, -- :: a -> DataType
gfoldl,
gunfold,
toConstr,
dataTypeOf,
dataCast1, -- mediate types and unary type constructors
dataCast2, -- mediate types and binary type constructors
-- Generic maps defined in terms of gfoldl
......@@ -50,54 +50,54 @@ module Data.Data (
),
-- * Datatype representations
DataType, -- abstract, instance of: Show
DataType, -- abstract
-- ** Constructors
mkDataType, -- :: String -> [Constr] -> DataType
mkIntType, -- :: String -> DataType
mkFloatType, -- :: String -> DataType
mkCharType, -- :: String -> DataType
mkNoRepType, -- :: String -> DataType
mkDataType,
mkIntType,
mkFloatType,
mkCharType,
mkNoRepType,
-- ** Observers
dataTypeName, -- :: DataType -> String
DataRep(..), -- instance of: Eq, Show
dataTypeRep, -- :: DataType -> DataRep
dataTypeName,
DataRep(..),
dataTypeRep,
-- ** Convenience functions
repConstr, -- :: DataType -> ConstrRep -> Constr
isAlgType, -- :: DataType -> Bool
dataTypeConstrs,-- :: DataType -> [Constr]
indexConstr, -- :: DataType -> ConIndex -> Constr
maxConstrIndex, -- :: DataType -> ConIndex
isNorepType, -- :: DataType -> Bool
repConstr,
isAlgType,
dataTypeConstrs,
indexConstr,
maxConstrIndex,
isNorepType,
-- * Data constructor representations
Constr, -- abstract, instance of: Eq, Show
Constr, -- abstract
ConIndex, -- alias for Int, start at 1
Fixity(..), -- instance of: Eq, Show
Fixity(..),
-- ** Constructors
mkConstr, -- :: DataType -> String -> Fixity -> Constr
mkIntegralConstr,-- :: (Integral a) => DataType -> a -> Constr
mkRealConstr, -- :: (Real a) => DataType -> a -> Constr
mkCharConstr, -- :: DataType -> Char -> Constr
mkConstr,
mkIntegralConstr,
mkRealConstr,
mkCharConstr,
-- ** Observers
constrType, -- :: Constr -> DataType
ConstrRep(..), -- instance of: Eq, Show
constrRep, -- :: Constr -> ConstrRep
constrFields, -- :: Constr -> [String]
constrFixity, -- :: Constr -> Fixity
constrType,
ConstrRep(..),
constrRep,
constrFields,
constrFixity,
-- ** Convenience function: algebraic data types
constrIndex, -- :: Constr -> ConIndex
constrIndex,
-- ** From strings to constructors and vice versa: all data types
showConstr, -- :: Constr -> String
readConstr, -- :: DataType -> String -> Maybe Constr
showConstr,
readConstr,
-- * Convenience functions: take type constructors apart
tyconUQname, -- :: String -> String
tyconModule, -- :: String -> String
tyconUQname,
tyconModule,
-- * Generic operations defined in terms of 'gunfold'
fromConstr, -- :: Constr -> a
fromConstrB, -- :: ... -> Constr -> a
fromConstrM -- :: Monad m => ... -> Constr -> m a
fromConstr,
fromConstrB,
fromConstrM
) where
......
......@@ -33,9 +33,9 @@ module Data.Dynamic
Dynamic, -- abstract, instance of: Show, Typeable
-- * Converting to and from @Dynamic@
toDyn, -- :: Typeable a => a -> Dynamic
fromDyn, -- :: Typeable a => Dynamic -> a -> a
fromDynamic, -- :: Typeable a => Dynamic -> Maybe a
toDyn,
fromDyn,
fromDynamic,
-- * Applying functions of dynamic type
dynApply,
......
......@@ -20,10 +20,10 @@
module Data.Either (
Either(..),
either, -- :: (a -> c) -> (b -> c) -> Either a b -> c
lefts, -- :: [Either a b] -> [a]
rights, -- :: [Either a b] -> [b]
partitionEithers, -- :: [Either a b] -> ([a],[b])
either,
lefts,
rights,
partitionEithers,
) where
#include "Typeable.h"
......
......@@ -19,17 +19,17 @@ module Data.IORef
(
-- * IORefs
IORef, -- abstract, instance of: Eq, Typeable
newIORef, -- :: a -> IO (IORef a)
readIORef, -- :: IORef a -> IO a
writeIORef, -- :: IORef a -> a -> IO ()
modifyIORef, -- :: IORef a -> (a -> a) -> IO ()
modifyIORef', -- :: IORef a -> (a -> a) -> IO ()
atomicModifyIORef, -- :: IORef a -> (a -> (a,b)) -> IO b
atomicModifyIORef', -- :: IORef a -> (a -> (a,b)) -> IO b
newIORef,
readIORef,
writeIORef,
modifyIORef,
modifyIORef',
atomicModifyIORef,
atomicModifyIORef',
atomicWriteIORef,
#if !defined(__PARALLEL_HASKELL__) && defined(__GLASGOW_HASKELL__)
mkWeakIORef, -- :: IORef a -> IO () -> IO (Weak (IORef a))
mkWeakIORef,
#endif
-- ** Memory Model
......
......@@ -21,10 +21,10 @@ module Data.Ix
(
-- * The 'Ix' class
Ix
( range -- :: (Ix a) => (a,a) -> [a]
, index -- :: (Ix a) => (a,a) -> a -> Int
, inRange -- :: (Ix a) => (a,a) -> a -> Bool
, rangeSize -- :: (Ix a) => (a,a) -> Int
( range
, index
, inRange
, rangeSize
)
-- Ix instances:
--
......
......@@ -24,152 +24,152 @@ module Data.List
-- * Basic functions
(++) -- :: [a] -> [a] -> [a]
, head -- :: [a] -> a
, last -- :: [a] -> a
, tail -- :: [a] -> [a]
, init -- :: [a] -> [a]
, null -- :: [a] -> Bool
, length -- :: [a] -> Int
(++)
, head
, last
, tail
, init
, null
, length
-- * List transformations
, map -- :: (a -> b) -> [a] -> [b]
, reverse -- :: [a] -> [a]
, map
, reverse
, intersperse -- :: a -> [a] -> [a]
, intercalate -- :: [a] -> [[a]] -> [a]
, transpose -- :: [[a]] -> [[a]]
, intersperse
, intercalate
, transpose
, subsequences -- :: [a] -> [[a]]
, permutations -- :: [a] -> [[a]]
, subsequences
, permutations
-- * Reducing lists (folds)
, foldl -- :: (b -> a -> b) -> b -> [a] -> b
, foldl' -- :: (b -> a -> b) -> b -> [a] -> b
, foldl1 -- :: (a -> a -> a) -> [a] -> a
, foldl1' -- :: (a -> a -> a) -> [a] -> a
, foldr -- :: (a -> b -> b) -> b -> [a] -> b
, foldr1 -- :: (a -> a -> a) -> [a] -> a
, foldl
, foldl'
, foldl1
, foldl1'
, foldr
, foldr1
-- ** Special folds
, concat -- :: [[a]] -> [a]
, concatMap -- :: (a -> [b]) -> [a] -> [b]
, and -- :: [Bool] -> Bool
, or -- :: [Bool] -> Bool
, any -- :: (a -> Bool) -> [a] -> Bool
, all -- :: (a -> Bool) -> [a] -> Bool
, sum -- :: (Num a) => [a] -> a
, product -- :: (Num a) => [a] -> a
, maximum -- :: (Ord a) => [a] -> a
, minimum -- :: (Ord a) => [a] -> a
, concat
, concatMap
, and
, or
, any
, all
, sum
, product
, maximum
, minimum
-- * Building lists
-- ** Scans
, scanl -- :: (b -> a -> b) -> b -> [a] -> [b]
, scanl1 -- :: (a -> a -> a) -> [a] -> [a]
, scanr -- :: (a -> b -> b) -> b -> [a] -> [b]
, scanr1 -- :: (a -> a -> a) -> [a] -> [a]
, scanl
, scanl1
, scanr
, scanr1
-- ** Accumulating maps
, mapAccumL -- :: (a -> b -> (a,c)) -> a -> [b] -> (a,[c])
, mapAccumR -- :: (a -> b -> (a,c)) -> a -> [b] -> (a,[c])