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

View file

@ -1,5 +1,5 @@
import { fnType, typedFnType } from "./types.js";
import { Type } from "../primitives/types.js";
import { typedFnType } from "./types.js";
import { Char, Type } from "../primitives/types.js";
import { Int } from "../primitives/types.js";
import { makeGeneric } from "../generics/generics.js";
import { lsType } from "./types.js";
@ -10,6 +10,8 @@ const get = ls => i => ls.l[i];
const put = ls => i => elem => ({l: ls.l.with(Number(i), elem)});
const push = ls => elem => ({l:ls.l.concat([elem])});
export const String = lsType(Char); // alias
export const ModuleList = {l:[
// Type -> Type
...typedFnType(lsType, fnType =>
@ -55,4 +57,6 @@ export const ModuleList = {l:[
)
)
),
// {i: String, t: Type}, // alias
]};