[project @ 1999-08-23 12:53:23 by keithw]
authorkeithw <unknown>
Mon, 23 Aug 1999 12:53:27 +0000 (12:53 +0000)
committerkeithw <unknown>
Mon, 23 Aug 1999 12:53:27 +0000 (12:53 +0000)
Revert commit of 1999/06/12 16:17:28.  We use -traditional for CPP,
and so x##y and #x don't work and we must use x/**/y (ugh) and "x"
(urk!!) instead.  Ah well.

ghc/interpreter/prelude/Prelude.hs
ghc/lib/std/CPUTime.lhs
ghc/lib/std/IO.lhs
ghc/lib/std/PrelHandle.lhs
ghc/lib/std/PrelIOBase.lhs
ghc/tests/lib/should_run/enum01.hs
ghc/tests/lib/should_run/enum02.hs
ghc/tests/lib/should_run/enum03.hs

index 227df90..19a1af4 100644 (file)
@@ -1,16 +1,16 @@
 #include "options.h"
 
 #if BIGNUM_IS_INT64
-#define primToBignum(t)   prim##t##ToInt64
-#define primFromBignum(t) primInt64To##t
+#define primToBignum(t)   prim/**/t/**/ToInt64
+#define primFromBignum(t) primInt64To/**/t
 #define primInt64ToInt64 id
 #define        primEncodeFloat primEncodeFloatz
 #define        primDecodeFloat primDecodeFloatz
 #define        primEncodeDouble primEncodeDoublez
 #define        primDecodeDouble primDecodeDoublez
 #elif BIGNUM_IS_INTEGER
-#define primToBignum(t)   prim##t##ToInteger
-#define primFromBignum(t) primIntegerTo##t
+#define primToBignum(t)   prim/**/t/**/ToInteger
+#define primFromBignum(t) primIntegerTo/**/t
 #define primIntegerToInteger id
 #define        primEncodeFloat primEncodeFloatZ
 #define        primDecodeFloat primDecodeFloatZ
index 1256d23..a90c8ae 100644 (file)
@@ -28,7 +28,7 @@ import IO             ( ioError )
 import Ratio
 
 #ifdef __HUGS__
-#define cat2(x,y)  x##y
+#define cat2(x,y)  x/**/y
 #define CCALL(fun) cat2(prim_,fun)
 #define stToIO id
 #define sizeof_int64 8
index b9a28ab..aeb3025 100644 (file)
@@ -127,7 +127,7 @@ import Char         ( ord, chr )
 #ifndef HEAD
 
 #ifdef __HUGS__
-#define cat2(x,y)  x##y
+#define cat2(x,y)  x/**/y
 #define CCALL(fun) cat2(prim_,fun)
 #define __CONCURRENT_HASKELL__
 #define stToIO id
index 52d6682..0886f9a 100644 (file)
@@ -42,7 +42,7 @@ import PrelForeign  ( makeForeignObj )
 #endif /* ndef(__HUGS__) */
 
 #ifdef __HUGS__
-#define cat2(x,y)  x##y
+#define cat2(x,y)  x/**/y
 #define CCALL(fun) cat2(prim_,fun)
 #define __CONCURRENT_HASKELL__
 #define stToIO id
index d9ba188..2e43613 100644 (file)
@@ -1,5 +1,5 @@
 % -----------------------------------------------------------------------------
-% $Id: PrelIOBase.lhs,v 1.11 1999/06/12 16:17:26 keithw Exp $
+% $Id: PrelIOBase.lhs,v 1.12 1999/08/23 12:53:25 keithw Exp $
 % 
 % (c) The AQUA Project, Glasgow University, 1994-1998
 %
@@ -33,7 +33,7 @@ import PrelArr          ( MutableVar, readVar )
 #endif
 
 #ifdef __HUGS__
-#define cat2(x,y)  x##y
+#define cat2(x,y)  x/**/y
 #define CCALL(fun) cat2(prim_,fun)
 #define __CONCURRENT_HASKELL__
 #define stToIO id
index 197c401..9254b40 100644 (file)
@@ -81,7 +81,7 @@ main = do
   OK - on with the regression testing.
 -}
 
-#define printTest(x) (do{ putStr ( "    " ++ #x ++ " = " ) ; print (x) })
+#define printTest(x) (do{ putStr ( "    " ++ "x" ++ " = " ) ; print (x) })
 
 
 testEnumInt :: IO ()
index abd5725..27be3fd 100644 (file)
@@ -14,7 +14,7 @@ main = do
   putStrLn "Testing Enum Int64:"
   testEnumInt64
 
-#define printTest(x) (do{ putStr ( "    " ++ #x ++ " = " ) ; print (x) })
+#define printTest(x) (do{ putStr ( "    " ++ "x" ++ " = " ) ; print (x) })
 
 testEnumInt8 :: IO ()
 testEnumInt8 = do
index 3eb2965..6d25333 100644 (file)
@@ -15,7 +15,7 @@ main = do
   testEnumWord64
 
 
-#define printTest(x) (do{ putStr ( "    " ++ #x ++ " = " ) ; print (x) })
+#define printTest(x) (do{ putStr ( "    " ++ "x" ++ " = " ) ; print (x) })
 
 testEnumWord8 :: IO ()
 testEnumWord8 = do