summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/lib
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2010-09-03 11:38:13 +0000
committerSimon Marlow <marlowsd@gmail.com>2010-09-03 11:38:13 +0000
commite6585ca3fbb14c4b80f430d296947d622f9e4687 (patch)
treee605667e1efc4ac95522080d129baaa023918b23 /testsuite/tests/ghc-regress/lib
parent6c0be53f6afa9a0d398cda4d68f0364380e96974 (diff)
downloadhaskell-e6585ca3fbb14c4b80f430d296947d622f9e4687.tar.gz
fix enum04 - it is no longer an expected failure
Diffstat (limited to 'testsuite/tests/ghc-regress/lib')
-rw-r--r--testsuite/tests/ghc-regress/lib/should_run/all.T2
-rw-r--r--testsuite/tests/ghc-regress/lib/should_run/enum04.hs15
2 files changed, 12 insertions, 5 deletions
diff --git a/testsuite/tests/ghc-regress/lib/should_run/all.T b/testsuite/tests/ghc-regress/lib/should_run/all.T
index a5e2dcd655..651240b00c 100644
--- a/testsuite/tests/ghc-regress/lib/should_run/all.T
+++ b/testsuite/tests/ghc-regress/lib/should_run/all.T
@@ -23,7 +23,7 @@ test('dynamic002', [skip_if_fast,reqlib('packedstring')], compile_and_run, ['-p
test('enum01', skip_if_fast, compile_and_run, ['-cpp'])
test('enum02', skip_if_fast, compile_and_run, ['-cpp'])
test('enum03', skip_if_fast, compile_and_run, ['-cpp'])
-test('enum04', expect_fail, compile_and_run, [''])
+test('enum04', normal, compile_and_run, [''])
test('exceptionsrun001', normal, compile_and_run, [''])
test('exceptionsrun002', normal, compile_and_run, [''])
test('list001' , skip_if_fast, compile_and_run, [''])
diff --git a/testsuite/tests/ghc-regress/lib/should_run/enum04.hs b/testsuite/tests/ghc-regress/lib/should_run/enum04.hs
index 7bfaa0692e..fed9e8c4ef 100644
--- a/testsuite/tests/ghc-regress/lib/should_run/enum04.hs
+++ b/testsuite/tests/ghc-regress/lib/should_run/enum04.hs
@@ -1,8 +1,15 @@
+{-# LANGUAGE ScopedTypeVariables #-}
import Control.Exception
import Prelude hiding (catch)
+-- enumFrom on basic numeric types should be strict
+-- (possibly a bug in the Haskell Report: it specifies that
+-- these ops should be strict in the section on Enum, but the
+-- sample code in the Prelude doesn't agree, at least for
+-- Float and Double).
+
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")
+ catch (evaluate [error "" :: Int ..] >> return ()) (\(e::SomeException) -> putStrLn "ok1")
+ catch (evaluate [error "" :: Integer ..] >> return ()) (\(e::SomeException) -> putStrLn "ok2")
+ catch (evaluate [error "" :: Float ..] >> return ()) (\(e::SomeException) -> putStrLn "ok3")
+ catch (evaluate [error "" :: Double ..] >> return ()) (\(e::SomeException) -> putStrLn "ok4")