[commit: ghc] master: Modify spec002 to be less trivial (2e33b9c)
git at git.haskell.org
git at git.haskell.org
Thu Jul 30 14:34:43 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/2e33b9c87615d3cc26ad188d5ca565e8a981208e/ghc
>---------------------------------------------------------------
commit 2e33b9c87615d3cc26ad188d5ca565e8a981208e
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Tue Jul 28 22:24:46 2015 +0100
Modify spec002 to be less trivial
As it stood the main function in the test always returned
bottom, and GHC noticed that and therefore made no attempt
to optimise it, which rather negated the test.
This change makes it non-vacuous.
>---------------------------------------------------------------
2e33b9c87615d3cc26ad188d5ca565e8a981208e
testsuite/tests/simplCore/should_compile/spec002.hs | 1 +
1 file changed, 1 insertion(+)
diff --git a/testsuite/tests/simplCore/should_compile/spec002.hs b/testsuite/tests/simplCore/should_compile/spec002.hs
index 1fb88d9..106debc 100644
--- a/testsuite/tests/simplCore/should_compile/spec002.hs
+++ b/testsuite/tests/simplCore/should_compile/spec002.hs
@@ -13,5 +13,6 @@ laLayout :: Int -> [Int] -> [Token] -> [Token]
laLayout l (s:ss) (t1@(l1, n1, w1, c1) :
t2@(l2, n2, w2, c2) : ts)
| n1 < s = laLayout l2 (n2:s:ss) ts
+ | n1 == s = [] -- Otherwise laLayout is bottom!
| otherwise = laLayout l ss (t1:t2:ts)
More information about the ghc-commits
mailing list