criterion-measurement-0.2.2.0: Criterion measurement functionality and associated types

Copyright | (c) 2017 Ryan Scott
License | BSD-style
Maintainer | bos@serpentine.com
Stability | experimental
Portability | GHC
Safe Haskell | Safe-Inferred
Language | Haskell2010

Criterion.Measurement.Types.Internal

Description

Exports `fakeEnvironment`.

Synopsis

- fakeEnvironment :: env
- nf' :: (b -> ()) -> (a -> b) -> a -> Int64 -> IO ()
- whnf' :: (a -> b) -> a -> Int64 -> IO ()
- data SPEC
  - = SPEC
  - | SPEC2

# Documentation

fakeEnvironment :: env Source #

A dummy environment that is passed to functions that create benchmarks from environments when no concrete environment is available.

nf' :: (b -> ()) -> (a -> b) -> a -> Int64 -> IO () Source #

Generate a function which applies an argument to a function a given number of times, reducing the result to normal form.

whnf' :: (a -> b) -> a -> Int64 -> IO () Source #

Generate a function which applies an argument to a function a given number of times.

data SPEC Source #

`SPEC` is used by GHC in the `SpecConstr` pass in order to inform the compiler when to be particularly aggressive. In particular, it tells GHC to specialize regardless of size or the number of specializations. However, not all loops fall into this category.

Libraries can specify this by using `SPEC` data type to inform which loops should be aggressively specialized.

Constructors

SPEC |
SPEC2 |