[project @ 1997-06-18 23:52:36 by simonpj]
[ghc-hetmet.git] / ghc / compiler / absCSyn / PprAbsC.lhs
index dfbd75e..3454645 100644 (file)
@@ -19,7 +19,7 @@ module PprAbsC (
     ) where
 
 IMP_Ubiq(){-uitous-}
-IMPORT_DELOOPER(AbsCLoop)              -- break its dependence on ClosureInfo
+
 IMPORT_1_3(IO(Handle))
 IMPORT_1_3(Char(isDigit,isPrint))
 #if __GLASGOW_HASKELL__ == 201
@@ -28,6 +28,12 @@ IMPORT_1_3(GHCbase(Addr(..)) ) -- to see innards
 import GlaExts (Addr(..))
 #endif
 
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ <= 201
+IMPORT_DELOOPER(AbsCLoop)              -- break its dependence on ClosureInfo
+#else
+import {-# SOURCE #-} ClosureInfo
+#endif
+
 import AbsCSyn
 
 import AbsCUtils       ( getAmodeRep, nonemptyAbsC,
@@ -46,7 +52,6 @@ import FiniteMap      ( addToFM, emptyFM, lookupFM, FiniteMap )
 import HeapOffs                ( isZeroOff, subOff, pprHeapOffset )
 import Literal         ( showLiteral, Literal(..) )
 import Maybes          ( maybeToBool, catMaybes )
-import PprStyle                ( PprStyle(..) )
 import Pretty
 import PrimOp          ( primOpNeedsWrapper, pprPrimOp, PrimOp(..) )
 import PrimRep         ( isFloatingRep, showPrimRep, PrimRep(..) )
@@ -57,7 +62,7 @@ import Unique         ( pprUnique, Unique{-instance NamedThing-} )
 import UniqSet         ( emptyUniqSet, elementOfUniqSet,
                          addOneToUniqSet, SYN_IE(UniqSet)
                        )
-import Outputable      ( printDoc )
+import Outputable      ( PprStyle(..), printDoc )
 import Util            ( nOfThem, panic, assertPanic )
 
 infixr 9 `thenTE`
@@ -949,7 +954,7 @@ ppr_amode sty (CAddr reg_rel)
 
 ppr_amode sty (CReg magic_id) = pprMagicId sty magic_id
 
-ppr_amode sty (CTemp uniq kind) = pprUnique uniq
+ppr_amode sty (CTemp uniq kind) = pprUnique uniq <> char '_'
 
 ppr_amode sty (CLbl label kind) = pprCLabel sty label
 
@@ -1209,7 +1214,7 @@ labelSeenTE label env@(seen_uniqs, seen_labels)
 \begin{code}
 pprTempDecl :: Unique -> PrimRep -> Doc
 pprTempDecl uniq kind
-  = hcat [ pprPrimKind PprDebug kind, space, pprUnique uniq, semi ]
+  = hcat [ pprPrimKind PprDebug kind, space, pprUnique uniq, ptext SLIT("_;") ]
 
 pprExternDecl :: CLabel -> PrimRep -> Doc