Commit 7650de57 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Add scoped tyvar test

parent 4f4f12e5
......@@ -142,3 +142,4 @@ test('tcfail154', normal, compile_fail, [''])
test('tcfail155', normal, compile_fail, [''])
test('tcfail156', normal, compile_fail, [''])
test('tcfail157', normal, compile_fail, [''])
test('tcfail158', normal, compile_fail, [''])
{-# OPTIONS_GHC -fglasgow-exts #-}
-- This one actually crashed in 6.4.1
-- There's a kind error in the signature for bar,
-- and we were recovering, and then crashing when we found
-- a scoped type variable not in scope
data Val v sm = Val
foo :: forall v sm. Val v sm
foo = undefined
where foo1 :: Val v sm
foo1 = bar
-- Correct type signature: bar :: forall v sm. Val v sm
bar :: forall v. Val v
bar = undefined foo
tcfail158.hs:14:18:
`Val v' is not applied to enough type arguments
Expected kind `*', but `Val v' has kind `* -> *'
In the type `forall v. Val v'
In the type signature for `bar':
bar :: forall v. Val v
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment