[project @ 1999-07-16 08:56:41 by panne]
authorpanne <unknown>
Fri, 16 Jul 1999 08:57:05 +0000 (08:57 +0000)
committerpanne <unknown>
Fri, 16 Jul 1999 08:57:05 +0000 (08:57 +0000)
More small portability changes:
   * For older GHCs use IOBase instead of PrelIOBase
   * Never use commas in SLIT. cpp IS a hack for Haskell...

ghc/compiler/nativeGen/PprMach.lhs
ghc/compiler/rename/RnMonad.lhs

index 700700e..766c2b3 100644 (file)
@@ -819,8 +819,12 @@ pprInstr (FUNBEGIN clab)
     where
        pp_lab = pprCLabel_asm clab
 
-       pp_ldgp  = ptext SLIT(":\n\tldgp $29,0($27)\n")
-       pp_frame = ptext SLIT("..ng:\n\t.frame $30,4240,$26,0\n\t.prologue 1")
+        -- NEVER use commas within those string literals, cpp will ruin your day
+       pp_ldgp  = hcat [ ptext SLIT(":\n\tldgp $29"), char ',', ptext SLIT("0($27)\n") ]
+       pp_frame = hcat [ ptext SLIT("..ng:\n\t.frame $30"), char ',',
+                          ptext SLIT("4240"), char ',',
+                          ptext SLIT("$26"), char ',',
+                          ptext SLIT("0\n\t.prologue 1") ]
 
 pprInstr (FUNEND clab)
   = (<>) (ptext SLIT("\t.align 4\n\t.end ")) (pprCLabel_asm clab)
index fae50f3..5494fe3 100644 (file)
@@ -20,7 +20,11 @@ module RnMonad(
 
 #include "HsVersions.h"
 
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 302
 import PrelIOBase      ( fixIO )       -- Should be in GlaExts
+#else
+import IOBase          ( fixIO )
+#endif
 import IOExts          ( IORef, newIORef, readIORef, writeIORef, unsafePerformIO )
        
 import HsSyn