[project @ 2001-04-10 15:54:31 by qrczak]
[ghc-hetmet.git] / ghc / tests / lib / should_run / enum01.hs
index 197c401..d8a6eda 100644 (file)
@@ -81,7 +81,7 @@ main = do
   OK - on with the regression testing.
 -}
 
-#define printTest(x) (do{ putStr ( "    " ++ #x ++ " = " ) ; print (x) })
+#define printTest(x) (do{ putStr ( "    " ++ "x" ++ " = " ) ; print (x) })
 
 
 testEnumInt :: IO ()
@@ -480,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