on master help sign in
Reduce redundant 'specifically' clauses in errors
commit43cb5c749e5a8f1d902cadfed4ad92645f9c1017 authorBen Sherman <sherman@metsci.com> dateWed 3 Dec 2014, 10:09 (12 years ago) parentda237ae
1 file changed+3
src/Idris/Delaborate.hs+3
src/Idris/Delaborate.hs+3
@@ -205,6 +205,9 @@ pprintErr' i (CantUnify _ x_in y_in e sc s) =
205205 ++ zip nms (repeat False)) y)) <>
206206 case e of
207207 Msg "" -> empty
208+ -- if the specific error is the same as the one we just printed,
209+ -- there's no need to print it
210+ CantUnify _ x_in' y_in' _ _ _ | x_in == x_in' && y_in == y_in' -> empty
208211 _ -> line <> line <> text "Specifically:" <>
209212 indented (pprintErr' i e) <>
210213 if (opt_errContext (idris_options i)) then showSc i sc else empty