criterion-1.5.5.0: Robust, reliable performance measurement and analysis

Copyright | (c) 2009 Neil Brown
License | BSD-style
Maintainer | bos@serpentine.com
Stability | experimental
Portability | GHC
Safe Haskell | Trustworthy
Language | Haskell2010

Criterion.Monad

Description

The environment in which most criterion code executes.

Synopsis

- data Criterion a
- withConfig :: Config -> Criterion a -> IO a
- getGen :: Criterion GenIO

# Documentation

data Criterion a Source #

The monad in which most criterion code executes.

Instances

Monad Criterion Source # |
Instance details Defined in Criterion.Monad.Internal Methods (>>=) :: Criterion a -> (a -> Criterion b) -> Criterion b Source # (>>) :: Criterion a -> Criterion b -> Criterion b Source # return :: a -> Criterion a Source # fail :: String -> Criterion a Source #
Functor Criterion Source # |
Instance details Defined in Criterion.Monad.Internal Methods fmap :: (a -> b) -> Criterion a -> Criterion b Source # (<$) :: a -> Criterion b -> Criterion a Source #
MonadFail Criterion Source # |
Instance details Defined in Criterion.Monad.Internal Methods fail :: String -> Criterion a Source #
Applicative Criterion Source # |
Instance details Defined in Criterion.Monad.Internal Methods pure :: a -> Criterion a Source # (<*>) :: Criterion (a -> b) -> Criterion a -> Criterion b Source # liftA2 :: (a -> b -> c) -> Criterion a -> Criterion b -> Criterion c Source # (*>) :: Criterion a -> Criterion b -> Criterion b Source # (<*) :: Criterion a -> Criterion b -> Criterion a Source #
MonadIO Criterion Source # |
Instance details Defined in Criterion.Monad.Internal Methods liftIO :: IO a -> Criterion a Source #
MonadThrow Criterion Source # |
Instance details Defined in Criterion.Monad.Internal Methods throwM :: Exception e => e -> Criterion a Source #
MonadCatch Criterion Source # |
Instance details Defined in Criterion.Monad.Internal Methods catch :: Exception e => Criterion a -> (e -> Criterion a) -> Criterion a Source #
MonadMask Criterion Source # |
Instance details Defined in Criterion.Monad.Internal Methods mask :: ((forall a. Criterion a -> Criterion a) -> Criterion b) -> Criterion b Source # uninterruptibleMask :: ((forall a. Criterion a -> Criterion a) -> Criterion b) -> Criterion b Source # generalBracket :: Criterion a -> (a -> ExitCase b -> Criterion c) -> (a -> Criterion b) -> Criterion (b, c) Source #
MonadReader Config Criterion Source # |
Instance details Defined in Criterion.Monad.Internal Methods ask :: Criterion Config Source # local :: (Config -> Config) -> Criterion a -> Criterion a Source # reader :: (Config -> a) -> Criterion a Source #
CritHPrintfType (Criterion a) Source # |
Instance details Defined in Criterion.IO.Printf Methods chPrintfImpl :: (Config -> Bool) -> PrintfCont -> Criterion a

withConfig :: Config -> Criterion a -> IO a Source #

Run a `Criterion` action with the given `Config`.

getGen :: Criterion GenIO Source #

Return a random number generator, creating one if necessary.

This is not currently thread-safe, but in a harmless way (we might call `createSystemRandom` more than once if multiple threads race).