Commit b51edfa4 authored by simonpj's avatar simonpj
Browse files

[project @ 2002-05-10 15:24:29 by simonpj]

More tests for type validity
parent 6f13e688
......@@ -156,3 +156,4 @@ test "tc151" { myvtc("") }
test "tc152" { myvtc("") }
test "tc153" { myvtc("") }
test "tc154" { myvtc("") }
test "tc155" { myvtc("") }
{-# OPTIONS -fglasgow-exts #-}
-- The type sig for 'test' is illegal in H98 because of the
-- partial application of the type sig.
-- But with -fglasgow-exts it should be OK because when
-- you expand the type synonyms it's just Int->Int
-- c.f should_fail/tcfail107.hs
module ShouldCompile where
type Thing m = m ()
type Const a b = a
test :: Thing (Const Int) -> Thing (Const Int)
test = test
......@@ -104,3 +104,4 @@ test "tcfail103" { vtcf("") }
test "tcfail104" { vtcf("") }
test "tcfail105" { vtcf("") }
test "tcfail106" { vtcf("") }
test "tcfail107" { vtcf("") }
-- The type sig for 'test' is illegal in H98 because of the
-- partial application of the type sig.
-- But with -fglasgow-exts it should be OK because when
-- you expand the type synonyms it's just Int->Int
-- c.f should_compile/tc155.hs
module ShouldFail where
type Thing m = m ()
type Const a b = a
test :: Thing (Const Int) -> Thing (Const Int)
test = test
tcfail107.hs:13:
Type synonym `Const' should have 2 arguments, but has been given 1
In the type: Thing (Const Int) -> Thing (Const Int)
While checking the type signature for `test'
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