1 We add the option -fno-implicit-prelude here to tell the reader that
2 special names such as () and -> shouldn't be resolved to Prelude.()
3 and Prelude.-> (as they are normally). -- SDM 8/10/97
6 {-# OPTIONS -fno-implicit-prelude #-}
10 -- Everything from these modules
17 Ord(..), Ordering(..),
20 Show(..), ShowS, shows, show, showChar, showString, showParen,
22 Bool(..), (&&), (||), not, otherwise,
23 Char, String, Int, Integer, Float, Double, Void,
26 ()(..), -- The unit type
29 id, const, (.), flip, ($), until, asTypeOf, undefined,
35 Functor(..), Monad(..), MonadZero(..), MonadPlus(..),
36 accumulate, sequence, mapM, mapM_, guard, filter, concat, applyM,
39 ReadS, Read(readsPrec, readList),
40 reads, read, lex, readParen,
43 IO, FilePath, IOError,
44 fail, userError, catch,
45 putChar, putStr, putStrLn, print,
46 getChar, getLine, getContents, interact,
47 readFile, writeFile, appendFile, readIO, readLn,
51 (%), numerator, denominator, approxRational,
53 Num((+), (-), (*), negate, abs, signum, fromInteger, fromInt{-glaExt-}),
55 Integral(quot, rem, div, mod, quotRem, divMod, toInteger, toInt{-partain-}),
56 Fractional((/), recip, fromRational),
57 Floating(pi, exp, log, sqrt, (**), logBase, sin, cos, tan,
58 asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh),
59 RealFrac(properFraction, truncate, round, ceiling, floor),
60 RealFloat(floatRadix, floatDigits, floatRange, decodeFloat,
61 encodeFloat, exponent, significand, scaleFloat, isNaN,
62 isInfinite, isDenormalized, isIEEE, isNegativeZero),
63 subtract, even, odd, gcd, lcm, (^), (^^),
64 fromIntegral, fromRealFrac, atan2
79 import PrelErr ( error )
82 -- These can't conveniently be defined in PrelBase because they use numbers,
83 -- or I/O, so here's a convenient place to do them.
85 strict :: (a -> b) -> a -> b
86 strict f x = x `seq` f x
88 -- It is expected that compilers will recognize this and insert error
89 -- messages which are more appropriate to the context in which undefined
93 undefined = error "Prelude.undefined"