[commit: ghc] master: Add test case for #8917 (4779602)

git at git.haskell.org git at git.haskell.org
Sat Mar 22 22:39:48 UTC 2014


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/47796026ca35a2438f7a7dc337add2ec3b14f06c/ghc

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

commit 47796026ca35a2438f7a7dc337add2ec3b14f06c
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date:   Sat Mar 22 12:34:40 2014 -0400

    Add test case for #8917


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

47796026ca35a2438f7a7dc337add2ec3b14f06c
 testsuite/tests/ghci/scripts/T8917.hs     |    8 ++++++++
 testsuite/tests/ghci/scripts/T8917.script |    4 ++++
 testsuite/tests/ghci/scripts/T8917.stdout |    4 ++++
 testsuite/tests/ghci/scripts/all.T        |    1 +
 4 files changed, 17 insertions(+)

diff --git a/testsuite/tests/ghci/scripts/T8917.hs b/testsuite/tests/ghci/scripts/T8917.hs
new file mode 100644
index 0000000..b16d928
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T8917.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE DataKinds, PolyKinds, TypeFamilies, TypeOperators #-}
+
+module T8917 where
+
+data Nat = Zero | Succ Nat
+type family a + b where
+  Zero + a = a
+  (Succ n) + m = Succ (n + m)
diff --git a/testsuite/tests/ghci/scripts/T8917.script b/testsuite/tests/ghci/scripts/T8917.script
new file mode 100644
index 0000000..e79ac31
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T8917.script
@@ -0,0 +1,4 @@
+:load T8917
+:seti -XDataKinds -XTypeOperators
+:kind! Zero + Succ Zero
+:kind! Succ (Zero + Zero)
\ No newline at end of file
diff --git a/testsuite/tests/ghci/scripts/T8917.stdout b/testsuite/tests/ghci/scripts/T8917.stdout
new file mode 100644
index 0000000..8426b6a
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T8917.stdout
@@ -0,0 +1,4 @@
+Zero + Succ Zero :: Nat
+= 'Succ 'Zero
+Succ (Zero + Zero) :: Nat
+= 'Succ 'Zero
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index 0181c2d..d41d985 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -169,3 +169,4 @@ test('T8696', normal, ghci_script, ['T8696.script'])
 test('T8776', normal, ghci_script, ['T8776.script'])
 test('ghci059', normal, ghci_script, ['ghci059.script'])
 test('T8831', expect_broken(8831), ghci_script, ['T8831.script'])
+test('T8917', normal, ghci_script, ['T8917.script'])



More information about the ghc-commits mailing list