summaryrefslogtreecommitdiff
path: root/testsuite/tests/indexed-types/should_compile/T3023.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/indexed-types/should_compile/T3023.hs')
-rw-r--r--testsuite/tests/indexed-types/should_compile/T3023.hs17
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/indexed-types/should_compile/T3023.hs b/testsuite/tests/indexed-types/should_compile/T3023.hs
new file mode 100644
index 0000000000..26966daed7
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_compile/T3023.hs
@@ -0,0 +1,17 @@
+{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, UndecidableInstances #-}
+{-# OPTIONS_GHC -fwarn-missing-signatures #-}
+
+module Bug where
+
+class C a b | a -> b, b -> a where
+ f :: a -> b
+
+instance C Int Bool where
+ f = undefined
+instance (C a c, C b d) => C (a -> b) (c -> d) where
+ f = undefined
+
+foo :: Int -> Int
+foo = undefined
+
+bar = f foo