From: Axel S. <si...@co...> - 2008-11-06 21:55:17
|
Thu Nov 6 03:00:55 EST 2008 Ross Mellgren <rmm-haskell@z.odi.ac> * fix compilation error on GHC 6.10.1 due to new Control.Exception module hunk ./gtk/Graphics/UI/Gtk/Gdk/EventM.hsc 189 -import Control.Exception (catch, throw, [_$_] +#if __GLASGOW_HASKELL__ >= 610 +import Control.Exception ( Handler(..) + , PatternMatchFail(..) + , catches, throw ) +import System.IO.Error (isUserError, ioeGetErrorString) +#else +import Control.Exception (catch, throw, hunk ./gtk/Graphics/UI/Gtk/Gdk/EventM.hsc 197 +#endif hunk ./gtk/Graphics/UI/Gtk/Gdk/EventM.hsc 594 - liftIO $ catch (runReaderT (act >> return True) ptr) - (\e -> case e of - IOException e - | "user error (Pattern" `isPrefixOf` show e -> - return False - PatternMatchFail _ -> return False - _ -> throw e) + liftIO $ (runReaderT (act >> return True) ptr) +#if __GLASGOW_HASKELL__ >= 610 + `catches` [ Handler (\ (PatternMatchFail _) -> return False) + , Handler (\ e -> if isUserError e && "Pattern" `isPrefixOf` ioeGetErrorString e + then return False + else throw e) ] +#else + `catch` (\e -> case e of + IOException e + | "user error (Pattern" `isPrefixOf` show e -> + return False + PatternMatchFail _ -> return False + _ -> throw e) +#endif + |