Errors reported while building a Project with
Elm.TypeInference.init or updating it with Elm.TypeInference.addFile.
Errors from type inference itself live in
Elm.TypeInference.InferError.
Where in a dependency an error was found.
Render an error for diagnostic output.
Types of errors:
NeedPackageSources: Raised byElm.TypeInference.initwhen extra dependency sources are needed to analyze whether adocs.json-mentioned internal type is a record or a custom type. Provide these files insourcesToResolveAmbiguityin the nextElm.TypeInference.initcall.MissingModuleName: Raised when aFilehas an empty module name.DuplicateModule: Raised byElm.TypeInference.initwhen two of theprojectFilesdeclare the same module.ImpossibleDocsType: for hand-crafteddocs.jsonwith nonsensical data, like a 4-tuple. Realdocs.jsonfiles emitted by the Elm compiler should never produce these.ImpossibleType: Similar but for hand-craftedelm-syntaxFiles given insourcesToResolveAmbiguity.AmbiguousModuleOwner: Raised when a type in a dependency'sdocs.jsonor sources refers to a module (moduleName) exposed by more than one package visible to that dependency.TypeNotFound,WrongTypeArity,RecursiveAlias: Raised when a type alias insourcesToResolveAmbiguitymentions a type that can't be found (eg. because thedocs.jsonof the package defining it wasn't provided), applies a type to the wrong number of arguments, or refers to itself. The Elm compiler rejects all of these when publishing a package, so they only happen with hand-writtensourcesToResolveAmbiguityordocs.jsonfiles, or with incomplete dependency information.