summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/typecheck/should_compile/tc186.hs
blob: 79bd42e8618d0b42bd0d7b0113d7f05ba6e9b5b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

-- 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). 

module ShoudlCompile where

class Foo a where
     foo :: a

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

test :: ()
test = foo 1