diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2021-05-09 15:19:45 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-05-11 05:36:02 -0400 |
commit | 32367cac4e586fb5aedaa021b257388392d976c4 (patch) | |
tree | 059b555f27488b9d80bcd2fb566bc1d8969f7579 /compiler/GHC/Hs/Utils.hs | |
parent | 087ac4ebee39bacd90529cab0e88af85a903448b (diff) | |
download | haskell-32367cac4e586fb5aedaa021b257388392d976c4.tar.gz |
EPA: Use custom AnnsIf structure for HsIf and HsCmdIf
This clearly identifies the presence and location of optional
semicolons in an if statement.
Closes #19813
Diffstat (limited to 'compiler/GHC/Hs/Utils.hs')
-rw-r--r-- | compiler/GHC/Hs/Utils.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Hs/Utils.hs b/compiler/GHC/Hs/Utils.hs index 34120f56cd..3c152af242 100644 --- a/compiler/GHC/Hs/Utils.hs +++ b/compiler/GHC/Hs/Utils.hs @@ -364,12 +364,12 @@ mkHsCompAnns ctxt stmts expr anns = mkHsDoAnns ctxt (mkLocatedList (stmts ++ [la last_stmt = L (noAnnSrcSpan $ getLocA expr) $ mkLastStmt expr -- restricted to GhcPs because other phases might need a SyntaxExpr -mkHsIf :: LHsExpr GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs -> EpAnn [AddEpAnn] +mkHsIf :: LHsExpr GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs -> EpAnn AnnsIf -> HsExpr GhcPs mkHsIf c a b anns = HsIf anns c a b -- restricted to GhcPs because other phases might need a SyntaxExpr -mkHsCmdIf :: LHsExpr GhcPs -> LHsCmd GhcPs -> LHsCmd GhcPs -> EpAnn [AddEpAnn] +mkHsCmdIf :: LHsExpr GhcPs -> LHsCmd GhcPs -> LHsCmd GhcPs -> EpAnn AnnsIf -> HsCmd GhcPs mkHsCmdIf c a b anns = HsCmdIf anns noSyntaxExpr c a b |