Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Fumiaki Kinoshita
GHC
Commits
f0022b77
Commit
f0022b77
authored
Feb 06, 2007
by
simonpj
Browse files
Add test for Trac #1128
parent
d5c903e2
Changes
3
Show whitespace changes
Inline
Sidebyside
testsuite/tests/ghcregress/typecheck/should_fail/all.T
View file @
f0022b77
...
...
@@ 159,4 +159,5 @@ test('tcfail170', normal, compile_fail, [''])
test
('
tcfail171
',
normal
,
compile_fail
,
[''])
test
('
tcfail172
',
normal
,
compile_fail
,
[''])
test
('
tcfail173
',
normal
,
compile_fail
,
[''])
test
('
tcfail174
',
normal
,
compile_fail
,
[''])
testsuite/tests/ghcregress/typecheck/should_fail/tcfail174.hs
0 → 100644
View file @
f0022b77
{# OPTIONS fglasgowexts #}
module
Foo
where
data
Capture
a
=
Base
a

Capture
(
Capture
(
forall
x
.
x
>
a
))
g
::
Capture
(
forall
a
.
a
>
a
)
g
=
Base
id
 This function should definitely be rejected, with or without type signature
h1
=
Capture
g
h2
::
Capture
b
h2
=
Capture
g
testsuite/tests/ghcregress/typecheck/should_fail/tcfail174.stderr
0 → 100644
View file @
f0022b77
tcfail174.hs:13:13:
Inferred type is less polymorphic than expected
Quantified type variable `a' escapes
When matching `forall a. a > a'
and `forall a. a > a1'
Expected type: Capture (forall x. x > a)
Inferred type: Capture (forall a2. a2 > a2)
In the first argument of `Capture', namely `g'
tcfail174.hs:16:13:
Couldn't match expected type `b' (a rigid variable)
against inferred type `a' (a rigid variable)
`b' is bound by the type signature for `h2' at tcfail174.hs:15:14
When matching `forall a. a > a'
and `forall a. a > b'
Expected type: Capture (forall x. x > b)
Inferred type: Capture (forall a1. a1 > a1)
In the first argument of `Capture', namely `g'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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