19 lines
638 B
JavaScript
19 lines
638 B
JavaScript
import { eqSymbol, getName } from "../primitives/symbol.js";
|
|
import { Bool, SymbolT, Type } from "../primitives/types.js";
|
|
import { String } from "../structures/list.js";
|
|
import { typedFnType } from "../structures/types.js";
|
|
|
|
// The way instances of SymbolT are currently encoded, their constructor is not a valid DOPE function, because it is impure.
|
|
// The only way to construct symbols is to do it in JS code.
|
|
|
|
export const ModuleSymbol = {l:[
|
|
{i: SymbolT, t: Type},
|
|
|
|
...typedFnType(getName, fnType =>
|
|
fnType
|
|
(SymbolT)
|
|
(String)
|
|
),
|
|
|
|
...typedFnType(eqSymbol, fnType => fnType(SymbolT)(fnType(SymbolT)(Bool))),
|
|
]};
|