diff options
author | David Waern <david.waern@gmail.com> | 2010-03-30 01:10:20 +0000 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2010-03-30 01:10:20 +0000 |
commit | f278f0676579f67075033a4f9857715909c4b71e (patch) | |
tree | 70316557d88f261e1af80ebe6c132374e32b7c15 /compiler/profiling | |
parent | ef6e8211dee59eb7fa80a242391b89b52bd57f80 (diff) | |
download | haskell-f278f0676579f67075033a4f9857715909c4b71e.tar.gz |
Add Data and Typeable instances to HsSyn
The instances (and deriving declarations) have been taken from the ghc-syb
package.
Diffstat (limited to 'compiler/profiling')
-rw-r--r-- | compiler/profiling/CostCentre.lhs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/profiling/CostCentre.lhs b/compiler/profiling/CostCentre.lhs index 444b8be112..2648d1eff2 100644 --- 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 +{-# LANGUAGE DeriveDataTypeable #-} module CostCentre ( CostCentre(..), CcName, IsDupdCC(..), IsCafCC(..), @@ -44,6 +45,8 @@ import Outputable 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. @@ -123,6 +126,7 @@ data CostCentre | AllCafsCC { cc_mod :: Module -- Name of module defining this CC. } + deriving (Data, Typeable) 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". + deriving (Data, Typeable) data IsCafCC = CafCC | NotCafCC + deriving (Data, Typeable) -- synonym for triple which describes the cost centre info in the generated -- code for a module. |