[commit: ghc] wip/T14068: Make the test case for #T5949 a little less bogus (4e9f2fb)

git at git.haskell.org git at git.haskell.org
Wed Aug 2 17:05:27 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/T14068
Link       : http://ghc.haskell.org/trac/ghc/changeset/4e9f2fb5cd803ba7d1730ab1a05e2e4071a44ee0/ghc

>---------------------------------------------------------------

commit 4e9f2fb5cd803ba7d1730ab1a05e2e4071a44ee0
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Wed Aug 2 11:53:26 2017 -0400

    Make the test case for #T5949 a little less bogus
    
    by actually using the result of `e`. I *believe* it still tests what we
    want to test, and now we get proper results with loopification.
    
    I am not so worried about the regression in the case of an unused result
    of `e`.


>---------------------------------------------------------------

4e9f2fb5cd803ba7d1730ab1a05e2e4071a44ee0
 testsuite/tests/perf/should_run/T5949.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testsuite/tests/perf/should_run/T5949.hs b/testsuite/tests/perf/should_run/T5949.hs
index a633aa0..689b629 100644
--- a/testsuite/tests/perf/should_run/T5949.hs
+++ b/testsuite/tests/perf/should_run/T5949.hs
@@ -53,4 +53,4 @@ e x y = x `seq` if y > 10
         else e x (y + 1)
 
 
-main = foldr (seq) 0 [e (n,0) 0| n <- [0..10000]] `seq` return ()
+main = sum [uncurry (+) (e (n,n) 0)| n <- [0..10000]] `seq` return ()



More information about the ghc-commits mailing list