Cabal-1.12.0: A framework for packaging Haskell software

Portabilityportable
Maintainercabal-devel@haskell.org

Distribution.Simple.Hpc

Description

This module provides functions for locating various HPC-related paths and a function for adding the necessary options to a PackageDescription to build test suites with HPC enabled.

Synopsis

Documentation

hpcDirSource

Arguments

:: FilePath

"dist/" prefix

-> FilePath

Component subdirectory name

-> FilePath

Directory containing component's HPC .mix files

enableCoverageSource

Arguments

:: Bool

Enable coverage?

-> String

"dist/" prefix

-> PackageDescription 
-> PackageDescription 

Conditionally enable Haskell Program Coverage by adding the necessary GHC options to a PackageDescription.

TODO: do this differently in the build stage by constructing local build info, not by modifying the original PackageDescription.

tixDirSource

Arguments

:: FilePath

"dist/" prefix

-> TestSuite

Test suite

-> FilePath

Directory containing test suite's .tix files

tixFilePathSource

Arguments

:: FilePath

"dist/" prefix

-> TestSuite

Test suite

-> FilePath 

Path to the .tix file containing a test suite's sum statistics.

doHpcMarkupSource

Arguments

:: Verbosity 
-> FilePath

"dist/" prefix

-> String

Library name

-> TestSuite 
-> IO () 

Generate the HTML markup for a test suite.

findTixFilesSource

Arguments

:: FilePath

"dist/" prefix

-> TestSuite

Test suite

-> IO [FilePath]

All .tix files belonging to test suite

Returns a list of all the .tix files in a test suite's .tix file directory. Returned paths are the complete relative path to each file.