summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc116.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc116.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/tc116.hs18
1 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc116.hs b/testsuite/tests/typecheck/should_compile/tc116.hs
new file mode 100644
index 0000000000..eb93410bed
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/tc116.hs
@@ -0,0 +1,18 @@
+{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies,
+ FlexibleInstances #-}
+-- !!! Functional dependencies
+-- This broke an early impl of functional dependencies
+-- (caused a panic)
+
+module ShouldCompile where
+
+class Foo r a | r -> a where
+ foo :: r -> a
+
+instance Foo [m a] (m a)
+
+bad:: Monad m => m a
+bad = foo bar
+
+bar:: [m a]
+bar = []