summaryrefslogtreecommitdiff
path: root/testsuite/tests/indexed-types/should_fail/T21896.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/indexed-types/should_fail/T21896.hs')
-rw-r--r--testsuite/tests/indexed-types/should_fail/T21896.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/testsuite/tests/indexed-types/should_fail/T21896.hs b/testsuite/tests/indexed-types/should_fail/T21896.hs
new file mode 100644
index 0000000000..64ce18d023
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_fail/T21896.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE NoImplicitPrelude #-}
+{-# LANGUAGE DataKinds, TypeFamilies, TypeFamilyDependencies, PolyKinds #-}
+module Bug where
+
+data T = Foo | Bar
+
+type family F (ns :: T) (ret :: k) = (r :: k) | r -> ret where
+ F Foo r = r
+ F Bar r = r