X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Prelude.hs;h=b833edb6d8e2cc5fce0ef38ed152a57df36a893b;hb=9911c1f1358df059c6694c31a5b2452a35c8d748;hp=ccbf6178b5d7173473af34e8a310a6d5d7305afb;hpb=9fa9bc17072a58c0bae2cce4764d38677e96ac29;p=ghc-base.git diff --git a/Prelude.hs b/Prelude.hs index ccbf617..b833edb 100644 --- a/Prelude.hs +++ b/Prelude.hs @@ -3,23 +3,48 @@ -- | -- Module : Prelude -- Copyright : (c) The University of Glasgow 2001 --- License : BSD-style (see the file libraries/core/LICENSE) +-- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : provisional -- Portability : portable -- --- $Id: Prelude.hs,v 1.3 2002/04/24 16:31:37 simonmar Exp $ --- --- Standard module imported by default into Haskell modules. +-- The Prelude: a standard module imported by default into all Haskell +-- modules. For more documentation, see the Haskell 98 Report +-- . -- ----------------------------------------------------------------------------- module Prelude ( - -- List things - [] (..), + -- * Basic data types + Bool(..), + Maybe(..), + Either(..), + Ordering(..), + Char, String, Int, Integer, Float, Double, IO, + Rational, + []((:), []), + + module Data.Tuple, + -- Includes tuple types + fst, snd, curry, uncurry + ()(..), -- The unit type + (->), -- functions + + -- * Basic type classes + Eq(..), + Ord(..), + Enum(..), + Bounded(..), + Num(..), + Real(..), + Integral(..), + Fractional(..), + Floating(..), + RealFrac(..), + RealFloat(..), + -- * List operations map, (++), filter, concat, head, last, tail, init, null, length, (!!), foldl, foldl1, scanl, scanl1, foldr, foldr1, scanr, scanr1, @@ -33,14 +58,14 @@ module Prelude ( lines, words, unlines, unwords, sum, product, - -- Everything from Text.Read and Text.Show + -- * Converting to and from @String@ ReadS, ShowS, Read(readsPrec, readList), Show(showsPrec, showList, show), reads, shows, read, lex, showChar, showString, readParen, showParen, - -- Everything corresponding to the Report's PreludeIO + -- * Simple I\/O operations ioError, userError, catch, FilePath, IOError, putChar, @@ -49,36 +74,12 @@ module Prelude ( getLine, getContents, interact, readFile, writeFile, appendFile, readIO, readLn, - Bool(..), - Maybe(..), - Either(..), - Ordering(..), - Char, String, Int, Integer, Float, Double, IO, - Rational, - []((:), []), - - module Data.Tuple, - -- Includes tuple types + fst, snd, curry, uncurry - ()(..), -- The unit type - (->), -- functions - - Eq(..), - Ord(..), - Enum(..), - Bounded(..), - Num(..), - Real(..), - Integral(..), - Fractional(..), - Floating(..), - RealFrac(..), - RealFloat(..), - - -- Monad stuff, from GHC.Base, and defined here + -- * Monads Monad(..), Functor(..), mapM, mapM_, sequence, sequence_, (=<<), + -- * Miscellaneous functions maybe, either, (&&), (||), not, otherwise, subtract, even, odd, gcd, lcm, (^), (^^),