SBench-0.2.0: A benchmark suite for runtime and heap measurements over a series of inputs.

Safe HaskellSafe-Inferred

Test.SBench.STerm

Description

The provided data type STerm is intended to store a term equipped with its own name and maybe some extra information about its cost center annotation and modules that need to be loaded when evaluating the term.

The additional information, provided as strings, is necessary for space measurements where small programs are constructed from the strings and run for heap profiling.

Synopsis

Documentation

type DataGen a = STerm aSource

type Data a = STerm aSource

type Seed a = STerm aSource

type Test a b = Data a -> FilePath -> IO bSource

data STerm a Source

Constructors

T 

Fields

stTerm :: a

The actual term.

stName :: TermName

The term as String

stModules :: [ModuleName]

The modules used when evaluation the term

stCC :: [CostCenter]

cost centers to measure when performing heap profiling.

Instances

Show (STerm a) 

toData :: Show a => a -> STerm aSource

toNamedData :: Show a => a -> TermName -> STerm aSource

toDataGen :: (a -> b) -> ModuleName -> TermName -> Data (a -> b)Source

toAlgorithm :: (a -> b) -> ModuleName -> TermName -> CostCenter -> Algorithm (a -> b)Source

(<$>) :: STerm (a -> b) -> STerm a -> STerm bSource

Function application for STerm.

makeSeedsSource

Arguments

:: (Show a, Integral a) 
=> a

minimal value

-> a

maximal value

-> a

number of seeds

-> [Seed a] 

makeIntSeeds :: Int -> Int -> Int -> [Seed Int]Source

Auxiliar version of makeSeeds to prevent defaulting to Integer.