From 8eee910075624d260f593d374fe50ba3611a4732 Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 17 May 2005 13:47:39 +0000 Subject: [PATCH] [project @ 2005-05-17 13:47:39 by simonmar] closureDescription: remove duplicate module name for external names, and include the unique for local names. This makes profiling with -hd more uesful. --- ghc/compiler/codeGen/CgClosure.lhs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ghc/compiler/codeGen/CgClosure.lhs b/ghc/compiler/codeGen/CgClosure.lhs index b7cef40..7ec8f48 100644 --- a/ghc/compiler/codeGen/CgClosure.lhs +++ b/ghc/compiler/codeGen/CgClosure.lhs @@ -1,7 +1,7 @@ % % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 % -% $Id: CgClosure.lhs,v 1.69 2005/04/21 15:28:20 simonmar Exp $ +% $Id: CgClosure.lhs,v 1.70 2005/05/17 13:47:39 simonmar Exp $ % \section[CgClosure]{Code generation for closures} @@ -45,7 +45,7 @@ import StgSyn import StaticFlags ( opt_DoTickyProfiling ) import CostCentre import Id ( Id, idName, idType ) -import Name ( Name ) +import Name ( Name, isExternalName ) import Module ( Module, pprModule ) import ListSetOps ( minusList ) import Util ( isIn, mapAccumL, zipWithEqual ) @@ -589,7 +589,11 @@ closureDescription :: Module -- Module -- Not called for StgRhsCon which have global info tables built in -- CgConTbls.lhs with a description generated from the data constructor closureDescription mod_name name - = showSDoc (hcat [char '<', pprModule mod_name, - char '.', ppr name, char '>']) + = showSDocDump (char '<' <> + (if isExternalName name + then ppr name -- ppr will include the module name prefix + else pprModule mod_name <> char '.' <> ppr name) <> + char '>') + -- showSDocDump, because we want to see the unique on the Name. \end{code} -- 1.7.10.4