diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc144.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/tc144.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc144.hs b/testsuite/tests/typecheck/should_compile/tc144.hs new file mode 100644 index 0000000000..29185c8bc4 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/tc144.hs @@ -0,0 +1,15 @@ +{-# LANGUAGE ImplicitParams, Rank2Types #-} + +-- Rank-2 types with implicit parameters. +-- GHC 5.02 erroneously rejected this + +module ShouldCompile where + + f :: ((?param :: a) => b) -> a -> b + f foo a = let ?param = a in foo + + g :: (?param :: a) => a + g = ?param + + h :: a -> a + h = f g |