summaryrefslogtreecommitdiff
path: root/compiler/typecheck/TcValidity.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/typecheck/TcValidity.hs')
-rw-r--r--compiler/typecheck/TcValidity.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/typecheck/TcValidity.hs b/compiler/typecheck/TcValidity.hs
index 56cb348669..b018b52994 100644
--- a/compiler/typecheck/TcValidity.hs
+++ b/compiler/typecheck/TcValidity.hs
@@ -684,7 +684,8 @@ check_valid_theta _ _ []
= return ()
check_valid_theta env ctxt theta
= do { dflags <- getDynFlags
- ; warnTcM (wopt Opt_WarnDuplicateConstraints dflags &&
+ ; warnTcM Opt_WarnDuplicateConstraints
+ (wopt Opt_WarnDuplicateConstraints dflags &&
notNull dups) (dupPredWarn env dups)
; traceTc "check_valid_theta" (ppr theta)
; mapM_ (check_pred_ty env dflags ctxt) theta }
@@ -1455,7 +1456,7 @@ checkValidCoAxiom ax@(CoAxiom { co_ax_tc = fam_tc, co_ax_branches = branches })
-- (b) failure of injectivity
check_branch_compat prev_branches cur_branch
| cur_branch `isDominatedBy` prev_branches
- = do { addWarnAt (coAxBranchSpan cur_branch) $
+ = do { addWarnAt' (coAxBranchSpan cur_branch) $
inaccessibleCoAxBranch ax cur_branch
; return prev_branches }
| otherwise