Refactor SrcLoc and SrcSpan
[ghc-hetmet.git] / compiler / nativeGen / NCGMonad.hs
index 409d0c4..2a73768 100644 (file)
@@ -90,8 +90,8 @@ mapAccumLNat f b (x:xs)
 
 getUniqueNat :: NatM Unique
 getUniqueNat = NatM $ \ (NatM_State us delta imports pic dflags) ->
-    case splitUniqSupply us of
-         (us1,us2) -> (uniqFromSupply us1, (NatM_State us2 delta imports pic dflags))
+    case takeUniqFromSupply us of
+         (uniq, us') -> (uniq, (NatM_State us' delta imports pic dflags))
 
 
 getDynFlagsNat :: NatM DynFlags
@@ -120,7 +120,7 @@ addImportNat imp
 getBlockIdNat :: NatM BlockId
 getBlockIdNat 
  = do  u <- getUniqueNat
-       return (BlockId u)
+       return (mkBlockId u)
 
 
 getNewLabelNat :: NatM CLabel