git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Improve "error in type class" message
commita7d25f2a6c20deea22998f21993d87697576129b authorGary Burgess <gary.burgess@gmail.com> dateWed 9 Apr 2014, 01:08 (13 years ago) parent0625714
1 file changed+2−1
src/Language/PureScript/Sugar/TypeClasses.hs+2−1
src/Language/PureScript/Sugar/TypeClasses.hs+2−1
@@ -25,6 +25,7 @@ import Language.PureScript.CodeGen.JS.AST
2525import Language.PureScript.Sugar.CaseDeclarations
2626import Language.PureScript.Environment
2727import Language.PureScript.Errors
28+import Language.PureScript.Pretty.Types (prettyPrintTypeAtom)
2829import Language.PureScript.CodeGen.Common (identToJs)
2930
3031import qualified Language.PureScript.Constants as C
@@ -158,7 +159,7 @@ unit = TypeApp tyObject REmpty
158159
159160typeInstanceDictionaryDeclaration :: Ident -> ModuleName -> [(Qualified ProperName, [Type])] -> Qualified ProperName -> [Type] -> [Declaration] -> Desugar Declaration
160161typeInstanceDictionaryDeclaration 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
162163 m <- get
163164
164165 -- Lookup the type arguments and member types for the type class