Apoorv Ingle pushed to branch wip/spj-apporv-Oct24 at Glasgow Haskell Compiler / GHC
Commits:
-
35d5a38d
by Apoorv Ingle at 2025-08-10T19:30:13-05:00
1 changed file:
Changes:
... | ... | @@ -81,14 +81,16 @@ expand_do_stmts flav [stmt@(L sloc (LastStmt _ body@(L body_loc _) _ ret_expr))] |
81 | 81 | -- See `checkLastStmt` and `Syntax.Expr.StmtLR.LastStmt`
|
82 | 82 | | NoSyntaxExprRn <- ret_expr
|
83 | 83 | -- Last statement is just body if we are not in ListComp context. See Syntax.Expr.LastStmt
|
84 | - = return $ L sloc (mkExpandedStmt stmt flav (HsPar noExtField body))
|
|
84 | + -- = return $ L sloc (mkExpandedStmt stmt flav (HsPar noExtField body))
|
|
85 | + = return body
|
|
85 | 86 | | SyntaxExprRn ret <- ret_expr
|
86 | 87 | --
|
87 | 88 | -- ------------------------------------------------
|
88 | 89 | -- return e ~~> return e
|
89 | 90 | -- to make T18324 work
|
90 | 91 | = do let expansion = L body_loc (genHsApp ret body)
|
91 | - return $ L sloc (mkExpandedStmt stmt flav (HsPar noExtField expansion))
|
|
92 | + --return $ L sloc (mkExpandedStmt stmt flav (HsPar noExtField expansion))
|
|
93 | + return expansion
|
|
92 | 94 | |
93 | 95 | expand_do_stmts doFlavour (stmt@(L loc (LetStmt _ bs)) : lstmts) =
|
94 | 96 | -- See Note [Expanding HsDo with XXExprGhcRn] Equation (3) below
|