blob: add92e43ab5ee10a634dc8385135b657ed436af1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
{-# LANGUAGE MultiParamTypeClasses #-}
-- Tests top-level ambiguity resolution
-- This made a post-6.4 GHC fall over in TcSimplify
module ShouldFail where
class Foo a
instance Foo (a -> b)
foo :: Foo a => a -> ()
foo = undefined
class Bar a r
-- The same happens if we use fundeps:
-- class Bar a r | r -> a
bar :: Bar a r => r -> ()
bar = undefined
test = foo bar
|