summaryrefslogtreecommitdiff
path: root/compiler/GHC
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2021-03-07 08:03:57 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-03-09 18:53:07 -0500
commite9189745cea060c33263226a585f2b838045c813 (patch)
tree9c9e1e51ca3bd5234a3a339c6f67a421e0827013 /compiler/GHC
parent8fe274e27b9bd42c68e931da875d3f8e9c20e53f (diff)
downloadhaskell-e9189745cea060c33263226a585f2b838045c813.tar.gz
Fix some warnings when bootstrapping with GHC 9.0
This fixes two classes of warnings that appear when bootstrapping with GHC 9.0: * `ghc-boot.cabal` was using `cabal-version: >=1.22`, which `cabal-install-3.4` now warns about, instead recommending the use of `cabal-version: 1.22`. * Several pattern matches were producing `Pattern match(es) are non-exhaustive` because of incorrect CPP. The pattern-match coverage checker _did_ become smarter in GHC 9.1, however, so I ended up needing to keep the CPP, adjusting them to use `#if __GLASGOW_HASKELL__ < 901` instead.
Diffstat (limited to 'compiler/GHC')
-rw-r--r--compiler/GHC/Cmm/DebugBlock.hs2
-rw-r--r--compiler/GHC/Core/Coercion/Opt.hs2
-rw-r--r--compiler/GHC/Hs/Expr.hs2
-rw-r--r--compiler/GHC/Hs/Pat.hs2
-rw-r--r--compiler/GHC/Tc/Errors/Hole.hs2
5 files changed, 5 insertions, 5 deletions
diff --git a/compiler/GHC/Cmm/DebugBlock.hs b/compiler/GHC/Cmm/DebugBlock.hs
index 3131b83d5a..0de3efe044 100644
--- a/compiler/GHC/Cmm/DebugBlock.hs
+++ b/compiler/GHC/Cmm/DebugBlock.hs
@@ -118,7 +118,7 @@ cmmDebugGen modLoc decls = map (blocksForScope Nothing) topScopes
-- recover by copying ticks below.
scp' | SubScope _ scp' <- scp = scp'
| CombinedScope scp' _ <- scp = scp'
-#if __GLASGOW_HASKELL__ <= 810
+#if __GLASGOW_HASKELL__ < 901
| otherwise = panic "findP impossible"
#endif
diff --git a/compiler/GHC/Core/Coercion/Opt.hs b/compiler/GHC/Core/Coercion/Opt.hs
index 4353676af6..4783ac6fe1 100644
--- a/compiler/GHC/Core/Coercion/Opt.hs
+++ b/compiler/GHC/Core/Coercion/Opt.hs
@@ -570,7 +570,7 @@ opt_univ env sym prov role oty1 oty2
where
prov' = case prov of
-#if __GLASGOW_HASKELL__ <= 810
+#if __GLASGOW_HASKELL__ < 901
-- This alt is redundant with the first match of the FunDef
PhantomProv kco -> PhantomProv $ opt_co4_wrap env sym False Nominal kco
#endif
diff --git a/compiler/GHC/Hs/Expr.hs b/compiler/GHC/Hs/Expr.hs
index 42ae115dab..e1f6e3fd3b 100644
--- a/compiler/GHC/Hs/Expr.hs
+++ b/compiler/GHC/Hs/Expr.hs
@@ -580,7 +580,7 @@ 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
+#if __GLASGOW_HASKELL__ < 901
(GhcPs, _) -> Nothing
#endif
(GhcRn, HsExpanded a _) -> ppr_infix_expr a
diff --git a/compiler/GHC/Hs/Pat.hs b/compiler/GHC/Hs/Pat.hs
index 2a81beaeb9..406f9d72a5 100644
--- a/compiler/GHC/Hs/Pat.hs
+++ b/compiler/GHC/Hs/Pat.hs
@@ -572,7 +572,7 @@ patNeedsParens p = go
go (SigPat {}) = p >= sigPrec
go (ViewPat {}) = True
go (XPat ext) = case ghcPass @p of
-#if __GLASGOW_HASKELL__ <= 810
+#if __GLASGOW_HASKELL__ < 901
GhcPs -> noExtCon ext
GhcRn -> noExtCon ext
#endif
diff --git a/compiler/GHC/Tc/Errors/Hole.hs b/compiler/GHC/Tc/Errors/Hole.hs
index 6514968b39..109a4416bc 100644
--- a/compiler/GHC/Tc/Errors/Hole.hs
+++ b/compiler/GHC/Tc/Errors/Hole.hs
@@ -785,7 +785,7 @@ tcFilterHoleFits limit typed_hole ht@(hole_ty, _) candidates =
Just (dataConWrapId con, dataConNonlinearType con)
_ -> Nothing }
where name = case hfc of
-#if __GLASGOW_HASKELL__ <= 810
+#if __GLASGOW_HASKELL__ < 901
IdHFCand id -> idName id
#endif
GreHFCand gre -> greMangledName gre