X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Prelude.hs;h=31aa6b63f54ea65729b5fa50e3e1f69bce2d4c41;hb=b847c4decf42a5bc503c38bcc74a8d3c5fbf35eb;hp=9f044e57456163d5e4006bbed16e7b10288bf3ec;hpb=56c900f7554904e4eef467b03635e732360aefc9;p=ghc-base.git diff --git a/Prelude.hs b/Prelude.hs index 9f044e5..31aa6b6 100644 --- a/Prelude.hs +++ b/Prelude.hs @@ -24,15 +24,16 @@ module Prelude ( Ordering(LT, EQ, GT), Char, String, Int, Integer, Float, Double, IO, Rational, -#ifdef __GLASGOW_HASKELL__ - -- Restore export of (:) until we get to 5.05 - []((:), []), -- Not legal Haskell 98; available through built-in syntax +#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 +#endif +#ifdef __HUGS__ + (:), -- Not legal Haskell 98 #endif - - module Data.Tuple, - -- Includes tuple types + fst, snd, curry, uncurry - -- ()(..), -- Not legal Haskell 98 - -- (->), -- ... available through built-in syntax -- * Basic type classes Eq((==), (/=)), @@ -93,13 +94,14 @@ module Prelude ( (&&), (||), not, otherwise, subtract, even, odd, gcd, lcm, (^), (^^), fromIntegral, realToFrac, - --exported by Data.Tuple: fst, snd, curry, uncurry, + fst, snd, curry, uncurry, id, const, (.), flip, ($), until, asTypeOf, error, undefined, seq, ($!) ) where +#ifndef __HUGS__ import Control.Monad import System.IO import Text.Read @@ -109,6 +111,7 @@ import Data.Either import Data.Maybe import Data.Bool import Data.Tuple +#endif #ifdef __GLASGOW_HASKELL__ import GHC.Base @@ -120,10 +123,14 @@ import GHC.Num import GHC.Real import GHC.Float import GHC.Show -import GHC.Conc import GHC.Err ( error, undefined ) #endif +#ifdef __HUGS__ +import Hugs.Prelude +#endif + +#ifndef __HUGS__ infixr 0 $! @@ -132,5 +139,5 @@ infixr 0 $! ($!) :: (a -> b) -> a -> b f $! x = x `seq` f x - +#endif