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
434514a7
Commit
434514a7
authored
Dec 16, 2005
by
simonpj
Browse files
[project @ 2005-12-16 14:56:50 by simonpj]
Add repeated-type-variable tests for instance constexts
parent
ae0204bf
Changes
3
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/typecheck/should_fail/all.T
View file @
434514a7
...
...
@@ -138,3 +138,4 @@ test('tcfail150', normal, compile_fail, [''])
test
('
tcfail151
',
normal
,
compile_fail
,
[''])
test
('
tcfail152
',
normal
,
compile_fail
,
[''])
test
('
tcfail153
',
normal
,
compile_fail
,
[''])
test
('
tcfail154
',
normal
,
compile_fail
,
[''])
testsuite/tests/ghc-regress/typecheck/should_fail/tcfail154.hs
0 → 100644
View file @
434514a7
{-# OPTIONS -fglasgow-exts #-}
module
ShouldFail
where
data
T
a
=
MkT
class
C
a
b
where
op
::
T
a
->
T
b
->
Bool
-- Repeated type variable in an instance constraint
-- should require -fallow-undecidable-instances
instance
C
a
a
=>
Eq
(
T
a
)
where
(
==
)
=
op
testsuite/tests/ghc-regress/typecheck/should_fail/tcfail154.stderr
0 → 100644
View file @
434514a7
tcfail154.hs:12:0:
Non-type variables, or repeated type variables,
in the constraint: C a a
(Use -fallow-undecidable-instances to permit this)
In the context: (C a a)
While checking the context of an instance declaration
In the instance declaration for `Eq (T a)'
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