BSD-3-Clause licensed and maintained by Brandon Chinn

Module documentation for 1.0.0

This version can be pinned in stack with:[email protected]:b651be5c3542f3b74e4b88fe00619f8d5bfa8baacebb6bada5b1f4307a1767c2,2732


codecov CircleCI Hackage

Convert HPC output into files that can be uploaded to coverage services, like Codecov.



  1. Run stack build hpc-lcov
  2. Run your test(s) with coverage, e.g. stack test --coverage
  3. Run stack exec hpc-lcov
  4. Upload the generated file to your coverage service


Coming soon! (


How do I convert coverage for an executable?

Note: If you have both tests and executables, HPC will write outputs to the same file. Because of this, you’ll have to load the coverage for each separately, with a stack clean in between.

  1. Build the executable with coverage enabled (e.g. stack build --coverage)
  2. Run the executable
  3. This should generate a .tix file in the current directory
  4. Run the following, specifying the package that builds the executable:
    stack exec -- hpc-lcov --file my-exe.tix --main-package my-package

How do I merge coverage files?

  1. Install LCOV (e.g. brew install lcov)

  2. Run

    lcov -a -a ... >





Initial release of hpc-lcov:

  • Generates LCOV files from HPC .tix files
  • Discovers .tix files generated by Stack test suites
  • Allows manually specifying a .tix file (useful for executables with coverage enabled)