Commit 7a5083fb authored by simonpj's avatar simonpj
Browse files

[project @ 2002-02-07 13:56:56 by simonpj]

Add test for stangely-kinded tyvar default
parent 6cc8a8ec
......@@ -146,3 +146,5 @@ test "tc141" { myvtc("") }
test "tc142" { myvtc("") }
test "tc143" { myvtc("") }
test "tc144" { myvtc("") }
test "tc145" { myvtc("") }
test "tc146" { myvtc("") }
{-# OPTIONS -fglasgow-exts #-}
-- Test two slightly exotic things about type signatures
module ShouldCompile where
-- The for-all hoisting should hoist the
-- implicit parameter to give
-- r :: (?param::a) => a
r :: Int -> ((?param :: a) => a)
r = error "urk"
-- The unboxed tuple is OK because it is
-- used on the right hand end of an arrow
type T = (# Int, Int #)
f :: Int -> T
f = error "urk"
{-# OPTIONS -fglasgow-exts #-}
-- The interesting thign about this one is that
-- there's an unbound type variable of kind *->*
-- that the typechecker should default to some
-- arbitrary type.
--
-- GHC 5.02 could only really deal with such things
-- of kind *, but 5.03 extended that to *->..->*
-- Still not complete, but a lot better.
module ShouldCompile where
f :: (forall a b . a b -> int) -> (forall c . c int) -> int
f x y = x y
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