diff options
author | sheaf <sam.derbyshire@gmail.com> | 2022-10-17 17:59:57 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-10-19 10:47:52 -0400 |
commit | 607ce263fd8304d02c24e997abc0d17ead1cb19b (patch) | |
tree | 84626cb0f75eb8a5f8c82c03de1b6e99e9dfa52e /compiler/GHC/Tc/Errors.hs | |
parent | 488d36311709f958f6c759952fc8379b231e69ca (diff) | |
download | haskell-607ce263fd8304d02c24e997abc0d17ead1cb19b.tar.gz |
Rename unsafeOverlap_matches -> unsafeOverlap_match in UnsafeOverlap
Diffstat (limited to 'compiler/GHC/Tc/Errors.hs')
-rw-r--r-- | compiler/GHC/Tc/Errors.hs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/GHC/Tc/Errors.hs b/compiler/GHC/Tc/Errors.hs index 3a3e474b80..021d163d84 100644 --- a/compiler/GHC/Tc/Errors.hs +++ b/compiler/GHC/Tc/Errors.hs @@ -2204,8 +2204,6 @@ mkDictErr ctxt orig_items -- and the result of evaluating ...". mk_dict_err :: HasCallStack => SolverReportErrCtxt -> (ErrorItem, ClsInstLookupResult) -> TcM TcSolverReportMsg --- Report an overlap error if this class constraint results --- from an overlap (returning Left clas), otherwise return (Right pred) mk_dict_err ctxt (item, (matches, unifiers, unsafe_overlapped)) = case (NE.nonEmpty matches, NE.nonEmpty unsafe_overlapped) of (Nothing, _) -> do -- No matches but perhaps several unifiers { (_, rel_binds, item) <- relevantBindings True ctxt item @@ -2219,7 +2217,7 @@ mk_dict_err ctxt (item, (matches, unifiers, unsafe_overlapped)) = case (NE.nonEm (Just (match :| []), Just unsafe_overlappedNE) -> return $ UnsafeOverlap item (fst match) (NE.map fst unsafe_overlappedNE) - (Just (_ :| rest), Just{}) -> pprPanic "should be empty" (ppr rest) + (Just matches@(_ :| _), Just overlaps) -> pprPanic "mk_dict_err: multiple matches with overlap" $ vcat [ text "matches:" <+> ppr matches, text "overlaps:" <+> ppr overlaps ] where orig = errorItemOrigin item pred = errorItemPred item |