Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- data Statistics
- type StatisticsState a = forall m. MonadState Statistics m => m a
- emptyStats :: Statistics
- showFinalStats :: Statistics -> String
- initialStatisticsStateFor :: (m a -> Statistics -> b) -> m a -> b
- addMetric :: Metric -> StatisticsState ()
- data Metric = IntMetric String Int
- queryMetrics :: (Metric -> Maybe a) -> Statistics -> [a]
- updateMetrics :: (Metric -> Metric) -> Statistics -> Statistics
- incrIntMetric :: String -> Int -> Metric -> Metric
- queryIntMetric :: String -> Metric -> Maybe Int
Documentation
type StatisticsState a = forall m. MonadState Statistics m => m a Source #
showFinalStats :: Statistics -> String Source #
initialStatisticsStateFor :: (m a -> Statistics -> b) -> m a -> b Source #
addMetric :: Metric -> StatisticsState () Source #
Adds a metric at the beginning of the list (note we reverse the order whene we want to print the metrics)
queryMetrics :: (Metric -> Maybe a) -> Statistics -> [a] Source #
updateMetrics :: (Metric -> Metric) -> Statistics -> Statistics Source #