summaryrefslogtreecommitdiff
path: root/testsuite/tests/indexed-types/should_fail/SimpleFail11b.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/indexed-types/should_fail/SimpleFail11b.hs')
-rw-r--r--testsuite/tests/indexed-types/should_fail/SimpleFail11b.hs18
1 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail11b.hs b/testsuite/tests/indexed-types/should_fail/SimpleFail11b.hs
new file mode 100644
index 0000000000..f6aa7aa3b0
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_fail/SimpleFail11b.hs
@@ -0,0 +1,18 @@
+{-# LANGUAGE TypeFamilies #-}
+
+module ShouldFail where
+
+data family C9 a b :: *
+data instance C9 Int Int = C9IntInt
+data instance C9 [a] Int = C9ListInt
+-- must fail: conflicting
+data instance C9 [a] Int = C9ListInt2
+
+type family D9 a b :: *
+type instance D9 Int Int = Int
+type instance D9 [a] Int = [a]
+-- must fail: conflicting
+type instance D9 [a] Int = Maybe a
+
+type instance D9 Int [a] = [a]
+type instance D9 Int [b] = [b] -- must not conflict!