testsuite: Assert that testsuite ways are known
[ghc.git] / testsuite / tests / typecheck / should_compile / tc161.hs
1 {-# LANGUAGE RankNTypes #-}
2 -- Blew up GHC 5.04, with:
3 -- Ambiguous type variable(s) `q' in the constraint `Foo q'
4 -- arising from a function with an overloaded argument type at Foo.hs:7
5 -- Expected type: Int -> (forall q1. (Foo q1) => q1 -> a) -> a
6 -- Inferred type: Int -> (q -> a) -> a
7 -- In the application `GHC.Err.noMethodBindingError "Foo.hs:7|Foo.foo"#'
8 --
9 -- Fix is to give wild-card args to the default methods
10 -- See TcClassDcl.mkDefMethRhs
11
12 module ShouldCompile where
13
14 class Foo a where
15 op :: Eq c => c -> (forall b. Eq b => b->b) -> a -> a
16
17 instance Foo Int