summaryrefslogtreecommitdiff
path: root/testsuite/tests/printer/Test19798.hs
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2021-05-06 18:47:51 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-05-09 18:13:40 -0400
commit736d47ffb7370ba4348b142c913b88e4c82347d0 (patch)
treed6525cbfe660a71d056ee61465b38a377c73274d /testsuite/tests/printer/Test19798.hs
parentad5a3aeb1d3094acbc17f07a2cc8388676d59dd1 (diff)
downloadhaskell-736d47ffb7370ba4348b142c913b88e4c82347d0.tar.gz
EPA: properly capture leading semicolons in statement lists
For the fragment blah = do { ; print "a" ; print "b" } capture the leading semicolon before 'print "a"' in 'al_rest' in AnnList instead of in 'al_trailing'. Closes #19798
Diffstat (limited to 'testsuite/tests/printer/Test19798.hs')
-rw-r--r--testsuite/tests/printer/Test19798.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/testsuite/tests/printer/Test19798.hs b/testsuite/tests/printer/Test19798.hs
new file mode 100644
index 0000000000..0b9e5162f1
--- /dev/null
+++ b/testsuite/tests/printer/Test19798.hs
@@ -0,0 +1,6 @@
+module Test19798 where
+
+blah = do {
+ ; print "a"
+ ; print "b"
+ }