[commit: nofib] shake: Deal with ugly behaviour of canonicalizePath when file doesn't exist. (abe42cf)

David Terei davidterei at gmail.com
Mon Mar 4 10:29:04 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/nofib

On branch  : shake

http://hackage.haskell.org/trac/ghc/changeset/abe42cf257aa081b347071bcd75ddfc9955720ab

>---------------------------------------------------------------

commit abe42cf257aa081b347071bcd75ddfc9955720ab
Author: David Terei <davidterei at gmail.com>
Date:   Mon Mar 4 01:27:31 2013 -0800

    Deal with ugly behaviour of canonicalizePath when file doesn't exist.

>---------------------------------------------------------------

 Nofib.hs |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Nofib.hs b/Nofib.hs
index 01ec308..2215a06 100644
--- a/Nofib.hs
+++ b/Nofib.hs
@@ -253,7 +253,7 @@ runTest Build{run=Just speed,..} test = do
     config <- readConfig $ output </> test </> "config.txt"
     let args = words (config "PROG_ARGS") ++ words (config $ map toUpper (show speed) ++ "_OPTS")
     stdin <- let s = config "STDIN_FILE" in if s == "" then grab "stdin" else readFile $ test </> s
-    stats <- IO.canonicalizePath $ output </> test </> "stat.txt"
+    stats <- fmap (</> "stat.txt") (IO.canonicalizePath $ output </> test)
 
     fmap and $ replicateM times $ do
         start <- getCurrentTime





More information about the ghc-commits mailing list