diff options
author | Simon Marlow <marlowsd@gmail.com> | 2010-09-03 11:38:13 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2010-09-03 11:38:13 +0000 |
commit | e6585ca3fbb14c4b80f430d296947d622f9e4687 (patch) | |
tree | e605667e1efc4ac95522080d129baaa023918b23 /testsuite/tests/ghc-regress/lib | |
parent | 6c0be53f6afa9a0d398cda4d68f0364380e96974 (diff) | |
download | haskell-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.T | 2 | ||||
-rw-r--r-- | testsuite/tests/ghc-regress/lib/should_run/enum04.hs | 15 |
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") |