enum04.hs 379 Bytes
Newer Older
1 2 3 4 5 6 7 8
import Exception
import Prelude hiding (catch)

main = do 
  catch	(evaluate [error "" :: Int ..] >> return ())     (\_ -> putStrLn "ok1")
  catch	(evaluate [error "" :: Integer ..] >> return ()) (\_ -> putStrLn "ok2")
  catch	(evaluate [error "" :: Float ..] >> return ())   (\_ -> putStrLn "ok3")
  catch	(evaluate [error "" :: Double ..] >> return ())  (\_ -> putStrLn "ok4")