Make applicative do work via expansions
Fixes #24406 Added Tests: T24406
The Applicative statements previously went via GHC.Tc.Gen.tcStmt
which calls tcSyntaxOp
.
This MR expands the Applicative statement similar to Monadic statements.
This MR does not work on rearranging the do statements.
Change noted in Note [Expanding HsDo with XXExprGhcRn]
This commit introduces a field xrn_doTcApp :: Bool
in ExpandedThingRn
(which we are not very happy about).
Setting it to True
typechecks the enclosing XExpr
expression with tcApp
setting it to False
typechecks it using tcExpr
. The reason to do it is to get good error messages.
Merge request reports
Activity
added user-facing label
added 6 commits
-
4c1c5f75...ff2c0cc9 - 5 commits from branch
master
- 4ff58d73 - make applicative do work with expansions, possibly badly
-
4c1c5f75...ff2c0cc9 - 5 commits from branch
added 4 commits
-
e534decf...d0d5acb5 - 2 commits from branch
master
- 22ebb064 - make applicative do work with expansions, possibly badly
- 38c3d11c - enable the expansion flow
-
e534decf...d0d5acb5 - 2 commits from branch
- Resolved by Apoorv Ingle
added 25 commits
-
90db5c48...de589554 - 23 commits from branch
master
- e09cce3a - make applicative do work with expansions, possibly badly
- de40a057 - enable the flow
-
90db5c48...de589554 - 23 commits from branch
added 8 commits
-
de40a057...b57200de - 6 commits from branch
master
- d81dc0df - make applicative do work with expansions, possibly badly
- f6ec2c44 - enable the flow
-
de40a057...b57200de - 6 commits from branch
added 156 commits
-
f6ec2c44...0590764c - 153 commits from branch
master
- 091a113e - make applicative do work with expansions, possibly badly
- b3d90ba3 - enable the flow
- 5106889a - renaming do_or_lc to doFlavour and debugging error contexts
Toggle commit list-
f6ec2c44...0590764c - 153 commits from branch
added 48 commits
-
5106889a...8d67f247 - 43 commits from branch
master
- cf1ce2b0 - make applicative do work with expansions, possibly badly
- 76f54dff - enable the flow
- c116bb94 - renaming do_or_lc to doFlavour and debugging error contexts
- 63eefc73 - testcases
- 6d953a6a - make sure app do expression statements location is mapped correctly
Toggle commit list-
5106889a...8d67f247 - 43 commits from branch
added 1 commit
- 7dece5c9 - make sure app do expression statements location is mapped correctly
added 1 commit
- 5bda9532 - make sure app do expression statements location is mapped correctly
added 1 commit
- 0047f94e - add flavour into OrigStmt to guide better error messages about qualified do.
added 17 commits
-
0047f94e...0acfe391 - 9 commits from branch
master
- a0c5b9ad - make applicative do work with expansions, possibly badly
- d5921c16 - enable the flow
- dd11a4f1 - renaming do_or_lc to doFlavour and debugging error contexts
- 3a809ed2 - testcases
- 1d95b1ef - make sure app do expression statements location is mapped correctly
- d7010192 - add flavour into OrigStmt to guide better error messages about qualified do.
- a7b53c4a - add stmt and do flav info in OrigPat to improve error messages
- 67ee05e6 - accepting some test cases ado003 and ado002 also fix for #16135
Toggle commit list-
0047f94e...0acfe391 - 9 commits from branch
added 112 commits
-
f76e8cfd...d7a3d6b5 - 103 commits from branch
master
- ec70b417 - make applicative do work with expansions, possibly badly
- 89f88784 - make sure app do expression statements location is mapped correctly
- fd30cb87 - add flavour into OrigStmt to guide better error messages about qualified do.
- b5b79eb9 - add stmt and do flav info in OrigPat to improve error messages
- 65ae9818 - accepting some test cases ado003 and ado002 also fix for #16135
- 2c7b46c5 - make applicative breakpoint work
- 1039589a - make join unlocated
- 03bd96b4 - fix rebase conflicts
- afc00d76 - in GHC.Tc.Gen.Do.mk_apps pull out the XExpr annotation outside the op application
Toggle commit list-
f76e8cfd...d7a3d6b5 - 103 commits from branch
added 1 commit
- 7e4ed6b0 - in GHC.Tc.Gen.Do.mk_apps pull out the XExpr annotation outside the op application
added 53 commits
-
7e4ed6b0...64feadcd - 44 commits from branch
master
- 11faf56f - make applicative do work with expansions, possibly badly
- dc42d2cd - make sure app do expression statements location is mapped correctly
- d33bfda7 - add flavour into OrigStmt to guide better error messages about qualified do.
- 27de2281 - add stmt and do flav info in OrigPat to improve error messages
- fbf2bfa6 - accepting some test cases ado003 and ado002 also fix for #16135
- bda3f098 - make applicative breakpoint work
- a3781239 - make join unlocated
- d7357924 - fix rebase conflicts
- 9b65133a - in GHC.Tc.Gen.Do.mk_apps pull out the XExpr annotation outside the op application
Toggle commit list-
7e4ed6b0...64feadcd - 44 commits from branch