summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/parser/should_fail/InfixAppPatErr.stderr4
-rw-r--r--testsuite/tests/parser/should_fail/T984.stderr4
-rw-r--r--testsuite/tests/parser/should_fail/all.T18
-rw-r--r--testsuite/tests/parser/should_fail/cmdFail001.hs4
-rw-r--r--testsuite/tests/parser/should_fail/cmdFail001.stderr2
-rw-r--r--testsuite/tests/parser/should_fail/cmdFail002.hs4
-rw-r--r--testsuite/tests/parser/should_fail/cmdFail002.stderr2
-rw-r--r--testsuite/tests/parser/should_fail/cmdFail003.hs8
-rw-r--r--testsuite/tests/parser/should_fail/cmdFail003.stderr3
-rw-r--r--testsuite/tests/parser/should_fail/cmdFail004.hs4
-rw-r--r--testsuite/tests/parser/should_fail/cmdFail004.stderr2
-rw-r--r--testsuite/tests/parser/should_fail/cmdFail005.hs4
-rw-r--r--testsuite/tests/parser/should_fail/cmdFail005.stderr2
-rw-r--r--testsuite/tests/parser/should_fail/cmdFail006.hs4
-rw-r--r--testsuite/tests/parser/should_fail/cmdFail006.stderr2
-rw-r--r--testsuite/tests/parser/should_fail/cmdFail007.hs7
-rw-r--r--testsuite/tests/parser/should_fail/cmdFail007.stderr4
-rw-r--r--testsuite/tests/parser/should_fail/cmdFail008.hs4
-rw-r--r--testsuite/tests/parser/should_fail/cmdFail008.stderr2
-rw-r--r--testsuite/tests/parser/should_fail/cmdFail009.hs8
-rw-r--r--testsuite/tests/parser/should_fail/cmdFail009.stderr3
-rw-r--r--testsuite/tests/parser/should_fail/patFail001.hs3
-rw-r--r--testsuite/tests/parser/should_fail/patFail001.stderr4
-rw-r--r--testsuite/tests/parser/should_fail/patFail002.hs3
-rw-r--r--testsuite/tests/parser/should_fail/patFail002.stderr2
-rw-r--r--testsuite/tests/parser/should_fail/patFail003.hs3
-rw-r--r--testsuite/tests/parser/should_fail/patFail003.stderr2
-rw-r--r--testsuite/tests/parser/should_fail/patFail004.hs3
-rw-r--r--testsuite/tests/parser/should_fail/patFail004.stderr3
-rw-r--r--testsuite/tests/parser/should_fail/patFail005.hs3
-rw-r--r--testsuite/tests/parser/should_fail/patFail005.stderr2
-rw-r--r--testsuite/tests/parser/should_fail/patFail006.hs3
-rw-r--r--testsuite/tests/parser/should_fail/patFail006.stderr2
-rw-r--r--testsuite/tests/parser/should_fail/patFail007.hs3
-rw-r--r--testsuite/tests/parser/should_fail/patFail007.stderr2
-rw-r--r--testsuite/tests/parser/should_fail/patFail008.hs4
-rw-r--r--testsuite/tests/parser/should_fail/patFail008.stderr2
-rw-r--r--testsuite/tests/parser/should_fail/patFail009.hs4
-rw-r--r--testsuite/tests/parser/should_fail/patFail009.stderr2
39 files changed, 141 insertions, 4 deletions
diff --git a/testsuite/tests/parser/should_fail/InfixAppPatErr.stderr b/testsuite/tests/parser/should_fail/InfixAppPatErr.stderr
index 69839e3920..f50166fd41 100644
--- a/testsuite/tests/parser/should_fail/InfixAppPatErr.stderr
+++ b/testsuite/tests/parser/should_fail/InfixAppPatErr.stderr
@@ -1,4 +1,4 @@
-InfixAppPatErr.hs:2:3: error:
- Parse error in pattern: f $ do a <- return 3 c
+InfixAppPatErr.hs:2:7: error:
+ do-notation in pattern
Possibly caused by a missing 'do'?
diff --git a/testsuite/tests/parser/should_fail/T984.stderr b/testsuite/tests/parser/should_fail/T984.stderr
index 4c723a7869..6d25a36e9e 100644
--- a/testsuite/tests/parser/should_fail/T984.stderr
+++ b/testsuite/tests/parser/should_fail/T984.stderr
@@ -1,4 +1,4 @@
-T984.hs:6:9:
- Parse error in pattern: case () of { _ -> result }
+T984.hs:6:9: error:
+ (case ... of ...)-syntax in pattern
Possibly caused by a missing 'do'?
diff --git a/testsuite/tests/parser/should_fail/all.T b/testsuite/tests/parser/should_fail/all.T
index aa089de3eb..2fc7f3d326 100644
--- a/testsuite/tests/parser/should_fail/all.T
+++ b/testsuite/tests/parser/should_fail/all.T
@@ -143,3 +143,21 @@ test('unpack_inside_type', normal, compile_fail, [''])
test('unpack_before_opr', normal, compile_fail, [''])
test('T16270', normal, compile_fail, [''])
test('T16270h', normal, compile_fail, [''])
+test('cmdFail001', normal, compile_fail, [''])
+test('cmdFail002', normal, compile_fail, [''])
+test('cmdFail003', normal, compile_fail, [''])
+test('cmdFail004', normal, compile_fail, [''])
+test('cmdFail005', normal, compile_fail, [''])
+test('cmdFail006', normal, compile_fail, [''])
+test('cmdFail007', normal, compile_fail, [''])
+test('cmdFail008', normal, compile_fail, [''])
+test('cmdFail009', normal, compile_fail, [''])
+test('patFail001', normal, compile_fail, [''])
+test('patFail002', normal, compile_fail, [''])
+test('patFail003', normal, compile_fail, [''])
+test('patFail004', normal, compile_fail, [''])
+test('patFail005', normal, compile_fail, [''])
+test('patFail006', normal, compile_fail, [''])
+test('patFail007', normal, compile_fail, [''])
+test('patFail008', normal, compile_fail, [''])
+test('patFail009', normal, compile_fail, [''])
diff --git a/testsuite/tests/parser/should_fail/cmdFail001.hs b/testsuite/tests/parser/should_fail/cmdFail001.hs
new file mode 100644
index 0000000000..c5a4f2fc89
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/cmdFail001.hs
@@ -0,0 +1,4 @@
+{-# LANGUAGE Arrows #-}
+module CmdFail001 where
+
+f = proc x -> _
diff --git a/testsuite/tests/parser/should_fail/cmdFail001.stderr b/testsuite/tests/parser/should_fail/cmdFail001.stderr
new file mode 100644
index 0000000000..7f8210ab4b
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/cmdFail001.stderr
@@ -0,0 +1,2 @@
+
+cmdFail001.hs:4:15: error: Parse error in command: _
diff --git a/testsuite/tests/parser/should_fail/cmdFail002.hs b/testsuite/tests/parser/should_fail/cmdFail002.hs
new file mode 100644
index 0000000000..a75a4d249c
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/cmdFail002.hs
@@ -0,0 +1,4 @@
+{-# LANGUAGE Arrows #-}
+module CmdFail002 where
+
+f = proc x -> (_ -< _) :: _
diff --git a/testsuite/tests/parser/should_fail/cmdFail002.stderr b/testsuite/tests/parser/should_fail/cmdFail002.stderr
new file mode 100644
index 0000000000..1e0393346a
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/cmdFail002.stderr
@@ -0,0 +1,2 @@
+
+cmdFail002.hs:4:15: error: Parse error in command: (_ -< _) :: _
diff --git a/testsuite/tests/parser/should_fail/cmdFail003.hs b/testsuite/tests/parser/should_fail/cmdFail003.hs
new file mode 100644
index 0000000000..03b8b823d3
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/cmdFail003.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE Arrows #-}
+module CmdFail003 where
+
+f = proc x -> [_ -< _,
+ _ -< _,
+ _ -< _,
+ _ -< _,
+ _ -< _]
diff --git a/testsuite/tests/parser/should_fail/cmdFail003.stderr b/testsuite/tests/parser/should_fail/cmdFail003.stderr
new file mode 100644
index 0000000000..21f958174d
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/cmdFail003.stderr
@@ -0,0 +1,3 @@
+
+cmdFail003.hs:4:15: error:
+ Parse error in command: [_ -< _, _ -< _, _ -< _, _ -< _, _ -< _]
diff --git a/testsuite/tests/parser/should_fail/cmdFail004.hs b/testsuite/tests/parser/should_fail/cmdFail004.hs
new file mode 100644
index 0000000000..89898cb983
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/cmdFail004.hs
@@ -0,0 +1,4 @@
+{-# LANGUAGE Arrows #-}
+module CmdFail004 where
+
+f = proc x -> (_ -> (_ -< _))
diff --git a/testsuite/tests/parser/should_fail/cmdFail004.stderr b/testsuite/tests/parser/should_fail/cmdFail004.stderr
new file mode 100644
index 0000000000..ed14937367
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/cmdFail004.stderr
@@ -0,0 +1,2 @@
+
+cmdFail004.hs:4:16: error: Parse error in command: _ -> (_ -< _)
diff --git a/testsuite/tests/parser/should_fail/cmdFail005.hs b/testsuite/tests/parser/should_fail/cmdFail005.hs
new file mode 100644
index 0000000000..a665ddd916
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/cmdFail005.hs
@@ -0,0 +1,4 @@
+{-# LANGUAGE Arrows #-}
+module CmdFail005 where
+
+f = proc x -> x@(_ -< _)
diff --git a/testsuite/tests/parser/should_fail/cmdFail005.stderr b/testsuite/tests/parser/should_fail/cmdFail005.stderr
new file mode 100644
index 0000000000..9944ff277c
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/cmdFail005.stderr
@@ -0,0 +1,2 @@
+
+cmdFail005.hs:4:15: error: Parse error in command: x@(_ -< _)
diff --git a/testsuite/tests/parser/should_fail/cmdFail006.hs b/testsuite/tests/parser/should_fail/cmdFail006.hs
new file mode 100644
index 0000000000..5953d74170
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/cmdFail006.hs
@@ -0,0 +1,4 @@
+{-# LANGUAGE Arrows #-}
+module CmdFail006 where
+
+f = proc x -> ~(_ -< _)
diff --git a/testsuite/tests/parser/should_fail/cmdFail006.stderr b/testsuite/tests/parser/should_fail/cmdFail006.stderr
new file mode 100644
index 0000000000..ad64e91648
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/cmdFail006.stderr
@@ -0,0 +1,2 @@
+
+cmdFail006.hs:4:15: error: Parse error in command: ~(_ -< _)
diff --git a/testsuite/tests/parser/should_fail/cmdFail007.hs b/testsuite/tests/parser/should_fail/cmdFail007.hs
new file mode 100644
index 0000000000..1d3c3adc17
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/cmdFail007.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE Arrows #-}
+module CmdFail007 where
+
+f = proc x ->
+ (_ -< _) { a = _ -< _,
+ b = _ -< _,
+ c = _ -< _ }
diff --git a/testsuite/tests/parser/should_fail/cmdFail007.stderr b/testsuite/tests/parser/should_fail/cmdFail007.stderr
new file mode 100644
index 0000000000..82dadb6b67
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/cmdFail007.stderr
@@ -0,0 +1,4 @@
+
+cmdFail007.hs:5:7: error:
+ Parse error in command:
+ (_ -< _) {a = _ -< _, b = _ -< _, c = _ -< _}
diff --git a/testsuite/tests/parser/should_fail/cmdFail008.hs b/testsuite/tests/parser/should_fail/cmdFail008.hs
new file mode 100644
index 0000000000..76e9864a9d
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/cmdFail008.hs
@@ -0,0 +1,4 @@
+{-# LANGUAGE Arrows #-}
+module CmdFail008 where
+
+f = proc x -> (! (_ -< _))
diff --git a/testsuite/tests/parser/should_fail/cmdFail008.stderr b/testsuite/tests/parser/should_fail/cmdFail008.stderr
new file mode 100644
index 0000000000..0f2f0818d7
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/cmdFail008.stderr
@@ -0,0 +1,2 @@
+
+cmdFail008.hs:4:16: error: Parse error in command: !(_ -< _)
diff --git a/testsuite/tests/parser/should_fail/cmdFail009.hs b/testsuite/tests/parser/should_fail/cmdFail009.hs
new file mode 100644
index 0000000000..e61ba08189
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/cmdFail009.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE Arrows #-}
+module CmdFail009 where
+
+f = proc x -> (_ -< _,
+ _ -< _,
+ _ -< _,
+ _ -< _,
+ _ -< _)
diff --git a/testsuite/tests/parser/should_fail/cmdFail009.stderr b/testsuite/tests/parser/should_fail/cmdFail009.stderr
new file mode 100644
index 0000000000..a0c4af5b77
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/cmdFail009.stderr
@@ -0,0 +1,3 @@
+
+cmdFail009.hs:4:15: error:
+ Parse error in command: (_ -< _,_ -< _,_ -< _,_ -< _,_ -< _)
diff --git a/testsuite/tests/parser/should_fail/patFail001.hs b/testsuite/tests/parser/should_fail/patFail001.hs
new file mode 100644
index 0000000000..1e41ed25fe
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/patFail001.hs
@@ -0,0 +1,3 @@
+module PatFail001 where
+
+f (\x -> a) = _
diff --git a/testsuite/tests/parser/should_fail/patFail001.stderr b/testsuite/tests/parser/should_fail/patFail001.stderr
new file mode 100644
index 0000000000..6dd20d794d
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/patFail001.stderr
@@ -0,0 +1,4 @@
+
+patFail001.hs:3:4: error:
+ Lambda-syntax in pattern.
+ Pattern matching on functions is not possible.
diff --git a/testsuite/tests/parser/should_fail/patFail002.hs b/testsuite/tests/parser/should_fail/patFail002.hs
new file mode 100644
index 0000000000..b6be3c4482
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/patFail002.hs
@@ -0,0 +1,3 @@
+module PatFail002 where
+
+f (let a = x in a) = _
diff --git a/testsuite/tests/parser/should_fail/patFail002.stderr b/testsuite/tests/parser/should_fail/patFail002.stderr
new file mode 100644
index 0000000000..804bfe9f47
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/patFail002.stderr
@@ -0,0 +1,2 @@
+
+patFail002.hs:3:4: error: (let ... in ...)-syntax in pattern
diff --git a/testsuite/tests/parser/should_fail/patFail003.hs b/testsuite/tests/parser/should_fail/patFail003.hs
new file mode 100644
index 0000000000..aab9750ee8
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/patFail003.hs
@@ -0,0 +1,3 @@
+module PatFail003 where
+
+f (case x of a -> b) = _
diff --git a/testsuite/tests/parser/should_fail/patFail003.stderr b/testsuite/tests/parser/should_fail/patFail003.stderr
new file mode 100644
index 0000000000..dc6e7aaea0
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/patFail003.stderr
@@ -0,0 +1,2 @@
+
+patFail003.hs:3:4: error: (case ... of ...)-syntax in pattern
diff --git a/testsuite/tests/parser/should_fail/patFail004.hs b/testsuite/tests/parser/should_fail/patFail004.hs
new file mode 100644
index 0000000000..0bc1ada01e
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/patFail004.hs
@@ -0,0 +1,3 @@
+module PatFail004 where
+
+f (if c then a else b) = _
diff --git a/testsuite/tests/parser/should_fail/patFail004.stderr b/testsuite/tests/parser/should_fail/patFail004.stderr
new file mode 100644
index 0000000000..48d289c348
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/patFail004.stderr
@@ -0,0 +1,3 @@
+
+patFail004.hs:3:4: error:
+ (if ... then ... else ...)-syntax in pattern
diff --git a/testsuite/tests/parser/should_fail/patFail005.hs b/testsuite/tests/parser/should_fail/patFail005.hs
new file mode 100644
index 0000000000..b140752fe9
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/patFail005.hs
@@ -0,0 +1,3 @@
+module PatFail005 where
+
+f (do a; b; c) = _
diff --git a/testsuite/tests/parser/should_fail/patFail005.stderr b/testsuite/tests/parser/should_fail/patFail005.stderr
new file mode 100644
index 0000000000..1302d62e0c
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/patFail005.stderr
@@ -0,0 +1,2 @@
+
+patFail005.hs:3:4: error: do-notation in pattern
diff --git a/testsuite/tests/parser/should_fail/patFail006.hs b/testsuite/tests/parser/should_fail/patFail006.hs
new file mode 100644
index 0000000000..ede9ad3a01
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/patFail006.hs
@@ -0,0 +1,3 @@
+module PatFail006 where
+
+f (-(1)) = _
diff --git a/testsuite/tests/parser/should_fail/patFail006.stderr b/testsuite/tests/parser/should_fail/patFail006.stderr
new file mode 100644
index 0000000000..270f738163
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/patFail006.stderr
@@ -0,0 +1,2 @@
+
+patFail006.hs:3:4: error: Parse error in pattern: -(1)
diff --git a/testsuite/tests/parser/should_fail/patFail007.hs b/testsuite/tests/parser/should_fail/patFail007.hs
new file mode 100644
index 0000000000..fb6a48d4d8
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/patFail007.hs
@@ -0,0 +1,3 @@
+module PatFail007 where
+
+f (+1) = _
diff --git a/testsuite/tests/parser/should_fail/patFail007.stderr b/testsuite/tests/parser/should_fail/patFail007.stderr
new file mode 100644
index 0000000000..f07689ba83
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/patFail007.stderr
@@ -0,0 +1,2 @@
+
+patFail007.hs:3:4: error: Parse error in pattern: +1
diff --git a/testsuite/tests/parser/should_fail/patFail008.hs b/testsuite/tests/parser/should_fail/patFail008.hs
new file mode 100644
index 0000000000..a4b5a3b98e
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/patFail008.hs
@@ -0,0 +1,4 @@
+{-# LANGUAGE Arrows #-}
+module PatFail008 where
+
+f (a -< b) = _
diff --git a/testsuite/tests/parser/should_fail/patFail008.stderr b/testsuite/tests/parser/should_fail/patFail008.stderr
new file mode 100644
index 0000000000..d9957d9ca5
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/patFail008.stderr
@@ -0,0 +1,2 @@
+
+patFail008.hs:4:4: error: Command syntax in pattern: a -< b
diff --git a/testsuite/tests/parser/should_fail/patFail009.hs b/testsuite/tests/parser/should_fail/patFail009.hs
new file mode 100644
index 0000000000..53e54a7d58
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/patFail009.hs
@@ -0,0 +1,4 @@
+{-# LANGUAGE OverloadedLabels #-}
+module PatFail009 where
+
+f #a = _
diff --git a/testsuite/tests/parser/should_fail/patFail009.stderr b/testsuite/tests/parser/should_fail/patFail009.stderr
new file mode 100644
index 0000000000..0c9fb5de15
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/patFail009.stderr
@@ -0,0 +1,2 @@
+
+patFail009.hs:4:3: error: Expression syntax in pattern: #a