Safe Haskell | Safe-Inferred |
---|

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.

- type CostCenter = String
- type DataGen a = STerm a
- type Algorithm a = STerm a
- type Data a = STerm a
- type Seed a = STerm a
- type Test a b = Data a -> FilePath -> IO b
- data STerm a = T {
- stTerm :: a
- stName :: TermName
- stModules :: [ModuleName]
- stCC :: [CostCenter]

- toData :: Show a => a -> STerm a
- toNamedData :: Show a => a -> TermName -> STerm a
- toDataGen :: (a -> b) -> ModuleName -> TermName -> Data (a -> b)
- toAlgorithm :: (a -> b) -> ModuleName -> TermName -> CostCenter -> Algorithm (a -> b)
- (<$>) :: STerm (a -> b) -> STerm a -> STerm b
- getImports :: STerm a -> String
- makeSeeds :: (Show a, Integral a) => a -> a -> a -> [Seed a]
- makeIntSeeds :: Int -> Int -> Int -> [Seed Int]

# Documentation

type CostCenter = StringSource

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

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

getImports :: STerm a -> StringSource