Repository : ssh://darcs.haskell.org//srv/darcs/testsuite On branch : master
http://hackage.haskell.org/trac/ghc/changeset/8c59c292d554e0071b8629d5d7ec202c21872659 >--------------------------------------------------------------- commit 8c59c292d554e0071b8629d5d7ec202c21872659 Author: Simon Peyton Jones <[email protected]> Date: Wed Nov 16 12:01:16 2011 +0000 Test Trac #5587 >--------------------------------------------------------------- tests/simplCore/should_run/T5587.hs | 30 ++++++++++++++++++++++++++++++ tests/simplCore/should_run/T5587.stderr | 1 + tests/simplCore/should_run/all.T | 1 + 3 files changed, 32 insertions(+), 0 deletions(-) diff --git a/tests/simplCore/should_run/T5587.hs b/tests/simplCore/should_run/T5587.hs new file mode 100644 index 0000000..4909154 --- /dev/null +++ b/tests/simplCore/should_run/T5587.hs @@ -0,0 +1,30 @@ +{-# OPTIONS_GHC -fpedantic-bottoms #-} +-- The pedantic-bottom flag makes GHC pickier about bottoms +-- See the ticket #5587 + +module Main(main) where + +hiddenError = error "hidden error" + +main = print $ seq (head (map (\a -> \b -> hiddenError) (hiddenError::[] Bool))) id [1] + +{- See notes in Trac #5587 +f a b = a +he = hiddenError::[Bool] +main = print $ seq (head (map f he)) id [1] + + +head (map f he) += head (build (\cn. foldr (mapFB c f) n he)) += (\cn. foldr (mapFB c f) n he) (\x _ -> x) badHead += foldr (mapFB (\x _ -> x) f) badHead he += let go [] = badHead + go (y:ys) = mapFB (\x _ -> x) f y (go ys) + in go he += let go [] = badHead + go (y:ys) = mapFB (\x _ -> x) f y (go ys) + = (\x _. x) (f y) (go ys) + = f y + = \b. y + in go he +-} diff --git a/tests/simplCore/should_run/T5587.stderr b/tests/simplCore/should_run/T5587.stderr new file mode 100644 index 0000000..cdf7675 --- /dev/null +++ b/tests/simplCore/should_run/T5587.stderr @@ -0,0 +1 @@ +T5587: hidden error diff --git a/tests/simplCore/should_run/all.T b/tests/simplCore/should_run/all.T index 265b4f9..fb04d89 100644 --- a/tests/simplCore/should_run/all.T +++ b/tests/simplCore/should_run/all.T @@ -52,3 +52,4 @@ test('T5603', normal, compile_and_run, ['']) # Run this test *without* optimisation too test('T5625', [ only_ways(['normal','optasm']), exit_code(1) ], compile_and_run, ['']) +test('T5587', [ only_ways(['normal','optasm']), exit_code(1) ], compile_and_run, ['']) _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
