Commit 2acb5952 authored by simonmar's avatar simonmar

[project @ 2001-12-10 15:22:12 by simonmar]

Test that the instances of enumFrom for the basic numeric types are
strict (only Int is at the moment, so this is an expected failure).
parent 681a88a7
......@@ -12,6 +12,7 @@ test "dynamic002" { lang_vtr("","","") }
test "enum01" { lang_vtr("-cpp","","") }
test "enum02" { lang_vtr("-cpp","","") }
test "enum03" { lang_vtr("-cpp","","") }
test "enum04" { $expect = "fail" lang_vtr("","","") }
test "exceptions001" { lang_vtr("","","") }
test "list001" { lang_vtr("","","") }
test "memo001" { lang_vtr("-package util","+RTS -A10k -G1 -RTS","") }
......
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")
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