Commit d0ad02cb authored by simonpj's avatar simonpj
Browse files

[project @ 2005-03-15 15:41:56 by simonpj]

Add new GADT tests
parent 98f34fe9
......@@ -9,6 +9,8 @@ test('gadt5', normal, compile_and_run, [''])
test('gadt6', normal, compile, [''])
test('gadt7', normal, compile_fail, [''])
test('gadt8', normal, compile, [''])
test('gadt10', normal, compile_fail, [''])
test('gadt11', normal, compile_fail, [''])
test('red-black', normal, compile, [''])
test('type-rep', normal, compile_and_run, [''])
test('equal', normal, compile, [''])
{-# OPTIONS -fglasgow-exts #-}
module ShouldFail where
-- Kind error
data RInt a where R :: RInt
Kind error: `RInt' is not applied to enough type arguments
In the data type declaration for `RInt'
{-# OPTIONS -fglasgow-exts #-}
module ShouldFail where
-- Wrong return type
data X f = X (f ())
data B a where
B1 :: X []
B2 :: B [Int]
Data constructor `B1' returns type `X' instead of its parent type
When checking the data constructor: B1
In the data type declaration for `B'
Supports Markdown
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