[project @ 2001-04-10 15:54:31 by qrczak]
[ghc-hetmet.git] / ghc / tests / lib / should_run / enum01.hs
index e983986..d8a6eda 100644 (file)
@@ -3,6 +3,7 @@ module Main(main) where
 
 import Exception
 import Char
+import Ratio
 
 main = do
    -- Enum Int
@@ -479,14 +480,7 @@ testEnumRatioInt = do
 --
 
 
-mayBomb x = catchAllIO x errorHandler
-
-errorHandler :: Exception -> IO ()
-errorHandler e =
-  case justErrors e of
-    Just t -> putStrLn ("error " ++ show t)
-    _     -> return ()
+mayBomb x = catchJust errorCalls x (\e -> putStrLn ("error " ++ show e))
 
 test :: Show a => String -> String -> a -> IO ()
 test test_nm expected val = do