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 3680405a0a..5047346111 100644
--- a/utils/check-exact/ExactPrint.hs
+++ b/utils/check-exact/ExactPrint.hs
@@ -1907,11 +1907,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
@@ -2399,6 +2401,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