A much nicer solution for typechecking ApplicativeDo
authorSimon Peyton Jones <simonpj@microsoft.com>
Wed, 22 Feb 2017 13:45:52 +0000 (13:45 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Wed, 22 Feb 2017 13:45:52 +0000 (13:45 +0000)
commit254bc3357b0de673b7873f1c4cf5dfc26d0bb5f2
treeea94b59884e4a020903df34770ecb1d1c258194c
parentfed7136c597868d1c13b96837a2b64137a9ee65c
A much nicer solution for typechecking ApplicativeDo

This patch improves the code for TcMatches.tcApplicativeStmts;
see the suggestion in Trac #13242 comment:9.

I now use (mapM goArg args) rather than a CPS-style fold.  The
result is less code, easier to understand, and automatically
fixes the original problem in Trac #13242.

See Note [ApplicativeDo and constraints].
compiler/typecheck/TcMatches.hs