diff options
author | Joachim Breitner <mail@joachim-breitner.de> | 2014-03-12 11:15:16 +0100 |
---|---|---|
committer | Joachim Breitner <mail@joachim-breitner.de> | 2014-03-12 12:48:20 +0100 |
commit | 7f919dec1579641bbcd02978a0038c8a3723d8b7 (patch) | |
tree | f34640ba0646be6a554fa22c1c953970dae07dfb /testsuite/tests/callarity | |
parent | d793a148917aa62e8860ffd7b66936d41bfa5737 (diff) | |
download | haskell-7f919dec1579641bbcd02978a0038c8a3723d8b7.tar.gz |
Call Arity: Resurrect fakeBoringCalls
(Otherwise the analysis was wrong, as covered by the new test case.)
Diffstat (limited to 'testsuite/tests/callarity')
-rw-r--r-- | testsuite/tests/callarity/unittest/CallArity1.hs | 4 | ||||
-rw-r--r-- | testsuite/tests/callarity/unittest/CallArity1.stderr | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/testsuite/tests/callarity/unittest/CallArity1.hs b/testsuite/tests/callarity/unittest/CallArity1.hs index 8a142d54c7..6dd6182897 100644 --- a/testsuite/tests/callarity/unittest/CallArity1.hs +++ b/testsuite/tests/callarity/unittest/CallArity1.hs @@ -163,6 +163,10 @@ exprs = , (n, Var go `mkApps` [d `mkLApps` [1]]) , (go, mkLams [x] $ mkACase (Var n) (Var go `mkApps` [Var n `mkVarApps` [x]]) ) ]) $ Var go `mkApps` [mkLit 0, go `mkLApps` [0,1]] + , ("a thunk (non-function-type) co-calls with the body (d 1 would be bad)",) $ + mkLet d (f `mkLApps` [0]) $ + mkLet x (d `mkLApps` [1]) $ + Var d `mkVarApps` [x] ] main = do diff --git a/testsuite/tests/callarity/unittest/CallArity1.stderr b/testsuite/tests/callarity/unittest/CallArity1.stderr index d5d7d91f77..c331a64549 100644 --- a/testsuite/tests/callarity/unittest/CallArity1.stderr +++ b/testsuite/tests/callarity/unittest/CallArity1.stderr @@ -78,3 +78,6 @@ a thunk (function type), in mutual recursion, still calls once, d part of mutual go 1 d 1 n 0 +a thunk (non-function-type) co-calls with the body (d 1 would be bad): + x 0 + d 0 |