summaryrefslogtreecommitdiff
path: root/testsuite/tests/indexed-types/should_compile/ColInference6.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/indexed-types/should_compile/ColInference6.hs')
-rw-r--r--testsuite/tests/indexed-types/should_compile/ColInference6.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/indexed-types/should_compile/ColInference6.hs b/testsuite/tests/indexed-types/should_compile/ColInference6.hs
new file mode 100644
index 0000000000..9273632e2b
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_compile/ColInference6.hs
@@ -0,0 +1,13 @@
+{-# LANGUAGE TypeFamilies #-}
+
+module ColInference6 where
+
+type family Elem c
+
+type instance Elem [e] = e
+
+class Col c where
+ toList :: c -> [Elem c]
+
+
+sumCol c = sum . toList $ c