X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fparser%2FParserCoreUtils.hs;h=8f67d962396d602506804e8cf5e3a8637af9e6b8;hp=2c88aa79e356176379744cdc5cad1ecff5d080ad;hb=b00e3a6c0a82a8af3238d677f798d812cd7fd49f;hpb=50769d7532f90b0ec1f1759a56d478cf2926a0ff diff --git a/compiler/parser/ParserCoreUtils.hs b/compiler/parser/ParserCoreUtils.hs index 2c88aa7..8f67d96 100644 --- a/compiler/parser/ParserCoreUtils.hs +++ b/compiler/parser/ParserCoreUtils.hs @@ -1,5 +1,6 @@ module ParserCoreUtils where +import Exception import System.IO data ParseResult a = OkP a | FailP String @@ -19,7 +20,7 @@ failP s s' _ = FailP (s ++ ":" ++ s') getCoreModuleName :: FilePath -> IO String getCoreModuleName fpath = - catch (do + catchIO (do h <- openFile fpath ReadMode ls <- hGetContents h let mo = findMod (words ls)