X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fprofiling%2FCostCentre.lhs;h=2740a5b6b86ff57238386df4a05cfdbe971cb506;hb=dabfa71f33eabc5a2d10959728f772aa016f1c84;hp=f9d5a61913782b523a6c88fd2b713a811bd78bc7;hpb=6c381e873e222417d9a67aeec77b9555eca7b7a8;p=ghc-hetmet.git diff --git a/ghc/compiler/profiling/CostCentre.lhs b/ghc/compiler/profiling/CostCentre.lhs index f9d5a61..2740a5b 100644 --- a/ghc/compiler/profiling/CostCentre.lhs +++ b/ghc/compiler/profiling/CostCentre.lhs @@ -27,16 +27,18 @@ module CostCentre ( cmpCostCentre -- used for removing dups in a list ) where +import Ubiq{-uitous-} + import Id ( externallyVisibleId, GenId, Id(..) ) import CStrings ( identToC, stringToC ) import Maybes ( Maybe(..) ) -import Outputable +import Name ( showRdr, getOccName, RdrName ) import Pretty ( ppShow, prettyToUn ) import PprStyle ( PprStyle(..) ) import UniqSet import Unpretty import Util -import Ubiq + showId = panic "Whoops" pprIdInUnfolding = panic "Whoops" \end{code} @@ -226,7 +228,7 @@ setToAbleCostCentre :: CostCentre -> Bool -- be set? setToAbleCostCentre is allowed to panic on -- "nonsense" cases, too... -#if DEBUG +#ifdef DEBUG setToAbleCostCentre NoCostCentre = panic "setToAbleCC:NoCostCentre" setToAbleCostCentre SubsumedCosts = panic "setToAbleCC:SubsumedCosts" setToAbleCostCentre CurrentCC = panic "setToAbleCC:CurrentCC" @@ -269,10 +271,7 @@ cmpCostCentre DontCareCC DontCareCC = EQ_ cmpCostCentre (NormalCC k1 m1 _ _ c1) (NormalCC k2 m2 _ _ c2) -- first key is module name, then we use "kinds" (which include -- names) - = case (_CMP_STRING_ m1 m2) of - LT_ -> LT_ - EQ_ -> cmp_kind k1 k2 - GT__ -> GT_ + = _CMP_STRING_ m1 m2 `thenCmp` cmp_kind k1 k2 cmpCostCentre other_1 other_2 = let @@ -400,8 +399,8 @@ uppCostCentre sty print_as_string cc do_id :: Id -> String do_id id = if print_as_string - then _UNPK_ (getOccurrenceName id) -- don't want module in the name - else showId sty id -- we really do + then showRdr sty (getOccName id) -- use occ name + else showId sty id -- we really do do_calved IsCafCC = "/CAF" do_calved _ = ""