[project @ 2000-04-10 14:05:57 by simonmar]
[ghc-hetmet.git] / ghc / compiler / nativeGen / MachRegs.lhs
index 446e7dd..bd72d6b 100644 (file)
@@ -64,11 +64,12 @@ import AbsCUtils    ( magicIdPrimRep )
 import CLabel           ( CLabel )
 import PrimOp          ( PrimOp(..) )
 import PrimRep         ( PrimRep(..) )
-import Stix            ( sStLitLbl, StixTree(..), StixReg(..) )
+import Stix            ( sStLitLbl, StixTree(..), StixReg(..),
+                          getUniqueNat, returnNat, thenNat, NatM )
 import Unique          ( mkPseudoUnique1, mkPseudoUnique2, mkPseudoUnique3,
                          Uniquable(..), Unique
                        )
-import UniqSupply      ( getUniqueUs, returnUs, thenUs, UniqSM )
+--import UniqSupply    ( getUniqueUs, returnUs, thenUs, UniqSM )
 import Outputable
 \end{code}
 
@@ -270,12 +271,12 @@ data Reg
 mkReg :: Unique -> PrimRep -> Reg
 mkReg = UnmappedReg
 
-getNewRegNCG :: PrimRep -> UniqSM Reg
+getNewRegNCG :: PrimRep -> NatM Reg
 getNewRegNCG pk
-  = getUniqueUs        `thenUs` \ u ->
-    returnUs (UnmappedReg u pk)
+  = getUniqueNat `thenNat` \ u ->
+    returnNat (UnmappedReg u pk)
 
-instance Text Reg where
+instance Show Reg where
     showsPrec _ (FixedReg i)   = showString "%"  . shows IBOX(i)
     showsPrec _ (MappedReg i)  = showString "%"  . shows IBOX(i)
     showsPrec _ (MemoryReg i _) = showString "%M"  . shows i