@@ -120,85 +120,171 @@ instance UnificationError Type ErrorMessage where
120instance UnificationError Kind ErrorMessage where
120instance UnificationError Kind ErrorMessage where
121 occursCheckFailed = InfiniteKind
121 occursCheckFailed = InfiniteKind
124+-- Get the error code for a particular error type
126+errorCode :: ErrorMessage -> String
127+errorCode (InfiniteType _) = "InfiniteType"
128+errorCode (InfiniteKind _) = "InfiniteKind"
129+errorCode CannotReorderOperators = "CannotReorderOperators"
130+errorCode (MultipleFixities _) = "MultipleFixities"
131+errorCode (OrphanTypeDeclaration _) = "OrphanTypeDeclaration"
132+errorCode (OrphanFixityDeclaration _) = "OrphanFixityDeclaration"
133+errorCode (RedefinedModule _) = "RedefinedModule"
134+errorCode (RedefinedIdent _) = "RedefinedIdent"
135+errorCode OverlappingNamesInLet = "OverlappingNamesInLet"
136+errorCode (UnknownModule _) = "UnknownModule"
137+errorCode (UnknownType _) = "UnknownType"
138+errorCode (UnknownTypeClass _) = "UnknownTypeClass"
139+errorCode (UnknownValue _) = "UnknownValue"
140+errorCode (UnknownDataConstructor _ _) = "UnknownDataConstructor"
141+errorCode (UnknownTypeConstructor _) = "UnknownTypeConstructor"
142+errorCode (ConflictingImport _ _) = "ConflictingImport"
143+errorCode (ConflictingImports _ _ _) = "ConflictingImports"
144+errorCode (ConflictingTypeDecls _) = "ConflictingTypeDecls"
145+errorCode (ConflictingCtorDecls _) = "ConflictingCtorDecls"
146+errorCode (TypeConflictsWithClass _) = "TypeConflictsWithClass"
147+errorCode (CtorConflictsWithClass _) = "CtorConflictsWithClass"
148+errorCode (ClassConflictsWithType _) = "ClassConflictsWithType"
149+errorCode (ClassConflictsWithCtor _) = "ClassConflictsWithCtor"
150+errorCode (DuplicateClassExport _) = "DuplicateClassExport"
151+errorCode (DuplicateValueExport _) = "DuplicateValueExport"
152+errorCode (DuplicateTypeArgument _) = "DuplicateTypeArgument"
153+errorCode InvalidDoBind = "InvalidDoBind"
154+errorCode InvalidDoLet = "InvalidDoLet"
155+errorCode (CycleInDeclaration _) = "CycleInDeclaration"
156+errorCode (CycleInTypeSynonym _) = "CycleInTypeSynonym"
157+errorCode (NameIsUndefined _) = "NameIsUndefined"
158+errorCode (NameNotInScope _) = "NameNotInScope"
159+errorCode (UndefinedTypeVariable _) = "UndefinedTypeVariable"
160+errorCode (PartiallyAppliedSynonym _) = "PartiallyAppliedSynonym"
161+errorCode (EscapedSkolem _) = "EscapedSkolem"
162+errorCode UnspecifiedSkolemScope = "UnspecifiedSkolemScope"
163+errorCode (TypesDoNotUnify _ _) = "TypesDoNotUnify"
164+errorCode (KindsDoNotUnify _ _) = "KindsDoNotUnify"
165+errorCode (ConstrainedTypeUnified _ _) = "ConstrainedTypeUnified"
166+errorCode (OverlappingInstances _ _ _) = "OverlappingInstances"
167+errorCode (NoInstanceFound _ _) = "NoInstanceFound"
168+errorCode (DuplicateLabel _ _) = "DuplicateLabel"
169+errorCode (DuplicateValueDeclaration _) = "DuplicateValueDeclaration"
170+errorCode (ArgListLengthsDiffer _) = "ArgListLengthsDiffer"
171+errorCode (OverlappingArgNames _) = "OverlappingArgNames"
172+errorCode (MissingClassMember _) = "MissingClassMember"
173+errorCode (ExpectedType _) = "ExpectedType"
174+errorCode (IncorrectConstructorArity _) = "IncorrectConstructorArity"
175+errorCode SubsumptionCheckFailed = "SubsumptionCheckFailed"
176+errorCode (ExprDoesNotHaveType _ _) = "ExprDoesNotHaveType"
177+errorCode (PropertyIsMissing _ _) = "PropertyIsMissing"
178+errorCode (ErrorUnifyingTypes _ _ _) = "ErrorUnifyingTypes"
179+errorCode (CannotApplyFunction _ _) = "CannotApplyFunction"
180+errorCode TypeSynonymInstance = "TypeSynonymInstance"
181+errorCode InvalidNewtype = "InvalidNewtype"
182+errorCode (InvalidInstanceHead _) = "InvalidInstanceHead"
183+errorCode (TransitiveExportError _ _) = "TransitiveExportError"
184+errorCode (NotYetDefined _ e) = errorCode e
185+errorCode (ErrorInExpression _ e) = errorCode e
186+errorCode (ErrorInModule _ e) = errorCode e
187+errorCode (ErrorInInstance _ _ e) = errorCode e
188+errorCode (ErrorInSubsumption _ _ e) = errorCode e
189+errorCode (ErrorCheckingType _ _ e) = errorCode e
190+errorCode (ErrorCheckingKind _ e) = errorCode e
191+errorCode (ErrorInferringType _ e) = errorCode e
192+errorCode (ErrorInApplication _ _ _ e) = errorCode e
193+errorCode (ErrorInDataConstructor _ e) = errorCode e
194+errorCode (ErrorInTypeConstructor _ e) = errorCode e
195+errorCode (ErrorInBindingGroup _ e) = errorCode e
196+errorCode (ErrorInDataBindingGroup e) = errorCode e
197+errorCode (ErrorInTypeSynonym _ e) = errorCode e
198+errorCode (ErrorInValueDeclaration _ e) = errorCode e
199+errorCode (ErrorInForeignImport _ e) = errorCode e
200+errorCode (PositionedError _ e) = errorCode e
124-- Pretty print an ErrorMessage
203-- Pretty print an ErrorMessage
126prettyPrintErrorMessage :: ErrorMessage -> String
205prettyPrintErrorMessage :: ErrorMessage -> String
206+prettyPrintErrorMessage e =
207+ go e ++ "\n\nUse --verbose-errors, or see " ++ wikiUri ++ " for more information."
210+ wikiUri = "http://wiki.purescript.org/Error-Code-" ++ errorCode e
212+ go :: ErrorMessage -> String
127−prettyPrintErrorMessage InvalidDoBind = "Bind statement cannot be the last statement in a do block"
213+ go InvalidDoBind = "Bind statement cannot be the last statement in a do block"
128−prettyPrintErrorMessage InvalidDoLet = "Let statement cannot be the last statement in a do block"
214+ go InvalidDoLet = "Let statement cannot be the last statement in a do block"
129−prettyPrintErrorMessage CannotReorderOperators = "Unable to reorder operators"
215+ go CannotReorderOperators = "Unable to reorder operators"
130−prettyPrintErrorMessage UnspecifiedSkolemScope = "Skolem variable scope is unspecified"
216+ go UnspecifiedSkolemScope = "Skolem variable scope is unspecified"
131−prettyPrintErrorMessage OverlappingNamesInLet = "Overlapping names in let binding."
217+ go OverlappingNamesInLet = "Overlapping names in let binding."
132−prettyPrintErrorMessage (InfiniteType ty) = "Infinite type detected: " ++ prettyPrintType ty
218+ go (InfiniteType ty) = "Infinite type detected: " ++ prettyPrintType ty
133−prettyPrintErrorMessage (InfiniteKind ki) = "Infinite kind detected: " ++ prettyPrintKind ki
219+ go (InfiniteKind ki) = "Infinite kind detected: " ++ prettyPrintKind ki
134−prettyPrintErrorMessage (MultipleFixities name) = "Multiple fixity declarations for " ++ show name
220+ go (MultipleFixities name) = "Multiple fixity declarations for " ++ show name
135−prettyPrintErrorMessage (OrphanTypeDeclaration nm) = "Orphan type declaration for " ++ show nm
221+ go (OrphanTypeDeclaration nm) = "Orphan type declaration for " ++ show nm
136−prettyPrintErrorMessage (OrphanFixityDeclaration op) = "Orphan fixity declaration for " ++ show op
222+ go (OrphanFixityDeclaration op) = "Orphan fixity declaration for " ++ show op
137−prettyPrintErrorMessage (RedefinedModule name) = "Module " ++ show name ++ " has been defined multiple times"
223+ go (RedefinedModule name) = "Module " ++ show name ++ " has been defined multiple times"
138−prettyPrintErrorMessage (RedefinedIdent name) = "Name " ++ show name ++ " has been defined multiple times"
224+ go (RedefinedIdent name) = "Name " ++ show name ++ " has been defined multiple times"
139−prettyPrintErrorMessage (UnknownModule mn) = "Unknown module " ++ show mn
225+ go (UnknownModule mn) = "Unknown module " ++ show mn
140−prettyPrintErrorMessage (UnknownType name) = "Unknown type " ++ show name
226+ go (UnknownType name) = "Unknown type " ++ show name
141−prettyPrintErrorMessage (UnknownTypeClass name) = "Unknown type class " ++ show name
227+ go (UnknownTypeClass name) = "Unknown type class " ++ show name
142−prettyPrintErrorMessage (UnknownValue name) = "Unknown value " ++ show name
228+ go (UnknownValue name) = "Unknown value " ++ show name
143−prettyPrintErrorMessage (UnknownTypeConstructor name) = "Unknown type constructor " ++ show name
229+ go (UnknownTypeConstructor name) = "Unknown type constructor " ++ show name
144−prettyPrintErrorMessage (UnknownDataConstructor dc tc) = "Unknown data constructor " ++ show dc ++ foldMap ((" for type constructor " ++) . show) tc
230+ go (UnknownDataConstructor dc tc) = "Unknown data constructor " ++ show dc ++ foldMap ((" for type constructor " ++) . show) tc
145−prettyPrintErrorMessage (ConflictingImport nm mn) = "Declaration " ++ nm ++ " conflicts with import " ++ show mn
231+ go (ConflictingImport nm mn) = "Declaration " ++ nm ++ " conflicts with import " ++ show mn
146−prettyPrintErrorMessage (ConflictingImports nm m1 m2) = "Conflicting imports for " ++ nm ++ " from modules " ++ show m1 ++ " and " ++ show m2
232+ go (ConflictingImports nm m1 m2) = "Conflicting imports for " ++ nm ++ " from modules " ++ show m1 ++ " and " ++ show m2
147−prettyPrintErrorMessage (ConflictingTypeDecls nm) = "Conflicting type declarations for " ++ show nm
233+ go (ConflictingTypeDecls nm) = "Conflicting type declarations for " ++ show nm
148−prettyPrintErrorMessage (ConflictingCtorDecls nm) = "Conflicting data constructor declarations for " ++ show nm
234+ go (ConflictingCtorDecls nm) = "Conflicting data constructor declarations for " ++ show nm
149−prettyPrintErrorMessage (TypeConflictsWithClass nm) = "Type " ++ show nm ++ " conflicts with type class declaration of the same name"
235+ go (TypeConflictsWithClass nm) = "Type " ++ show nm ++ " conflicts with type class declaration of the same name"
150−prettyPrintErrorMessage (CtorConflictsWithClass nm) = "Data constructor " ++ show nm ++ " conflicts with type class declaration of the same name"
236+ go (CtorConflictsWithClass nm) = "Data constructor " ++ show nm ++ " conflicts with type class declaration of the same name"
151−prettyPrintErrorMessage (ClassConflictsWithType nm) = "Type class " ++ show nm ++ " conflicts with type declaration of the same name"
237+ go (ClassConflictsWithType nm) = "Type class " ++ show nm ++ " conflicts with type declaration of the same name"
152−prettyPrintErrorMessage (ClassConflictsWithCtor nm) = "Type class " ++ show nm ++ " conflicts with data constructor declaration of the same name"
238+ go (ClassConflictsWithCtor nm) = "Type class " ++ show nm ++ " conflicts with data constructor declaration of the same name"
153−prettyPrintErrorMessage (DuplicateClassExport nm) = "Duplicate export declaration for type class " ++ show nm
239+ go (DuplicateClassExport nm) = "Duplicate export declaration for type class " ++ show nm
154−prettyPrintErrorMessage (DuplicateValueExport nm) = "Duplicate export declaration for value " ++ show nm
240+ go (DuplicateValueExport nm) = "Duplicate export declaration for value " ++ show nm
155−prettyPrintErrorMessage (CycleInDeclaration nm) = "Cycle in declaration of " ++ show nm
241+ go (CycleInDeclaration nm) = "Cycle in declaration of " ++ show nm
156−prettyPrintErrorMessage (NotYetDefined names err) = "The following are not yet defined here: " ++ unwords (map show names) ++ "\n" ++ prettyPrintErrorMessage err
242+ go (NotYetDefined names err) = "The following are not yet defined here: " ++ unwords (map show names) ++ "\n" ++ go err
157−prettyPrintErrorMessage (CycleInTypeSynonym pn) = "Cycle in type synonym" ++ foldMap ((" " ++) . show) pn
243+ go (CycleInTypeSynonym pn) = "Cycle in type synonym" ++ foldMap ((" " ++) . show) pn
158−prettyPrintErrorMessage (NameIsUndefined ident) = show ident ++ " is undefined"
244+ go (NameIsUndefined ident) = show ident ++ " is undefined"
159−prettyPrintErrorMessage (NameNotInScope ident) = show ident ++ " may not be defined in the current scope"
245+ go (NameNotInScope ident) = show ident ++ " may not be defined in the current scope"
160−prettyPrintErrorMessage (UndefinedTypeVariable name) = "Type variable " ++ show name ++ " is undefined"
246+ go (UndefinedTypeVariable name) = "Type variable " ++ show name ++ " is undefined"
161−prettyPrintErrorMessage (PartiallyAppliedSynonym name) = "Partially applied type synonym " ++ show name
247+ go (PartiallyAppliedSynonym name) = "Partially applied type synonym " ++ show name
162−prettyPrintErrorMessage (EscapedSkolem binding) = "Rigid/skolem type variable " ++ foldMap (("bound by " ++) . prettyPrintValue) binding ++ " has escaped."
248+ go (EscapedSkolem binding) = "Rigid/skolem type variable " ++ foldMap (("bound by " ++) . prettyPrintValue) binding ++ " has escaped."
163−prettyPrintErrorMessage (TypesDoNotUnify t1 t2) = "Cannot unify " ++ prettyPrintType t1 ++ " with " ++ prettyPrintType t2
249+ go (TypesDoNotUnify t1 t2) = "Cannot unify " ++ prettyPrintType t1 ++ " with " ++ prettyPrintType t2
164−prettyPrintErrorMessage (KindsDoNotUnify k1 k2) = "Cannot unify " ++ prettyPrintKind k1 ++ " with " ++ prettyPrintKind k2
250+ go (KindsDoNotUnify k1 k2) = "Cannot unify " ++ prettyPrintKind k1 ++ " with " ++ prettyPrintKind k2
165−prettyPrintErrorMessage (ConstrainedTypeUnified t1 t2) = "Cannot unify constrained type " ++ prettyPrintType t1 ++ " with " ++ prettyPrintType t2
251+ go (ConstrainedTypeUnified t1 t2) = "Cannot unify constrained type " ++ prettyPrintType t1 ++ " with " ++ prettyPrintType t2
166−prettyPrintErrorMessage (OverlappingInstances nm ts ds) = unlines (("Overlapping instances found for " ++ show nm ++ " " ++ unwords (map prettyPrintType ts) ++ ":")
252+ go (OverlappingInstances nm ts ds) = unlines ( ("Overlapping instances found for " ++ show nm ++ " " ++ unwords (map prettyPrintType ts) ++ ":")
167− : map prettyPrintDictionaryValue ds)
253+ : map prettyPrintDictionaryValue ds)
168−prettyPrintErrorMessage (NoInstanceFound nm ts) = "No instance found for " ++ show nm ++ " " ++ unwords (map prettyPrintTypeAtom ts)
254+ go (NoInstanceFound nm ts) = "No instance found for " ++ show nm ++ " " ++ unwords (map prettyPrintTypeAtom ts)
169−prettyPrintErrorMessage (DuplicateLabel l expr) = "Duplicate label " ++ show l ++ " in row." ++ foldMap ((" Relevant expression: " ++) . prettyPrintValue) expr
255+ go (DuplicateLabel l expr) = "Duplicate label " ++ show l ++ " in row." ++ foldMap ((" Relevant expression: " ++) . prettyPrintValue) expr
170−prettyPrintErrorMessage (DuplicateTypeArgument name) = "Duplicate type argument " ++ show name
256+ go (DuplicateTypeArgument name) = "Duplicate type argument " ++ show name
171−prettyPrintErrorMessage (DuplicateValueDeclaration nm) = "Duplicate value declaration for " ++ show nm
257+ go (DuplicateValueDeclaration nm) = "Duplicate value declaration for " ++ show nm
172−prettyPrintErrorMessage (ArgListLengthsDiffer ident) = "Argument list lengths differ in declaration " ++ show ident
258+ go (ArgListLengthsDiffer ident) = "Argument list lengths differ in declaration " ++ show ident
173−prettyPrintErrorMessage (OverlappingArgNames ident) = "Overlapping names in function/binder" ++ foldMap ((" in declaration" ++) . show) ident
259+ go (OverlappingArgNames ident) = "Overlapping names in function/binder" ++ foldMap ((" in declaration" ++) . show) ident
174−prettyPrintErrorMessage (MissingClassMember ident) = "Member " ++ show ident ++ " has not been implemented"
260+ go (MissingClassMember ident) = "Member " ++ show ident ++ " has not been implemented"
175−prettyPrintErrorMessage (ExpectedType kind) = "Expected type of kind *, was " ++ prettyPrintKind kind
261+ go (ExpectedType kind) = "Expected type of kind *, was " ++ prettyPrintKind kind
176−prettyPrintErrorMessage (IncorrectConstructorArity nm) = "Wrong number of arguments to constructor " ++ show nm
262+ go (IncorrectConstructorArity nm) = "Wrong number of arguments to constructor " ++ show nm
177−prettyPrintErrorMessage SubsumptionCheckFailed = "Unable to check type subsumption"
263+ go SubsumptionCheckFailed = "Unable to check type subsumption"
178−prettyPrintErrorMessage (ExprDoesNotHaveType expr ty) = "Expression " ++ prettyPrintValue expr ++ " does not have type " ++ prettyPrintType ty
264+ go (ExprDoesNotHaveType expr ty) = "Expression " ++ prettyPrintValue expr ++ " does not have type " ++ prettyPrintType ty
179−prettyPrintErrorMessage (PropertyIsMissing prop row) = "Row " ++ prettyPrintRow row ++ " lacks required property " ++ show prop
265+ go (PropertyIsMissing prop row) = "Row " ++ prettyPrintRow row ++ " lacks required property " ++ show prop
180−prettyPrintErrorMessage (CannotApplyFunction fn arg) = "Cannot apply function of type " ++ prettyPrintType fn ++ " to argument " ++ prettyPrintValue arg
266+ go (CannotApplyFunction fn arg) = "Cannot apply function of type " ++ prettyPrintType fn ++ " to argument " ++ prettyPrintValue arg
181−prettyPrintErrorMessage TypeSynonymInstance = "Type synonym instances are disallowed"
267+ go TypeSynonymInstance = "Type synonym instances are disallowed"
182−prettyPrintErrorMessage InvalidNewtype = "Newtypes must define a single constructor with a single argument"
268+ go InvalidNewtype = "Newtypes must define a single constructor with a single argument"
183−prettyPrintErrorMessage (InvalidInstanceHead ty) = "Invalid type " ++ prettyPrintType ty ++ " in class instance head"
269+ go (InvalidInstanceHead ty) = "Invalid type " ++ prettyPrintType ty ++ " in class instance head"
184−prettyPrintErrorMessage (TransitiveExportError x ys) = "An export for " ++ prettyPrintExport x ++ " requires the following to also be exported: " ++ intercalate ", " (map prettyPrintExport ys)
270+ go (TransitiveExportError x ys) = "An export for " ++ prettyPrintExport x ++ " requires the following to also be exported: " ++ intercalate ", " (map prettyPrintExport ys)
185−prettyPrintErrorMessage (ErrorUnifyingTypes t1 t2 err) = "Error unifying type " ++ prettyPrintType t1 ++ " with type " ++ prettyPrintType t2 ++ ":\n" ++ prettyPrintErrorMessage err
271+ go (ErrorUnifyingTypes t1 t2 err) = "Error unifying type " ++ prettyPrintType t1 ++ " with type " ++ prettyPrintType t2 ++ ":\n" ++ go err
186−prettyPrintErrorMessage (ErrorInExpression expr err) = "Error in expression " ++ prettyPrintValue expr ++ ":\n" ++ prettyPrintErrorMessage err
272+ go (ErrorInExpression expr err) = "Error in expression " ++ prettyPrintValue expr ++ ":\n" ++ go err
187−prettyPrintErrorMessage (ErrorInModule mn err) = "Error in module " ++ show mn ++ ":\n" ++ prettyPrintErrorMessage err
273+ go (ErrorInModule mn err) = "Error in module " ++ show mn ++ ":\n" ++ go err
188−prettyPrintErrorMessage (ErrorInSubsumption t1 t2 err) = "Error checking that type " ++ prettyPrintType t1 ++ " subsumes type " ++ prettyPrintType t2 ++ ":\n" ++ prettyPrintErrorMessage err
274+ go (ErrorInSubsumption t1 t2 err) = "Error checking that type " ++ prettyPrintType t1 ++ " subsumes type " ++ prettyPrintType t2 ++ ":\n" ++ go err
189−prettyPrintErrorMessage (ErrorInInstance name ts err) = "Error in type class instance " ++ show name ++ " " ++ unwords (map prettyPrintTypeAtom ts) ++ ":\n" ++ prettyPrintErrorMessage err
275+ go (ErrorInInstance name ts err) = "Error in type class instance " ++ show name ++ " " ++ unwords (map prettyPrintTypeAtom ts) ++ ":\n" ++ go err
190−prettyPrintErrorMessage (ErrorCheckingKind ty err) = "Error checking kind of type " ++ prettyPrintType ty ++ ":\n" ++ prettyPrintErrorMessage err
276+ go (ErrorCheckingKind ty err) = "Error checking kind of type " ++ prettyPrintType ty ++ ":\n" ++ go err
191−prettyPrintErrorMessage (ErrorInferringType expr err) = "Error inferring type of value " ++ prettyPrintValue expr ++ ":\n" ++ prettyPrintErrorMessage err
277+ go (ErrorInferringType expr err) = "Error inferring type of value " ++ prettyPrintValue expr ++ ":\n" ++ go err
192−prettyPrintErrorMessage (ErrorCheckingType expr ty err) = "Error checking value " ++ prettyPrintValue expr ++ " has type " ++ prettyPrintType ty ++ ":\n" ++ prettyPrintErrorMessage err
278+ go (ErrorCheckingType expr ty err) = "Error checking value " ++ prettyPrintValue expr ++ " has type " ++ prettyPrintType ty ++ ":\n" ++ go err
193−prettyPrintErrorMessage (ErrorInApplication f t a err) = "Error applying function " ++ prettyPrintValue f ++ " of type " ++ prettyPrintType t ++ " to argument " ++ prettyPrintValue a ++ ":\n" ++ prettyPrintErrorMessage err
279+ go (ErrorInApplication f t a err) = "Error applying function " ++ prettyPrintValue f ++ " of type " ++ prettyPrintType t ++ " to argument " ++ prettyPrintValue a ++ ":\n" ++ go err
194−prettyPrintErrorMessage (ErrorInDataConstructor nm err) = "Error in data constructor " ++ show nm ++ ":\n" ++ prettyPrintErrorMessage err
280+ go (ErrorInDataConstructor nm err) = "Error in data constructor " ++ show nm ++ ":\n" ++ go err
195−prettyPrintErrorMessage (ErrorInTypeConstructor nm err) = "Error in type constructor " ++ show nm ++ ":\n" ++ prettyPrintErrorMessage err
281+ go (ErrorInTypeConstructor nm err) = "Error in type constructor " ++ show nm ++ ":\n" ++ go err
196−prettyPrintErrorMessage (ErrorInBindingGroup nms err) = "Error in binding group " ++ intercalate ", " (map show nms) ++ ":\n" ++ prettyPrintErrorMessage err
282+ go (ErrorInBindingGroup nms err) = "Error in binding group " ++ intercalate ", " (map show nms) ++ ":\n" ++ go err
197−prettyPrintErrorMessage (ErrorInDataBindingGroup err) = "Error in data binding group:\n" ++ prettyPrintErrorMessage err
283+ go (ErrorInDataBindingGroup err) = "Error in data binding group:\n" ++ go err
198−prettyPrintErrorMessage (ErrorInTypeSynonym name err) = "Error in type synonym " ++ show name ++ ":\n" ++ prettyPrintErrorMessage err
284+ go (ErrorInTypeSynonym name err) = "Error in type synonym " ++ show name ++ ":\n" ++ go err
199−prettyPrintErrorMessage (ErrorInValueDeclaration n err) = "Error in value declaration " ++ show n ++ ":\n" ++ prettyPrintErrorMessage err
285+ go (ErrorInValueDeclaration n err) = "Error in value declaration " ++ show n ++ ":\n" ++ go err
200−prettyPrintErrorMessage (ErrorInForeignImport nm err) = "Error in foreign import " ++ show nm ++ ":\n" ++ prettyPrintErrorMessage err
286+ go (ErrorInForeignImport nm err) = "Error in foreign import " ++ show nm ++ ":\n" ++ go err
201−prettyPrintErrorMessage (PositionedError pos err) = "Error at " ++ show pos ++ ":\n" ++ prettyPrintErrorMessage err
287+ go (PositionedError pos err) = "Error at " ++ show pos ++ ":\n" ++ go err
204-- Render a DictionaryValue fit for human consumption in error messages
290-- Render a DictionaryValue fit for human consumption in error messages