@@ -168,11 +168,11 @@ errorCode em = case unwrapErrorMessage em of
168168 CaseBinderLengthDiffers{} -> "CaseBinderLengthDiffers"
169169 IncorrectAnonymousArgument -> "IncorrectAnonymousArgument"
170170 InvalidOperatorInBinder{} -> "InvalidOperatorInBinder"
171− DeprecatedRequirePath{} -> "DeprecatedRequirePath"
172171 CannotGeneralizeRecursiveFunction{} -> "CannotGeneralizeRecursiveFunction"
173172 CannotDeriveNewtypeForData{} -> "CannotDeriveNewtypeForData"
174173 ExpectedWildcard{} -> "ExpectedWildcard"
175174 CannotUseBindWithDo{} -> "CannotUseBindWithDo"
175+ ClassInstanceArityMismatch{} -> "ClassInstanceArityMismatch"
176176
177177-- |
178178-- A stack trace for an error
@@ -691,7 +691,7 @@ prettyPrintSingleError (PPEOptions codeColor full level showDocs) e = flip evalS
691691 renderSimpleErrorMessage (ExtraneousClassMember ident className) =
692692 line $ "" <> markCode (showIdent ident) <> " is not a member of type class " <> markCode (showQualified runProperName className)
693693 renderSimpleErrorMessage (ExpectedType ty kind) =
694− paras [ line $ "In a type-annotated expression " <> markCode "x :: t" <> ", the type " <> markCode "t" <> " must have kind " <> markCode "*" <> "."
694+ paras [ line $ "In a type-annotated expression " <> markCode "x :: t" <> ", the type " <> markCode "t" <> " must have kind " <> markCode (prettyPrintKind kindType) <> "."
695695 , line "The error arises from the type"
696696 , markCodeBox $ indent $ typeAsBox ty
697697 , line "having the kind"
@@ -863,9 +863,6 @@ prettyPrintSingleError (PPEOptions codeColor full level showDocs) e = flip evalS
863863 , line "Only aliases for data constructors may be used in patterns."
864864 ]
865865
866− renderSimpleErrorMessage DeprecatedRequirePath =
867− line "The require-path option is deprecated and will be removed in PureScript 0.9."
868−
869866 renderSimpleErrorMessage (CannotGeneralizeRecursiveFunction ident ty) =
870867 paras [ line $ "Unable to generalize the type of the recursive function " <> markCode (showIdent ident) <> "."
871868 , line $ "The inferred type of " <> markCode (showIdent ident) <> " was:"
@@ -885,6 +882,13 @@ prettyPrintSingleError (PPEOptions codeColor full level showDocs) e = flip evalS
885882 paras [ line $ "The name " <> markCode "bind" <> " cannot be brought into scope in a do notation block, since do notation uses the same name."
886883 ]
887884
885+ renderSimpleErrorMessage (ClassInstanceArityMismatch dictName className expected actual) =
886+ paras [ line $ "The type class " <> markCode (showQualified runProperName className) <>
887+ " expects " <> T.pack (show expected) <> " argument(s)."
888+ , line $ "But the instance " <> markCode (showIdent dictName) <> " only provided " <>
889+ T.pack (show actual) <> "."
890+ ]
891+
888892 renderHint :: ErrorMessageHint -> Box.Box -> Box.Box
889893 renderHint (ErrorUnifyingTypes t1 t2) detail =
890894 paras [ detail