diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc112.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/tc112.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc112.hs b/testsuite/tests/typecheck/should_compile/tc112.hs new file mode 100644 index 0000000000..d588d0e698 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/tc112.hs @@ -0,0 +1,12 @@ +{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-} + +-- !!! Functional dependencies +-- This broke an early impl of functional dependencies +-- (complaint about ambiguity) + +module ShouldCompile where + +class C a b | a -> b where f :: a -> b + +g :: (C a b, Eq b) => a -> Bool +g x = f x == f x |