Improve error messages around kind mismatches.
[ghc.git] / testsuite / tests / typecheck / should_fail / tcfail158.hs
1 {-# LANGUAGE ExplicitForAll #-}
2
3 -- This one actually crashed in 6.4.1
4 -- There's a kind error in the signature for bar,
5 -- and we were recovering, and then crashing when we found
6 -- a scoped type variable not in scope
7
8 data Val v sm = Val
9 foo :: forall v sm. Val v sm
10 foo = undefined
11 where foo1 :: Val v sm
12 foo1 = bar
13 -- Correct type signature: bar :: forall v sm. Val v sm
14 bar :: forall v. Val v
15 bar = undefined foo