Safe Haskell | Safe-Infered |
---|
- data Statistics
- type StatisticsState a = forall m. MonadState Statistics m => m a
- emptyStats :: Statistics
- showFinalStats :: Statistics -> String
- initialStatisticsStateFor :: MonadState Statistics m => (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
showFinalStats :: Statistics -> String
initialStatisticsStateFor :: MonadState Statistics m => (m a -> Statistics -> b) -> m a -> b
addMetric :: Metric -> StatisticsState ()
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]
updateMetrics :: (Metric -> Metric) -> Statistics -> Statistics
incrIntMetric :: String -> Int -> Metric -> Metric
queryIntMetric :: String -> Metric -> Maybe Int