Add test case for #8917
authorRichard Eisenberg <eir@cis.upenn.edu>
Sat, 22 Mar 2014 16:34:40 +0000 (12:34 -0400)
committerRichard Eisenberg <eir@cis.upenn.edu>
Sat, 22 Mar 2014 22:38:41 +0000 (18:38 -0400)
testsuite/tests/ghci/scripts/T8917.hs [new file with mode: 0644]
testsuite/tests/ghci/scripts/T8917.script [new file with mode: 0644]
testsuite/tests/ghci/scripts/T8917.stdout [new file with mode: 0644]
testsuite/tests/ghci/scripts/all.T

diff --git a/testsuite/tests/ghci/scripts/T8917.hs b/testsuite/tests/ghci/scripts/T8917.hs
new file mode 100644 (file)
index 0000000..b16d928
--- /dev/null
@@ -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 (file)
index 0000000..e79ac31
--- /dev/null
@@ -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 (file)
index 0000000..8426b6a
--- /dev/null
@@ -0,0 +1,4 @@
+Zero + Succ Zero :: Nat
+= 'Succ 'Zero
+Succ (Zero + Zero) :: Nat
+= 'Succ 'Zero
index 0181c2d..d41d985 100755 (executable)
@@ -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'])