Typeclasses
This commit is contained in:
parent
a4daf88085
commit
8020f9d1a0
6 changed files with 123 additions and 19 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import type { AST, Pattern, Definition } from './ast';
|
||||
import type { AST, Pattern, Definition, TypeDefinition, ClassDefinition, InstanceDeclaration } from './ast';
|
||||
import { store } from './runtime-js';
|
||||
import { typecheck } from './typechecker';
|
||||
|
||||
|
|
@ -221,8 +221,8 @@ function compilePattern(pattern: Pattern, expr: string): { condition: string, bi
|
|||
}
|
||||
}
|
||||
|
||||
export function compileAndRun(defs: Definition[], typeDefs: TypeDefinition[] = []) {
|
||||
typecheck(defs, typeDefs);
|
||||
export function compileAndRun(defs: Definition[], typeDefs: TypeDefinition[] = [], classDefs: ClassDefinition[] = [], instances: InstanceDeclaration[] = []) {
|
||||
typecheck(defs, typeDefs, classDefs, instances);
|
||||
|
||||
const compiledDefs: string[] = [];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue