[commit: ghc] master: hpc: use `takeDirectory` instead of `dropWhileEnd (/= '/')` (08af42f)
git at git.haskell.org
git at git.haskell.org
Sat Sep 12 21:41:48 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/08af42fd0a30516e0a0ec981af5cc3d165f75a5a/ghc
>---------------------------------------------------------------
commit 08af42fd0a30516e0a0ec981af5cc3d165f75a5a
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date: Sat Sep 12 22:41:35 2015 +0200
hpc: use `takeDirectory` instead of `dropWhileEnd (/= '/')`
This fixes some hpc tests on Windows. Update submodule hpc.
>---------------------------------------------------------------
08af42fd0a30516e0a0ec981af5cc3d165f75a5a
libraries/hpc | 2 +-
utils/hpc/HpcMarkup.hs | 5 +----
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/libraries/hpc b/libraries/hpc
index da5928c..315b78a 160000
--- a/libraries/hpc
+++ b/libraries/hpc
@@ -1 +1 @@
-Subproject commit da5928ccf4e369f6985ef291351d074918b88019
+Subproject commit 315b78ac8fe7b42912d2146783b0366f6b0e9503
diff --git a/utils/hpc/HpcMarkup.hs b/utils/hpc/HpcMarkup.hs
index 31327fc..fb68eac 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
More information about the ghc-commits
mailing list