@@ -25,6 +25,7 @@ import Language.PureScript.CodeGen.JS.AST
25import Language.PureScript.Sugar.CaseDeclarations
25import Language.PureScript.Sugar.CaseDeclarations
26import Language.PureScript.Environment
26import Language.PureScript.Environment
27import Language.PureScript.Errors
27import Language.PureScript.Errors
28+import Language.PureScript.Pretty.Types (prettyPrintTypeAtom)
28import Language.PureScript.CodeGen.Common (identToJs)
29import Language.PureScript.CodeGen.Common (identToJs)
30import qualified Language.PureScript.Constants as C
31import qualified Language.PureScript.Constants as C
@@ -158,7 +159,7 @@ unit = TypeApp tyObject REmpty
159typeInstanceDictionaryDeclaration :: Ident -> ModuleName -> [(Qualified ProperName, [Type])] -> Qualified ProperName -> [Type] -> [Declaration] -> Desugar Declaration
160typeInstanceDictionaryDeclaration :: Ident -> ModuleName -> [(Qualified ProperName, [Type])] -> Qualified ProperName -> [Type] -> [Declaration] -> Desugar Declaration
160typeInstanceDictionaryDeclaration name mn deps className tys decls =
161typeInstanceDictionaryDeclaration name mn deps className tys decls =
161− rethrow (strMsg ("Error in type class " ++ show className ++ ":") <>) $ do
162+ rethrow (strMsg ("Error in type class instance " ++ show className ++ " " ++ unwords (map prettyPrintTypeAtom tys) ++ ":") <>) $ do
164 -- Lookup the type arguments and member types for the type class
165 -- Lookup the type arguments and member types for the type class