X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Prelude.hs;h=31aa6b63f54ea65729b5fa50e3e1f69bce2d4c41;hb=833c0251f3de7eafbc42b4ce67360e84afd071f4;hp=02aad8b697908db3b9911d94b8b40bec3d3ce506;hpb=d7351a78329804dd5115b83184aec64136a5c8e2;p=ghc-base.git diff --git a/Prelude.hs b/Prelude.hs index 02aad8b..31aa6b6 100644 --- a/Prelude.hs +++ b/Prelude.hs @@ -24,16 +24,16 @@ module Prelude ( Ordering(LT, EQ, GT), Char, String, Int, Integer, Float, Double, IO, Rational, -#if defined(__GLASGOW_HASKELL__) || defined(__NHC__) - -- Restore export of (:) until we get to 5.05 +#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 - - module Data.Tuple, - -- Includes tuple types + fst, snd, curry, uncurry +#ifdef __HUGS__ + (:), -- Not legal Haskell 98 +#endif -- * Basic type classes Eq((==), (/=)), @@ -94,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 @@ -110,6 +111,7 @@ import Data.Either import Data.Maybe import Data.Bool import Data.Tuple +#endif #ifdef __GLASGOW_HASKELL__ import GHC.Base @@ -121,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 $! @@ -133,5 +139,5 @@ infixr 0 $! ($!) :: (a -> b) -> a -> b f $! x = x `seq` f x - +#endif