diff options
Diffstat (limited to 'testsuite/tests/parser')
-rw-r--r-- | testsuite/tests/parser/should_compile/T15730a.hs | 5 | ||||
-rw-r--r-- | testsuite/tests/parser/should_compile/T15730a.stdout | 1 | ||||
-rw-r--r-- | testsuite/tests/parser/should_compile/all.T | 2 | ||||
-rw-r--r-- | testsuite/tests/parser/should_fail/T15730.hs | 3 | ||||
-rw-r--r-- | testsuite/tests/parser/should_fail/T15730.stderr | 2 | ||||
-rw-r--r-- | testsuite/tests/parser/should_fail/T15730b.hs | 8 | ||||
-rw-r--r-- | testsuite/tests/parser/should_fail/T15730b.stderr | 2 | ||||
-rw-r--r-- | testsuite/tests/parser/should_fail/all.T | 2 |
8 files changed, 25 insertions, 0 deletions
diff --git a/testsuite/tests/parser/should_compile/T15730a.hs b/testsuite/tests/parser/should_compile/T15730a.hs new file mode 100644 index 0000000000..5f1c45828a --- /dev/null +++ b/testsuite/tests/parser/should_compile/T15730a.hs @@ -0,0 +1,5 @@ +x = 1 / 2 / 2 +a = {-# SCC ann #-} 1 / 2 / 2 +b = 1 / 2 / {-# SCC ann #-} 2 + +main = print (x, a == x, b == x) diff --git a/testsuite/tests/parser/should_compile/T15730a.stdout b/testsuite/tests/parser/should_compile/T15730a.stdout new file mode 100644 index 0000000000..f8528ac72a --- /dev/null +++ b/testsuite/tests/parser/should_compile/T15730a.stdout @@ -0,0 +1 @@ +(0.25,True,True) diff --git a/testsuite/tests/parser/should_compile/all.T b/testsuite/tests/parser/should_compile/all.T index 91aae139ab..85a7c3c172 100644 --- a/testsuite/tests/parser/should_compile/all.T +++ b/testsuite/tests/parser/should_compile/all.T @@ -162,3 +162,5 @@ test('proposal-229f', omit_ways(['profasm', 'profthreaded']) ], multimod_compile_and_run, ['proposal-229f.hs', '']) + +test('T15730a', normal, compile_and_run, ['']) diff --git a/testsuite/tests/parser/should_fail/T15730.hs b/testsuite/tests/parser/should_fail/T15730.hs new file mode 100644 index 0000000000..98c7689e1c --- /dev/null +++ b/testsuite/tests/parser/should_fail/T15730.hs @@ -0,0 +1,3 @@ +module T15730 where + +x = 1 / {-# SCC ann #-} 2 / 2 diff --git a/testsuite/tests/parser/should_fail/T15730.stderr b/testsuite/tests/parser/should_fail/T15730.stderr new file mode 100644 index 0000000000..32b5b33759 --- /dev/null +++ b/testsuite/tests/parser/should_fail/T15730.stderr @@ -0,0 +1,2 @@ + +T15730.hs:3:27: error: parse error on input ‘/’ diff --git a/testsuite/tests/parser/should_fail/T15730b.hs b/testsuite/tests/parser/should_fail/T15730b.hs new file mode 100644 index 0000000000..01fa6e2eac --- /dev/null +++ b/testsuite/tests/parser/should_fail/T15730b.hs @@ -0,0 +1,8 @@ +module T15730b where + +(.!) :: (a, a) -> Bool -> a +a .! True = fst a +a .! False = snd a + +t :: Bool -> Integer +t x = (5,6) .! {-# SCC a1 #-} {-# SCC a2 #-} x :: Integer diff --git a/testsuite/tests/parser/should_fail/T15730b.stderr b/testsuite/tests/parser/should_fail/T15730b.stderr new file mode 100644 index 0000000000..5794dc00fe --- /dev/null +++ b/testsuite/tests/parser/should_fail/T15730b.stderr @@ -0,0 +1,2 @@ + +T15730b.hs:8:48: error: parse error on input ‘::’ diff --git a/testsuite/tests/parser/should_fail/all.T b/testsuite/tests/parser/should_fail/all.T index c4a7a4f67b..e0000f009e 100644 --- a/testsuite/tests/parser/should_fail/all.T +++ b/testsuite/tests/parser/should_fail/all.T @@ -163,3 +163,5 @@ test('patFail008', normal, compile_fail, ['']) test('patFail009', normal, compile_fail, ['']) test('T17162', normal, compile_fail, ['']) test('proposal-229c', normal, compile_fail, ['']) +test('T15730', normal, compile_fail, ['']) +test('T15730b', normal, compile_fail, ['']) |