[commit: ghc] ghc-7.8: Add test case for #8917 (9055d6b)

git at git.haskell.org git at git.haskell.org
Sun Mar 23 02:01:45 UTC 2014


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

On branch  : ghc-7.8
Link       : http://ghc.haskell.org/trac/ghc/changeset/9055d6b66ca93c3a576320286863c93d9f1996c5/ghc

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

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

    Add test case for #8917
    
    (cherry picked from commit 47796026ca35a2438f7a7dc337add2ec3b14f06c)


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

9055d6b66ca93c3a576320286863c93d9f1996c5
 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 7a0e17d..59a29ed 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -168,3 +168,4 @@ test('T8674', normal, ghci_script, ['T8674.script'])
 test('T8696', normal, ghci_script, ['T8696.script'])
 test('T8776', normal, ghci_script, ['T8776.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