getOccName, occNameFS
)
import Module ( Module, ModuleName, moduleName,
- pprModuleName, moduleNameUserString
+ moduleNameUserString
)
import Outputable
import CStrings ( pprStringInCStyle )
+import FastTypes
import Util ( thenCmp )
\end{code}
tag1 = tag_CC other_1
tag2 = tag_CC other_2
in
- if tag1 _LT_ tag2 then LT else GT
+ if tag1 <# tag2 then LT else GT
where
- tag_CC (NormalCC {}) = (ILIT(1) :: FAST_INT)
- tag_CC (AllCafsCC {}) = ILIT(2)
+ tag_CC (NormalCC {}) = (_ILIT 1 :: FastInt)
+ tag_CC (AllCafsCC {}) = _ILIT 2
cmp_caf NotCafCC CafCC = LT
cmp_caf NotCafCC NotCafCC = EQ
-- Printing in an interface file or in Core generally
pprCostCentreCore (AllCafsCC {cc_mod = m})
- = text "__sccC" <+> braces (pprModuleName m)
+ = text "__sccC" <+> braces (ppr m)
pprCostCentreCore (NormalCC {cc_name = n, cc_mod = m,
cc_is_caf = caf, cc_is_dupd = dup})
= text "__scc" <+> braces (hsep [
ptext n,
- pprModuleName m,
+ ppr m,
pp_dup dup,
pp_caf caf
])
-- Printing as a C label
ppCostCentreLbl (NoCostCentre) = text "NONE_cc"
-ppCostCentreLbl (AllCafsCC {cc_mod = m}) = pprModuleName m <> text "_CAFs_cc"
+ppCostCentreLbl (AllCafsCC {cc_mod = m}) = ppr m <> text "_CAFs_cc"
ppCostCentreLbl (NormalCC {cc_name = n, cc_mod = m, cc_is_caf = is_caf})
- = pprModuleName m <> ptext n <>
+ = ppr m <> ptext n <>
text (case is_caf of { CafCC -> "_CAF"; _ -> "" }) <> text "_cc"
-- This is the name to go in the user-displayed string,