summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2015-09-12 22:41:35 +0200
committerThomas Miedema <thomasmiedema@gmail.com>2015-09-12 23:43:14 +0200
commit08af42fd0a30516e0a0ec981af5cc3d165f75a5a (patch)
tree6aafa944deffc1ea128bd33de3396aa90ab1794e
parent3ec205aec45ec13fc7274d6b019cd7f7654191f4 (diff)
downloadhaskell-08af42fd0a30516e0a0ec981af5cc3d165f75a5a.tar.gz
hpc: use `takeDirectory` instead of `dropWhileEnd (/= '/')`
This fixes some hpc tests on Windows. Update submodule hpc.
m---------libraries/hpc0
-rw-r--r--utils/hpc/HpcMarkup.hs5
2 files changed, 1 insertions, 4 deletions
diff --git a/libraries/hpc b/libraries/hpc
-Subproject da5928ccf4e369f6985ef291351d074918b8801
+Subproject 315b78ac8fe7b42912d2146783b0366f6b0e950
diff --git a/utils/hpc/HpcMarkup.hs b/utils/hpc/HpcMarkup.hs
index 31327fc991..fb68eacef7 100644
--- a/utils/hpc/HpcMarkup.hs
+++ b/utils/hpc/HpcMarkup.hs
@@ -479,15 +479,12 @@ instance Monoid ModuleSummary where
writeFileUsing :: String -> String -> IO ()
writeFileUsing filename text = do
- let dest_dir = dropWhileEndLE (\ x -> x /= '/') $ filename
-
-- We need to check for the dest_dir each time, because we use sub-dirs for
-- packages, and a single .tix file might contain information about
-- many package.
-- create the dest_dir if needed
- when (not (null dest_dir)) $
- createDirectoryIfMissing True dest_dir
+ createDirectoryIfMissing True (takeDirectory filename)
writeFile filename text