From 781a3b702d1112e72a2117fdbd5327e0e4fe271e Mon Sep 17 00:00:00 2001 From: keithw Date: Sat, 12 Jun 1999 16:17:28 +0000 Subject: [PATCH] [project @ 1999-06-12 16:17:23 by keithw] K&R -> ANSI token pasting (ie, x##y for x/**/y) --- ghc/interpreter/prelude/Prelude.hs | 8 ++++---- ghc/lib/std/CPUTime.lhs | 2 +- ghc/lib/std/IO.lhs | 2 +- ghc/lib/std/PrelHandle.lhs | 2 +- ghc/lib/std/PrelIOBase.lhs | 4 ++-- ghc/tests/lib/should_run/enum01.hs | 2 +- ghc/tests/lib/should_run/enum02.hs | 2 +- ghc/tests/lib/should_run/enum03.hs | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ghc/interpreter/prelude/Prelude.hs b/ghc/interpreter/prelude/Prelude.hs index 19a1af4..227df90 100644 --- a/ghc/interpreter/prelude/Prelude.hs +++ b/ghc/interpreter/prelude/Prelude.hs @@ -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 diff --git a/ghc/lib/std/CPUTime.lhs b/ghc/lib/std/CPUTime.lhs index a90c8ae..1256d23 100644 --- a/ghc/lib/std/CPUTime.lhs +++ b/ghc/lib/std/CPUTime.lhs @@ -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 diff --git a/ghc/lib/std/IO.lhs b/ghc/lib/std/IO.lhs index 7f5f695..b008e72 100644 --- a/ghc/lib/std/IO.lhs +++ b/ghc/lib/std/IO.lhs @@ -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 diff --git a/ghc/lib/std/PrelHandle.lhs b/ghc/lib/std/PrelHandle.lhs index d044bf8..366421a 100644 --- a/ghc/lib/std/PrelHandle.lhs +++ b/ghc/lib/std/PrelHandle.lhs @@ -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 diff --git a/ghc/lib/std/PrelIOBase.lhs b/ghc/lib/std/PrelIOBase.lhs index 3f9730f..d9ba188 100644 --- a/ghc/lib/std/PrelIOBase.lhs +++ b/ghc/lib/std/PrelIOBase.lhs @@ -1,5 +1,5 @@ % ----------------------------------------------------------------------------- -% $Id: PrelIOBase.lhs,v 1.10 1999/05/18 14:59:18 simonpj Exp $ +% $Id: PrelIOBase.lhs,v 1.11 1999/06/12 16:17:26 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 diff --git a/ghc/tests/lib/should_run/enum01.hs b/ghc/tests/lib/should_run/enum01.hs index 9254b40..197c401 100644 --- a/ghc/tests/lib/should_run/enum01.hs +++ b/ghc/tests/lib/should_run/enum01.hs @@ -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 () diff --git a/ghc/tests/lib/should_run/enum02.hs b/ghc/tests/lib/should_run/enum02.hs index 27be3fd..abd5725 100644 --- a/ghc/tests/lib/should_run/enum02.hs +++ b/ghc/tests/lib/should_run/enum02.hs @@ -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 diff --git a/ghc/tests/lib/should_run/enum03.hs b/ghc/tests/lib/should_run/enum03.hs index 6d25333..3eb2965 100644 --- a/ghc/tests/lib/should_run/enum03.hs +++ b/ghc/tests/lib/should_run/enum03.hs @@ -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 -- 1.7.10.4