[commit: packages/hpc] master: Make error messages Windows proof (315b78a)

git at git.haskell.org git at git.haskell.org
Sat Sep 12 21:40:43 UTC 2015


Repository : ssh://git@git.haskell.org/hpc

On branch  : master
Link       : http://git.haskell.org/packages/hpc.git/commitdiff/315b78ac8fe7b42912d2146783b0366f6b0e9503

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

commit 315b78ac8fe7b42912d2146783b0366f6b0e9503
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Sat Sep 12 23:10:23 2015 +0200

    Make error messages Windows proof
    
    Before, we ended up with too many slashes, which caused a test failure
    in T10529a.
    
      show "foo\\bar" == "\"foo\\\\bar\""


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

315b78ac8fe7b42912d2146783b0366f6b0e9503
 Trace/Hpc/Mix.hs                 | 6 ++++--
 tests/simple/tixs/T10529a.stderr | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Trace/Hpc/Mix.hs b/Trace/Hpc/Mix.hs
index 0a5f054..2066284 100644
--- a/Trace/Hpc/Mix.hs
+++ b/Trace/Hpc/Mix.hs
@@ -22,6 +22,7 @@ module Trace.Hpc.Mix
         )
   where
 
+import Data.List
 import Data.Maybe (catMaybes, fromMaybe)
 import Data.Time (UTCTime)
 import Data.Tree
@@ -113,9 +114,10 @@ readMix dirNames mod' = do
               -- Only complain if multiple *different* `Mix` files with the
               -- same name are found (#9619).
               error $ "found " ++ show(length xs) ++ " different instances of "
-                      ++ modName ++ " in " ++ show dirNames
+                      ++ modName ++ " in " ++ intercalate ", " dirNames
      (x:_) -> return x
-     _     -> error $ "can not find " ++ modName ++ " in " ++ show dirNames
+     _     -> error $ "can not find "
+                      ++ modName ++ " in " ++ intercalate ", " dirNames
 
 mixName :: FilePath -> String -> String
 mixName dirName name = dirName </> name <.> "mix"
diff --git a/tests/simple/tixs/T10529a.stderr b/tests/simple/tixs/T10529a.stderr
index 945c633..5107218 100644
--- a/tests/simple/tixs/T10529a.stderr
+++ b/tests/simple/tixs/T10529a.stderr
@@ -1 +1 @@
-hpc: can not find NonExistingModule in ["./.hpc"]
+hpc: can not find NonExistingModule in ./.hpc



More information about the ghc-commits mailing list