mirror of
https://github.com/Noratrieb/riverdelta.git
synced 2026-03-15 04:36:06 +01:00
move ty defs
This commit is contained in:
parent
a22cc15b59
commit
d18ab34e9f
14 changed files with 173 additions and 192 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import { ItemId, Pkg, Resolved, Ty } from "../ast";
|
||||
import { ItemId, Pkg, Resolved } from "../ast";
|
||||
import { GlobalContext } from "../context";
|
||||
import { CompilerError, ErrorEmitted } from "../error";
|
||||
import { Ty } from "../types";
|
||||
import { ComplexMap } from "../utils";
|
||||
|
||||
export type TypeckCtx = {
|
||||
|
|
|
|||
|
|
@ -13,14 +13,6 @@ import {
|
|||
Resolution,
|
||||
Resolved,
|
||||
StructLiteralField,
|
||||
TY_BOOL,
|
||||
TY_I32,
|
||||
TY_INT,
|
||||
TY_NEVER,
|
||||
TY_STRING,
|
||||
TY_UNIT,
|
||||
Ty,
|
||||
TyFn,
|
||||
Type,
|
||||
Typecked,
|
||||
mkDefaultFolder,
|
||||
|
|
@ -28,6 +20,7 @@ import {
|
|||
} from "../ast";
|
||||
import { CompilerError, ErrorEmitted, Span, unreachable } from "../error";
|
||||
import { printTy } from "../printer";
|
||||
import { TY_BOOL, TY_I32, TY_INT, TY_NEVER, TY_STRING, TY_UNIT, Ty, TyFn } from "../types";
|
||||
import { INSTRS, Instr, VALTYPES, ValType } from "../wasm/defs";
|
||||
import { TypeckCtx, emitError, mkTyFn, tyError, tyErrorFrom } from "./base";
|
||||
import { InferContext } from "./infer";
|
||||
|
|
|
|||
|
|
@ -5,17 +5,13 @@ import {
|
|||
Item,
|
||||
ItemId,
|
||||
Resolved,
|
||||
TY_I32,
|
||||
TY_INT,
|
||||
Ty,
|
||||
TyFn,
|
||||
Typecked,
|
||||
foldAst,
|
||||
mkDefaultFolder,
|
||||
tyIsUnit,
|
||||
} from "../ast";
|
||||
import { GlobalContext } from "../context";
|
||||
import { CompilerError, ErrorEmitted, Span } from "../error";
|
||||
import { TY_I32, TY_INT, Ty, TyFn, tyIsUnit } from "../types";
|
||||
import { ComplexMap } from "../utils";
|
||||
import { emitError } from "./base";
|
||||
import { checkBody, exprError } from "./expr";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { TY_INT, TY_STRING, TY_UNIT } from "../ast";
|
||||
import { Emitter, ErrorHandler, Span } from "../error";
|
||||
import { TY_INT, TY_STRING, TY_UNIT } from "../types";
|
||||
import { InferContext } from "./infer";
|
||||
|
||||
const SPAN: Span = Span.startOfFile({ content: "" });
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Ty } from "../ast";
|
||||
import { CompilerError, ErrorHandler, Span } from "../error";
|
||||
import { printTy } from "../printer";
|
||||
import { Ty } from "../types";
|
||||
|
||||
type TyVarRes =
|
||||
| {
|
||||
|
|
|
|||
|
|
@ -1,18 +1,11 @@
|
|||
import {
|
||||
ItemId,
|
||||
Resolved,
|
||||
Ty,
|
||||
TY_BOOL,
|
||||
TY_I32,
|
||||
TY_INT,
|
||||
TY_NEVER,
|
||||
TY_STRING,
|
||||
TY_UNIT,
|
||||
Type,
|
||||
substituteTy,
|
||||
} from "../ast";
|
||||
import { CompilerError, Span } from "../error";
|
||||
import { printTy } from "../printer";
|
||||
import { TY_BOOL, TY_I32, TY_INT, TY_NEVER, TY_STRING, TY_UNIT, Ty, substituteTy } from "../types";
|
||||
import { TypeckCtx, tyError, tyErrorFrom } from "./base";
|
||||
|
||||
function builtinAsTy(cx: TypeckCtx, name: string, span: Span): Ty {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue