HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulecriterion-1.6.4.0Haskell2010

Criterion.Report

Reporting functions.

  • 1 type
  • 8 values
  • Packagecriterion-1.6.4.0
  • Exports9
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceReport.hs

Rendering helper functions

6 declarations
datadata TemplateException
#

A problem arose with a template.

Constructors

Instances7Eq, Data, Read, Show, Generic, Exception, …
valueloadTemplate
  1. :: [FilePath]

    Search path.

  2. -> FilePath

    Name of template file.

  3. -> IO Text
#

Load a Mustache template file.

If the name is an absolute or relative path, the search path is not used, and the name is treated as a literal path.

If the -fembed-data-files Cabal flag is enabled, this also checks the embedded data-files from criterion.cabal.

This function throws a TemplateException if the template could not be found, or an IOException if no template could be loaded.

valueincludeFile
  1. :: MonadIO m
  2. => [FilePath]

    Directories to search.

  3. -> FilePath

    Name of the file to search for.

  4. -> m Text
#

Attempt to include the contents of a file based on a search path. Returns B.empty if the search fails or the file could not be read.

Intended for preprocessing Mustache files, e.g. replacing sections

{{#include}}file.txt{{/include}

with file contents.

Return the path to the template and other files used for generating reports.

When the -fembed-data-files Cabal flag is enabled, this simply returns the empty path.

valuevector
  1. :: (Vector v a, ToJSON a)
  2. => Text

    Name to use when substituting.

  3. -> v a
  4. -> Value
#

Render the elements of a vector.

It will substitute each value in the vector for x in the following Mustache template:

{{#foo}}
 {{x}}
{{/foo}}
valuevector2
  1. :: (Vector v a, Vector v b, ToJSON a, ToJSON b)
  2. => Text

    Name for elements from the first vector.

  3. -> Text

    Name for elements from the second vector.

  4. -> v a

    First vector.

  5. -> v b

    Second vector.

  6. -> Value
#

Render the elements of two vectors.