[Git][ghc/ghc][wip/expand-do] - Blame the binding body but keep the error context about the statement in addArgCtxt

Apoorv Ingle (@ani) gitlab at gitlab.haskell.org
Wed Jul 12 16:57:58 UTC 2023



Apoorv Ingle pushed to branch wip/expand-do at Glasgow Haskell Compiler / GHC


Commits:
85d28d95 by Apoorv Ingle at 2023-07-12T11:56:53-05:00
- Blame the binding body but keep the error context about the statement in addArgCtxt

- - - - -


1 changed file:

- compiler/GHC/Tc/Gen/App.hs


Changes:

=====================================
compiler/GHC/Tc/Gen/App.hs
=====================================
@@ -747,10 +747,11 @@ addArgCtxt ctxt (L arg_loc arg) thing_inside
                    setSrcSpanA loc $
                      addStmtCtxt ((text "addArgCtxt 2e")) stmt $
                      thing_inside
-           VAExpansionStmt (L _ (BindStmt _ _ (L body_loc body)))
+           VAExpansionStmt stmt@(L _ (BindStmt _ _ (L body_loc _)))
              -> do traceTc "addArgCtxt 2e bind" empty
                    setSrcSpanA body_loc $
-                     addExprCtxt ((text "addArgCtxt body 2e")) body $
+                     -- addExprCtxt ((text "addArgCtxt body 2e")) body $
+                     addStmtCtxt ((text "addArgCtxt body 2e")) stmt $
                      thing_inside
            VAExpansionStmt (L _ (LetStmt {})) -- TODO: Do nothing for let statements for now?
              -> do traceTc "addArgCtxt 2e let" empty



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/85d28d95326ec9474d33cefc2f4bfb18b4e089e7

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/85d28d95326ec9474d33cefc2f4bfb18b4e089e7
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230712/9f3160af/attachment-0001.html>


More information about the ghc-commits mailing list