Fix the GHCi debugger with ApplicativeDo
authorSimon Marlow <marlowsd@gmail.com>
Sun, 22 Jul 2018 15:03:33 +0000 (17:03 +0200)
committerBen Gamari <ben@smart-cactus.org>
Tue, 31 Jul 2018 19:53:19 +0000 (15:53 -0400)
commitd170083be4c8ad0ce6a3d00ce5891341fde774b8
tree53618e82e5484a71e4c3bccfb49f2a5e893c0aa1
parent8bed140099f8ab78e3e728fd2e50dd73d7210e84
Fix the GHCi debugger with ApplicativeDo

Summary:
`collectLStmtsBinders` was returning nothing for `ApplicativeStmts`, which
caused the debugger to not track free variables in many cases when using
`ApplicativeDo`.

Test Plan:
* new test case
* validate

Reviewers: bgamari, erikd

Reviewed By: bgamari

Subscribers: rwbarton, thomie, carter

GHC Trac Issues: #15422

Differential Revision: https://phabricator.haskell.org/D4991

(cherry picked from commit 4ea9311cc5c3b99ea6915bee23f0a6776731f20e)
compiler/hsSyn/HsUtils.hs
testsuite/tests/ghci.debugger/scripts/all.T
testsuite/tests/ghci.debugger/scripts/break029.hs [new file with mode: 0644]
testsuite/tests/ghci.debugger/scripts/break029.script [new file with mode: 0644]
testsuite/tests/ghci.debugger/scripts/break029.stdout [new file with mode: 0644]