@@ -168,11 +168,11 @@ errorCode em = case unwrapErrorMessage em of
168 CaseBinderLengthDiffers{} -> "CaseBinderLengthDiffers"
168 CaseBinderLengthDiffers{} -> "CaseBinderLengthDiffers"
169 IncorrectAnonymousArgument -> "IncorrectAnonymousArgument"
169 IncorrectAnonymousArgument -> "IncorrectAnonymousArgument"
170 InvalidOperatorInBinder{} -> "InvalidOperatorInBinder"
170 InvalidOperatorInBinder{} -> "InvalidOperatorInBinder"
171− DeprecatedRequirePath{} -> "DeprecatedRequirePath"
172 CannotGeneralizeRecursiveFunction{} -> "CannotGeneralizeRecursiveFunction"
171 CannotGeneralizeRecursiveFunction{} -> "CannotGeneralizeRecursiveFunction"
173 CannotDeriveNewtypeForData{} -> "CannotDeriveNewtypeForData"
172 CannotDeriveNewtypeForData{} -> "CannotDeriveNewtypeForData"
174 ExpectedWildcard{} -> "ExpectedWildcard"
173 ExpectedWildcard{} -> "ExpectedWildcard"
175 CannotUseBindWithDo{} -> "CannotUseBindWithDo"
174 CannotUseBindWithDo{} -> "CannotUseBindWithDo"
175+ ClassInstanceArityMismatch{} -> "ClassInstanceArityMismatch"
178-- A stack trace for an error
178-- A stack trace for an error
@@ -691,7 +691,7 @@ prettyPrintSingleError (PPEOptions codeColor full level showDocs) e = flip evalS
691 renderSimpleErrorMessage (ExtraneousClassMember ident className) =
691 renderSimpleErrorMessage (ExtraneousClassMember ident className) =
692 line $ "" <> markCode (showIdent ident) <> " is not a member of type class " <> markCode (showQualified runProperName className)
692 line $ "" <> markCode (showIdent ident) <> " is not a member of type class " <> markCode (showQualified runProperName className)
693 renderSimpleErrorMessage (ExpectedType ty kind) =
693 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) <> "."
695 , line "The error arises from the type"
695 , line "The error arises from the type"
696 , markCodeBox $ indent $ typeAsBox ty
696 , markCodeBox $ indent $ typeAsBox ty
697 , line "having the kind"
697 , line "having the kind"
@@ -863,9 +863,6 @@ prettyPrintSingleError (PPEOptions codeColor full level showDocs) e = flip evalS
863 , line "Only aliases for data constructors may be used in patterns."
863 , line "Only aliases for data constructors may be used in patterns."
866− renderSimpleErrorMessage DeprecatedRequirePath =
867− line "The require-path option is deprecated and will be removed in PureScript 0.9."
869 renderSimpleErrorMessage (CannotGeneralizeRecursiveFunction ident ty) =
866 renderSimpleErrorMessage (CannotGeneralizeRecursiveFunction ident ty) =
870 paras [ line $ "Unable to generalize the type of the recursive function " <> markCode (showIdent ident) <> "."
867 paras [ line $ "Unable to generalize the type of the recursive function " <> markCode (showIdent ident) <> "."
871 , line $ "The inferred type of " <> markCode (showIdent ident) <> " was:"
868 , line $ "The inferred type of " <> markCode (showIdent ident) <> " was:"
@@ -885,6 +882,13 @@ prettyPrintSingleError (PPEOptions codeColor full level showDocs) e = flip evalS
885 paras [ line $ "The name " <> markCode "bind" <> " cannot be brought into scope in a do notation block, since do notation uses the same name."
882 paras [ line $ "The name " <> markCode "bind" <> " cannot be brought into scope in a do notation block, since do notation uses the same name."
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) <> "."
888 renderHint :: ErrorMessageHint -> Box.Box -> Box.Box
892 renderHint :: ErrorMessageHint -> Box.Box -> Box.Box
889 renderHint (ErrorUnifyingTypes t1 t2) detail =
893 renderHint (ErrorUnifyingTypes t1 t2) detail =
890 paras [ detail
894 paras [ detail