Prelude and Libraries
- The Prelude exports the following classes and methods
(which are also correctly exported from the Ix, Char and
Ratio modules):
- The class Ix(range, index, inRange, rangeSize).
-
ord, chr,
isAscii, isControl,
isPrint, isSpace, isUpper, isLower,
isAlpha, isDigit, isOctDigit, isHexDigit,
isAlphanum,
toUpper, toLower,
digitToInt, and intToDigit.
-
The types Ratio and Rational
and the functions (%), numerator, denominator and approxRational.
In addition:
-
The Num class has an additional method: fromInt.
-
The Integral class has two additional methods: odd and even.
-
The Fractional class has an additional method: fromDouble.
- The IO library doesn't export the following values:
handlePosn,
FileSize,
ReadWriteMode,
hSetBuffering,
hGetBuffering,
hSeek,
hIsSeekable,
hIsEOF,
isEOF,
hReady and
hLookahead.
The following non-standard functions are exported from IO:
hugsGetCh :: IO Char -- getchar without echoing to screen
hugsHIsEOF :: Handle -> IO Bool
-- same semantics as C's "feof" (different from Haskell's hIsEOF)
hugsIsEOF :: IO Bool
-- same semantics as C's "feof(stdin)"
hPutStrLn :: String -> IO ()
-- corresponds to Prelude.putStrLn
- The System library has the following differences:
- Only the stand-alone system (runhugs) passes arguments to the
executing program. The interactive system always uses an empty
argument list when runnning a program. This affect the output of the
functions getProgName and getArgs
- When running under Windows 95, System.system always
returns ExitSuccess.
The following libraries are not yet available: Directory,
Time, Locale and CPUTime.