[project @ 2000-05-10 10:58:15 by sewardj]
[ghc-hetmet.git] / ghc / lib / hugs / Prelude.hs
1 {-
2  WARNING: This file is an integral part of the Hugs source code.  Changes to
3  the definitions in this file without corresponding modifications in other
4  parts of the program may cause the interpreter to fail unexpectedly.  Under
5  normal circumstances, you should not attempt to modify this file in any way!
6 ----------------------------------------------------------------------------}
7
8 module Prelude (
9 --  module PreludeList,
10     map, (++), concat, filter,
11     head, last, tail, init, null, length, (!!),
12     foldl, foldl1, scanl, scanl1, foldr, foldr1, scanr, scanr1,
13     iterate, repeat, replicate, cycle,
14     take, drop, splitAt, takeWhile, dropWhile, span, break,
15     lines, words, unlines, unwords, reverse, and, or,
16     any, all, elem, notElem, lookup,
17     sum, product, maximum, minimum, concatMap, 
18     zip, zip3, zipWith, zipWith3, unzip, unzip3,
19 --  module PreludeText, 
20     ReadS, ShowS,
21     Read(readsPrec, readList),
22     Show(show, showsPrec, showList),
23     reads, shows, read, lex,
24     showChar, showString, readParen, showParen,
25 --  module PreludeIO,
26     FilePath, IOError, ioError, userError, catch,
27     putChar, putStr, putStrLn, print,
28     getChar, getLine, getContents, interact,
29     readFile, writeFile, appendFile, readIO, readLn,
30 --  module Ix,
31     Ix(range, index, inRange, rangeSize),
32 --  module Char,
33     isAscii, isControl, isPrint, isSpace, isUpper, isLower,
34     isAlpha, isDigit, isOctDigit, isHexDigit, isAlphaNum,
35     digitToInt, intToDigit,
36     toUpper, toLower,
37     ord, chr,
38     readLitChar, showLitChar, lexLitChar,
39 --  module Numeric
40     showSigned, showInt,
41     readSigned, readInt,
42     readDec, readOct, readHex, readSigned,
43     readFloat, lexDigits, 
44 --  module Ratio,
45     Ratio, Rational, (%), numerator, denominator, approxRational,
46 --  Non-standard exports
47     IO, IOResult(..), Addr, StablePtr,
48     makeStablePtr, freeStablePtr, deRefStablePtr,
49
50     Bool(False, True),
51     Maybe(Nothing, Just),
52     Either(Left, Right),
53     Ordering(LT, EQ, GT),
54     Char, String, Int, Integer, Float, Double, IO,
55 --  List type: []((:), [])
56     (:),
57 --  Tuple types: (,), (,,), etc.
58 --  Trivial type: ()
59 --  Functions: (->)
60     Rec, EmptyRec, EmptyRow, -- non-standard, should only be exported if TREX
61     Eq((==), (/=)),
62     Ord(compare, (<), (<=), (>=), (>), max, min),
63     Enum(succ, pred, toEnum, fromEnum, enumFrom, enumFromThen,
64          enumFromTo, enumFromThenTo),
65     Bounded(minBound, maxBound),
66 --  Num((+), (-), (*), negate, abs, signum, fromInteger),
67     Num((+), (-), (*), negate, abs, signum, fromInteger, fromInt),
68     Real(toRational),
69 --  Integral(quot, rem, div, mod, quotRem, divMod, toInteger),
70     Integral(quot, rem, div, mod, quotRem, divMod, even, odd, toInteger, toInt),
71     Fractional((/), recip, fromRational, fromDouble),
72     Floating(pi, exp, log, sqrt, (**), logBase, sin, cos, tan,
73              asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh),
74     RealFrac(properFraction, truncate, round, ceiling, floor),
75     RealFloat(floatRadix, floatDigits, floatRange, decodeFloat,
76               encodeFloat, exponent, significand, scaleFloat, isNaN,
77               isInfinite, isDenormalized, isIEEE, isNegativeZero),
78     Monad((>>=), (>>), return, fail),
79     Functor(fmap),
80     mapM, mapM_, sequence, sequence_, (=<<),
81     maybe, either,
82     (&&), (||), not, otherwise,
83     subtract, even, odd, gcd, lcm, (^), (^^), 
84     fromIntegral, realToFrac, atan2,
85     fst, snd, curry, uncurry, id, const, (.), flip, ($), until,
86     asTypeOf, error, undefined,
87     seq, ($!)
88         -- Now we have the extra (non standard) thing.
89   ) where
90
91 import PrelPrim
92