summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/Gen/Expr.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Tc/Gen/Expr.hs')
-rw-r--r--compiler/GHC/Tc/Gen/Expr.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/GHC/Tc/Gen/Expr.hs b/compiler/GHC/Tc/Gen/Expr.hs
index 597b9ca9cf..662a418116 100644
--- a/compiler/GHC/Tc/Gen/Expr.hs
+++ b/compiler/GHC/Tc/Gen/Expr.hs
@@ -1411,8 +1411,8 @@ checkMissingFields con_like rbinds arg_tys
else do
warn <- woptM Opt_WarnMissingFields
when (warn && notNull field_strs && null field_labels)
- (warnTc (Reason Opt_WarnMissingFields) True
- (missingFields con_like []))
+ (diagnosticTc (WarningWithFlag Opt_WarnMissingFields) True
+ (missingFields con_like []))
| otherwise = do -- A record
unless (null missing_s_fields) $ do
@@ -1427,8 +1427,8 @@ checkMissingFields con_like rbinds arg_tys
-- It is not an error (though we may want) to omit a
-- lazy field, because we can always use
-- (error "Missing field f") instead.
- warnTc (Reason Opt_WarnMissingFields) True
- (missingFields con_like fs)
+ diagnosticTc (WarningWithFlag Opt_WarnMissingFields) True
+ (missingFields con_like fs)
where
-- we zonk the fields to get better types in error messages (#18869)