1 {-# OPTIONS -fno-implicit-prelude #-}
2 -----------------------------------------------------------------------------
5 -- Copyright : (c) The University of Glasgow 2001
6 -- License : BSD-style (see the file libraries/base/LICENSE)
8 -- Maintainer : libraries@haskell.org
9 -- Stability : provisional
10 -- Portability : portable
12 -- The Prelude: a standard module imported by default into all Haskell
13 -- modules. For more documentation, see the Haskell 98 Report
14 -- <http://www.haskell.org/onlinereport/>.
16 -----------------------------------------------------------------------------
25 Char, String, Int, Integer, Float, Double, IO,
28 []((:), []), -- Not legal Haskell 98;
29 -- ... available through built-in syntax
30 module Data.Tuple, -- Includes tuple types
31 ()(..), -- Not legal Haskell 98
32 (->), -- ... available through built-in syntax
35 (:), -- Not legal Haskell 98
38 -- * Basic type classes
40 Ord(compare, (<), (<=), (>=), (>), max, min),
41 Enum(succ, pred, toEnum, fromEnum, enumFrom, enumFromThen,
42 enumFromTo, enumFromThenTo),
43 Bounded(minBound, maxBound),
45 -- * Numeric type classes
46 Num((+), (-), (*), negate, abs, signum, fromInteger),
48 Integral(quot, rem, div, mod, quotRem, divMod, toInteger),
49 Fractional((/), recip, fromRational),
50 Floating(pi, exp, log, sqrt, (**), logBase, sin, cos, tan,
51 asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh),
52 RealFrac(properFraction, truncate, round, ceiling, floor),
53 RealFloat(floatRadix, floatDigits, floatRange, decodeFloat,
54 encodeFloat, exponent, significand, scaleFloat, isNaN,
55 isInfinite, isDenormalized, isIEEE, isNegativeZero, atan2),
58 map, (++), filter, concat,
59 head, last, tail, init, null, length, (!!),
60 foldl, foldl1, scanl, scanl1, foldr, foldr1, scanr, scanr1,
61 iterate, repeat, replicate, cycle,
62 take, drop, splitAt, takeWhile, dropWhile, span, break,
64 any, all, elem, notElem, lookup,
65 maximum, minimum, concatMap,
66 zip, zip3, zipWith, zipWith3, unzip, unzip3,
68 lines, words, unlines, unwords,
71 -- * Converting to and from @String@
73 Read(readsPrec, readList),
74 Show(showsPrec, showList, show),
75 reads, shows, read, lex,
76 showChar, showString, readParen, showParen,
78 -- * Simple I\/O operations
79 ioError, userError, catch,
82 putStr, putStrLn, print,
84 getLine, getContents, interact,
85 readFile, writeFile, appendFile, readIO, readLn,
88 Monad((>>=), (>>), return, fail),
90 mapM, mapM_, sequence, sequence_, (=<<),
92 -- * Miscellaneous functions
94 (&&), (||), not, otherwise,
95 subtract, even, odd, gcd, lcm, (^), (^^),
96 fromIntegral, realToFrac,
97 fst, snd, curry, uncurry,
98 id, const, (.), flip, ($), until,
99 asTypeOf, error, undefined,
116 #ifdef __GLASGOW_HASKELL__
127 import GHC.Err ( error, undefined )
138 -- -----------------------------------------------------------------------------
139 -- Miscellaneous functions
141 ($!) :: (a -> b) -> a -> b