Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
d0ad02cb
Commit
d0ad02cb
authored
Mar 15, 2005
by
simonpj
Browse files
[project @ 2005-03-15 15:41:56 by simonpj]
Add new GADT tests
parent
98f34fe9
Changes
5
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/gadt/all.T
View file @
d0ad02cb
...
...
@@ -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
,
[''])
...
...
testsuite/tests/ghc-regress/gadt/gadt10.hs
0 → 100644
View file @
d0ad02cb
{-# OPTIONS -fglasgow-exts #-}
module
ShouldFail
where
-- Kind error
data
RInt
a
where
R
::
RInt
testsuite/tests/ghc-regress/gadt/gadt10.stderr
0 → 100644
View file @
d0ad02cb
gadt10.hs:6:23:
Kind error: `RInt' is not applied to enough type arguments
In the data type declaration for `RInt'
testsuite/tests/ghc-regress/gadt/gadt11.hs
0 → 100644
View file @
d0ad02cb
{-# OPTIONS -fglasgow-exts #-}
module
ShouldFail
where
-- Wrong return type
data
X
f
=
X
(
f
()
)
data
B
a
where
B1
::
X
[]
B2
::
B
[
Int
]
testsuite/tests/ghc-regress/gadt/gadt11.stderr
0 → 100644
View file @
d0ad02cb
gadt11.hs:8:0:
Data constructor `B1' returns type `X' instead of its parent type
When checking the data constructor: B1
In the data type declaration for `B'
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment