ApplicativeDo: handle BodyStmt (#12143)
ClosedPublic

Authored by simonmar on Oct 26 2017, 5:33 AM.

Details

Summary

It's simple to treat BodyStmt just like a BindStmt with a wildcard
pattern, which is enough to fix Trac #12143 without going all the way to
using <* and *> (Trac #10892).

Test Plan
  • new test cases in ado004.hs
  • validate

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
simonmar created this revision.Oct 26 2017, 5:33 AM
simonpj added inline comments.Oct 26 2017, 6:18 AM
compiler/hsSyn/HsExpr.hs
1783

Could you add a Note to explain this flag? What is its significance? Could you give an example?

Refer to the ticket obviously. Point to where the flag is used. (in flattenArg only, I think).

When constructors have three fields, I start using named fields.

2009–2013

I believe this is THE place where the isBody flag does something. Say so. Refer to the Note.

This revision was automatically updated to reflect the committed changes.