summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libraries/base/Control/Concurrent.hs8
-rw-r--r--libraries/base/Control/Concurrent/Chan.hs16
-rw-r--r--libraries/base/Control/Concurrent/MVar.hs2
-rw-r--r--libraries/base/Control/Monad.hs66
-rw-r--r--libraries/base/Control/Monad/Fix.hs6
-rw-r--r--libraries/base/Control/Monad/ST.hs6
-rw-r--r--libraries/base/Control/Monad/ST/Imp.hs12
-rw-r--r--libraries/base/Control/Monad/ST/Safe.hs8
-rw-r--r--libraries/base/Data/Bits.hs32
-rw-r--r--libraries/base/Data/Bool.hs8
-rw-r--r--libraries/base/Data/Char.hs16
-rw-r--r--libraries/base/Data/Complex.hs25
-rw-r--r--libraries/base/Data/Data.hs76
-rw-r--r--libraries/base/Data/Dynamic.hs6
-rw-r--r--libraries/base/Data/Either.hs8
-rw-r--r--libraries/base/Data/IORef.hs16
-rw-r--r--libraries/base/Data/Ix.hs8
-rw-r--r--libraries/base/Data/List.hs194
-rw-r--r--libraries/base/Data/Maybe.hs25
-rw-r--r--libraries/base/Data/Ratio.hs19
-rw-r--r--libraries/base/Data/STRef.hs12
-rw-r--r--libraries/base/Data/STRef/Lazy.hs10
-rw-r--r--libraries/base/Data/Tuple.hs10
-rw-r--r--libraries/base/Data/Typeable.hs64
-rw-r--r--libraries/base/Data/Unique.hs6
-rw-r--r--libraries/base/Debug/Trace.hs4
-rw-r--r--libraries/base/Foreign/C/Error.hs39
-rw-r--r--libraries/base/Foreign/C/String.hs58
-rw-r--r--libraries/base/Foreign/Marshal/Alloc.hs18
-rw-r--r--libraries/base/Foreign/Marshal/Array.hs40
-rw-r--r--libraries/base/Foreign/Marshal/Error.hs14
-rw-r--r--libraries/base/Foreign/Marshal/Pool.hs28
-rw-r--r--libraries/base/Foreign/Marshal/Utils.hs23
-rw-r--r--libraries/base/Foreign/Ptr.hs24
-rw-r--r--libraries/base/Foreign/StablePtr.hs10
-rw-r--r--libraries/base/Foreign/Storable.hs16
-rw-r--r--libraries/base/GHC/Conc.lhs84
-rw-r--r--libraries/base/GHC/Conc/IO.hs20
-rw-r--r--libraries/base/GHC/Conc/Sync.lhs64
-rw-r--r--libraries/base/GHC/Conc/Windows.hs10
-rw-r--r--libraries/base/GHC/Err.lhs12
-rw-r--r--libraries/base/GHC/Foreign.hs14
-rw-r--r--libraries/base/GHC/MVar.hs16
-rw-r--r--libraries/base/GHC/Pack.lhs6
-rw-r--r--libraries/base/GHC/Read.lhs20
-rw-r--r--libraries/base/GHC/Stable.lhs10
-rw-r--r--libraries/base/Numeric.hs37
-rw-r--r--libraries/base/System/Environment.hs10
-rw-r--r--libraries/base/System/Exit.hs6
-rw-r--r--libraries/base/System/IO.hs108
-rw-r--r--libraries/base/System/IO/Error.hs46
-rw-r--r--libraries/base/System/IO/Unsafe.hs6
-rw-r--r--libraries/base/System/Info.hs8
-rw-r--r--libraries/base/System/Mem.hs2
-rw-r--r--libraries/base/System/Mem/Weak.hs14
-rw-r--r--libraries/base/Text/ParserCombinators/ReadP.hs72
-rw-r--r--libraries/base/Text/ParserCombinators/ReadPrec.hs34
-rw-r--r--libraries/base/Text/Read.hs24
-rw-r--r--libraries/base/Text/Read/Lex.hs18
-rw-r--r--libraries/base/Text/Show.hs18
60 files changed, 772 insertions, 820 deletions
diff --git a/libraries/base/Control/Concurrent.hs b/libraries/base/Control/Concurrent.hs
index fa7fc4d3e1..95ad957b97 100644
--- a/libraries/base/Control/Concurrent.hs
+++ b/libraries/base/Control/Concurrent.hs
@@ -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
diff --git a/libraries/base/Control/Concurrent/Chan.hs b/libraries/base/Control/Concurrent/Chan.hs
index be10c0053c..5781b9f476 100644
--- a/libraries/base/Control/Concurrent/Chan.hs
+++ b/libraries/base/Control/Concurrent/Chan.hs
@@ -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
diff --git a/libraries/base/Control/Concurrent/MVar.hs b/libraries/base/Control/Concurrent/MVar.hs
index 7acfbdcbcf..5f1b4fce6e 100644
--- a/libraries/base/Control/Concurrent/MVar.hs
+++ b/libraries/base/Control/Concurrent/MVar.hs
@@ -141,7 +141,7 @@ module Control.Concurrent.MVar
, modifyMVarMasked
#ifndef __HUGS__
, mkWeakMVar
- , addMVarFinalizer -- :: MVar a -> IO () -> IO ()
+ , addMVarFinalizer
#endif
) where
diff --git a/libraries/base/Control/Monad.hs b/libraries/base/Control/Monad.hs
index eec9465283..1aa17381a7 100644
--- a/libraries/base/Control/Monad.hs
+++ b/libraries/base/Control/Monad.hs
@@ -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
diff --git a/libraries/base/Control/Monad/Fix.hs b/libraries/base/Control/Monad/Fix.hs
index a3d2c89d85..1508d62653 100644
--- a/libraries/base/Control/Monad/Fix.hs
+++ b/libraries/base/Control/Monad/Fix.hs
@@ -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
diff --git a/libraries/base/Control/Monad/ST.hs b/libraries/base/Control/Monad/ST.hs
index 29d79599eb..fe8a837cda 100644
--- a/libraries/base/Control/Monad/ST.hs
+++ b/libraries/base/Control/Monad/ST.hs
@@ -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,
diff --git a/libraries/base/Control/Monad/ST/Imp.hs b/libraries/base/Control/Monad/ST/Imp.hs
index e3feaa6a68..9f58af3711 100644
--- a/libraries/base/Control/Monad/ST/Imp.hs
+++ b/libraries/base/Control/Monad/ST/Imp.hs
@@ -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__)
diff --git a/libraries/base/Control/Monad/ST/Safe.hs b/libraries/base/Control/Monad/ST/Safe.hs
index e6c8e8cfdc..1e9c981895 100644
--- a/libraries/base/Control/Monad/ST/Safe.hs
+++ b/libraries/base/Control/Monad/ST/Safe.hs
@@ -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
diff --git a/libraries/base/Data/Bits.hs b/libraries/base/Data/Bits.hs
index abbadbd665..747a481e21 100644
--- a/libraries/base/Data/Bits.hs
+++ b/libraries/base/Data/Bits.hs
@@ -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.
diff --git a/libraries/base/Data/Bool.hs b/libraries/base/Data/Bool.hs
index 1f53177aef..b60cad91b5 100644
--- a/libraries/base/Data/Bool.hs
+++ b/libraries/base/Data/Bool.hs
@@ -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__
diff --git a/libraries/base/Data/Char.hs b/libraries/base/Data/Char.hs
index 26ca8a4c36..56f6487371 100644
--- a/libraries/base/Data/Char.hs
+++ b/libraries/base/Data/Char.hs
@@ -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__
diff --git a/libraries/base/Data/Complex.hs b/libraries/base/Data/Complex.hs
index 1e32bd74fa..b0f549e14f 100644
--- a/libraries/base/Data/Complex.hs
+++ b/libraries/base/Data/Complex.hs
@@ -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
diff --git a/libraries/base/Data/Data.hs b/libraries/base/Data/Data.hs
index 0a29668546..4dd229a4cd 100644
--- a/libraries/base/Data/Data.hs
+++ b/libraries/base/Data/Data.hs
@@ -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
diff --git a/libraries/base/Data/Dynamic.hs b/libraries/base/Data/Dynamic.hs
index 11501b8c98..03a34cf3c6 100644
--- a/libraries/base/Data/Dynamic.hs
+++ b/libraries/base/Data/Dynamic.hs
@@ -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,
diff --git a/libraries/base/Data/Either.hs b/libraries/base/Data/Either.hs
index 2dbe9e8f77..0fd862e025 100644
--- a/libraries/base/Data/Either.hs
+++ b/libraries/base/Data/Either.hs
@@ -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"
diff --git a/libraries/base/Data/IORef.hs b/libraries/base/Data/IORef.hs
index 580013232b..a66ce1bc0a 100644
--- a/libraries/base/Data/IORef.hs
+++ b/libraries/base/Data/IORef.hs
@@ -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
diff --git a/libraries/base/Data/Ix.hs b/libraries/base/Data/Ix.hs
index 4af5db334d..44fc4099ba 100644
--- a/libraries/base/Data/Ix.hs
+++ b/libraries/base/Data/Ix.hs
@@ -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:
--
diff --git a/libraries/base/Data/List.hs b/libraries/base/Data/List.hs
index 7a05939552..431ae1bc4e 100644
--- a/libraries/base/Data/List.hs
+++ b/libraries/base/Data/List.hs
@@ -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])
+ , mapAccumL
+ , mapAccumR
-- ** Infinite lists
- , iterate -- :: (a -> a) -> a -> [a]
- , repeat -- :: a -> [a]
- , replicate -- :: Int -> a -> [a]
- , cycle -- :: [a] -> [a]
+ , iterate
+ , repeat
+ , replicate
+ , cycle
-- ** Unfolding
- , unfoldr -- :: (b -> Maybe (a, b)) -> b -> [a]
+ , unfoldr
-- * Sublists
-- ** Extracting sublists
- , take -- :: Int -> [a] -> [a]
- , drop -- :: Int -> [a] -> [a]
- , splitAt -- :: Int -> [a] -> ([a], [a])
+ , take
+ , drop
+ , splitAt
- , takeWhile -- :: (a -> Bool) -> [a] -> [a]
- , dropWhile -- :: (a -> Bool) -> [a] -> [a]
- , dropWhileEnd -- :: (a -> Bool) -> [a] -> [a]
- , span -- :: (a -> Bool) -> [a] -> ([a], [a])
- , break -- :: (a -> Bool) -> [a] -> ([a], [a])
+ , takeWhile
+ , dropWhile
+ , dropWhileEnd
+ , span
+ , break
- , stripPrefix -- :: Eq a => [a] -> [a] -> Maybe [a]
+ , stripPrefix
- , group -- :: Eq a => [a] -> [[a]]
+ , group
- , inits -- :: [a] -> [[a]]
- , tails -- :: [a] -> [[a]]
+ , inits
+ , tails
-- ** Predicates
- , isPrefixOf -- :: (Eq a) => [a] -> [a] -> Bool
- , isSuffixOf -- :: (Eq a) => [a] -> [a] -> Bool
- , isInfixOf -- :: (Eq a) => [a] -> [a] -> Bool
+ , isPrefixOf
+ , isSuffixOf
+ , isInfixOf
-- * Searching lists
-- ** Searching by equality
- , elem -- :: a -> [a] -> Bool
- , notElem -- :: a -> [a] -> Bool
- , lookup -- :: (Eq a) => a -> [(a,b)] -> Maybe b
+ , elem
+ , notElem
+ , lookup
-- ** Searching with a predicate
- , find -- :: (a -> Bool) -> [a] -> Maybe a
- , filter -- :: (a -> Bool) -> [a] -> [a]
- , partition -- :: (a -> Bool) -> [a] -> ([a], [a])
+ , find
+ , filter
+ , partition
-- * Indexing lists
-- | These functions treat a list @xs@ as a indexed collection,
-- with indices ranging from 0 to @'length' xs - 1@.
- , (!!) -- :: [a] -> Int -> a
+ , (!!)
- , elemIndex -- :: (Eq a) => a -> [a] -> Maybe Int
- , elemIndices -- :: (Eq a) => a -> [a] -> [Int]
+ , elemIndex
+ , elemIndices
- , findIndex -- :: (a -> Bool) -> [a] -> Maybe Int
- , findIndices -- :: (a -> Bool) -> [a] -> [Int]
+ , findIndex
+ , findIndices
-- * Zipping and unzipping lists
- , zip -- :: [a] -> [b] -> [(a,b)]
+ , zip
, zip3
, zip4, zip5, zip6, zip7
- , zipWith -- :: (a -> b -> c) -> [a] -> [b] -> [c]
+ , zipWith
, zipWith3
, zipWith4, zipWith5, zipWith6, zipWith7
- , unzip -- :: [(a,b)] -> ([a],[b])
+ , unzip
, unzip3
, unzip4, unzip5, unzip6, unzip7
-- * Special lists
-- ** Functions on strings
- , lines -- :: String -> [String]
- , words -- :: String -> [String]
- , unlines -- :: [String] -> String
- , unwords -- :: [String] -> String
+ , lines
+ , words
+ , unlines
+ , unwords
-- ** \"Set\" operations
- , nub -- :: (Eq a) => [a] -> [a]
+ , nub
- , delete -- :: (Eq a) => a -> [a] -> [a]
- , (\\) -- :: (Eq a) => [a] -> [a] -> [a]
+ , delete
+ , (\\)
- , union -- :: (Eq a) => [a] -> [a] -> [a]
- , intersect -- :: (Eq a) => [a] -> [a] -> [a]
+ , union
+ , intersect
-- ** Ordered lists
- , sort -- :: (Ord a) => [a] -> [a]
- , insert -- :: (Ord a) => a -> [a] -> [a]
+ , sort
+ , insert
-- * Generalized functions
@@ -183,30 +183,30 @@ module Data.List
-- *** User-supplied equality (replacing an @Eq@ context)
-- | The predicate is assumed to define an equivalence.
- , nubBy -- :: (a -> a -> Bool) -> [a] -> [a]
- , deleteBy -- :: (a -> a -> Bool) -> a -> [a] -> [a]
- , deleteFirstsBy -- :: (a -> a -> Bool) -> [a] -> [a] -> [a]
- , unionBy -- :: (a -> a -> Bool) -> [a] -> [a] -> [a]
- , intersectBy -- :: (a -> a -> Bool) -> [a] -> [a] -> [a]
- , groupBy -- :: (a -> a -> Bool) -> [a] -> [[a]]
+ , nubBy
+ , deleteBy
+ , deleteFirstsBy
+ , unionBy
+ , intersectBy
+ , groupBy
-- *** User-supplied comparison (replacing an @Ord@ context)
-- | The function is assumed to define a total ordering.
- , sortBy -- :: (a -> a -> Ordering) -> [a] -> [a]
- , insertBy -- :: (a -> a -> Ordering) -> a -> [a] -> [a]
- , maximumBy -- :: (a -> a -> Ordering) -> [a] -> a
- , minimumBy -- :: (a -> a -> Ordering) -> [a] -> a
+ , sortBy
+ , insertBy
+ , maximumBy
+ , minimumBy
-- ** The \"@generic@\" operations
-- | The prefix \`@generic@\' indicates an overloaded function that
-- is a generalized version of a "Prelude" function.
- , genericLength -- :: (Integral a) => [b] -> a
- , genericTake -- :: (Integral a) => a -> [b] -> [b]
- , genericDrop -- :: (Integral a) => a -> [b] -> [b]
- , genericSplitAt -- :: (Integral a) => a -> [b] -> ([b], [b])
- , genericIndex -- :: (Integral a) => [b] -> a -> b
- , genericReplicate -- :: (Integral a) => a -> b -> [b]
+ , genericLength
+ , genericTake
+ , genericDrop
+ , genericSplitAt
+ , genericIndex
+ , genericReplicate
) where
diff --git a/libraries/base/Data/Maybe.hs b/libraries/base/Data/Maybe.hs
index aafe8928bd..728c981755 100644
--- a/libraries/base/Data/Maybe.hs
+++ b/libraries/base/Data/Maybe.hs
@@ -17,19 +17,18 @@
module Data.Maybe
(
- Maybe(Nothing,Just)-- instance of: Eq, Ord, Show, Read,
- -- Functor, Monad, MonadPlus
-
- , maybe -- :: b -> (a -> b) -> Maybe a -> b
-
- , isJust -- :: Maybe a -> Bool
- , isNothing -- :: Maybe a -> Bool
- , fromJust -- :: Maybe a -> a
- , fromMaybe -- :: a -> Maybe a -> a
- , listToMaybe -- :: [a] -> Maybe a
- , maybeToList -- :: Maybe a -> [a]
- , catMaybes -- :: [Maybe a] -> [a]
- , mapMaybe -- :: (a -> Maybe b) -> [a] -> [b]
+ Maybe(Nothing,Just)
+
+ , maybe
+
+ , isJust
+ , isNothing
+ , fromJust
+ , fromMaybe
+ , listToMaybe
+ , maybeToList
+ , catMaybes
+ , mapMaybe
) where
#ifdef __GLASGOW_HASKELL__
diff --git a/libraries/base/Data/Ratio.hs b/libraries/base/Data/Ratio.hs
index d3d29c8bb9..a9f726e849 100644
--- a/libraries/base/Data/Ratio.hs
+++ b/libraries/base/Data/Ratio.hs
@@ -18,21 +18,10 @@
module Data.Ratio
( Ratio
, Rational
- , (%) -- :: (Integral a) => a -> a -> Ratio a
- , numerator -- :: (Integral a) => Ratio a -> a
- , denominator -- :: (Integral a) => Ratio a -> a
- , approxRational -- :: (RealFrac a) => a -> a -> Rational
-
- -- Ratio instances:
- -- (Integral a) => Eq (Ratio a)
- -- (Integral a) => Ord (Ratio a)
- -- (Integral a) => Num (Ratio a)
- -- (Integral a) => Real (Ratio a)
- -- (Integral a) => Fractional (Ratio a)
- -- (Integral a) => RealFrac (Ratio a)
- -- (Integral a) => Enum (Ratio a)
- -- (Read a, Integral a) => Read (Ratio a)
- -- (Integral a) => Show (Ratio a)
+ , (%)
+ , numerator
+ , denominator
+ , approxRational
) where
diff --git a/libraries/base/Data/STRef.hs b/libraries/base/Data/STRef.hs
index 7c884e512b..f8e6e13c58 100644
--- a/libraries/base/Data/STRef.hs
+++ b/libraries/base/Data/STRef.hs
@@ -17,12 +17,12 @@
module Data.STRef (
-- * STRefs
- STRef, -- abstract, instance Eq
- newSTRef, -- :: a -> ST s (STRef s a)
- readSTRef, -- :: STRef s a -> ST s a
- writeSTRef, -- :: STRef s a -> a -> ST s ()
- modifySTRef, -- :: STRef s a -> (a -> a) -> ST s ()
- modifySTRef' -- :: STRef s a -> (a -> a) -> ST s ()
+ STRef, -- abstract
+ newSTRef,
+ readSTRef,
+ writeSTRef,
+ modifySTRef,
+ modifySTRef'
) where
import Prelude
diff --git a/libraries/base/Data/STRef/Lazy.hs b/libraries/base/Data/STRef/Lazy.hs
index 7c9a74e9b5..039b03f3b5 100644
--- a/libraries/base/Data/STRef/Lazy.hs
+++ b/libraries/base/Data/STRef/Lazy.hs
@@ -16,11 +16,11 @@
module Data.STRef.Lazy (
-- * STRefs
- ST.STRef, -- abstract, instance Eq
- newSTRef, -- :: a -> ST s (STRef s a)
- readSTRef, -- :: STRef s a -> ST s a
- writeSTRef, -- :: STRef s a -> a -> ST s ()
- modifySTRef -- :: STRef s a -> (a -> a) -> ST s ()
+ ST.STRef, -- abstract
+ newSTRef,
+ readSTRef,
+ writeSTRef,
+ modifySTRef
) where
import Control.Monad.ST.Lazy.Safe
diff --git a/libraries/base/Data/Tuple.hs b/libraries/base/Data/Tuple.hs
index 30f93c5e63..12684c3ac4 100644
--- a/libraries/base/Data/Tuple.hs
+++ b/libraries/base/Data/Tuple.hs
@@ -18,11 +18,11 @@
-----------------------------------------------------------------------------
module Data.Tuple
- ( fst -- :: (a,b) -> a
- , snd -- :: (a,b) -> a
- , curry -- :: ((a, b) -> c) -> a -> b -> c
- , uncurry -- :: (a -> b -> c) -> ((a, b) -> c)
- , swap -- :: (a,b) -> (b,a)
+ ( fst
+ , snd
+ , curry
+ , uncurry
+ , swap
#ifdef __NHC__
, (,)(..)
, (,,)(..)
diff --git a/libraries/base/Data/Typeable.hs b/libraries/base/Data/Typeable.hs
index 73c989b52c..d43ad50253 100644
--- a/libraries/base/Data/Typeable.hs
+++ b/libraries/base/Data/Typeable.hs
@@ -39,10 +39,10 @@ module Data.Typeable
(
-- * The Typeable class
- Typeable( typeOf ), -- :: a -> TypeRep
+ Typeable( typeOf ),
-- * Type-safe cast
- cast, -- :: (Typeable a, Typeable b) => a -> Maybe b
+ cast,
gcast, -- a generalisation of cast
-- * Type representations
@@ -50,48 +50,48 @@ module Data.Typeable
showsTypeRep,
TyCon, -- abstract, instance of: Eq, Show, Typeable
- tyConString, -- :: TyCon -> String
- tyConPackage, -- :: TyCon -> String
- tyConModule, -- :: TyCon -> String
- tyConName, -- :: TyCon -> String
+ tyConString,
+ tyConPackage,
+ tyConModule,
+ tyConName,
-- * Construction of type representations
- mkTyCon, -- :: String -> TyCon
- mkTyCon3, -- :: String -> String -> String -> TyCon
- mkTyConApp, -- :: TyCon -> [TypeRep] -> TypeRep
- mkAppTy, -- :: TypeRep -> TypeRep -> TypeRep
- mkFunTy, -- :: TypeRep -> TypeRep -> TypeRep
+ mkTyCon,
+ mkTyCon3,
+ mkTyConApp,
+ mkAppTy,
+ mkFunTy,
-- * Observation of type representations
- splitTyConApp, -- :: TypeRep -> (TyCon, [TypeRep])
- funResultTy, -- :: TypeRep -> TypeRep -> Maybe TypeRep
- typeRepTyCon, -- :: TypeRep -> TyCon
- typeRepArgs, -- :: TypeRep -> [TypeRep]
- typeRepKey, -- :: TypeRep -> IO TypeRepKey
+ splitTyConApp,
+ funResultTy,
+ typeRepTyCon,
+ typeRepArgs,
+ typeRepKey,
TypeRepKey, -- abstract, instance of Eq, Ord
-- * The other Typeable classes
-- | /Note:/ The general instances are provided for GHC only.
- Typeable1( typeOf1 ), -- :: t a -> TypeRep
- Typeable2( typeOf2 ), -- :: t a b -> TypeRep
- Typeable3( typeOf3 ), -- :: t a b c -> TypeRep
- Typeable4( typeOf4 ), -- :: t a b c d -> TypeRep
- Typeable5( typeOf5 ), -- :: t a b c d e -> TypeRep
- Typeable6( typeOf6 ), -- :: t a b c d e f -> TypeRep
- Typeable7( typeOf7 ), -- :: t a b c d e f g -> TypeRep
- gcast1, -- :: ... => c (t a) -> Maybe (c (t' a))
- gcast2, -- :: ... => c (t a b) -> Maybe (c (t' a b))
+ Typeable1( typeOf1 ),
+ Typeable2( typeOf2 ),
+ Typeable3( typeOf3 ),
+ Typeable4( typeOf4 ),
+ Typeable5( typeOf5 ),
+ Typeable6( typeOf6 ),
+ Typeable7( typeOf7 ),
+ gcast1,
+ gcast2,
-- * Default instances
-- | /Note:/ These are not needed by GHC, for which these instances
-- are generated by general instance declarations.
- typeOfDefault, -- :: (Typeable1 t, Typeable a) => t a -> TypeRep
- typeOf1Default, -- :: (Typeable2 t, Typeable a) => t a b -> TypeRep
- typeOf2Default, -- :: (Typeable3 t, Typeable a) => t a b c -> TypeRep
- typeOf3Default, -- :: (Typeable4 t, Typeable a) => t a b c d -> TypeRep
- typeOf4Default, -- :: (Typeable5 t, Typeable a) => t a b c d e -> TypeRep
- typeOf5Default, -- :: (Typeable6 t, Typeable a) => t a b c d e f -> TypeRep
- typeOf6Default -- :: (Typeable7 t, Typeable a) => t a b c d e f g -> TypeRep
+ typeOfDefault,
+ typeOf1Default,
+ typeOf2Default,
+ typeOf3Default,
+ typeOf4Default,
+ typeOf5Default,
+ typeOf6Default
) where
diff --git a/libraries/base/Data/Unique.hs b/libraries/base/Data/Unique.hs
index 3443c9aaee..b8aa6cd63a 100644
--- a/libraries/base/Data/Unique.hs
+++ b/libraries/base/Data/Unique.hs
@@ -21,9 +21,9 @@
module Data.Unique (
-- * Unique objects
- Unique, -- instance (Eq, Ord)
- newUnique, -- :: IO Unique
- hashUnique -- :: Unique -> Int
+ Unique,
+ newUnique,
+ hashUnique
) where
import Prelude
diff --git a/libraries/base/Debug/Trace.hs b/libraries/base/Debug/Trace.hs
index 998b4a4b5e..f5839eead2 100644
--- a/libraries/base/Debug/Trace.hs
+++ b/libraries/base/Debug/Trace.hs
@@ -21,10 +21,10 @@
module Debug.Trace (
-- * Tracing
-- $tracing
- trace, -- :: String -> a -> a
+ trace,
traceShow,
traceStack,
- traceIO, -- :: String -> IO ()
+ traceIO,
putTraceMsg,
-- * Eventlog tracing
diff --git a/libraries/base/Foreign/C/Error.hs b/libraries/base/Foreign/C/Error.hs
index 3f16d27ef4..17ab2d0716 100644
--- a/libraries/base/Foreign/C/Error.hs
+++ b/libraries/base/Foreign/C/Error.hs
@@ -19,7 +19,7 @@ module Foreign.C.Error (
-- * Haskell representations of @errno@ values
- Errno(..), -- instance: Eq
+ Errno(..),
-- ** Common @errno@ symbols
-- | Different operating systems and\/or C libraries often support
@@ -42,44 +42,33 @@ module Foreign.C.Error (
eTOOMANYREFS, eTXTBSY, eUSERS, eWOULDBLOCK, eXDEV,
-- ** 'Errno' functions
- -- :: Errno
- isValidErrno, -- :: Errno -> Bool
+ isValidErrno,
-- access to the current thread's "errno" value
--
- getErrno, -- :: IO Errno
- resetErrno, -- :: IO ()
+ getErrno,
+ resetErrno,
-- conversion of an "errno" value into IO error
--
- errnoToIOError, -- :: String -- location
- -- -> Errno -- errno
- -- -> Maybe Handle -- handle
- -- -> Maybe String -- filename
- -- -> IOError
+ errnoToIOError,
-- throw current "errno" value
--
- throwErrno, -- :: String -> IO a
+ throwErrno,
-- ** Guards for IO operations that may fail
- throwErrnoIf, -- :: (a -> Bool) -> String -> IO a -> IO a
- throwErrnoIf_, -- :: (a -> Bool) -> String -> IO a -> IO ()
- throwErrnoIfRetry, -- :: (a -> Bool) -> String -> IO a -> IO a
- throwErrnoIfRetry_, -- :: (a -> Bool) -> String -> IO a -> IO ()
- throwErrnoIfMinus1, -- :: Num a
- -- => String -> IO a -> IO a
- throwErrnoIfMinus1_, -- :: Num a
- -- => String -> IO a -> IO ()
+ throwErrnoIf,
+ throwErrnoIf_,
+ throwErrnoIfRetry,
+ throwErrnoIfRetry_,
+ throwErrnoIfMinus1,
+ throwErrnoIfMinus1_,
throwErrnoIfMinus1Retry,
- -- :: Num a
- -- => String -> IO a -> IO a
throwErrnoIfMinus1Retry_,
- -- :: Num a
- -- => String -> IO a -> IO ()
- throwErrnoIfNull, -- :: String -> IO (Ptr a) -> IO (Ptr a)
- throwErrnoIfNullRetry,-- :: String -> IO (Ptr a) -> IO (Ptr a)
+ throwErrnoIfNull,
+ throwErrnoIfNullRetry,
throwErrnoIfRetryMayBlock,
throwErrnoIfRetryMayBlock_,
diff --git a/libraries/base/Foreign/C/String.hs b/libraries/base/Foreign/C/String.hs
index a55f856165..8be917ac07 100644
--- a/libraries/base/Foreign/C/String.hs
+++ b/libraries/base/Foreign/C/String.hs
@@ -26,8 +26,8 @@
module Foreign.C.String ( -- representation of strings in C
-- * C strings
- CString, -- = Ptr CChar
- CStringLen, -- = (Ptr CChar, Int)
+ CString,
+ CStringLen,
-- ** Using a locale-dependent encoding
@@ -42,20 +42,20 @@ module Foreign.C.String ( -- representation of strings in C
-- conversion of C strings into Haskell strings
--
- peekCString, -- :: CString -> IO String
- peekCStringLen, -- :: CStringLen -> IO String
+ peekCString,
+ peekCStringLen,
-- conversion of Haskell strings into C strings
--
- newCString, -- :: String -> IO CString
- newCStringLen, -- :: String -> IO CStringLen
+ newCString,
+ newCStringLen,
-- conversion of Haskell strings into C strings using temporary storage
--
- withCString, -- :: String -> (CString -> IO a) -> IO a
- withCStringLen, -- :: String -> (CStringLen -> IO a) -> IO a
+ withCString,
+ withCStringLen,
- charIsRepresentable, -- :: Char -> IO Bool
+ charIsRepresentable,
-- ** Using 8-bit characters
@@ -63,20 +63,20 @@ module Foreign.C.String ( -- representation of strings in C
-- that are ignorant of Unicode. These functions should be used with
-- care, as a loss of information can occur.
- castCharToCChar, -- :: Char -> CChar
- castCCharToChar, -- :: CChar -> Char
+ castCharToCChar,
+ castCCharToChar,
- castCharToCUChar, -- :: Char -> CUChar
- castCUCharToChar, -- :: CUChar -> Char
- castCharToCSChar, -- :: Char -> CSChar
- castCSCharToChar, -- :: CSChar -> Char
+ castCharToCUChar,
+ castCUCharToChar,
+ castCharToCSChar,
+ castCSCharToChar,
- peekCAString, -- :: CString -> IO String
- peekCAStringLen, -- :: CStringLen -> IO String
- newCAString, -- :: String -> IO CString
- newCAStringLen, -- :: String -> IO CStringLen
- withCAString, -- :: String -> (CString -> IO a) -> IO a
- withCAStringLen, -- :: String -> (CStringLen -> IO a) -> IO a
+ peekCAString,
+ peekCAStringLen,
+ newCAString,
+ newCAStringLen,
+ withCAString,
+ withCAStringLen,
-- * C wide strings
@@ -88,15 +88,15 @@ module Foreign.C.String ( -- representation of strings in C
--
-- * UTF-16 (as used on Windows systems).
- CWString, -- = Ptr CWchar
- CWStringLen, -- = (Ptr CWchar, Int)
+ CWString,
+ CWStringLen,
- peekCWString, -- :: CWString -> IO String
- peekCWStringLen, -- :: CWStringLen -> IO String
- newCWString, -- :: String -> IO CWString
- newCWStringLen, -- :: String -> IO CWStringLen
- withCWString, -- :: String -> (CWString -> IO a) -> IO a
- withCWStringLen, -- :: String -> (CWStringLen -> IO a) -> IO a
+ peekCWString,
+ peekCWStringLen,
+ newCWString,
+ newCWStringLen,
+ withCWString,
+ withCWStringLen,
) where
diff --git a/libraries/base/Foreign/Marshal/Alloc.hs b/libraries/base/Foreign/Marshal/Alloc.hs
index 515af4a83b..c38f0cc689 100644
--- a/libraries/base/Foreign/Marshal/Alloc.hs
+++ b/libraries/base/Foreign/Marshal/Alloc.hs
@@ -46,19 +46,19 @@
module Foreign.Marshal.Alloc (
-- * Memory allocation
-- ** Local allocation
- alloca, -- :: Storable a => (Ptr a -> IO b) -> IO b
- allocaBytes, -- :: Int -> (Ptr a -> IO b) -> IO b
- allocaBytesAligned, -- :: Int -> Int -> (Ptr a -> IO b) -> IO b
+ alloca,
+ allocaBytes,
+ allocaBytesAligned,
-- ** Dynamic allocation
- malloc, -- :: Storable a => IO (Ptr a)
- mallocBytes, -- :: Int -> IO (Ptr a)
+ malloc,
+ mallocBytes,
- realloc, -- :: Storable b => Ptr a -> IO (Ptr b)
- reallocBytes, -- :: Ptr a -> Int -> IO (Ptr a)
+ realloc,
+ reallocBytes,
- free, -- :: Ptr a -> IO ()
- finalizerFree -- :: FinalizerPtr a
+ free,
+ finalizerFree
) where
import Data.Maybe
diff --git a/libraries/base/Foreign/Marshal/Array.hs b/libraries/base/Foreign/Marshal/Array.hs
index 04825aa22d..60121796c3 100644
--- a/libraries/base/Foreign/Marshal/Array.hs
+++ b/libraries/base/Foreign/Marshal/Array.hs
@@ -21,47 +21,47 @@ module Foreign.Marshal.Array (
-- ** Allocation
--
- mallocArray, -- :: Storable a => Int -> IO (Ptr a)
- mallocArray0, -- :: Storable a => Int -> IO (Ptr a)
+ mallocArray,
+ mallocArray0,
- allocaArray, -- :: Storable a => Int -> (Ptr a -> IO b) -> IO b
- allocaArray0, -- :: Storable a => Int -> (Ptr a -> IO b) -> IO b
+ allocaArray,
+ allocaArray0,
- reallocArray, -- :: Storable a => Ptr a -> Int -> IO (Ptr a)
- reallocArray0, -- :: Storable a => Ptr a -> Int -> IO (Ptr a)
+ reallocArray,
+ reallocArray0,
-- ** Marshalling
--
- peekArray, -- :: Storable a => Int -> Ptr a -> IO [a]
- peekArray0, -- :: (Storable a, Eq a) => a -> Ptr a -> IO [a]
+ peekArray,
+ peekArray0,
- pokeArray, -- :: Storable a => Ptr a -> [a] -> IO ()
- pokeArray0, -- :: Storable a => a -> Ptr a -> [a] -> IO ()
+ pokeArray,
+ pokeArray0,
-- ** Combined allocation and marshalling
--
- newArray, -- :: Storable a => [a] -> IO (Ptr a)
- newArray0, -- :: Storable a => a -> [a] -> IO (Ptr a)
+ newArray,
+ newArray0,
- withArray, -- :: Storable a => [a] -> (Ptr a -> IO b) -> IO b
- withArray0, -- :: Storable a => a -> [a] -> (Ptr a -> IO b) -> IO b
+ withArray,
+ withArray0,
- withArrayLen, -- :: Storable a => [a] -> (Int -> Ptr a -> IO b) -> IO b
- withArrayLen0, -- :: Storable a => a -> [a] -> (Int -> Ptr a -> IO b) -> IO b
+ withArrayLen,
+ withArrayLen0,
-- ** Copying
-- | (argument order: destination, source)
- copyArray, -- :: Storable a => Ptr a -> Ptr a -> Int -> IO ()
- moveArray, -- :: Storable a => Ptr a -> Ptr a -> Int -> IO ()
+ copyArray,
+ moveArray,
-- ** Finding the length
--
- lengthArray0, -- :: (Storable a, Eq a) => a -> Ptr a -> IO Int
+ lengthArray0,
-- ** Indexing
--
- advancePtr, -- :: Storable a => Ptr a -> Int -> Ptr a
+ advancePtr,
) where
import Foreign.Ptr (Ptr, plusPtr)
diff --git a/libraries/base/Foreign/Marshal/Error.hs b/libraries/base/Foreign/Marshal/Error.hs
index 4236d44b40..3048ffe063 100644
--- a/libraries/base/Foreign/Marshal/Error.hs
+++ b/libraries/base/Foreign/Marshal/Error.hs
@@ -17,17 +17,15 @@
-----------------------------------------------------------------------------
module Foreign.Marshal.Error (
- throwIf, -- :: (a -> Bool) -> (a -> String) -> IO a -> IO a
- throwIf_, -- :: (a -> Bool) -> (a -> String) -> IO a -> IO ()
- throwIfNeg, -- :: (Ord a, Num a)
- -- => (a -> String) -> IO a -> IO a
- throwIfNeg_, -- :: (Ord a, Num a)
- -- => (a -> String) -> IO a -> IO ()
- throwIfNull, -- :: String -> IO (Ptr a) -> IO (Ptr a)
+ throwIf,
+ throwIf_,
+ throwIfNeg,
+ throwIfNeg_,
+ throwIfNull,
-- Discard return value
--
- void -- IO a -> IO ()
+ void
) where
import Foreign.Ptr
diff --git a/libraries/base/Foreign/Marshal/Pool.hs b/libraries/base/Foreign/Marshal/Pool.hs
index 6953c0b285..ccb0f415ad 100644
--- a/libraries/base/Foreign/Marshal/Pool.hs
+++ b/libraries/base/Foreign/Marshal/Pool.hs
@@ -23,27 +23,27 @@
module Foreign.Marshal.Pool (
-- * Pool management
Pool,
- newPool, -- :: IO Pool
- freePool, -- :: Pool -> IO ()
- withPool, -- :: (Pool -> IO b) -> IO b
+ newPool,
+ freePool,
+ withPool,
-- * (Re-)Allocation within a pool
- pooledMalloc, -- :: Storable a => Pool -> IO (Ptr a)
- pooledMallocBytes, -- :: Pool -> Int -> IO (Ptr a)
+ pooledMalloc,
+ pooledMallocBytes,
- pooledRealloc, -- :: Storable a => Pool -> Ptr a -> IO (Ptr a)
- pooledReallocBytes, -- :: Pool -> Ptr a -> Int -> IO (Ptr a)
+ pooledRealloc,
+ pooledReallocBytes,
- pooledMallocArray, -- :: Storable a => Pool -> Int -> IO (Ptr a)
- pooledMallocArray0, -- :: Storable a => Pool -> Int -> IO (Ptr a)
+ pooledMallocArray,
+ pooledMallocArray0,
- pooledReallocArray, -- :: Storable a => Pool -> Ptr a -> Int -> IO (Ptr a)
- pooledReallocArray0, -- :: Storable a => Pool -> Ptr a -> Int -> IO (Ptr a)
+ pooledReallocArray,
+ pooledReallocArray0,
-- * Combined allocation and marshalling
- pooledNew, -- :: Storable a => Pool -> a -> IO (Ptr a)
- pooledNewArray, -- :: Storable a => Pool -> [a] -> IO (Ptr a)
- pooledNewArray0 -- :: Storable a => Pool -> a -> [a] -> IO (Ptr a)
+ pooledNew,
+ pooledNewArray,
+ pooledNewArray0
) where
#ifdef __GLASGOW_HASKELL__
diff --git a/libraries/base/Foreign/Marshal/Utils.hs b/libraries/base/Foreign/Marshal/Utils.hs
index c9e1fd6e4d..d21222d9f9 100644
--- a/libraries/base/Foreign/Marshal/Utils.hs
+++ b/libraries/base/Foreign/Marshal/Utils.hs
@@ -20,32 +20,29 @@ module Foreign.Marshal.Utils (
-- ** Combined allocation and marshalling
--
- with, -- :: Storable a => a -> (Ptr a -> IO b) -> IO b
- new, -- :: Storable a => a -> IO (Ptr a)
+ with,
+ new,
-- ** Marshalling of Boolean values (non-zero corresponds to 'True')
--
- fromBool, -- :: Num a => Bool -> a
- toBool, -- :: Num a => a -> Bool
+ fromBool,
+ toBool,
-- ** Marshalling of Maybe values
--
- maybeNew, -- :: ( a -> IO (Ptr a))
- -- -> (Maybe a -> IO (Ptr a))
- maybeWith, -- :: ( a -> (Ptr b -> IO c) -> IO c)
- -- -> (Maybe a -> (Ptr b -> IO c) -> IO c)
- maybePeek, -- :: (Ptr a -> IO b )
- -- -> (Ptr a -> IO (Maybe b))
+ maybeNew,
+ maybeWith,
+ maybePeek,
-- ** Marshalling lists of storable objects
--
- withMany, -- :: (a -> (b -> res) -> res) -> [a] -> ([b] -> res) -> res
+ withMany,
-- ** Haskellish interface to memcpy and memmove
-- | (argument order: destination, source)
--
- copyBytes, -- :: Ptr a -> Ptr a -> Int -> IO ()
- moveBytes, -- :: Ptr a -> Ptr a -> Int -> IO ()
+ copyBytes,
+ moveBytes,
) where
import Data.Maybe
diff --git a/libraries/base/Foreign/Ptr.hs b/libraries/base/Foreign/Ptr.hs
index 3bab833593..b0a1a8ab8e 100644
--- a/libraries/base/Foreign/Ptr.hs
+++ b/libraries/base/Foreign/Ptr.hs
@@ -29,22 +29,22 @@ module Foreign.Ptr (
-- * Data pointers
- Ptr, -- data Ptr a
- nullPtr, -- :: Ptr a
- castPtr, -- :: Ptr a -> Ptr b
- plusPtr, -- :: Ptr a -> Int -> Ptr b
- alignPtr, -- :: Ptr a -> Int -> Ptr a
- minusPtr, -- :: Ptr a -> Ptr b -> Int
+ Ptr,
+ nullPtr,
+ castPtr,
+ plusPtr,
+ alignPtr,
+ minusPtr,
-- * Function pointers
- FunPtr, -- data FunPtr a
- nullFunPtr, -- :: FunPtr a
- castFunPtr, -- :: FunPtr a -> FunPtr b
- castFunPtrToPtr, -- :: FunPtr a -> Ptr b
- castPtrToFunPtr, -- :: Ptr a -> FunPtr b
+ FunPtr,
+ nullFunPtr,
+ castFunPtr,
+ castFunPtrToPtr,
+ castPtrToFunPtr,
- freeHaskellFunPtr, -- :: FunPtr a -> IO ()
+ freeHaskellFunPtr,
-- Free the function pointer created by foreign export dynamic.
#ifndef __NHC__
diff --git a/libraries/base/Foreign/StablePtr.hs b/libraries/base/Foreign/StablePtr.hs
index d0b6625e50..78bdc9db66 100644
--- a/libraries/base/Foreign/StablePtr.hs
+++ b/libraries/base/Foreign/StablePtr.hs
@@ -20,11 +20,11 @@
module Foreign.StablePtr
( -- * Stable references to Haskell values
StablePtr -- abstract
- , newStablePtr -- :: a -> IO (StablePtr a)
- , deRefStablePtr -- :: StablePtr a -> IO a
- , freeStablePtr -- :: StablePtr a -> IO ()
- , castStablePtrToPtr -- :: StablePtr a -> Ptr ()
- , castPtrToStablePtr -- :: Ptr () -> StablePtr a
+ , newStablePtr
+ , deRefStablePtr
+ , freeStablePtr
+ , castStablePtrToPtr
+ , castPtrToStablePtr
, -- ** The C-side interface
-- $cinterface
diff --git a/libraries/base/Foreign/Storable.hs b/libraries/base/Foreign/Storable.hs
index 753dc83f5f..bf3735b9e0 100644
--- a/libraries/base/Foreign/Storable.hs
+++ b/libraries/base/Foreign/Storable.hs
@@ -23,14 +23,14 @@
module Foreign.Storable
( Storable(
- sizeOf, -- :: a -> Int
- alignment, -- :: a -> Int
- peekElemOff, -- :: Ptr a -> Int -> IO a
- pokeElemOff, -- :: Ptr a -> Int -> a -> IO ()
- peekByteOff, -- :: Ptr b -> Int -> IO a
- pokeByteOff, -- :: Ptr b -> Int -> a -> IO ()
- peek, -- :: Ptr a -> IO a
- poke) -- :: Ptr a -> a -> IO ()
+ sizeOf,
+ alignment,
+ peekElemOff,
+ pokeElemOff,
+ peekByteOff,
+ pokeByteOff,
+ peek,
+ poke)
) where
diff --git a/libraries/base/GHC/Conc.lhs b/libraries/base/GHC/Conc.lhs
index ad8cfc469e..914db3ff27 100644
--- a/libraries/base/GHC/Conc.lhs
+++ b/libraries/base/GHC/Conc.lhs
@@ -30,66 +30,66 @@ module GHC.Conc
( ThreadId(..)
-- * Forking and suchlike
- , forkIO -- :: IO a -> IO ThreadId
+ , forkIO
, forkIOUnmasked
, forkIOWithUnmask
, forkOn
- , forkOnIO -- :: Int -> IO a -> IO ThreadId
+ , forkOnIO
, forkOnIOUnmasked
, forkOnWithUnmask
- , numCapabilities -- :: Int
- , getNumCapabilities -- :: IO Int
- , setNumCapabilities -- :: Int -> IO ()
- , getNumProcessors -- :: IO Int
- , numSparks -- :: IO Int
- , childHandler -- :: Exception -> IO ()
- , myThreadId -- :: IO ThreadId
- , killThread -- :: ThreadId -> IO ()
- , throwTo -- :: ThreadId -> Exception -> IO ()
- , par -- :: a -> b -> b
- , pseq -- :: a -> b -> b
+ , numCapabilities
+ , getNumCapabilities
+ , setNumCapabilities
+ , getNumProcessors
+ , numSparks
+ , childHandler
+ , myThreadId
+ , killThread
+ , throwTo
+ , par
+ , pseq
, runSparks
- , yield -- :: IO ()
- , labelThread -- :: ThreadId -> String -> IO ()
- , mkWeakThreadId -- :: ThreadId -> IO (Weak ThreadId)
+ , yield
+ , labelThread
+ , mkWeakThreadId
, ThreadStatus(..), BlockReason(..)
- , threadStatus -- :: ThreadId -> IO ThreadStatus
+ , threadStatus
, threadCapability
-- * Waiting
- , threadDelay -- :: Int -> IO ()
- , registerDelay -- :: Int -> IO (TVar Bool)
- , threadWaitRead -- :: Int -> IO ()
- , threadWaitWrite -- :: Int -> IO ()
- , closeFdWith -- :: (Fd -> IO ()) -> Fd -> IO ()
+ , threadDelay
+ , registerDelay
+ , threadWaitRead
+ , threadWaitWrite
+ , closeFdWith
-- * TVars
, STM(..)
- , atomically -- :: STM a -> IO a
- , retry -- :: STM a
- , orElse -- :: STM a -> STM a -> STM a
- , throwSTM -- :: Exception e => e -> STM a
- , catchSTM -- :: Exception e => STM a -> (e -> STM a) -> STM a
- , alwaysSucceeds -- :: STM a -> STM ()
- , always -- :: STM Bool -> STM ()
+ , atomically
+ , retry
+ , orElse
+ , throwSTM
+ , catchSTM
+ , alwaysSucceeds
+ , always
, TVar(..)
- , newTVar -- :: a -> STM (TVar a)
- , newTVarIO -- :: a -> STM (TVar a)
- , readTVar -- :: TVar a -> STM a
- , readTVarIO -- :: TVar a -> IO a
- , writeTVar -- :: a -> TVar a -> STM ()
- , unsafeIOToSTM -- :: IO a -> STM a
+ , newTVar
+ , newTVarIO
+ , readTVar
+ , readTVarIO
+ , writeTVar
+ , unsafeIOToSTM
-- * Miscellaneous
, withMVar
#ifdef mingw32_HOST_OS
- , asyncRead -- :: Int -> Int -> Int -> Ptr a -> IO (Int, Int)
- , asyncWrite -- :: Int -> Int -> Int -> Ptr a -> IO (Int, Int)
- , asyncDoProc -- :: FunPtr (Ptr a -> IO Int) -> Ptr a -> IO Int
+ , asyncRead
+ , asyncWrite
+ , asyncDoProc
- , asyncReadBA -- :: Int -> Int -> Int -> Int -> MutableByteArray# RealWorld -> IO (Int, Int)
- , asyncWriteBA -- :: Int -> Int -> Int -> Int -> MutableByteArray# RealWorld -> IO (Int, Int)
+ , asyncReadBA
+ , asyncWriteBA
#endif
#ifndef mingw32_HOST_OS
@@ -103,8 +103,8 @@ module GHC.Conc
, win32ConsoleHandler
, toWin32ConsoleEvent
#endif
- , setUncaughtExceptionHandler -- :: (Exception -> IO ()) -> IO ()
- , getUncaughtExceptionHandler -- :: IO (Exception -> IO ())
+ , setUncaughtExceptionHandler
+ , getUncaughtExceptionHandler
, reportError, reportStackOverflow
) where
diff --git a/libraries/base/GHC/Conc/IO.hs b/libraries/base/GHC/Conc/IO.hs
index 64a479e7c1..94a63a9878 100644
--- a/libraries/base/GHC/Conc/IO.hs
+++ b/libraries/base/GHC/Conc/IO.hs
@@ -34,19 +34,19 @@ module GHC.Conc.IO
( ensureIOManagerIsRunning
-- * Waiting
- , threadDelay -- :: Int -> IO ()
- , registerDelay -- :: Int -> IO (TVar Bool)
- , threadWaitRead -- :: Int -> IO ()
- , threadWaitWrite -- :: Int -> IO ()
- , closeFdWith -- :: (Fd -> IO ()) -> Fd -> IO ()
+ , threadDelay
+ , registerDelay
+ , threadWaitRead
+ , threadWaitWrite
+ , closeFdWith
#ifdef mingw32_HOST_OS
- , asyncRead -- :: Int -> Int -> Int -> Ptr a -> IO (Int, Int)
- , asyncWrite -- :: Int -> Int -> Int -> Ptr a -> IO (Int, Int)
- , asyncDoProc -- :: FunPtr (Ptr a -> IO Int) -> Ptr a -> IO Int
+ , asyncRead
+ , asyncWrite
+ , asyncDoProc
- , asyncReadBA -- :: Int -> Int -> Int -> Int -> MutableByteArray# RealWorld -> IO (Int, Int)
- , asyncWriteBA -- :: Int -> Int -> Int -> Int -> MutableByteArray# RealWorld -> IO (Int, Int)
+ , asyncReadBA
+ , asyncWriteBA
, ConsoleEvent(..)
, win32ConsoleHandler
diff --git a/libraries/base/GHC/Conc/Sync.lhs b/libraries/base/GHC/Conc/Sync.lhs
index 4d289c63b5..ec266e9017 100644
--- a/libraries/base/GHC/Conc/Sync.lhs
+++ b/libraries/base/GHC/Conc/Sync.lhs
@@ -40,56 +40,56 @@ module GHC.Conc.Sync
( ThreadId(..)
-- * Forking and suchlike
- , forkIO -- :: IO a -> IO ThreadId
+ , forkIO
, forkIOUnmasked
, forkIOWithUnmask
- , forkOn -- :: Int -> IO a -> IO ThreadId
+ , forkOn
, forkOnIO -- DEPRECATED
, forkOnIOUnmasked
, forkOnWithUnmask
- , numCapabilities -- :: Int
- , getNumCapabilities -- :: IO Int
- , setNumCapabilities -- :: Int -> IO ()
- , getNumProcessors -- :: IO Int
- , numSparks -- :: IO Int
- , childHandler -- :: Exception -> IO ()
- , myThreadId -- :: IO ThreadId
- , killThread -- :: ThreadId -> IO ()
- , throwTo -- :: ThreadId -> Exception -> IO ()
- , par -- :: a -> b -> b
- , pseq -- :: a -> b -> b
+ , numCapabilities
+ , getNumCapabilities
+ , setNumCapabilities
+ , getNumProcessors
+ , numSparks
+ , childHandler
+ , myThreadId
+ , killThread
+ , throwTo
+ , par
+ , pseq
, runSparks
- , yield -- :: IO ()
- , labelThread -- :: ThreadId -> String -> IO ()
- , mkWeakThreadId -- :: ThreadId -> IO (Weak ThreadId)
+ , yield
+ , labelThread
+ , mkWeakThreadId
, ThreadStatus(..), BlockReason(..)
- , threadStatus -- :: ThreadId -> IO ThreadStatus
+ , threadStatus
, threadCapability
-- * TVars
, STM(..)
- , atomically -- :: STM a -> IO a
- , retry -- :: STM a
- , orElse -- :: STM a -> STM a -> STM a
- , throwSTM -- :: Exception e => e -> STM a
- , catchSTM -- :: Exception e => STM a -> (e -> STM a) -> STM a
- , alwaysSucceeds -- :: STM a -> STM ()
- , always -- :: STM Bool -> STM ()
+ , atomically
+ , retry
+ , orElse
+ , throwSTM
+ , catchSTM
+ , alwaysSucceeds
+ , always
, TVar(..)
- , newTVar -- :: a -> STM (TVar a)
- , newTVarIO -- :: a -> STM (TVar a)
- , readTVar -- :: TVar a -> STM a
- , readTVarIO -- :: TVar a -> IO a
- , writeTVar -- :: a -> TVar a -> STM ()
- , unsafeIOToSTM -- :: IO a -> STM a
+ , newTVar
+ , newTVarIO
+ , readTVar
+ , readTVarIO
+ , writeTVar
+ , unsafeIOToSTM
-- * Miscellaneous
, withMVar
, modifyMVar_
- , setUncaughtExceptionHandler -- :: (Exception -> IO ()) -> IO ()
- , getUncaughtExceptionHandler -- :: IO (Exception -> IO ())
+ , setUncaughtExceptionHandler
+ , getUncaughtExceptionHandler
, reportError, reportStackOverflow
diff --git a/libraries/base/GHC/Conc/Windows.hs b/libraries/base/GHC/Conc/Windows.hs
index 0170b06412..ceb6b40e35 100644
--- a/libraries/base/GHC/Conc/Windows.hs
+++ b/libraries/base/GHC/Conc/Windows.hs
@@ -27,12 +27,12 @@ module GHC.Conc.Windows
, registerDelay
-- * Miscellaneous
- , asyncRead -- :: Int -> Int -> Int -> Ptr a -> IO (Int, Int)
- , asyncWrite -- :: Int -> Int -> Int -> Ptr a -> IO (Int, Int)
- , asyncDoProc -- :: FunPtr (Ptr a -> IO Int) -> Ptr a -> IO Int
+ , asyncRead
+ , asyncWrite
+ , asyncDoProc
- , asyncReadBA -- :: Int -> Int -> Int -> Int -> MutableByteArray# RealWorld -> IO (Int, Int)
- , asyncWriteBA -- :: Int -> Int -> Int -> Int -> MutableByteArray# RealWorld -> IO (Int, Int)
+ , asyncReadBA
+ , asyncWriteBA
, ConsoleEvent(..)
, win32ConsoleHandler
diff --git a/libraries/base/GHC/Err.lhs b/libraries/base/GHC/Err.lhs
index ed1dcb9766..964bc0cda9 100644
--- a/libraries/base/GHC/Err.lhs
+++ b/libraries/base/GHC/Err.lhs
@@ -25,14 +25,14 @@
-- #hide
module GHC.Err
(
- absentErr -- :: a
- , divZeroError -- :: a
- , ratioZeroDenominatorError -- :: a
- , overflowError -- :: a
+ absentErr
+ , divZeroError
+ , ratioZeroDenominatorError
+ , overflowError
- , error -- :: String -> a
+ , error
- , undefined -- :: a
+ , undefined
) where
import GHC.Types
diff --git a/libraries/base/GHC/Foreign.hs b/libraries/base/GHC/Foreign.hs
index 4eef2ebc2f..3924d404a5 100644
--- a/libraries/base/GHC/Foreign.hs
+++ b/libraries/base/GHC/Foreign.hs
@@ -20,20 +20,20 @@ module GHC.Foreign (
-- conversion of C strings into Haskell strings
--
- peekCString, -- :: TextEncoding -> CString -> IO String
- peekCStringLen, -- :: TextEncoding -> CStringLen -> IO String
+ peekCString,
+ peekCStringLen,
-- conversion of Haskell strings into C strings
--
- newCString, -- :: TextEncoding -> String -> IO CString
- newCStringLen, -- :: TextEncoding -> String -> IO CStringLen
+ newCString,
+ newCStringLen,
-- conversion of Haskell strings into C strings using temporary storage
--
- withCString, -- :: TextEncoding -> String -> (CString -> IO a) -> IO a
- withCStringLen, -- :: TextEncoding -> String -> (CStringLen -> IO a) -> IO a
+ withCString,
+ withCStringLen,
- charIsRepresentable, -- :: TextEncoding -> Char -> IO Bool
+ charIsRepresentable,
) where
import Foreign.Marshal.Array
diff --git a/libraries/base/GHC/MVar.hs b/libraries/base/GHC/MVar.hs
index 6a10748e2d..cd2ca33dd8 100644
--- a/libraries/base/GHC/MVar.hs
+++ b/libraries/base/GHC/MVar.hs
@@ -20,14 +20,14 @@
module GHC.MVar (
-- * MVars
MVar(..)
- , newMVar -- :: a -> IO (MVar a)
- , newEmptyMVar -- :: IO (MVar a)
- , takeMVar -- :: MVar a -> IO a
- , putMVar -- :: MVar a -> a -> IO ()
- , tryTakeMVar -- :: MVar a -> IO (Maybe a)
- , tryPutMVar -- :: MVar a -> a -> IO Bool
- , isEmptyMVar -- :: MVar a -> IO Bool
- , addMVarFinalizer -- :: MVar a -> IO () -> IO ()
+ , newMVar
+ , newEmptyMVar
+ , takeMVar
+ , putMVar
+ , tryTakeMVar
+ , tryPutMVar
+ , isEmptyMVar
+ , addMVarFinalizer
) where
import GHC.Base
diff --git a/libraries/base/GHC/Pack.lhs b/libraries/base/GHC/Pack.lhs
index 79708cb950..91fa6ddffc 100644
--- a/libraries/base/GHC/Pack.lhs
+++ b/libraries/base/GHC/Pack.lhs
@@ -27,10 +27,10 @@ module GHC.Pack
(
-- (**) - emitted by compiler.
- packCString#, -- :: [Char] -> ByteArray# (**)
+ packCString#,
unpackCString,
- unpackCString#, -- :: Addr# -> [Char] (**)
- unpackNBytes#, -- :: Addr# -> Int# -> [Char] (**)
+ unpackCString#,
+ unpackNBytes#,
unpackFoldrCString#, -- (**)
unpackAppendCString#, -- (**)
)
diff --git a/libraries/base/GHC/Read.lhs b/libraries/base/GHC/Read.lhs
index 96b5b2d4c1..b0869aa133 100644
--- a/libraries/base/GHC/Read.lhs
+++ b/libraries/base/GHC/Read.lhs
@@ -23,20 +23,20 @@ module GHC.Read
( Read(..) -- class
-- ReadS type
- , ReadS -- :: *; = String -> [(a,String)]
+ , ReadS
-- H98 compatibility
- , lex -- :: ReadS String
- , lexLitChar -- :: ReadS String
- , readLitChar -- :: ReadS Char
- , lexDigits -- :: ReadS String
+ , lex
+ , lexLitChar
+ , readLitChar
+ , lexDigits
-- defining readers
- , lexP -- :: ReadPrec Lexeme
- , paren -- :: ReadPrec a -> ReadPrec a
- , parens -- :: ReadPrec a -> ReadPrec a
- , list -- :: ReadPrec a -> ReadPrec [a]
- , choose -- :: [(String, ReadPrec a)] -> ReadPrec a
+ , lexP
+ , paren
+ , parens
+ , list
+ , choose
, readListDefault, readListPrecDefault
-- Temporary
diff --git a/libraries/base/GHC/Stable.lhs b/libraries/base/GHC/Stable.lhs
index e660917be4..439689583b 100644
--- a/libraries/base/GHC/Stable.lhs
+++ b/libraries/base/GHC/Stable.lhs
@@ -24,11 +24,11 @@
-- #hide
module GHC.Stable (
StablePtr(..),
- newStablePtr, -- :: a -> IO (StablePtr a)
- deRefStablePtr, -- :: StablePtr a -> a
- freeStablePtr, -- :: StablePtr a -> IO ()
- castStablePtrToPtr, -- :: StablePtr a -> Ptr ()
- castPtrToStablePtr -- :: Ptr () -> StablePtr a
+ newStablePtr,
+ deRefStablePtr,
+ freeStablePtr,
+ castStablePtrToPtr,
+ castPtrToStablePtr
) where
import GHC.Ptr
diff --git a/libraries/base/Numeric.hs b/libraries/base/Numeric.hs
index c29d7b9ccd..a990cfb000 100644
--- a/libraries/base/Numeric.hs
+++ b/libraries/base/Numeric.hs
@@ -20,19 +20,19 @@ module Numeric (
-- * Showing
- showSigned, -- :: (Real a) => (a -> ShowS) -> Int -> a -> ShowS
+ showSigned,
- showIntAtBase, -- :: Integral a => a -> (a -> Char) -> a -> ShowS
- showInt, -- :: Integral a => a -> ShowS
- showHex, -- :: Integral a => a -> ShowS
- showOct, -- :: Integral a => a -> ShowS
+ showIntAtBase,
+ showInt,
+ showHex,
+ showOct,
- showEFloat, -- :: (RealFloat a) => Maybe Int -> a -> ShowS
- showFFloat, -- :: (RealFloat a) => Maybe Int -> a -> ShowS
- showGFloat, -- :: (RealFloat a) => Maybe Int -> a -> ShowS
- showFloat, -- :: (RealFloat a) => a -> ShowS
+ showEFloat,
+ showFFloat,
+ showGFloat,
+ showFloat,
- floatToDigits, -- :: (RealFloat a) => Integer -> a -> ([Int], Int)
+ floatToDigits,
-- * Reading
@@ -40,21 +40,20 @@ module Numeric (
-- and 'readDec' is the \`dual\' of 'showInt'.
-- The inconsistent naming is a historical accident.
- readSigned, -- :: (Real a) => ReadS a -> ReadS a
+ readSigned,
- readInt, -- :: (Integral a) => a -> (Char -> Bool)
- -- -> (Char -> Int) -> ReadS a
- readDec, -- :: (Integral a) => ReadS a
- readOct, -- :: (Integral a) => ReadS a
- readHex, -- :: (Integral a) => ReadS a
+ readInt,
+ readDec,
+ readOct,
+ readHex,
- readFloat, -- :: (RealFloat a) => ReadS a
+ readFloat,
- lexDigits, -- :: ReadS String
+ lexDigits,
-- * Miscellaneous
- fromRat, -- :: (RealFloat a) => Rational -> a
+ fromRat,
) where
diff --git a/libraries/base/System/Environment.hs b/libraries/base/System/Environment.hs
index 1f3321327e..c74286f29d 100644
--- a/libraries/base/System/Environment.hs
+++ b/libraries/base/System/Environment.hs
@@ -17,11 +17,11 @@
module System.Environment
(
- getArgs, -- :: IO [String]
- getProgName, -- :: IO String
- getExecutablePath, -- :: IO FilePath
- getEnv, -- :: String -> IO String
- lookupEnv, -- :: String -> IO (Maybe String)
+ getArgs,
+ getProgName,
+ getExecutablePath,
+ getEnv,
+ lookupEnv,
#ifndef __NHC__
withArgs,
withProgName,
diff --git a/libraries/base/System/Exit.hs b/libraries/base/System/Exit.hs
index 2f63024b18..441b8c5cf5 100644
--- a/libraries/base/System/Exit.hs
+++ b/libraries/base/System/Exit.hs
@@ -18,9 +18,9 @@
module System.Exit
(
ExitCode(ExitSuccess,ExitFailure)
- , exitWith -- :: ExitCode -> IO a
- , exitFailure -- :: IO a
- , exitSuccess -- :: IO a
+ , exitWith
+ , exitFailure
+ , exitSuccess
) where
import Prelude
diff --git a/libraries/base/System/IO.hs b/libraries/base/System/IO.hs
index 31aa0e88c6..3ff8396bb2 100644
--- a/libraries/base/System/IO.hs
+++ b/libraries/base/System/IO.hs
@@ -19,12 +19,12 @@
module System.IO (
-- * The IO monad
- IO, -- instance MonadFix
- fixIO, -- :: (a -> IO a) -> IO a
+ IO,
+ fixIO,
-- * Files and handles
- FilePath, -- :: String
+ FilePath,
Handle, -- abstract, instance of: Eq, Show.
@@ -42,27 +42,27 @@ module System.IO (
-- | Three handles are allocated during program initialisation,
-- and are initially open.
- stdin, stdout, stderr, -- :: Handle
+ stdin, stdout, stderr,
-- * Opening and closing files
-- ** Opening files
withFile,
- openFile, -- :: FilePath -> IOMode -> IO Handle
+ openFile,
IOMode(ReadMode,WriteMode,AppendMode,ReadWriteMode),
-- ** Closing files
- hClose, -- :: Handle -> IO ()
+ hClose,
-- ** Special cases
-- | These functions are also exported by the "Prelude".
- readFile, -- :: FilePath -> IO String
- writeFile, -- :: FilePath -> String -> IO ()
- appendFile, -- :: FilePath -> String -> IO ()
+ readFile,
+ writeFile,
+ appendFile,
-- ** File locking
@@ -72,100 +72,100 @@ module System.IO (
-- ** Determining and changing the size of a file
- hFileSize, -- :: Handle -> IO Integer
+ hFileSize,
#ifdef __GLASGOW_HASKELL__
- hSetFileSize, -- :: Handle -> Integer -> IO ()
+ hSetFileSize,
#endif
-- ** Detecting the end of input
- hIsEOF, -- :: Handle -> IO Bool
- isEOF, -- :: IO Bool
+ hIsEOF,
+ isEOF,
-- ** Buffering operations
BufferMode(NoBuffering,LineBuffering,BlockBuffering),
- hSetBuffering, -- :: Handle -> BufferMode -> IO ()
- hGetBuffering, -- :: Handle -> IO BufferMode
- hFlush, -- :: Handle -> IO ()
+ hSetBuffering,
+ hGetBuffering,
+ hFlush,
-- ** Repositioning handles
- hGetPosn, -- :: Handle -> IO HandlePosn
- hSetPosn, -- :: HandlePosn -> IO ()
+ hGetPosn,
+ hSetPosn,
HandlePosn, -- abstract, instance of: Eq, Show.
- hSeek, -- :: Handle -> SeekMode -> Integer -> IO ()
+ hSeek,
SeekMode(AbsoluteSeek,RelativeSeek,SeekFromEnd),
#if !defined(__NHC__)
- hTell, -- :: Handle -> IO Integer
+ hTell,
#endif
-- ** Handle properties
- hIsOpen, hIsClosed, -- :: Handle -> IO Bool
- hIsReadable, hIsWritable, -- :: Handle -> IO Bool
- hIsSeekable, -- :: Handle -> IO Bool
+ hIsOpen, hIsClosed,
+ hIsReadable, hIsWritable,
+ hIsSeekable,
-- ** Terminal operations (not portable: GHC\/Hugs only)
#if !defined(__NHC__)
- hIsTerminalDevice, -- :: Handle -> IO Bool
+ hIsTerminalDevice,
- hSetEcho, -- :: Handle -> Bool -> IO ()
- hGetEcho, -- :: Handle -> IO Bool
+ hSetEcho,
+ hGetEcho,
#endif
-- ** Showing handle state (not portable: GHC only)
#ifdef __GLASGOW_HASKELL__
- hShow, -- :: Handle -> IO String
+ hShow,
#endif
-- * Text input and output
-- ** Text input
- hWaitForInput, -- :: Handle -> Int -> IO Bool
- hReady, -- :: Handle -> IO Bool
- hGetChar, -- :: Handle -> IO Char
- hGetLine, -- :: Handle -> IO [Char]
- hLookAhead, -- :: Handle -> IO Char
- hGetContents, -- :: Handle -> IO [Char]
+ hWaitForInput,
+ hReady,
+ hGetChar,
+ hGetLine,
+ hLookAhead,
+ hGetContents,
-- ** Text output
- hPutChar, -- :: Handle -> Char -> IO ()
- hPutStr, -- :: Handle -> [Char] -> IO ()
- hPutStrLn, -- :: Handle -> [Char] -> IO ()
- hPrint, -- :: Show a => Handle -> a -> IO ()
+ hPutChar,
+ hPutStr,
+ hPutStrLn,
+ hPrint,
-- ** Special cases for standard input and output
-- | These functions are also exported by the "Prelude".
- interact, -- :: (String -> String) -> IO ()
- putChar, -- :: Char -> IO ()
- putStr, -- :: String -> IO ()
- putStrLn, -- :: String -> IO ()
- print, -- :: Show a => a -> IO ()
- getChar, -- :: IO Char
- getLine, -- :: IO String
- getContents, -- :: IO String
- readIO, -- :: Read a => String -> IO a
- readLn, -- :: Read a => IO a
+ interact,
+ putChar,
+ putStr,
+ putStrLn,
+ print,
+ getChar,
+ getLine,
+ getContents,
+ readIO,
+ readLn,
-- * Binary input and output
withBinaryFile,
- openBinaryFile, -- :: FilePath -> IOMode -> IO Handle
- hSetBinaryMode, -- :: Handle -> Bool -> IO ()
- hPutBuf, -- :: Handle -> Ptr a -> Int -> IO ()
- hGetBuf, -- :: Handle -> Ptr a -> Int -> IO Int
+ openBinaryFile,
+ hSetBinaryMode,
+ hPutBuf,
+ hGetBuf,
#if !defined(__NHC__) && !defined(__HUGS__)
- hGetBufSome, -- :: Handle -> Ptr a -> Int -> IO Int
- hPutBufNonBlocking, -- :: Handle -> Ptr a -> Int -> IO Int
- hGetBufNonBlocking, -- :: Handle -> Ptr a -> Int -> IO Int
+ hGetBufSome,
+ hPutBufNonBlocking,
+ hGetBufNonBlocking,
#endif
-- * Temporary files
diff --git a/libraries/base/System/IO/Error.hs b/libraries/base/System/IO/Error.hs
index 4259676839..8d939c08b3 100644
--- a/libraries/base/System/IO/Error.hs
+++ b/libraries/base/System/IO/Error.hs
@@ -18,18 +18,16 @@
module System.IO.Error (
-- * I\/O errors
- IOError, -- = IOException
+ IOError,
- userError, -- :: String -> IOError
+ userError,
- mkIOError, -- :: IOErrorType -> String -> Maybe Handle
- -- -> Maybe FilePath -> IOError
+ mkIOError,
- annotateIOError, -- :: IOError -> String -> Maybe Handle
- -- -> Maybe FilePath -> IOError
+ annotateIOError,
-- ** Classifying I\/O errors
- isAlreadyExistsError, -- :: IOError -> Bool
+ isAlreadyExistsError,
isDoesNotExistError,
isAlreadyInUseError,
isFullError,
@@ -39,22 +37,22 @@ module System.IO.Error (
isUserError,
-- ** Attributes of I\/O errors
- ioeGetErrorType, -- :: IOError -> IOErrorType
- ioeGetLocation, -- :: IOError -> String
- ioeGetErrorString, -- :: IOError -> String
- ioeGetHandle, -- :: IOError -> Maybe Handle
- ioeGetFileName, -- :: IOError -> Maybe FilePath
-
- ioeSetErrorType, -- :: IOError -> IOErrorType -> IOError
- ioeSetErrorString, -- :: IOError -> String -> IOError
- ioeSetLocation, -- :: IOError -> String -> IOError
- ioeSetHandle, -- :: IOError -> Handle -> IOError
- ioeSetFileName, -- :: IOError -> FilePath -> IOError
+ ioeGetErrorType,
+ ioeGetLocation,
+ ioeGetErrorString,
+ ioeGetHandle,
+ ioeGetFileName,
+
+ ioeSetErrorType,
+ ioeSetErrorString,
+ ioeSetLocation,
+ ioeSetHandle,
+ ioeSetFileName,
-- * Types of I\/O error
IOErrorType, -- abstract
- alreadyExistsErrorType, -- :: IOErrorType
+ alreadyExistsErrorType,
doesNotExistErrorType,
alreadyInUseErrorType,
fullErrorType,
@@ -64,7 +62,7 @@ module System.IO.Error (
userErrorType,
-- ** 'IOErrorType' predicates
- isAlreadyExistsErrorType, -- :: IOErrorType -> Bool
+ isAlreadyExistsErrorType,
isDoesNotExistErrorType,
isAlreadyInUseErrorType,
isFullErrorType,
@@ -75,12 +73,12 @@ module System.IO.Error (
-- * Throwing and catching I\/O errors
- ioError, -- :: IOError -> IO a
+ ioError,
- catchIOError, -- :: IO a -> (IOError -> IO a) -> IO a
- tryIOError, -- :: IO a -> IO (Either IOError a)
+ catchIOError,
+ tryIOError,
- modifyIOError, -- :: (IOError -> IOError) -> IO a -> IO a
+ modifyIOError,
) where
#ifndef __HUGS__
diff --git a/libraries/base/System/IO/Unsafe.hs b/libraries/base/System/IO/Unsafe.hs
index 33620a3f77..6ac4af61de 100644
--- a/libraries/base/System/IO/Unsafe.hs
+++ b/libraries/base/System/IO/Unsafe.hs
@@ -17,9 +17,9 @@
module System.IO.Unsafe (
-- * Unsafe 'System.IO.IO' operations
- unsafePerformIO, -- :: IO a -> a
- unsafeDupablePerformIO, -- :: IO a -> a
- unsafeInterleaveIO, -- :: IO a -> IO a
+ unsafePerformIO,
+ unsafeDupablePerformIO,
+ unsafeInterleaveIO,
unsafeFixIO,
) where
diff --git a/libraries/base/System/Info.hs b/libraries/base/System/Info.hs
index c9f623d1ff..c475be3eb7 100644
--- a/libraries/base/System/Info.hs
+++ b/libraries/base/System/Info.hs
@@ -18,10 +18,10 @@
module System.Info
(
- os, -- :: String
- arch, -- :: String
- compilerName, -- :: String
- compilerVersion -- :: Version
+ os,
+ arch,
+ compilerName,
+ compilerVersion
) where
import Prelude
diff --git a/libraries/base/System/Mem.hs b/libraries/base/System/Mem.hs
index 8e8a1bc2e0..665f69e0dc 100644
--- a/libraries/base/System/Mem.hs
+++ b/libraries/base/System/Mem.hs
@@ -19,7 +19,7 @@
-----------------------------------------------------------------------------
module System.Mem (
- performGC -- :: IO ()
+ performGC
) where
import Prelude
diff --git a/libraries/base/System/Mem/Weak.hs b/libraries/base/System/Mem/Weak.hs
index 71b8446c15..9691649668 100644
--- a/libraries/base/System/Mem/Weak.hs
+++ b/libraries/base/System/Mem/Weak.hs
@@ -55,15 +55,15 @@ module System.Mem.Weak (
Weak, -- abstract
-- * The general interface
- mkWeak, -- :: k -> v -> Maybe (IO ()) -> IO (Weak v)
- deRefWeak, -- :: Weak v -> IO (Maybe v)
- finalize, -- :: Weak v -> IO ()
+ mkWeak,
+ deRefWeak,
+ finalize,
-- * Specialised versions
- mkWeakPtr, -- :: k -> Maybe (IO ()) -> IO (Weak k)
- addFinalizer, -- :: key -> IO () -> IO ()
- mkWeakPair, -- :: k -> v -> Maybe (IO ()) -> IO (Weak (k,v))
- -- replaceFinaliser -- :: Weak v -> IO () -> IO ()
+ mkWeakPtr,
+ addFinalizer,
+ mkWeakPair,
+ -- replaceFinaliser
-- * A precise semantics
diff --git a/libraries/base/Text/ParserCombinators/ReadP.hs b/libraries/base/Text/ParserCombinators/ReadP.hs
index cfcb3bda07..ce7c26af43 100644
--- a/libraries/base/Text/ParserCombinators/ReadP.hs
+++ b/libraries/base/Text/ParserCombinators/ReadP.hs
@@ -29,50 +29,50 @@ module Text.ParserCombinators.ReadP
(
-- * The 'ReadP' type
#ifndef __NHC__
- ReadP, -- :: * -> *; instance Functor, Monad, MonadPlus
+ ReadP,
#else
- ReadPN, -- :: * -> * -> *; instance Functor, Monad, MonadPlus
+ ReadPN,
#endif
-- * Primitive operations
- get, -- :: ReadP Char
- look, -- :: ReadP String
- (+++), -- :: ReadP a -> ReadP a -> ReadP a
- (<++), -- :: ReadP a -> ReadP a -> ReadP a
- gather, -- :: ReadP a -> ReadP (String, a)
+ get,
+ look,
+ (+++),
+ (<++),
+ gather,
-- * Other operations
- pfail, -- :: ReadP a
- eof, -- :: ReadP ()
- satisfy, -- :: (Char -> Bool) -> ReadP Char
- char, -- :: Char -> ReadP Char
- string, -- :: String -> ReadP String
- munch, -- :: (Char -> Bool) -> ReadP String
- munch1, -- :: (Char -> Bool) -> ReadP String
- skipSpaces, -- :: ReadP ()
- choice, -- :: [ReadP a] -> ReadP a
- count, -- :: Int -> ReadP a -> ReadP [a]
- between, -- :: ReadP open -> ReadP close -> ReadP a -> ReadP a
- option, -- :: a -> ReadP a -> ReadP a
- optional, -- :: ReadP a -> ReadP ()
- many, -- :: ReadP a -> ReadP [a]
- many1, -- :: ReadP a -> ReadP [a]
- skipMany, -- :: ReadP a -> ReadP ()
- skipMany1, -- :: ReadP a -> ReadP ()
- sepBy, -- :: ReadP a -> ReadP sep -> ReadP [a]
- sepBy1, -- :: ReadP a -> ReadP sep -> ReadP [a]
- endBy, -- :: ReadP a -> ReadP sep -> ReadP [a]
- endBy1, -- :: ReadP a -> ReadP sep -> ReadP [a]
- chainr, -- :: ReadP a -> ReadP (a -> a -> a) -> a -> ReadP a
- chainl, -- :: ReadP a -> ReadP (a -> a -> a) -> a -> ReadP a
- chainl1, -- :: ReadP a -> ReadP (a -> a -> a) -> ReadP a
- chainr1, -- :: ReadP a -> ReadP (a -> a -> a) -> ReadP a
- manyTill, -- :: ReadP a -> ReadP end -> ReadP [a]
+ pfail,
+ eof,
+ satisfy,
+ char,
+ string,
+ munch,
+ munch1,
+ skipSpaces,
+ choice,
+ count,
+ between,
+ option,
+ optional,
+ many,
+ many1,
+ skipMany,
+ skipMany1,
+ sepBy,
+ sepBy1,
+ endBy,
+ endBy1,
+ chainr,
+ chainl,
+ chainl1,
+ chainr1,
+ manyTill,
-- * Running a parser
- ReadS, -- :: *; = String -> [(a,String)]
- readP_to_S, -- :: ReadP a -> ReadS a
- readS_to_P, -- :: ReadS a -> ReadP a
+ ReadS,
+ readP_to_S,
+ readS_to_P,
-- * Properties
-- $properties
diff --git a/libraries/base/Text/ParserCombinators/ReadPrec.hs b/libraries/base/Text/ParserCombinators/ReadPrec.hs
index faf53a9a4b..ba59facb8b 100644
--- a/libraries/base/Text/ParserCombinators/ReadPrec.hs
+++ b/libraries/base/Text/ParserCombinators/ReadPrec.hs
@@ -17,32 +17,32 @@
module Text.ParserCombinators.ReadPrec
(
- ReadPrec, -- :: * -> *; instance Functor, Monad, MonadPlus
+ ReadPrec,
-- * Precedences
- Prec, -- :: *; = Int
- minPrec, -- :: Prec; = 0
+ Prec,
+ minPrec,
-- * Precedence operations
- lift, -- :: ReadP a -> ReadPrec a
- prec, -- :: Prec -> ReadPrec a -> ReadPrec a
- step, -- :: ReadPrec a -> ReadPrec a
- reset, -- :: ReadPrec a -> ReadPrec a
+ lift,
+ prec,
+ step,
+ reset,
-- * Other operations
-- | All are based directly on their similarly-named 'ReadP' counterparts.
- get, -- :: ReadPrec Char
- look, -- :: ReadPrec String
- (+++), -- :: ReadPrec a -> ReadPrec a -> ReadPrec a
- (<++), -- :: ReadPrec a -> ReadPrec a -> ReadPrec a
- pfail, -- :: ReadPrec a
- choice, -- :: [ReadPrec a] -> ReadPrec a
+ get,
+ look,
+ (+++),
+ (<++),
+ pfail,
+ choice,
-- * Converters
- readPrec_to_P, -- :: ReadPrec a -> (Int -> ReadP a)
- readP_to_Prec, -- :: (Int -> ReadP a) -> ReadPrec a
- readPrec_to_S, -- :: ReadPrec a -> (Int -> ReadS a)
- readS_to_Prec, -- :: (Int -> ReadS a) -> ReadPrec a
+ readPrec_to_P,
+ readP_to_Prec,
+ readPrec_to_S,
+ readS_to_Prec,
)
where
diff --git a/libraries/base/Text/Read.hs b/libraries/base/Text/Read.hs
index 88784ac90d..0216df9d3b 100644
--- a/libraries/base/Text/Read.hs
+++ b/libraries/base/Text/Read.hs
@@ -23,27 +23,27 @@
module Text.Read (
-- * The 'Read' class
- Read(..), -- The Read class
- ReadS, -- String -> Maybe (a,String)
+ Read(..),
+ ReadS,
-- * Haskell 98 functions
- reads, -- :: (Read a) => ReadS a
- read, -- :: (Read a) => String -> a
- readParen, -- :: Bool -> ReadS a -> ReadS a
- lex, -- :: ReadS String
+ reads,
+ read,
+ readParen,
+ lex,
#if defined(__GLASGOW_HASKELL__) || defined(__HUGS__)
-- * New parsing functions
module Text.ParserCombinators.ReadPrec,
L.Lexeme(..),
- lexP, -- :: ReadPrec Lexeme
- parens, -- :: ReadPrec a -> ReadPrec a
+ lexP,
+ parens,
#endif
#ifdef __GLASGOW_HASKELL__
- readListDefault, -- :: Read a => ReadS [a]
- readListPrecDefault, -- :: Read a => ReadPrec [a]
- readEither, -- :: Read a => String -> Either String a
- readMaybe -- :: Read a => String -> Maybe a
+ readListDefault,
+ readListPrecDefault,
+ readEither,
+ readMaybe
#endif
) where
diff --git a/libraries/base/Text/Read/Lex.hs b/libraries/base/Text/Read/Lex.hs
index 7c99f0c8a0..f5a07f1658 100644
--- a/libraries/base/Text/Read/Lex.hs
+++ b/libraries/base/Text/Read/Lex.hs
@@ -17,19 +17,19 @@
module Text.Read.Lex
-- lexing types
- ( Lexeme(..) -- :: *; Show, Eq
+ ( Lexeme(..)
, numberToInteger, numberToRational, numberToRangedRational
-- lexer
- , lex -- :: ReadP Lexeme Skips leading spaces
- , hsLex -- :: ReadP String
- , lexChar -- :: ReadP Char Reads just one char, with H98 escapes
-
- , readIntP -- :: Num a => a -> (Char -> Bool) -> (Char -> Int) -> ReadP a
- , readOctP -- :: Num a => ReadP a
- , readDecP -- :: Num a => ReadP a
- , readHexP -- :: Num a => ReadP a
+ , lex
+ , hsLex
+ , lexChar
+
+ , readIntP
+ , readOctP
+ , readDecP
+ , readHexP
)
where
diff --git a/libraries/base/Text/Show.hs b/libraries/base/Text/Show.hs
index 0ee9e50fba..d37f71594e 100644
--- a/libraries/base/Text/Show.hs
+++ b/libraries/base/Text/Show.hs
@@ -17,17 +17,13 @@
-----------------------------------------------------------------------------
module Text.Show (
- ShowS, -- String -> String
- Show(
- showsPrec, -- :: Int -> a -> ShowS
- show, -- :: a -> String
- showList -- :: [a] -> ShowS
- ),
- shows, -- :: (Show a) => a -> ShowS
- showChar, -- :: Char -> ShowS
- showString, -- :: String -> ShowS
- showParen, -- :: Bool -> ShowS -> ShowS
- showListWith, -- :: (a -> ShowS) -> [a] -> ShowS
+ ShowS,
+ Show(showsPrec, show, showList),
+ shows,
+ showChar,
+ showString,
+ showParen,
+ showListWith,
) where
#ifdef __GLASGOW_HASKELL__