[project @ 2002-09-25 15:16:30 by simonpj]
[ghc-base.git] / Prelude.hs
index 9f044e5..2d0fe96 100644 (file)
@@ -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
@@ -124,6 +127,11 @@ import GHC.Conc
 import GHC.Err   ( error, undefined )
 #endif
 
+#ifdef __HUGS__
+import Hugs.Prelude
+#endif
+
+#ifndef __HUGS__
 infixr 0 $!
 
 
@@ -132,5 +140,5 @@ infixr 0 $!
 
 ($!)    :: (a -> b) -> a -> b
 f $! x  = x `seq` f x
-
+#endif