Typeclasses

This commit is contained in:
Dustin Swan 2026-03-26 21:38:32 -06:00
parent a4daf88085
commit 8020f9d1a0
No known key found for this signature in database
GPG key ID: 30D46587E2100467
6 changed files with 123 additions and 19 deletions

View file

@ -187,6 +187,25 @@ export type Constraint = {
typeVar: string
}
export type ClassDefinition = {
kind: 'class-definition'
name: string
param: string
methods: { name: string, type: TypeAST }[]
line?: number
column?: number
start?: number
}
export type InstanceDeclaration = {
kind: 'instance-declaration'
typeName: string
className: string
line?: number
column?: number
start?: number
}
export type AST =
| Literal
| Variable