rename some things

This commit is contained in:
Joeri Exelmans 2025-04-20 21:09:51 +02:00
parent e04cac4f7d
commit 8a4bd44f04
16 changed files with 92 additions and 60 deletions

19
primitives/dynamic.js Normal file
View file

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