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 -- Restore export of (:) until we get to 5.05
28 []((:), []), -- Not legal Haskell 98; available through built-in syntax
31 -- Includes tuple types + fst, snd, curry, uncurry
32 -- ()(..), -- Not legal Haskell 98
33 -- (->), -- ... available through built-in syntax
35 -- * Basic type classes
49 map, (++), filter, concat,
50 head, last, tail, init, null, length, (!!),
51 foldl, foldl1, scanl, scanl1, foldr, foldr1, scanr, scanr1,
52 iterate, repeat, replicate, cycle,
53 take, drop, splitAt, takeWhile, dropWhile, span, break,
55 any, all, elem, notElem, lookup,
56 maximum, minimum, concatMap,
57 zip, zip3, zipWith, zipWith3, unzip, unzip3,
59 lines, words, unlines, unwords,
62 -- * Converting to and from @String@
64 Read(readsPrec, readList),
65 Show(showsPrec, showList, show),
66 reads, shows, read, lex,
67 showChar, showString, readParen, showParen,
69 -- * Simple I\/O operations
70 ioError, userError, catch,
73 putStr, putStrLn, print,
75 getLine, getContents, interact,
76 readFile, writeFile, appendFile, readIO, readLn,
81 mapM, mapM_, sequence, sequence_, (=<<),
83 -- * Miscellaneous functions
85 (&&), (||), not, otherwise,
86 subtract, even, odd, gcd, lcm, (^), (^^),
87 fromIntegral, realToFrac,
88 --exported by Data.Tuple: fst, snd, curry, uncurry,
89 id, const, (.), flip, ($), until,
90 asTypeOf, error, undefined,
105 #ifdef __GLASGOW_HASKELL__
116 import GHC.Err ( error, undefined )
122 -- -----------------------------------------------------------------------------
123 -- Miscellaneous functions
125 ($!) :: (a -> b) -> a -> b