summaryrefslogtreecommitdiff
path: root/testsuite/tests/indexed-types/should_compile/Simple12.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/indexed-types/should_compile/Simple12.hs')
-rw-r--r--testsuite/tests/indexed-types/should_compile/Simple12.hs17
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/indexed-types/should_compile/Simple12.hs b/testsuite/tests/indexed-types/should_compile/Simple12.hs
new file mode 100644
index 0000000000..c425d78db5
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_compile/Simple12.hs
@@ -0,0 +1,17 @@
+{-# LANGUAGE TypeFamilies #-}
+
+module Simple12 where
+
+type family F a
+
+same :: a -> a -> a
+same = undefined
+
+mkf :: a -> F a
+mkf p = undefined
+
+-- works with either of these signatures
+-- foo :: a ~ F a => a -> a
+-- foo :: a ~ F a => a -> F a
+foo p = same p (mkf p)
+