Send expression level coverage report
Work branch: https://github.com/guillaume-nargeot/codecov-haskell/tree/expression-level-coverage
Some initial changes were made in a420f6f5ddeb36fade0bb2706b97f007ae512fee and 2c8ca354127912b5b6c622d4a282e065b629e843 to propagate additional information required to compute expression level coverage.
The remaining work consist in performing the following transformations:
- split coverage entries which cover multiple lines into ones that cover only a single line
- in the case of TopLevelEntry, discard all but the first line in case it is hit at least once
- splitted lines will have their start column adjusted to the first non-blank character of the covered code
- "unnest" coverage entries (see this gist for details)
Below are examples html outputs produced by hpc, which is what codecov-haskell should try to reproduce. These html reports were generated for the same peace of code, with differing variations of coverage.
No coverage at all:

Coverage when tested with takeUntil (> 1) [] ~=? []:

Coverage when tested with takeUntil (> 1) [2] ~=? [2]:

Coverage when tested with takeUntil (> 1) [1, 2] ~=? [1, 2]:

Same coverage patterns tested on multi-line if-then-else statements:



