Commits

Bryan O'Sullivan committed 0c75442

Add Typeable bits.

  • Participants
  • Parent commits f3dea8f

Comments (0)

Files changed (1)

Criterion/Analysis.hs

-{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE DeriveDataTypeable, RecordWildCards #-}
 -- |
 -- Module      : Criterion.Analysis
 -- Copyright   : (c) 2009, 2010, 2011 Bryan O'Sullivan
 import Criterion.IO (note)
 import Criterion.Measurement (secs)
 import Criterion.Monad (Criterion)
+import Data.Data (Data)
 import Data.Int (Int64)
 import Data.Monoid (Monoid(..))
+import Data.Typeable (Typeable)
 import Statistics.Function (sort)
 import Statistics.Quantile (weightedAvg)
 import Statistics.Resampling (Resample, resample)
     -- ^ Between 1.5 and 3 times the IQR above the third quartile.
     , highSevere  :: {-# UNPACK #-} !Int64
     -- ^ More than 3 times the IQR above the third quartile.
-    } deriving (Eq, Read, Show)
+    } deriving (Eq, Read, Show, Typeable, Data)
 
 -- | A description of the extent to which outliers in the sample data
 -- affect the sample mean and standard deviation.
                    | Moderate   -- ^ Between 10% and 50%.
                    | Severe     -- ^ Above 50% (i.e. measurements
                                 -- are useless).
-                     deriving (Eq, Ord, Read, Show)
+                     deriving (Eq, Ord, Read, Show, Typeable, Data)
 
 instance Monoid Outliers where
     mempty  = Outliers 0 0 0 0 0
     -- ^ Qualitative description of effect.
     , ovFraction :: Double
     -- ^ Quantitative description of effect (a fraction between 0 and 1).
-    } deriving (Eq, Read, Show)
+    } deriving (Eq, Read, Show, Typeable, Data)
 
 -- | Compute the extent to which outliers in the sample data affect
 -- the sample mean and standard deviation.
       anMean :: B.Estimate
     , anStdDev :: B.Estimate
     , anOutliers :: OutlierVariance
-    } deriving (Eq, Show)
+    } deriving (Eq, Show, Typeable, Data)
 
 -- | Multiply the 'Estimate's in an analysis by the given value, using
 -- 'B.scale'.