X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Prelude.hs;h=61bd27eb8bd1121a21f16b3a5982b324bda59125;hb=37ab854f9d2c1280117658bbd29919968f4f4585;hp=ddf3a93f2bbc68e38e6d701f2ae100e7c2c6a5fd;hpb=fd14d1940233a4563d14a89fc195587c95750300;p=ghc-base.git diff --git a/Prelude.hs b/Prelude.hs index ddf3a93..61bd27e 100644 --- a/Prelude.hs +++ b/Prelude.hs @@ -1,4 +1,4 @@ -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS_GHC -XNoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : Prelude @@ -36,16 +36,16 @@ module Prelude ( fst, snd, curry, uncurry, #if defined(__NHC__) - []((:), []), -- Not legal Haskell 98; - -- ... available through built-in syntax - module Data.Tuple, -- Includes tuple types - ()(..), -- Not legal Haskell 98 - (->), -- ... available through built-in syntax + []((:), []), -- Not legal Haskell 98; + -- ... available through built-in syntax + module Data.Tuple, -- Includes tuple types + ()(..), -- Not legal Haskell 98 + (->), -- ... available through built-in syntax #endif #ifdef __HUGS__ - (:), -- Not legal Haskell 98 + (:), -- Not legal Haskell 98 #endif - + -- ** Basic type classes Eq((==), (/=)), Ord(compare, (<), (<=), (>=), (>), max, min), @@ -72,7 +72,7 @@ module Prelude ( isInfinite, isDenormalized, isIEEE, isNegativeZero, atan2), -- *** Numeric functions - subtract, even, odd, gcd, lcm, (^), (^^), + subtract, even, odd, gcd, lcm, (^), (^^), fromIntegral, realToFrac, -- ** Monads and functors @@ -87,7 +87,7 @@ module Prelude ( -- * List operations map, (++), filter, - head, last, tail, init, null, length, (!!), + head, last, tail, init, null, length, (!!), reverse, -- ** Reducing lists (folds) foldl, foldl1, foldr, foldr1, @@ -119,8 +119,8 @@ module Prelude ( -- ** Converting from @String@ ReadS, Read(readsPrec, readList), - reads, readParen, read, lex, - + reads, readParen, read, lex, + -- * Basic Input and output IO, -- ** Simple I\/O operations @@ -146,20 +146,17 @@ module Prelude ( #ifndef __HUGS__ import Control.Monad import System.IO -import Text.Read -import Text.Show +import System.IO.Error import Data.List import Data.Either import Data.Maybe -import Data.Bool import Data.Tuple #endif #ifdef __GLASGOW_HASKELL__ import GHC.Base import GHC.IOBase -import GHC.Exception -import GHC.Read +import Text.Read import GHC.Enum import GHC.Num import GHC.Real @@ -175,7 +172,6 @@ import Hugs.Prelude #ifndef __HUGS__ infixr 0 $! - -- ----------------------------------------------------------------------------- -- Miscellaneous functions