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,
27 #ifdef __GLASGOW_HASKELL__
28 -- Restore export of (:) until we get to 5.05
29 []((:), []), -- Not legal Haskell 98; available through built-in syntax
33 -- Includes tuple types + fst, snd, curry, uncurry
34 -- ()(..), -- Not legal Haskell 98
35 -- (->), -- ... available through built-in syntax
37 -- * Basic type classes
39 Ord(compare, (<), (<=), (>=), (>), max, min),
40 Enum(succ, pred, toEnum, fromEnum, enumFrom, enumFromThen,
41 enumFromTo, enumFromThenTo),
42 Bounded(minBound, maxBound),
44 -- * Numeric type classes
45 Num((+), (-), (*), negate, abs, signum, fromInteger),
47 Integral(quot, rem, div, mod, quotRem, divMod, toInteger),
48 Fractional((/), recip, fromRational),
49 Floating(pi, exp, log, sqrt, (**), logBase, sin, cos, tan,
50 asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh),
51 RealFrac(properFraction, truncate, round, ceiling, floor),
52 RealFloat(floatRadix, floatDigits, floatRange, decodeFloat,
53 encodeFloat, exponent, significand, scaleFloat, isNaN,
54 isInfinite, isDenormalized, isIEEE, isNegativeZero, atan2),
57 map, (++), filter, concat,
58 head, last, tail, init, null, length, (!!),
59 foldl, foldl1, scanl, scanl1, foldr, foldr1, scanr, scanr1,
60 iterate, repeat, replicate, cycle,
61 take, drop, splitAt, takeWhile, dropWhile, span, break,
63 any, all, elem, notElem, lookup,
64 maximum, minimum, concatMap,
65 zip, zip3, zipWith, zipWith3, unzip, unzip3,
67 lines, words, unlines, unwords,
70 -- * Converting to and from @String@
72 Read(readsPrec, readList),
73 Show(showsPrec, showList, show),
74 reads, shows, read, lex,
75 showChar, showString, readParen, showParen,
77 -- * Simple I\/O operations
78 ioError, userError, catch,
81 putStr, putStrLn, print,
83 getLine, getContents, interact,
84 readFile, writeFile, appendFile, readIO, readLn,
87 Monad((>>=), (>>), return, fail),
89 mapM, mapM_, sequence, sequence_, (=<<),
91 -- * Miscellaneous functions
93 (&&), (||), not, otherwise,
94 subtract, even, odd, gcd, lcm, (^), (^^),
95 fromIntegral, realToFrac,
96 --exported by Data.Tuple: fst, snd, curry, uncurry,
97 id, const, (.), flip, ($), until,
98 asTypeOf, error, undefined,
113 #ifdef __GLASGOW_HASKELL__
124 import GHC.Err ( error, undefined )
130 -- -----------------------------------------------------------------------------
131 -- Miscellaneous functions
133 ($!) :: (a -> b) -> a -> b