@@ -170,6 +170,7 @@ data ErrorMessage
170 | ErrorInDataBindingGroup ErrorMessage
170 | ErrorInDataBindingGroup ErrorMessage
171 | ErrorInTypeSynonym ProperName ErrorMessage
171 | ErrorInTypeSynonym ProperName ErrorMessage
172 | ErrorInValueDeclaration Ident ErrorMessage
172 | ErrorInValueDeclaration Ident ErrorMessage
173+ | ErrorInTypeDeclaration Ident ErrorMessage
173 | ErrorInForeignImport Ident ErrorMessage
174 | ErrorInForeignImport Ident ErrorMessage
174 | PositionedError SourceSpan ErrorMessage
175 | PositionedError SourceSpan ErrorMessage
175 | SimpleErrorWrapper SimpleErrorMessage
176 | SimpleErrorWrapper SimpleErrorMessage
@@ -340,6 +341,7 @@ unwrapErrorMessage em = case em of
340 (ErrorInTypeConstructor _ err) -> unwrapErrorMessage err
341 (ErrorInTypeConstructor _ err) -> unwrapErrorMessage err
341 (ErrorInTypeSynonym _ err) -> unwrapErrorMessage err
342 (ErrorInTypeSynonym _ err) -> unwrapErrorMessage err
342 (ErrorInValueDeclaration _ err) -> unwrapErrorMessage err
343 (ErrorInValueDeclaration _ err) -> unwrapErrorMessage err
344+ (ErrorInTypeDeclaration _ err) -> unwrapErrorMessage err
343 (ErrorInferringType _ err) -> unwrapErrorMessage err
345 (ErrorInferringType _ err) -> unwrapErrorMessage err
344 (ErrorUnifyingTypes _ _ err) -> unwrapErrorMessage err
346 (ErrorUnifyingTypes _ _ err) -> unwrapErrorMessage err
345 (NotYetDefined _ err) -> unwrapErrorMessage err
347 (NotYetDefined _ err) -> unwrapErrorMessage err
@@ -386,6 +388,7 @@ onTypesInErrorMessageM f = g
386 g (ErrorInDataBindingGroup e) = ErrorInDataBindingGroup <$> (g e)
388 g (ErrorInDataBindingGroup e) = ErrorInDataBindingGroup <$> (g e)
387 g (ErrorInTypeSynonym x e) = ErrorInTypeSynonym x <$> (g e)
389 g (ErrorInTypeSynonym x e) = ErrorInTypeSynonym x <$> (g e)
388 g (ErrorInValueDeclaration x e) = ErrorInValueDeclaration x <$> (g e)
390 g (ErrorInValueDeclaration x e) = ErrorInValueDeclaration x <$> (g e)
391+ g (ErrorInTypeDeclaration x e) = ErrorInTypeDeclaration x <$> (g e)
389 g (ErrorInForeignImport x e) = ErrorInForeignImport x <$> (g e)
392 g (ErrorInForeignImport x e) = ErrorInForeignImport x <$> (g e)
390 g (PositionedError x e) = PositionedError x <$> (g e)
393 g (PositionedError x e) = PositionedError x <$> (g e)
391 g (SimpleErrorWrapper sem) = SimpleErrorWrapper <$> gSimple sem
394 g (SimpleErrorWrapper sem) = SimpleErrorWrapper <$> gSimple sem
@@ -740,6 +743,10 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError
740 paras [ lineWithLevel $ "in value declaration " ++ showIdent n ++ ":"
743 paras [ lineWithLevel $ "in value declaration " ++ showIdent n ++ ":"
746+ go (ErrorInTypeDeclaration n err) =
747+ paras [ lineWithLevel $ "in type declaration for " ++ showIdent n ++ ":"
743 go (ErrorInForeignImport nm err) =
750 go (ErrorInForeignImport nm err) =
744 paras [ lineWithLevel $ "in foreign import " ++ showIdent nm ++ ":"
751 paras [ lineWithLevel $ "in foreign import " ++ showIdent nm ++ ":"
@@ -805,6 +812,7 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError
805 unwrap pos (ErrorInDataBindingGroup err) = ErrorInDataBindingGroup (unwrap pos err)
812 unwrap pos (ErrorInDataBindingGroup err) = ErrorInDataBindingGroup (unwrap pos err)
806 unwrap pos (ErrorInTypeSynonym nm err) = ErrorInTypeSynonym nm (unwrap pos err)
813 unwrap pos (ErrorInTypeSynonym nm err) = ErrorInTypeSynonym nm (unwrap pos err)
807 unwrap pos (ErrorInValueDeclaration nm err) = ErrorInValueDeclaration nm (unwrap pos err)
814 unwrap pos (ErrorInValueDeclaration nm err) = ErrorInValueDeclaration nm (unwrap pos err)
815+ unwrap pos (ErrorInTypeDeclaration nm err) = ErrorInTypeDeclaration nm (unwrap pos err)
808 unwrap pos (ErrorInForeignImport nm err) = ErrorInForeignImport nm (unwrap pos err)
816 unwrap pos (ErrorInForeignImport nm err) = ErrorInForeignImport nm (unwrap pos err)
809 unwrap pos (NotYetDefined ns err) = NotYetDefined ns (unwrap pos err)
817 unwrap pos (NotYetDefined ns err) = NotYetDefined ns (unwrap pos err)
810 unwrap _ (PositionedError pos err) = unwrap (Just pos) err
818 unwrap _ (PositionedError pos err) = unwrap (Just pos) err