Commit c45a6466 authored by Simon Marlow's avatar Simon Marlow

catch is no longer exported by Prelude

parent 40c01620
......@@ -87,6 +87,8 @@ Desired enhancements:
module Main where
import Control.Exception (catch, IOException)
type Line = String
type Entry = [Line]
type FileName = String
......@@ -105,8 +107,9 @@ mainLoop fns =
putStr "\nFile to be converted: " >>
case fns of
[] -> putStr "\nGoodbye!\n"
(fn:fns') -> catch (readFile fn >>= process (fn ++ ".tex") fns')
(\err -> putStr ("\nCan't read " ++fn++ "; try again.\n") >>
(fn:fns') -> catch (readFile fn >>= process (fn ++ ".tex") fns')
(\err -> let _ = err :: IOException in
putStr ("\nCan't read " ++fn++ "; try again.\n") >>
mainLoop fns')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment