#10138: hpc does not handle absolute paths correctly -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: patch Priority: normal | Milestone: 7.12.1 Component: Code Coverage | Version: 7.8.4 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: hpc/T10138 Related Tickets: | Blocking: | Differential Revisions: Phab:D703 -------------------------------------+------------------------------------- Comment (by Thomas Miedema <thomasmiedema@…>): In [changeset:"801f4b98fa5198ab7e033949dd84aaae00162993/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="801f4b98fa5198ab7e033949dd84aaae00162993" hpc: use System.FilePath.(</>) instead of (++) Summary: BAD: "." ++ "/" ++ "/absolute/path" == ".//absolute/path" GOOD: "." </> "/absolute/path" == "/absolute path" Also replace `++ ".ext"` with `<.> "ext"`. Although it doesn't fix any bugs in this instance, it might in some other. As a general rule it's better not to use (++) on FilePaths. Reviewed By: austin, hvr Differential Revision: https://phabricator.haskell.org/D703 GHC Trac Issues: #10138 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10138#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler