on master help sign in
Fix error messages for interfaces
220f400Edwin Brady
src/Idris/Delaborate.hs+2−2
@@ -346,11 +346,11 @@ pprintErr' i (NotInjective p x y) =
346 text "Can't verify injectivity of" <+> annTm p (pprintTerm i (delabSugared i p)) <+>
346 text "Can't verify injectivity of" <+> annTm p (pprintTerm i (delabSugared i p)) <+>
347 text " when unifying" <+> annTm x (pprintTerm i (delabSugared i x)) <+> text "and" <+>
347 text " when unifying" <+> annTm x (pprintTerm i (delabSugared i x)) <+> text "and" <+>
348 annTm y (pprintTerm i (delabSugared i y))
348 annTm y (pprintTerm i (delabSugared i y))
349−pprintErr' i (CantResolve _ c) = text "Can't resolve type class" <+> pprintTerm i (delabSugared i c)
349+pprintErr' i (CantResolve _ c) = text "Can't find implementation for" <+> pprintTerm i (delabSugared i c)
350pprintErr' i (InvalidTCArg n t)
350pprintErr' i (InvalidTCArg n t)
351 = annTm t (pprintTerm i (delabSugared i t)) <+> text " cannot be a parameter of "
351 = annTm t (pprintTerm i (delabSugared i t)) <+> text " cannot be a parameter of "
352 <> annName n <$>
352 <> annName n <$>
353− text "(Type class arguments must be injective)"
353+ text "(Implementation arguments must be injective)"
354pprintErr' i (CantResolveAlts as) = text "Can't disambiguate name:" <+>
354pprintErr' i (CantResolveAlts as) = text "Can't disambiguate name:" <+>
355 align (cat (punctuate (comma <> space) (map (fmap (fancifyAnnots i True) . annName) as)))
355 align (cat (punctuate (comma <> space) (map (fmap (fancifyAnnots i True) . annName) as)))
356pprintErr' i (NoValidAlts as) = text "Can't disambiguate since no name has a suitable type:" <+>
356pprintErr' i (NoValidAlts as) = text "Can't disambiguate since no name has a suitable type:" <+>
test/interactive010/expected+1−1
@@ -17,4 +17,4 @@ pat {ty504} : Type u. pat {__class505} : Prelude.Classes.Fractional {ty504}. Pre
17 end of input
17 end of input
18++<EOF>
18++<EOF>
19^
19^
20−Can't resolve type class Fractional ty
20+Can't find implementation for Fractional ty