hpc: use System.FilePath.(</>) instead of (++)
authorThomas Miedema <thomasmiedema@gmail.com>
Tue, 17 Mar 2015 17:09:18 +0000 (18:09 +0100)
committerThomas Miedema <thomasmiedema@gmail.com>
Tue, 17 Mar 2015 17:17:27 +0000 (18:17 +0100)
commit801f4b98fa5198ab7e033949dd84aaae00162993
tree4efda91a9cf063b614c47bd4cd8be44872f77469
parent86eff3d92ffa3c9be29e037c01fd9b3fec8976e7
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
testsuite/tests/hpc/.hpc.T10138/Main.mix [new file with mode: 0644]
testsuite/tests/hpc/T10138.tix [new file with mode: 0644]
testsuite/tests/hpc/all.T
utils/hpc/HpcFlags.hs
utils/hpc/HpcMarkup.hs
utils/hpc/HpcUtils.hs
utils/hpc/hpc-bin.cabal