X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=utils%2Fhpc%2FHpcUtils.hs;h=5655f837f3e081556cd2fcbe2ac18dc53abaeefa;hp=397a04196558224efd5a2eec0d109c54ca93bbd0;hb=b00e3a6c0a82a8af3238d677f798d812cd7fd49f;hpb=50769d7532f90b0ec1f1759a56d478cf2926a0ff diff --git a/utils/hpc/HpcUtils.hs b/utils/hpc/HpcUtils.hs index 397a041..5655f83 100644 --- a/utils/hpc/HpcUtils.hs +++ b/utils/hpc/HpcUtils.hs @@ -23,9 +23,9 @@ readFileFromPath :: (String -> IO String) -> String -> [String] -> IO String readFileFromPath _ filename@('/':_) _ = readFile filename readFileFromPath err filename path0 = readTheFile path0 where - readTheFile [] = err $ "could not find " ++ show filename - ++ " in path " ++ show path0 - readTheFile (dir:dirs) = - catch (do str <- readFile (dir ++ "/" ++ filename) - return str) - (\ _ -> readTheFile dirs) + readTheFile [] = err $ "could not find " ++ show filename + ++ " in path " ++ show path0 + readTheFile (dir:dirs) = + catchIO (do str <- readFile (dir ++ "/" ++ filename) + return str) + (\ _ -> readTheFile dirs)