recursive types (and operations on them, like pretty-printing, comparison and unification) seem to be working.

big part of the code base still needs to be 'ported' to the updated type constructors.
This commit is contained in:
Joeri Exelmans 2025-05-05 17:17:45 +02:00
parent 55c5d7cffa
commit 8eec5b9239
34 changed files with 523 additions and 295 deletions

View file

@ -1,5 +1,5 @@
import { typedFnType } from "../structures/types.js";
import { Any, Type } from "./types.js";
import { Top, Type } from "./types.js";
import { makeTypeConstructor } from "../type_constructor.js";
// A type-link, connecting a value to its Type.
@ -11,9 +11,9 @@ export const getType = lnk => lnk.t;
export const ModuleDynamic = {l:[
{i: Dynamic, t: Type},
{i: Any , t: Type},
{i: Top , t: Type},
...typedFnType(getInst, fnType => fnType(Dynamic)(Any)),
...typedFnType(getType, fnType => fnType(Dynamic)(Any)),
...typedFnType(getInst, fnType => fnType(() => Dynamic)(() => Top)),
...typedFnType(getType, fnType => fnType(() => Dynamic)(() => Top)),
]};