Type constructors

This commit is contained in:
Dustin Swan 2026-03-26 19:49:28 -06:00
parent 635f12490d
commit 668ee3e4d8
No known key found for this signature in database
GPG key ID: 30D46587E2100467
4 changed files with 50 additions and 17 deletions

View file

@ -221,8 +221,8 @@ function compilePattern(pattern: Pattern, expr: string): { condition: string, bi
}
}
export function compileAndRun(defs: Definition[]) {
typecheck(defs);
export function compileAndRun(defs: Definition[], typeDefs: TypeDefinition[] = []) {
typecheck(defs, typeDefs);
const compiledDefs: string[] = [];