Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
obsidiansystems
GHC
Commits
d1e9f827
Commit
d1e9f827
authored
Dec 23, 2015
by
Simon Peyton Jones
Browse files
Update tests for Trac #11039
parent
cb989e2f
Changes
4
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/patsyn/should_fail/T11039.hs
View file @
d1e9f827
{-# LANGUAGE PatternSynonyms #-}
module
Foo
()
where
module
T11039
where
data
A
a
=
A
a
-- This should fail
pattern
Q
::
()
=>
(
A
~
f
)
=>
a
->
f
a
pattern
Q
a
=
A
a
testsuite/tests/patsyn/should_fail/T11039.stderr
0 → 100644
View file @
d1e9f827
T11039.hs:8:15: error:
• Couldn't match type ‘f’ with ‘A’
‘f’ is a rigid type variable bound by
the type signature for pattern synonym ‘Q’:
forall (f :: * -> *) a. a -> f a
at T11039.hs:7:14
Expected type: f a
Actual type: A a
• In the pattern: A a
In the declaration for pattern synonym ‘Q’
testsuite/tests/patsyn/should_fail/T11039a.hs
0 → 100644
View file @
d1e9f827
{-# LANGUAGE PatternSynonyms #-}
module
T11039a
where
data
A
a
=
A
a
-- This should succeed
pattern
Q2
::
(
A
~
f
)
=>
a
->
f
a
pattern
Q2
a
=
A
a
testsuite/tests/patsyn/should_fail/all.T
View file @
d1e9f827
...
...
@@ -16,7 +16,8 @@ test('records-mixing-fields', normal, compile_fail, [''])
test
('
records-exquant
',
normal
,
compile_fail
,
[''])
test
('
records-poly-update
',
normal
,
compile_fail
,
[''])
test
('
mixed-pat-syn-record-sels
',
normal
,
compile_fail
,
[''])
test
('
T11039
',
[
expect_broken
(
11039
)],
compile_fail
,
[''])
test
('
T11039
',
normal
,
compile_fail
,
[''])
test
('
T11039a
',
normal
,
compile
,
[''])
test
('
export-type
',
normal
,
compile_fail
,
[''])
test
('
export-syntax
',
normal
,
compile_fail
,
[''])
test
('
import-syntax
',
normal
,
compile_fail
,
[''])
...
...
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