Fix build with old base package
authorunc0rr
Fri, 07 Feb 2014 14:41:49 +0400
changeset 10119 7e05a397602f
parent 10118 788703011d20
child 10120 b7f632c12784
Fix build with old base package
tools/pas2c/PascalPreprocessor.hs
--- a/tools/pas2c/PascalPreprocessor.hs	Fri Feb 07 10:11:10 2014 +0100
+++ b/tools/pas2c/PascalPreprocessor.hs	Fri Feb 07 14:41:49 2014 +0400
@@ -6,8 +6,7 @@
 import Control.Monad
 import System.IO
 import qualified Data.Map as Map
-import Control.Exception(catch, IOException)
-import Prelude
+import qualified Control.Exception as E
 
 char' :: Char -> ParsecT String u IO ()
 char' = void . char
@@ -80,7 +79,9 @@
         char' '"'
         spaces
         char' '}'
-        f <- liftIO (readFile (inputPath ++ ifn) `catch` (\(_ :: IOException) -> readFile (alternateInputPath ++ ifn) `catch` (\(_ :: IOException) -> error ("File not found: " ++ fn))))
+        f <- liftIO (readFile (inputPath ++ ifn) 
+            `E.catch` (\(_ :: E.IOException) -> readFile (alternateInputPath ++ ifn) 
+            `E.catch` (\(_ :: E.IOException) -> error ("File not found: " ++ fn))))
         c <- getInput
         setInput $ f ++ c
         return ""