roc/crates/compiler/checkmate/www/src/schema.d.ts
2023-07-17 10:13:11 -05:00

243 lines
4.8 KiB
TypeScript

/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type Event =
| {
left: Variable;
mode: UnificationMode;
right: Variable;
subevents: Event[];
success?: boolean | null;
type: "Unification";
[k: string]: unknown;
}
| {
from: Variable;
to: Variable;
type: "VariableUnified";
[k: string]: unknown;
}
| {
content?: Content | null;
rank?: Rank | null;
type: "VariableSetDescriptor";
variable: Variable;
[k: string]: unknown;
};
export type Variable = number;
export type UnificationMode =
| {
type: "Eq";
[k: string]: unknown;
}
| {
type: "Present";
[k: string]: unknown;
}
| {
type: "LambdaSetSpecialization";
[k: string]: unknown;
};
export type Content =
| {
name?: string | null;
type: "Flex";
[k: string]: unknown;
}
| {
name: string;
type: "Rigid";
[k: string]: unknown;
}
| {
abilities: Symbol[];
name?: string | null;
type: "FlexAble";
[k: string]: unknown;
}
| {
abilities: Symbol[];
name: string;
type: "RigidAble";
[k: string]: unknown;
}
| {
name?: string | null;
structure: Variable;
type: "Recursive";
[k: string]: unknown;
}
| {
ambient_function: Variable;
recursion_var?: Variable | null;
solved: ClosureType[];
type: "LambdaSet";
unspecialized: UnspecializedClosureType[];
[k: string]: unknown;
}
| {
type: "ErasedLambda";
[k: string]: unknown;
}
| {
kind: AliasKind;
name: Symbol;
real_variable: Variable;
type: "Alias";
variables: AliasTypeVariables;
[k: string]: unknown;
}
| {
symbol: Symbol;
type: "Apply";
variables: Variable[];
[k: string]: unknown;
}
| {
arguments: Variable[];
lambda_type: Variable;
ret: Variable;
type: "Function";
[k: string]: unknown;
}
| {
extension: Variable;
fields: {
[k: string]: RecordField;
};
type: "Record";
[k: string]: unknown;
}
| {
elements: {
[k: string]: Variable;
};
extension: Variable;
type: "Tuple";
[k: string]: unknown;
}
| {
extension: TagUnionExtension;
tags: {
[k: string]: Variable[];
};
type: "TagUnion";
[k: string]: unknown;
}
| {
extension: TagUnionExtension;
functions: Symbol[];
tags: string[];
type: "FunctionOrTagUnion";
[k: string]: unknown;
}
| {
extension: TagUnionExtension;
recursion_var: Variable;
tags: {
[k: string]: Variable[];
};
type: "RecursiveTagUnion";
[k: string]: unknown;
}
| {
type: "EmptyRecord";
[k: string]: unknown;
}
| {
type: "EmptyTuple";
[k: string]: unknown;
}
| {
type: "EmptyTagUnion";
[k: string]: unknown;
}
| {
range: NumericRange;
type: "RangedNumber";
[k: string]: unknown;
}
| {
type: "Error";
[k: string]: unknown;
};
export type Symbol = string;
export type AliasKind =
| {
type: "Structural";
[k: string]: unknown;
}
| {
type: "Opaque";
[k: string]: unknown;
};
export type RecordFieldKind =
| {
type: "Demanded";
[k: string]: unknown;
}
| {
rigid: boolean;
type: "Required";
[k: string]: unknown;
}
| {
rigid: boolean;
type: "Optional";
[k: string]: unknown;
};
export type TagUnionExtension =
| {
type: "Openness";
variable: Variable;
[k: string]: unknown;
}
| {
type: "Any";
variable: Variable;
[k: string]: unknown;
};
export type NumericRangeKind =
| {
type: "Int";
[k: string]: unknown;
}
| {
type: "AnyNum";
[k: string]: unknown;
};
export type Rank = number;
export type AllEvents = Event[];
export interface ClosureType {
environment: Variable[];
function: Symbol;
[k: string]: unknown;
}
export interface UnspecializedClosureType {
ability_member: Symbol;
lambda_set_region: number;
specialization: Variable;
[k: string]: unknown;
}
export interface AliasTypeVariables {
infer_ext_in_output_position_variables: Variable[];
lambda_set_variables: Variable[];
type_variables: Variable[];
[k: string]: unknown;
}
export interface RecordField {
field_type: Variable;
kind: RecordFieldKind;
[k: string]: unknown;
}
export interface NumericRange {
kind: NumericRangeKind;
min_width: number;
signed: boolean;
[k: string]: unknown;
}