blob: a628b0e335add81ae22c4e527c13d6d1a84c870b (
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 GHC.Tc.Solver
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
|