@@ -170,6 +170,7 @@ data ErrorMessage
170170 | ErrorInDataBindingGroup ErrorMessage
171171 | ErrorInTypeSynonym ProperName ErrorMessage
172172 | ErrorInValueDeclaration Ident ErrorMessage
173+ | ErrorInTypeDeclaration Ident ErrorMessage
173174 | ErrorInForeignImport Ident ErrorMessage
174175 | PositionedError SourceSpan ErrorMessage
175176 | SimpleErrorWrapper SimpleErrorMessage
@@ -340,6 +341,7 @@ unwrapErrorMessage em = case em of
340341 (ErrorInTypeConstructor _ err) -> unwrapErrorMessage err
341342 (ErrorInTypeSynonym _ err) -> unwrapErrorMessage err
342343 (ErrorInValueDeclaration _ err) -> unwrapErrorMessage err
344+ (ErrorInTypeDeclaration _ err) -> unwrapErrorMessage err
343345 (ErrorInferringType _ err) -> unwrapErrorMessage err
344346 (ErrorUnifyingTypes _ _ err) -> unwrapErrorMessage err
345347 (NotYetDefined _ err) -> unwrapErrorMessage err
@@ -386,6 +388,7 @@ onTypesInErrorMessageM f = g
386388 g (ErrorInDataBindingGroup e) = ErrorInDataBindingGroup <$> (g e)
387389 g (ErrorInTypeSynonym x e) = ErrorInTypeSynonym x <$> (g e)
388390 g (ErrorInValueDeclaration x e) = ErrorInValueDeclaration x <$> (g e)
391+ g (ErrorInTypeDeclaration x e) = ErrorInTypeDeclaration x <$> (g e)
389392 g (ErrorInForeignImport x e) = ErrorInForeignImport x <$> (g e)
390393 g (PositionedError x e) = PositionedError x <$> (g e)
391394 g (SimpleErrorWrapper sem) = SimpleErrorWrapper <$> gSimple sem
@@ -740,6 +743,10 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError
740743 paras [ lineWithLevel $ "in value declaration " ++ showIdent n ++ ":"
741744 , go err
742745 ]
746+ go (ErrorInTypeDeclaration n err) =
747+ paras [ lineWithLevel $ "in type declaration for " ++ showIdent n ++ ":"
748+ , go err
749+ ]
743750 go (ErrorInForeignImport nm err) =
744751 paras [ lineWithLevel $ "in foreign import " ++ showIdent nm ++ ":"
745752 , go err
@@ -805,6 +812,7 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError
805812 unwrap pos (ErrorInDataBindingGroup err) = ErrorInDataBindingGroup (unwrap pos err)
806813 unwrap pos (ErrorInTypeSynonym nm err) = ErrorInTypeSynonym nm (unwrap pos err)
807814 unwrap pos (ErrorInValueDeclaration nm err) = ErrorInValueDeclaration nm (unwrap pos err)
815+ unwrap pos (ErrorInTypeDeclaration nm err) = ErrorInTypeDeclaration nm (unwrap pos err)
808816 unwrap pos (ErrorInForeignImport nm err) = ErrorInForeignImport nm (unwrap pos err)
809817 unwrap pos (NotYetDefined ns err) = NotYetDefined ns (unwrap pos err)
810818 unwrap _ (PositionedError pos err) = unwrap (Just pos) err