[commit: ghc] wip/nested-cpr: Add a testcase with an infinite CPR property (868496a)

git at git.haskell.org git at git.haskell.org
Tue Feb 4 18:27:22 UTC 2014


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

On branch  : wip/nested-cpr
Link       : http://ghc.haskell.org/trac/ghc/changeset/868496a83120fc8cab33f7d92692ea4c6da608fa/ghc

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

commit 868496a83120fc8cab33f7d92692ea4c6da608fa
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Fri Jan 17 09:48:39 2014 +0000

    Add a testcase with an infinite CPR property


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

868496a83120fc8cab33f7d92692ea4c6da608fa
 testsuite/tests/stranal/sigs/InfiniteCPR.hs                  |   10 ++++++++++
 .../sigs/{StrAnalExample.stderr => InfiniteCPR.stderr}       |    2 +-
 testsuite/tests/stranal/sigs/all.T                           |    1 +
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/testsuite/tests/stranal/sigs/InfiniteCPR.hs b/testsuite/tests/stranal/sigs/InfiniteCPR.hs
new file mode 100644
index 0000000..f814792
--- /dev/null
+++ b/testsuite/tests/stranal/sigs/InfiniteCPR.hs
@@ -0,0 +1,10 @@
+module InfiniteCPR where
+
+data Rec1 = Foo Rec2 Rec2
+data Rec2 = Bar Rec1 Rec1
+
+f a =
+    let x = Foo a y
+        y = Bar x x
+    in x
+
diff --git a/testsuite/tests/stranal/sigs/StrAnalExample.stderr b/testsuite/tests/stranal/sigs/InfiniteCPR.stderr
similarity index 63%
copy from testsuite/tests/stranal/sigs/StrAnalExample.stderr
copy to testsuite/tests/stranal/sigs/InfiniteCPR.stderr
index dbe4770..70a3cdf 100644
--- a/testsuite/tests/stranal/sigs/StrAnalExample.stderr
+++ b/testsuite/tests/stranal/sigs/InfiniteCPR.stderr
@@ -1,5 +1,5 @@
 
 ==================== Strictness signatures ====================
-StrAnalExample.foo: <S,1*U>
+InfiniteCPR.f: <L,U>m(,m(tm(,),tm(,)))
 
 
diff --git a/testsuite/tests/stranal/sigs/all.T b/testsuite/tests/stranal/sigs/all.T
index 81a8d4b..7fde06b 100644
--- a/testsuite/tests/stranal/sigs/all.T
+++ b/testsuite/tests/stranal/sigs/all.T
@@ -16,3 +16,4 @@ test('UnsatFun', normal, compile, [''])
 test('BottomFromInnerLambda', normal, compile, [''])
 test('DmdAnalGADTs', normal, compile, [''])
 test('CaseBinderCPR', normal, compile, [''])
+test('InfiniteCPR', normal, compile, [''])



More information about the ghc-commits mailing list