summaryrefslogtreecommitdiff
path: root/testsuite/tests/parser
diff options
context:
space:
mode:
authorAdam Gundry <adam@well-typed.com>2015-10-16 13:58:52 +0100
committerAdam Gundry <adam@well-typed.com>2015-10-16 13:58:52 +0100
commit5a1b4f814f74ec1c48152d97523744518e212777 (patch)
tree7c2207ecacbd37f12c78dbcf9d4334827164e0fb /testsuite/tests/parser
parent6757950cdd8bb0af0355539987ee78401a6a8f6b (diff)
parent808bbdf08058785ae5bc59b5b4f2b04951d4cbbf (diff)
downloadhaskell-wip/orf-reboot.tar.gz
Merge remote-tracking branch 'origin/master' into wip/orf-rebootwip/orf-reboot
Conflicts: compiler/rename/RnNames.hs compiler/typecheck/TcRnMonad.hs utils/haddock
Diffstat (limited to 'testsuite/tests/parser')
-rw-r--r--testsuite/tests/parser/should_fail/ParserNoLambdaCase.stderr2
-rw-r--r--testsuite/tests/parser/should_fail/T10498a.hs14
-rw-r--r--testsuite/tests/parser/should_fail/T10498a.stderr2
-rw-r--r--testsuite/tests/parser/should_fail/T10498b.hs7
-rw-r--r--testsuite/tests/parser/should_fail/T10498b.stderr2
-rw-r--r--testsuite/tests/parser/should_fail/T8430.stderr1
-rw-r--r--testsuite/tests/parser/should_fail/all.T2
-rw-r--r--testsuite/tests/parser/should_fail/readFail020.stderr3
8 files changed, 30 insertions, 3 deletions
diff --git a/testsuite/tests/parser/should_fail/ParserNoLambdaCase.stderr b/testsuite/tests/parser/should_fail/ParserNoLambdaCase.stderr
index 5a3f1cc080..5eb8b539a3 100644
--- a/testsuite/tests/parser/should_fail/ParserNoLambdaCase.stderr
+++ b/testsuite/tests/parser/should_fail/ParserNoLambdaCase.stderr
@@ -1,2 +1,2 @@
-ParserNoLambdaCase.hs:3:5: parse error: naked lambda expression ''
+ParserNoLambdaCase.hs:3:6: error: parse error on input ‘case’
diff --git a/testsuite/tests/parser/should_fail/T10498a.hs b/testsuite/tests/parser/should_fail/T10498a.hs
new file mode 100644
index 0000000000..5a9656f254
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/T10498a.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE LambdaCase #-}
+module T10498a where
+
+-- ghc-7.10 would show the unhelpful error message:
+--
+-- T10498a.hs:10:5:
+-- parse error in if statement: missing required else clause
+
+foo =
+ if True
+ then
+ \case ->
+ 1 -> 2
+ else id
diff --git a/testsuite/tests/parser/should_fail/T10498a.stderr b/testsuite/tests/parser/should_fail/T10498a.stderr
new file mode 100644
index 0000000000..8b866f35f2
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/T10498a.stderr
@@ -0,0 +1,2 @@
+
+T10498a.hs:12:15: error: parse error on input ‘->’
diff --git a/testsuite/tests/parser/should_fail/T10498b.hs b/testsuite/tests/parser/should_fail/T10498b.hs
new file mode 100644
index 0000000000..19b62af5aa
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/T10498b.hs
@@ -0,0 +1,7 @@
+module T10498b where
+
+-- ghc-7.10 would show the unhelpful error message:
+--
+-- T10498b.hs:7:5: parse error in if statement: naked if statement
+
+f = if module then True else False
diff --git a/testsuite/tests/parser/should_fail/T10498b.stderr b/testsuite/tests/parser/should_fail/T10498b.stderr
new file mode 100644
index 0000000000..e15343b891
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/T10498b.stderr
@@ -0,0 +1,2 @@
+
+T10498b.hs:7:8: error: parse error on input ‘module’
diff --git a/testsuite/tests/parser/should_fail/T8430.stderr b/testsuite/tests/parser/should_fail/T8430.stderr
index 2d7b703e51..5bfc8a40c0 100644
--- a/testsuite/tests/parser/should_fail/T8430.stderr
+++ b/testsuite/tests/parser/should_fail/T8430.stderr
@@ -1,2 +1,3 @@
T8430.lhs line 3: unlit: spurious \end{code}
+`unlit' failed in phase `Literate pre-processor'. (Exit code: 1)
diff --git a/testsuite/tests/parser/should_fail/all.T b/testsuite/tests/parser/should_fail/all.T
index 33da7217a7..13fb7385a2 100644
--- a/testsuite/tests/parser/should_fail/all.T
+++ b/testsuite/tests/parser/should_fail/all.T
@@ -91,3 +91,5 @@ test('T9225', normal, compile_fail, [''])
test('T10196Fail1', normal, compile_fail, [''])
test('T10196Fail2', normal, compile_fail, [''])
test('T10196Fail3', expect_broken(10196), compile_fail, [''])
+test('T10498a', normal, compile_fail, [''])
+test('T10498b', normal, compile_fail, [''])
diff --git a/testsuite/tests/parser/should_fail/readFail020.stderr b/testsuite/tests/parser/should_fail/readFail020.stderr
index 0c00cdc79b..0697604181 100644
--- a/testsuite/tests/parser/should_fail/readFail020.stderr
+++ b/testsuite/tests/parser/should_fail/readFail020.stderr
@@ -1,3 +1,2 @@
-readFail020.hs:3:5:
- parse error in let binding: missing required 'in'
+readFail020.hs:3:16: error: parse error on input ‘}’