projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Derive some Typeable instances
[ghc-hetmet.git]
/
compiler
/
profiling
/
CostCentre.lhs
diff --git
a/compiler/profiling/CostCentre.lhs
b/compiler/profiling/CostCentre.lhs
index
444b8be
..
9e08831
100644
(file)
--- a/
compiler/profiling/CostCentre.lhs
+++ b/
compiler/profiling/CostCentre.lhs
@@
-10,6
+10,7
@@
-- any warnings in the module. See
-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
-- for details
-- any warnings in the module. See
-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
-- for details
+{-# LANGUAGE BangPatterns, DeriveDataTypeable #-}
module CostCentre (
CostCentre(..), CcName, IsDupdCC(..), IsCafCC(..),
module CostCentre (
CostCentre(..), CcName, IsDupdCC(..), IsCafCC(..),
@@
-44,6
+45,8
@@
import Outputable
import FastTypes
import FastString
import Util ( thenCmp )
import FastTypes
import FastString
import Util ( thenCmp )
+
+import Data.Data
\end{code}
A Cost Centre Stack is something that can be attached to a closure.
\end{code}
A Cost Centre Stack is something that can be attached to a closure.
@@
-123,6
+126,7
@@
data CostCentre
| AllCafsCC {
cc_mod :: Module -- Name of module defining this CC.
}
| AllCafsCC {
cc_mod :: Module -- Name of module defining this CC.
}
+ deriving (Data, Typeable)
type CcName = FastString
type CcName = FastString
@@
-141,8
+145,10
@@
data IsDupdCC
-- but we are trying to avoid confusion between
-- "subd" and "subsumed". So we call the former
-- "dupd".
-- but we are trying to avoid confusion between
-- "subd" and "subsumed". So we call the former
-- "dupd".
+ deriving (Data, Typeable)
data IsCafCC = CafCC | NotCafCC
data IsCafCC = CafCC | NotCafCC
+ deriving (Data, Typeable)
-- synonym for triple which describes the cost centre info in the generated
-- code for a module.
-- synonym for triple which describes the cost centre info in the generated
-- code for a module.