Commit dd7655da authored by simonpj's avatar simonpj
Browse files

[project @ 2002-03-25 15:12:45 by simonpj]

rank-n tests
parent f814ffff
...@@ -151,3 +151,4 @@ test "tc146" { myvtc("") } ...@@ -151,3 +151,4 @@ test "tc146" { myvtc("") }
test "tc147" { myvtc("") } test "tc147" { myvtc("") }
test "tc148" { myvtc("") } test "tc148" { myvtc("") }
test "tc149" { myvtc("") } test "tc149" { myvtc("") }
test "tc150" { myvtc("") }
{-# OPTIONS -fglasgow-exts #-}
module ShouldCompile where
f v = (\ (x :: forall a. a->a) -> x) id 'c'
...@@ -101,3 +101,4 @@ test "tcfail100" { vtcf("") } ...@@ -101,3 +101,4 @@ test "tcfail100" { vtcf("") }
test "tcfail101" { vtcf("") } test "tcfail101" { vtcf("") }
test "tcfail102" { vtcf("") } test "tcfail102" { vtcf("") }
test "tcfail103" { vtcf("") } test "tcfail103" { vtcf("") }
test "tcfail104" { vtcf("") }
{-# OPTIONS -fglasgow-exts #-}
-- Test the handling of conditionals in rank-n stuff
-- Should fail, regardless of branch ordering
module ShouldFail where
f v = (if v then
(\ (x :: forall a. a->a) -> x)
else
(\ x -> x)
) id 'c'
g v = (if v then
(\ (x :: forall a. a->a) -> x)
else
(\ x -> x)
) id 'c'
tcfail104.hs:9:
Inferred type is less polymorphic than expected
Quantified type variable `a' escapes
Expected type: forall a1. a1 -> a1
Inferred type: a -> a
When checking the pattern: x :: forall a. a -> a
In a lambda abstraction: (x :: forall a. a -> a) -> x
tcfail104.hs:15:
Inferred type is less polymorphic than expected
Quantified type variable `a' escapes
Expected type: forall a1. a1 -> a1
Inferred type: a -> a
When checking the pattern: x :: forall a. a -> a
In a lambda abstraction: (x :: forall a. a -> a) -> x
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