Bump `base` version to 4.9.0.0 (closes #11026)
[ghc.git] / testsuite / tests / typecheck / should_fail / tcfail142.hs
1 {-# LANGUAGE MultiParamTypeClasses #-}
2
3 -- Tests top-level ambiguity resolution
4 -- This made a post-6.4 GHC fall over in TcSimplify
5
6 module ShouldFail where
7
8 class Foo a
9 instance Foo (a -> b)
10
11 foo :: Foo a => a -> ()
12 foo = undefined
13
14 class Bar a r
15 -- The same happens if we use fundeps:
16 -- class Bar a r | r -> a
17
18 bar :: Bar a r => r -> ()
19 bar = undefined
20
21 test = foo bar