
#1853: hpc mix files for Main modules overwrite each other ----------------------------------+-------------------------------------- Reporter: guest | Owner: Type: bug | Status: new Priority: lowest | Milestone: 8.0.1 Component: Code Coverage | Version: 6.8.1 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ----------------------------------+-------------------------------------- Comment (by ezyang): So, in some sense, you are actually completely screwed, because at runtime the executable producing Tix files has no idea if it was compiled from `Main1.hs` or `Main2.hs`: the symbol names for the two executables live in the same namespace, etc. There is actually a very cunning way this problem could be fixed: 1. `-main-is` could be extended to work with modules which are not in the `main` package. 2. Executables could then be compiled while setting `-package-name` to something that is not `main`. Then the symbol names would be different and you could merge them reliably. The alternative is that HPC can be told explicitly that a mix file is for a specific file name (extending it's model to not be profiling a pile of `Module`s, but a pile of `Module`s or files). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/1853#comment:26 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler