Skip to content
Snippets Groups Projects

Make applicative do work via expansions

Open Apoorv Ingle requested to merge wip/expansions-appdo into master

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.

Edited by Apoorv Ingle

Merge request reports

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Apoorv Ingle added 1 commit

    added 1 commit

    Compare with previous version

  • Apoorv Ingle added 25 commits

    added 25 commits

    Compare with previous version

  • Apoorv Ingle added 8 commits

    added 8 commits

    Compare with previous version

  • Apoorv Ingle added 156 commits

    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

    Compare with previous version

  • Apoorv Ingle added 48 commits

    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

    Compare with previous version

  • Apoorv Ingle added 1 commit

    added 1 commit

    • 7dece5c9 - make sure app do expression statements location is mapped correctly

    Compare with previous version

  • Apoorv Ingle added 1 commit

    added 1 commit

    • 5bda9532 - make sure app do expression statements location is mapped correctly

    Compare with previous version

  • Apoorv Ingle added 1 commit

    added 1 commit

    • 0047f94e - add flavour into OrigStmt to guide better error messages about qualified do.

    Compare with previous version

  • Apoorv Ingle added 17 commits

    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

    Compare with previous version

  • Apoorv Ingle added 1 commit

    added 1 commit

    • f76e8cfd - make applicative breakpoint work

    Compare with previous version

  • Apoorv Ingle added 112 commits

    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

    Compare with previous version

  • Apoorv Ingle added 1 commit

    added 1 commit

    • 7e4ed6b0 - in GHC.Tc.Gen.Do.mk_apps pull out the XExpr annotation outside the op application

    Compare with previous version

  • Apoorv Ingle added 53 commits

    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

    Compare with previous version

  • Apoorv Ingle added 1 commit

    added 1 commit

    • 7c2ea776 - some pesky appdo testcases remain

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading