Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/d2d3b7190ee013b05286fb00d9ac1e6e1c0c70de

>---------------------------------------------------------------

commit d2d3b7190ee013b05286fb00d9ac1e6e1c0c70de
Author: Ian Lynagh <[email protected]>
Date:   Tue Jun 12 15:48:49 2012 +0100

    Avoid a needless trip via SDoc when showing a Unique

>---------------------------------------------------------------

 compiler/typecheck/TcEnv.lhs |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/compiler/typecheck/TcEnv.lhs b/compiler/typecheck/TcEnv.lhs
index 3f5fb09..fce17af 100644
--- a/compiler/typecheck/TcEnv.lhs
+++ b/compiler/typecheck/TcEnv.lhs
@@ -78,7 +78,6 @@ import DynFlags
 import SrcLoc
 import BasicTypes
 import Outputable
-import Unique
 import FastString
 import ListSetOps
 import Util
@@ -736,8 +735,7 @@ mkStableIdFromString :: String -> Type -> SrcSpan -> 
(OccName -> OccName) -> TcM
 mkStableIdFromString str sig_ty loc occ_wrapper = do
     uniq <- newUnique
     mod <- getModule
-    let uniq_str = showSDoc (pprUnique uniq) :: String
-        occ = mkVarOcc (str ++ '_' : uniq_str) :: OccName
+    let occ = mkVarOcc (str ++ '_' : show uniq) :: OccName
         gnm = mkExternalName uniq mod (occ_wrapper occ) loc :: Name
         id  = mkExportedLocalId gnm sig_ty :: Id
     return id



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to