BSD-3-Clause licensed and maintained by Brandon Chinn
This version can be pinned in stack with:hpc-lcov-1.1.1@sha256:4da209087eb9107a0d84881aacfa862889ba8bc43af91c204afaf0f001b55e80,2862

Module documentation for 1.1.1


GitHub Actions codecov Hackage

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


  1. Download hpc-lcov from the releases page or install it from Hackage with your favorite package manager
  2. Run your tests with coverage enabled
  3. Run hpc-lcov
  4. Upload the generated file to your coverage service


How do I convert coverage for an executable?

Note: If you have both tests and executables, HPC will write module information 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 a single executable with coverage enabled (e.g. stack build :my-exe --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 ... >




  • Add support for GHC 9.4 + 9.6
  • Drop support for GHC < 8.10


  • Drop support for GHC < 8.6


Bug fix:

  • Don’t error if the packages field in stack.yaml doesn’t exist


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)