summaryrefslogtreecommitdiff
path: root/compiler/GHC/Hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Hs')
-rw-r--r--compiler/GHC/Hs/Expr.hs2
-rw-r--r--compiler/GHC/Hs/Pat.hs2
2 files changed, 4 insertions, 0 deletions
diff --git a/compiler/GHC/Hs/Expr.hs b/compiler/GHC/Hs/Expr.hs
index d08e2079b0..806ee1d3a7 100644
--- a/compiler/GHC/Hs/Expr.hs
+++ b/compiler/GHC/Hs/Expr.hs
@@ -1243,7 +1243,9 @@ ppr_infix_expr (HsConLikeOut _ c) = Just (pprInfixOcc (conLikeName c))
ppr_infix_expr (HsRecFld _ f) = Just (pprInfixOcc f)
ppr_infix_expr (HsUnboundVar _ occ) = Just (pprInfixOcc occ)
ppr_infix_expr (XExpr x) = case (ghcPass @p, x) of
+#if __GLASGOW_HASKELL__ <= 810
(GhcPs, _) -> Nothing
+#endif
(GhcRn, HsExpanded a _) -> ppr_infix_expr a
(GhcTc, WrapExpr (HsWrap _ e)) -> ppr_infix_expr e
(GhcTc, ExpansionExpr (HsExpanded a _)) -> ppr_infix_expr a
diff --git a/compiler/GHC/Hs/Pat.hs b/compiler/GHC/Hs/Pat.hs
index 59873ac600..1bf9715d18 100644
--- a/compiler/GHC/Hs/Pat.hs
+++ b/compiler/GHC/Hs/Pat.hs
@@ -845,8 +845,10 @@ patNeedsParens p = go
go (SigPat {}) = p >= sigPrec
go (ViewPat {}) = True
go (XPat ext) = case ghcPass @p of
+#if __GLASGOW_HASKELL__ <= 810
GhcPs -> noExtCon ext
GhcRn -> noExtCon ext
+#endif
GhcTc -> go inner
where CoPat _ inner _ = ext
go (WildPat {}) = False