tc186.hs 362 Bytes
Newer Older
1 2 3 4 5 6

-- Killed 6.2.2
-- The trouble was that 1 was instantiated to a type (t::?)
-- and the constraint (Foo (t::? -> s::*)) didn't match Foo (a::* -> b::*).
-- Solution is to zap the expected type in TcEpxr.tc_expr(HsOverLit). 

7
module ShouldCompile where
8 9 10 11 12 13 14 15 16

class Foo a where
     foo :: a

instance Foo (a -> b) where
     foo = error "urk"

test :: ()
test = foo 1