Use takeUniqFromSupply in ByteCodeGen
authorIan Lynagh <igloo@earth.li>
Thu, 21 Oct 2010 12:14:54 +0000 (12:14 +0000)
committerIan Lynagh <igloo@earth.li>
Thu, 21 Oct 2010 12:14:54 +0000 (12:14 +0000)
compiler/ghci/ByteCodeGen.lhs

index d654586..4358515 100644 (file)
@@ -1565,9 +1565,9 @@ getBreakArray = BcM $ \st -> return (st, breakArray st)
 
 newUnique :: BcM Unique
 newUnique = BcM $
-   \st -> case splitUniqSupply (uniqSupply st) of
-             (us1, us2) -> let newState = st { uniqSupply = us2 } 
-                           in  return (newState, uniqFromSupply us1) 
+   \st -> case takeUniqFromSupply (uniqSupply st) of
+             (uniq, us) -> let newState = st { uniqSupply = us }
+                           in  return (newState, uniq)
 
 newId :: Type -> BcM Id
 newId ty = do