progress and some refactoring

This commit is contained in:
Joeri Exelmans 2025-03-31 15:35:02 +02:00
parent d236eca5e5
commit d8ca2f3999
25 changed files with 376 additions and 163 deletions

22
lib/symbol.js Normal file
View file

@ -0,0 +1,22 @@
import { constructSymbol, eqSymbol, getName } from "../primitives/symbol.js";
import { Bool, SymbolT, Type } from "../primitives/types.js";
import { String } from "../structures/list.js";
import { typedFnType } from "../structures/types.js";
export const ModuleSymbol = {l:[
{i: SymbolT, t: Type},
...typedFnType(constructSymbol, fnType =>
fnType
(String)
(SymbolT)
),
...typedFnType(getName, fnType =>
fnType
(SymbolT)
(String)
),
...typedFnType(eqSymbol, fnType => fnType(SymbolT, fnType(SymbolT, Bool))),
]};