summaryrefslogtreecommitdiff
path: root/testsuite/tests/indexed-types/should_compile/Simple9.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/indexed-types/should_compile/Simple9.hs')
-rw-r--r--testsuite/tests/indexed-types/should_compile/Simple9.hs18
1 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/indexed-types/should_compile/Simple9.hs b/testsuite/tests/indexed-types/should_compile/Simple9.hs
new file mode 100644
index 0000000000..4075d4845f
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_compile/Simple9.hs
@@ -0,0 +1,18 @@
+{-# LANGUAGE TypeFamilies #-}
+
+module Simple9 where
+
+-- The test succeeds with
+--
+-- type family F a b
+-- type instance F () b = Maybe b
+
+type family F a :: * -> *
+type instance F () = Maybe
+
+type family G a
+type instance G (Maybe a) = Int
+
+foo :: G (F () a) -> Int
+foo x = x
+