diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc237.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/tc237.hs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc237.hs b/testsuite/tests/typecheck/should_compile/tc237.hs new file mode 100644 index 0000000000..0eacf2e854 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/tc237.hs @@ -0,0 +1,20 @@ +{-# LANGUAGE RankNTypes, MultiParamTypeClasses, FunctionalDependencies #-} + +-- This one caught a bug in the implementation of functional +-- dependencies, where improvement must happen when +-- checking the call in 'test4' + +module ShouldCompile where + +newtype M s a = M a + +class Modular s a | s -> a + +wim :: forall a w. Integral a + => a -> (forall s. Modular s a => M s w) -> w +wim i k = error "urk" + +test4' :: (Modular s a, Integral a) => M s a +test4' = error "urk" + +test4 = wim 4 test4' |