Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/aeaf3df2d745eab8b7fec37cdff44deadba6fed3 >--------------------------------------------------------------- commit aeaf3df2d745eab8b7fec37cdff44deadba6fed3 Author: Simon Marlow <[email protected]> Date: Fri Jul 6 14:32:14 2012 +0100 put back the newtype around Label Having all BlockIds print as integers was a pain for debugging. >--------------------------------------------------------------- compiler/cmm/BlockId.hs | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/compiler/cmm/BlockId.hs b/compiler/cmm/BlockId.hs index 4aedcb7..95293c8 100644 --- a/compiler/cmm/BlockId.hs +++ b/compiler/cmm/BlockId.hs @@ -15,7 +15,7 @@ import Outputable import Unique import Compiler.Hoopl as Hoopl hiding (Unique) -import Compiler.Hoopl.Internals (uniqueToLbl) +import Compiler.Hoopl.Internals (uniqueToLbl, lblToUnique) ---------------------------------------------------------------- --- Block Ids, their environments, and their sets @@ -31,6 +31,12 @@ compilation unit in which it appears. type BlockId = Hoopl.Label +instance Uniquable BlockId where + getUnique label = getUnique (lblToUnique label) + +instance Outputable BlockId where + ppr label = ppr (getUnique label) + mkBlockId :: Unique -> BlockId mkBlockId unique = uniqueToLbl $ intToUnique $ getKey unique _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
