summaryrefslogtreecommitdiff
path: root/testsuite/tests/parser/should_fail
diff options
context:
space:
mode:
authorRupert Horlick <ruperthorlick@gmail.com>2017-03-02 16:35:31 -0500
committerBen Gamari <ben@smart-cactus.org>2017-03-02 19:58:01 -0500
commit4b1f0721ce164d079848d1f8890630dbbf4cbf7a (patch)
tree4f30c8a9afe63421c92bbdb7fcadee003c2a1ee8 /testsuite/tests/parser/should_fail
parent27bf6b6857b181cd70402829a10d78e8d205962f (diff)
downloadhaskell-4b1f0721ce164d079848d1f8890630dbbf4cbf7a.tar.gz
Add suggestion for PatternSynonyms parse error (fixes #12429)
Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3261
Diffstat (limited to 'testsuite/tests/parser/should_fail')
-rw-r--r--testsuite/tests/parser/should_fail/T12429.hs3
-rw-r--r--testsuite/tests/parser/should_fail/T12429.stderr7
-rw-r--r--testsuite/tests/parser/should_fail/all.T1
3 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/parser/should_fail/T12429.hs b/testsuite/tests/parser/should_fail/T12429.hs
new file mode 100644
index 0000000000..3e0496b458
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/T12429.hs
@@ -0,0 +1,3 @@
+module X where
+ import Data.Text (pattern Y)
+ x = 3
diff --git a/testsuite/tests/parser/should_fail/T12429.stderr b/testsuite/tests/parser/should_fail/T12429.stderr
new file mode 100644
index 0000000000..fde11ec5eb
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/T12429.stderr
@@ -0,0 +1,7 @@
+
+testsuite/tests/parser/should_fail/T12429.hs:2:29: error:
+ parse error on input ‘Y’
+ Perhaps you intended to use PatternSynonyms
+ |
+2 | import Data.Text (pattern Y)
+ | ^
diff --git a/testsuite/tests/parser/should_fail/all.T b/testsuite/tests/parser/should_fail/all.T
index ca23d3b5b6..e515e2fd6b 100644
--- a/testsuite/tests/parser/should_fail/all.T
+++ b/testsuite/tests/parser/should_fail/all.T
@@ -94,3 +94,4 @@ test('T10196Fail2', normal, compile_fail, [''])
test('T10498a', normal, compile_fail, [''])
test('T10498b', normal, compile_fail, [''])
test('T12051', normal, compile_fail, [''])
+test('T12429', normal, compile_fail, [''])