lotta progress
This commit is contained in:
parent
29d20b2273
commit
bc91d9bf39
27 changed files with 317 additions and 475 deletions
12
typed.js
12
typed.js
|
|
@ -1,5 +1,5 @@
|
|||
import { fnType } from "./structures/function.js";
|
||||
import { Type } from "./metacircular.js";
|
||||
import { typedFnType } from "./structures/types.js";
|
||||
import { Type } from "./type.js";
|
||||
|
||||
// Everything is (implicitly) typed by the Any type.
|
||||
export const Any = { symbol: Symbol('Any'), params: [] };
|
||||
|
|
@ -10,13 +10,9 @@ export const Typed = { symbol: Symbol('Typed'), params: [] };
|
|||
const getInst = lnk => lnk.i;
|
||||
const getType = lnk => lnk.t;
|
||||
|
||||
const Typed_to_Type = fnType({in: Any, out: Type});
|
||||
|
||||
export const ModuleTyped = {l:[
|
||||
{i: Typed, t: Type},
|
||||
|
||||
{i: Typed_to_Type, t: Type},
|
||||
|
||||
{i: getInst, t: Typed_to_Type},
|
||||
{i: getType, t: Typed_to_Type},
|
||||
...typedFnType(getInst, fnType => fnType(Typed)(Type)),
|
||||
...typedFnType(getType, fnType => fnType(Typed)(Type)),
|
||||
]};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue