dope2/typed.js

18 lines
415 B
JavaScript

import { fnType } from "./type_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 = fnType({in: Typed, out: Type});
export const ModuleTyped = {l:[
{i: Typed, t: Type},
{i: Typed_to_Type, t: Function},
{i: getInst, t: Typed_to_Type},
{i: getType, t: Typed_to_Type},
]};