Commit 20c553c7 authored by simonpj's avatar simonpj
Browse files

[project @ 2002-06-21 13:10:45 by simonpj]

Add tc157
parent 6d126a13
......@@ -158,3 +158,4 @@ test "tc153" { myvtc("") }
test "tc154" { myvtc("") }
test "tc155" { myvtc("") }
test "tc156" { myvtc("") }
test "tc157" { myvtc("") }
{-# OPTIONS -fglasgow-exts #-}
-- Test silly type synonyms
module ShouldCompile where
type C u a = u -- Note 'a' unused
foo :: (forall a. C u a -> C u a) -> u
foo x = undefined x
bar :: Num u => u
bar = foo (\t -> t + t)
-- The (Num u) should not get trapped inside the
-- /\a-abstraction which the compiler constructs for
-- the arg to foo. But it might because it's Num (C u a)!
-- This test tickles a bizarre corner case documented
-- as [Silly Type Synonym] in TcMType.lhs
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