summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/GHC/Driver/Session.hs5
-rw-r--r--compiler/GHC/Hs/Expr.hs2
-rw-r--r--compiler/GHC/Hs/Extension.hs1
-rw-r--r--compiler/typecheck/TcErrors.hs39
-rw-r--r--compiler/typecheck/TcOrigin.hs8
5 files changed, 16 insertions, 39 deletions
diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs
index 4eb9ab2597..f20a899086 100644
--- a/compiler/GHC/Driver/Session.hs
+++ b/compiler/GHC/Driver/Session.hs
@@ -875,7 +875,7 @@ data WarningFlag =
| Opt_WarnRedundantRecordWildcards
| Opt_WarnWarningsDeprecations
| Opt_WarnDeprecatedFlags
- | Opt_WarnMissingMonadFailInstances -- since 8.0
+ | Opt_WarnMissingMonadFailInstances -- since 8.0, has no effect since 8.8
| Opt_WarnSemigroup -- since 8.0
| Opt_WarnDodgyExports
| Opt_WarnDodgyImports
@@ -4918,8 +4918,7 @@ minusWeverythingOpts = [ toEnum 0 .. ]
-- code future compatible to fix issues before they even generate warnings.
minusWcompatOpts :: [WarningFlag]
minusWcompatOpts
- = [ Opt_WarnMissingMonadFailInstances
- , Opt_WarnSemigroup
+ = [ Opt_WarnSemigroup
, Opt_WarnNonCanonicalMonoidInstances
, Opt_WarnStarIsType
, Opt_WarnCompatUnqualifiedImports
diff --git a/compiler/GHC/Hs/Expr.hs b/compiler/GHC/Hs/Expr.hs
index a84bc1b240..f6f0541097 100644
--- a/compiler/GHC/Hs/Expr.hs
+++ b/compiler/GHC/Hs/Expr.hs
@@ -666,8 +666,6 @@ type instance XBinTick (GhcPass _) = NoExtField
type instance XPragE (GhcPass _) = NoExtField
-type instance XWrap (GhcPass _) = NoExtField
-
type instance XXExpr GhcPs = NoExtCon
type instance XXExpr GhcRn = NoExtCon
type instance XXExpr GhcTc = HsWrap HsExpr
diff --git a/compiler/GHC/Hs/Extension.hs b/compiler/GHC/Hs/Extension.hs
index cde29509c5..31e6a20f5d 100644
--- a/compiler/GHC/Hs/Extension.hs
+++ b/compiler/GHC/Hs/Extension.hs
@@ -522,7 +522,6 @@ type family XStatic x
type family XTick x
type family XBinTick x
type family XPragE x
-type family XWrap x
type family XXExpr x
type family XSCC x
diff --git a/compiler/typecheck/TcErrors.hs b/compiler/typecheck/TcErrors.hs
index de38cdfcec..d098edac8a 100644
--- a/compiler/typecheck/TcErrors.hs
+++ b/compiler/typecheck/TcErrors.hs
@@ -810,31 +810,20 @@ cmp_loc ct1 ct2 = ctLocSpan (ctLoc ct1) `compare` ctLocSpan (ctLoc ct2)
reportGroup :: (ReportErrCtxt -> [Ct] -> TcM ErrMsg) -> ReportErrCtxt
-> [Ct] -> TcM ()
reportGroup mk_err ctxt cts =
- case partition isMonadFailInstanceMissing cts of
- -- Only warn about missing MonadFail constraint when
- -- there are no other missing constraints!
- (monadFailCts, []) ->
- do { err <- mk_err ctxt monadFailCts
- ; reportWarning (Reason Opt_WarnMissingMonadFailInstances) err }
-
- (_, cts') -> do { err <- mk_err ctxt cts'
- ; traceTc "About to maybeReportErr" $
- vcat [ text "Constraint:" <+> ppr cts'
- , text "cec_suppress =" <+> ppr (cec_suppress ctxt)
- , text "cec_defer_type_errors =" <+> ppr (cec_defer_type_errors ctxt) ]
- ; maybeReportError ctxt err
- -- But see Note [Always warn with -fdefer-type-errors]
- ; traceTc "reportGroup" (ppr cts')
- ; mapM_ (addDeferredBinding ctxt err) cts' }
- -- Add deferred bindings for all
- -- Redundant if we are going to abort compilation,
- -- but that's hard to know for sure, and if we don't
- -- abort, we need bindings for all (e.g. #12156)
- where
- isMonadFailInstanceMissing ct =
- case ctLocOrigin (ctLoc ct) of
- FailablePattern _pat -> True
- _otherwise -> False
+ ASSERT( not (null cts))
+ do { err <- mk_err ctxt cts
+ ; traceTc "About to maybeReportErr" $
+ vcat [ text "Constraint:" <+> ppr cts
+ , text "cec_suppress =" <+> ppr (cec_suppress ctxt)
+ , text "cec_defer_type_errors =" <+> ppr (cec_defer_type_errors ctxt) ]
+ ; maybeReportError ctxt err
+ -- But see Note [Always warn with -fdefer-type-errors]
+ ; traceTc "reportGroup" (ppr cts)
+ ; mapM_ (addDeferredBinding ctxt err) cts }
+ -- Add deferred bindings for all
+ -- Redundant if we are going to abort compilation,
+ -- but that's hard to know for sure, and if we don't
+ -- abort, we need bindings for all (e.g. #12156)
maybeReportHoleError :: ReportErrCtxt -> Ct -> ErrMsg -> TcM ()
-- Unlike maybeReportError, these "hole" errors are
diff --git a/compiler/typecheck/TcOrigin.hs b/compiler/typecheck/TcOrigin.hs
index c69013917c..4137939135 100644
--- a/compiler/typecheck/TcOrigin.hs
+++ b/compiler/typecheck/TcOrigin.hs
@@ -437,10 +437,6 @@ data CtOrigin
| ListOrigin -- An overloaded list
| BracketOrigin -- An overloaded quotation bracket
| StaticOrigin -- A static form
- | FailablePattern (LPat GhcTcId) -- A failable pattern in do-notation for the
- -- MonadFail Proposal (MFP). Obsolete when
- -- actual desugaring to MonadFail.fail is
- -- live.
| Shouldn'tHappenOrigin String
-- the user should never see this one,
-- unless ImpredicativeTypes is on, where all
@@ -601,10 +597,6 @@ pprCtOrigin (MCompPatOrigin pat)
= ctoHerald <+> hsep [ text "the failable pattern"
, quotes (ppr pat)
, text "in a statement in a monad comprehension" ]
-pprCtOrigin (FailablePattern pat)
- = ctoHerald <+> text "the failable pattern" <+> quotes (ppr pat)
- $$
- text "(this will become an error in a future GHC release)"
pprCtOrigin (Shouldn'tHappenOrigin note)
= sdocOption sdocImpredicativeTypes $ \case