wip
This commit is contained in:
parent
afd78c3b3e
commit
29d20b2273
25 changed files with 369 additions and 469 deletions
14
typed.js
14
typed.js
|
|
@ -1,17 +1,21 @@
|
|||
import { fnType } from "./metacircular.js";
|
||||
import {Type, Function} from "./metacircular.js";
|
||||
import { fnType } from "./structures/function.js";
|
||||
import { Type } from "./metacircular.js";
|
||||
|
||||
export const Typed = Symbol('Typed');
|
||||
// Everything is (implicitly) typed by the Any type.
|
||||
export const Any = { symbol: Symbol('Any'), params: [] };
|
||||
|
||||
// A type-link, connecting a value to its Type.
|
||||
export const Typed = { symbol: Symbol('Typed'), params: [] };
|
||||
|
||||
const getInst = lnk => lnk.i;
|
||||
const getType = lnk => lnk.t;
|
||||
|
||||
const Typed_to_Type = fnType({in: Typed, out: Type});
|
||||
const Typed_to_Type = fnType({in: Any, out: Type});
|
||||
|
||||
export const ModuleTyped = {l:[
|
||||
{i: Typed, t: Type},
|
||||
|
||||
{i: Typed_to_Type, t: Function},
|
||||
{i: Typed_to_Type, t: Type},
|
||||
|
||||
{i: getInst, t: Typed_to_Type},
|
||||
{i: getType, t: Typed_to_Type},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue