interactive prompt can handle polymorphic types
This commit is contained in:
parent
a0e3aa0cb3
commit
4a4983f693
20 changed files with 485 additions and 276 deletions
|
|
@ -3,20 +3,17 @@ 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(constructSymbol, fnType =>
|
||||
// fnType
|
||||
// (String)
|
||||
// (SymbolT)
|
||||
// ),
|
||||
|
||||
...typedFnType(getName, fnType =>
|
||||
fnType
|
||||
(SymbolT)
|
||||
(String)
|
||||
),
|
||||
|
||||
...typedFnType(eqSymbol, fnType => fnType(SymbolT, fnType(SymbolT, Bool))),
|
||||
...typedFnType(eqSymbol, fnType => fnType(SymbolT)(fnType(SymbolT)(Bool))),
|
||||
]};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue