Interface InferenceProblem<Specifics>

Common interface of all problems/errors/messages which should be shown to users of DSLs which are type-checked with Typir. This approach makes it easier to introduce additional errors by users of Typir, compared to a union type, e.g. export type TypirProblem = ValueConflict | IndexedTypeConflict | ...

interface InferenceProblem<Specifics extends TypirSpecifics> {
    $problem: "InferenceProblem";
    inferenceCandidate?: Type;
    languageNode: Specifics["LanguageType"];
    location: string;
    rule?: TypeInferenceRule<Specifics, Specifics["LanguageType"]>;
    subProblems: TypirProblem[];
}

Type Parameters

Hierarchy (View Summary)

Properties

$problem: "InferenceProblem"
inferenceCandidate?: Type
languageNode: Specifics["LanguageType"]
location: string
rule?: TypeInferenceRule<Specifics, Specifics["LanguageType"]>
subProblems: TypirProblem[]