hpc and CPP don't mix on Windows
Originaly reported by Dominic Steinitz here: http://www.haskell.org/pipermail/glasgow-haskell-users/2009-July/017511.html
On Windows, with these files:
CommonHPC.hs:
module Main (main) where
import Common
main = do
test
test
test = do
putStrLn $ show $ fact 4
putStrLn $ show $ fact 5
Common.hs:
module Common (fact) where
fact 0 = 1
fact n = n * fact (n-1)
This works:
$ ghc -fhpc --make CommonHPC
$ ./CommonHPC
$ cat CommonHPC.exe.tix
Tix [ TixModule "Main" 693125724 18 [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], TixModule "Common" 4136915291 8 [2,9,9,9,9,9,9,11]]
but with -cpp we get no ticks for Common:
$ ghc -fhpc --make CommonHPC -cpp
$ ./CommonHPC
$ cat CommonHPC.exe.tix
Tix [ TixModule "Main" 693125724 18 [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], TixModule "Common" 3370079577 0 []]
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.10.4 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Code Coverage |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |