summaryrefslogtreecommitdiff
path: root/compiler/typecheck/TcDeriv.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/typecheck/TcDeriv.hs')
-rw-r--r--compiler/typecheck/TcDeriv.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/typecheck/TcDeriv.hs b/compiler/typecheck/TcDeriv.hs
index c2b344dd77..e98ca8852d 100644
--- a/compiler/typecheck/TcDeriv.hs
+++ b/compiler/typecheck/TcDeriv.hs
@@ -559,7 +559,7 @@ deriveStandalone (L loc (DerivDecl deriv_ty overlap_mode))
warnUselessTypeable :: TcM ()
warnUselessTypeable
= do { warn <- woptM Opt_WarnDerivingTypeable
- ; when warn $ addWarnTc
+ ; when warn $ addWarnTc (Reason Opt_WarnDerivingTypeable)
$ text "Deriving" <+> quotes (ppr typeableClassName) <+>
text "has no effect: all types now auto-derive Typeable" }
@@ -1499,7 +1499,8 @@ mkNewTypeEqn dflags overlap_mode tvs
-- CanDerive/DerivableViaInstance
_ -> do when (newtype_deriving && deriveAnyClass) $
- addWarnTc (sep [ text "Both DeriveAnyClass and GeneralizedNewtypeDeriving are enabled"
+ addWarnTc NoReason
+ (sep [ text "Both DeriveAnyClass and GeneralizedNewtypeDeriving are enabled"
, text "Defaulting to the DeriveAnyClass strategy for instantiating" <+> ppr cls ])
go_for_it
where