summaryrefslogtreecommitdiff
path: root/testsuite/tests/indexed-types/should_compile/Simple13.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/indexed-types/should_compile/Simple13.hs')
-rw-r--r--testsuite/tests/indexed-types/should_compile/Simple13.hs18
1 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/indexed-types/should_compile/Simple13.hs b/testsuite/tests/indexed-types/should_compile/Simple13.hs
new file mode 100644
index 0000000000..7633f01f98
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_compile/Simple13.hs
@@ -0,0 +1,18 @@
+{-# LANGUAGE TypeFamilies #-}
+
+-- This should fail, I think, because of the loopy equality,
+-- but the error message is hopeless
+
+module Simple13 where
+
+type family F a
+
+same :: a -> a -> a
+same = undefined
+
+mkf :: a -> [F a]
+mkf p = undefined
+
+foo :: a ~ [F a] => a -> a
+foo p = same p (mkf p)
+