summaryrefslogtreecommitdiff
path: root/utils/check-exact/ExactPrint.hs
diff options
context:
space:
mode:
Diffstat (limited to 'utils/check-exact/ExactPrint.hs')
-rw-r--r--utils/check-exact/ExactPrint.hs18
1 files changed, 15 insertions, 3 deletions
diff --git a/utils/check-exact/ExactPrint.hs b/utils/check-exact/ExactPrint.hs
index e575b0b25d..cca7afcf73 100644
--- a/utils/check-exact/ExactPrint.hs
+++ b/utils/check-exact/ExactPrint.hs
@@ -1910,11 +1910,13 @@ instance ExactPrint (HsExpr GhcPs) where
-- exact x@(HsCase EpAnnNotUsed _ _) = withPpr x
exact (HsIf an e1 e2 e3) = do
- markEpAnn an AnnIf
+ markAnnKw an aiIf AnnIf
markAnnotated e1
- markEpAnn an AnnThen
+ markAnnKwM an aiThenSemi AnnSemi
+ markAnnKw an aiThen AnnThen
markAnnotated e2
- markEpAnn an AnnElse
+ markAnnKwM an aiElseSemi AnnSemi
+ markAnnKw an aiElse AnnElse
markAnnotated e3
exact (HsMultiIf an mg) = do
@@ -2402,6 +2404,16 @@ instance ExactPrint (HsCmd GhcPs) where
-- mark GHC.AnnElse
-- markLocated e3
+ exact (HsCmdIf an _ e1 e2 e3) = do
+ markAnnKw an aiIf AnnIf
+ markAnnotated e1
+ markAnnKwM an aiThenSemi AnnSemi
+ markAnnKw an aiThen AnnThen
+ markAnnotated e2
+ markAnnKwM an aiElseSemi AnnSemi
+ markAnnKw an aiElse AnnElse
+ markAnnotated e3
+
-- markAST _ (GHC.HsCmdLet _ (GHC.L _ binds) e) = do
-- mark GHC.AnnLet
-- markOptional GHC.AnnOpenC