Skip to content
Snippets Groups Projects
Commit 368eb285 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Replace uses of the old catch function with the new one

parent fc22ff43
No related branches found
No related tags found
No related merge requests found
...@@ -23,9 +23,9 @@ readFileFromPath :: (String -> IO String) -> String -> [String] -> IO String ...@@ -23,9 +23,9 @@ readFileFromPath :: (String -> IO String) -> String -> [String] -> IO String
readFileFromPath _ filename@('/':_) _ = readFile filename readFileFromPath _ filename@('/':_) _ = readFile filename
readFileFromPath err filename path0 = readTheFile path0 readFileFromPath err filename path0 = readTheFile path0
where where
readTheFile [] = err $ "could not find " ++ show filename readTheFile [] = err $ "could not find " ++ show filename
++ " in path " ++ show path0 ++ " in path " ++ show path0
readTheFile (dir:dirs) = readTheFile (dir:dirs) =
catch (do str <- readFile (dir ++ "/" ++ filename) catchIO (do str <- readFile (dir ++ "/" ++ filename)
return str) return str)
(\ _ -> readTheFile dirs) (\ _ -> readTheFile dirs)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment