basic functionality, no generics
This commit is contained in:
commit
a8260f2afb
17 changed files with 615 additions and 0 deletions
19
typed.js
Normal file
19
typed.js
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { getFnType } from "./function_registry.js";
|
||||
import {Type, Function} from "./metacircular.js";
|
||||
|
||||
export const Typed = Symbol('Typed');
|
||||
|
||||
const getInst = lnk => lnk.i;
|
||||
const getType = lnk => lnk.t;
|
||||
|
||||
// const Typed_to_Type = {in: Typed, out: Type};
|
||||
const Typed_to_Type = getFnType(Typed, Type);
|
||||
|
||||
export const ModuleTyped = [
|
||||
{i: Typed, t: Type},
|
||||
|
||||
{i: Typed_to_Type, t: Function},
|
||||
|
||||
{i: getInst, t: Typed_to_Type},
|
||||
{i: getType, t: Typed_to_Type},
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue