Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit fff940b16ba589380c7fc538bfccd0094c97583b 1 parent 63f6086
@igfoo igfoo authored
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
8 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
View
16 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
View
2  Control/Concurrent/MVar.hs
@@ -141,7 +141,7 @@ module Control.Concurrent.MVar
, modifyMVarMasked
#ifndef __HUGS__
, mkWeakMVar
- , addMVarFinalizer -- :: MVar a -> IO () -> IO ()
+ , addMVarFinalizer
#endif
) where
View
66 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
View
6 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
View
6 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,
View
12 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__)
View
8 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
View
32 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.
View
8 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__
View
16 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__
View
25 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
View
76 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
View
6 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,
View
8 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"
View
16 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
View
8 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:
--
View
194 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
View
25 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__
View
19 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
View
12 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
View
10 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
View
10 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__
, (,)(..)
, (,,)(..)
View
64 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
View
6 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
View
4 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
View
39 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_,
View
58 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
View
18 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
View
40 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)
View
14 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
View
28 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__
View
23 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
View
24 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__
View
10 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
View
16 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
View
84 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
View
20 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
View
64 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
View
10 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
View
12 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
View
14 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
View
16 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
View
6 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#, -- (**)
)
View
20 GHC/Read.lhs