summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorDavid Feuer <david.feuer@gmail.com>2017-09-07 23:56:35 -0400
committerDavid Feuer <David.Feuer@gmail.com>2017-09-07 23:56:36 -0400
commit011e15aa2d6949fc56126f1028ea25d5497196d9 (patch)
tree2dfff303e970953b1d5fb5959911b8352ec14b29 /testsuite/tests
parentcb4878ffd18a3c70f98bdbb413cd3c4d1f054e1f (diff)
downloadhaskell-011e15aa2d6949fc56126f1028ea25d5497196d9.tar.gz
Deal with unbreakable blocks in Applicative Do
The renamer wasn't able to deal with more than a couple strict patterns in a row with `ApplicativeDo` when using the heuristic splitter. Update it to work with them properly. Reviewers: simonmar, austin, bgamari, hvr Reviewed By: simonmar Subscribers: RyanGlScott, lippling, rwbarton, thomie GHC Trac Issues: #14163 Differential Revision: https://phabricator.haskell.org/D3900
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/ado/T14163.hs13
-rw-r--r--testsuite/tests/ado/T14163.stdin3
-rw-r--r--testsuite/tests/ado/T14163.stdout1
-rw-r--r--testsuite/tests/ado/all.T1
4 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/ado/T14163.hs b/testsuite/tests/ado/T14163.hs
new file mode 100644
index 0000000000..9463c1c5fc
--- /dev/null
+++ b/testsuite/tests/ado/T14163.hs
@@ -0,0 +1,13 @@
+{-# language ApplicativeDo #-}
+
+import GHC.Exts
+
+readIt :: IO (Int, Int)
+readIt = readLn
+
+main :: IO ()
+main = do
+ (_, _) <- readIt
+ (_, _) <- readIt
+ (_, _) <- readIt
+ print "Done"
diff --git a/testsuite/tests/ado/T14163.stdin b/testsuite/tests/ado/T14163.stdin
new file mode 100644
index 0000000000..0f620463b5
--- /dev/null
+++ b/testsuite/tests/ado/T14163.stdin
@@ -0,0 +1,3 @@
+(1,2)
+(3,4)
+(5,6)
diff --git a/testsuite/tests/ado/T14163.stdout b/testsuite/tests/ado/T14163.stdout
new file mode 100644
index 0000000000..5a32621be4
--- /dev/null
+++ b/testsuite/tests/ado/T14163.stdout
@@ -0,0 +1 @@
+"Done"
diff --git a/testsuite/tests/ado/all.T b/testsuite/tests/ado/all.T
index bb1cc163d1..d88e907315 100644
--- a/testsuite/tests/ado/all.T
+++ b/testsuite/tests/ado/all.T
@@ -11,3 +11,4 @@ test('T12490', normal, compile, [''])
test('T13242', normal, compile, [''])
test('T13242a', normal, compile_fail, [''])
test('T13875', normal, compile_and_run, [''])
+test('T14163', normal, compile_and_run, [''])