diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc109.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/tc109.hs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc109.hs b/testsuite/tests/typecheck/should_compile/tc109.hs new file mode 100644 index 0000000000..0d9fdc051c --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/tc109.hs @@ -0,0 +1,19 @@ +{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, + UndecidableInstances #-} +-- UndecidableInstances because 'b' appears in the context but not the head + +module ShouldCompile where + +-- This accepted by Hugs, but not by GHC 4.08.1 +-- Reported by Thomas Hallgren Nov 00 + +class P a +class R a b | b->a + +instance (P a,R a b) => P [b] + +{- GHC 4.08.1 doesn't seem to allow variables in the context that +don't appear after the =>, but which are still ok since they are +determined by the functional dependenices. -} + + |