Agda-2.6.2.2: A dependently typed functional programming language and proof assistant

Safe Haskell | Safe-Inferred
Language | Haskell2010

Agda.TypeChecking.Monad.Statistics

Description

Collect statistics.

Synopsis

- class ReadTCState m => MonadStatistics m where
  - modifyCounter :: String -> (Integer -> Integer) -> m ()
- tick :: MonadStatistics m => String -> m ()
- tickN :: MonadStatistics m => String -> Integer -> m ()
- tickMax :: MonadStatistics m => String -> Integer -> m ()
- getStatistics :: ReadTCState m => m Statistics
- modifyStatistics :: (Statistics -> Statistics) -> TCM ()
- printStatistics :: (MonadDebug m, MonadTCEnv m, HasOptions m) => Int -> Maybe TopLevelModuleName -> Statistics -> m ()

# Documentation

class ReadTCState m => MonadStatistics m where Source #

Minimal complete definition

Nothing

Methods

modifyCounter :: String -> (Integer -> Integer) -> m () Source #

default modifyCounter :: (MonadStatistics n, MonadTrans t, t n ~ m) => String -> (Integer -> Integer) -> m () Source #

#### Instances

Instances details

MonadStatistics TerM Source # |
Instance details Defined in Agda.Termination.Monad Methods modifyCounter :: String -> (Integer -> Integer) -> TerM () Source #
MonadStatistics TCM Source # |
Instance details Defined in Agda.TypeChecking.Monad.Statistics Methods modifyCounter :: String -> (Integer -> Integer) -> TCM () Source #
ReadTCState m => MonadStatistics (PureConversionT m) Source # |
Instance details Defined in Agda.TypeChecking.Conversion.Pure Methods modifyCounter :: String -> (Integer -> Integer) -> PureConversionT m () Source #
MonadStatistics m => MonadStatistics (MaybeT m) Source # |
Instance details Defined in Agda.TypeChecking.Monad.Statistics Methods modifyCounter :: String -> (Integer -> Integer) -> MaybeT m () Source #
MonadStatistics m => MonadStatistics (ExceptT e m) Source # |
Instance details Defined in Agda.TypeChecking.Monad.Statistics Methods modifyCounter :: String -> (Integer -> Integer) -> ExceptT e m () Source #
MonadStatistics m => MonadStatistics (ReaderT r m) Source # |
Instance details Defined in Agda.TypeChecking.Monad.Statistics Methods modifyCounter :: String -> (Integer -> Integer) -> ReaderT r m () Source #
MonadStatistics m => MonadStatistics (StateT s m) Source # |
Instance details Defined in Agda.TypeChecking.Monad.Statistics Methods modifyCounter :: String -> (Integer -> Integer) -> StateT s m () Source #
(MonadStatistics m, Monoid w) => MonadStatistics (WriterT w m) Source # |
Instance details Defined in Agda.TypeChecking.Monad.Statistics Methods modifyCounter :: String -> (Integer -> Integer) -> WriterT w m () Source #

tick :: MonadStatistics m => String -> m () Source #

Increase specified counter by `1`.

tickN :: MonadStatistics m => String -> Integer -> m () Source #

Increase specified counter by `n`.

tickMax :: MonadStatistics m => String -> Integer -> m () Source #

Set the specified counter to the maximum of its current value and `n`.

getStatistics :: ReadTCState m => m Statistics Source #

Get the statistics.

modifyStatistics :: (Statistics -> Statistics) -> TCM () Source #

Modify the statistics via given function.

printStatistics :: (MonadDebug m, MonadTCEnv m, HasOptions m) => Int -> Maybe TopLevelModuleName -> Statistics -> m () Source #

Print the given statistics if verbosity "profile.ticks" is given.