interactive prompt can handle polymorphic types
This commit is contained in:
parent
a0e3aa0cb3
commit
4a4983f693
20 changed files with 485 additions and 276 deletions
|
|
@ -10,6 +10,7 @@ const SymbolChar = Symbol('Char');
|
|||
const SymbolUnit = Symbol('Unit');
|
||||
const SymbolSymbol = Symbol('Symbol');
|
||||
const SymbolType = Symbol('Type');
|
||||
const SymbolGenericType = Symbol('GenericType');
|
||||
|
||||
export const Int = makeTypeConstructor(SymbolInt)(0);
|
||||
export const Bool = makeTypeConstructor(SymbolBool)(0);
|
||||
|
|
@ -24,6 +25,8 @@ export const SymbolT = makeTypeConstructor(SymbolSymbol)(0);
|
|||
|
||||
export const Type = makeTypeConstructor(SymbolType)(0);
|
||||
|
||||
export const GenericType = makeTypeConstructor(SymbolGenericType)(0);
|
||||
|
||||
|
||||
export const ModuleSymbols = {l:[
|
||||
{i: SymbolInt , t: SymbolT},
|
||||
|
|
@ -34,4 +37,5 @@ export const ModuleSymbols = {l:[
|
|||
{i: SymbolUnit , t: SymbolT},
|
||||
{i: SymbolSymbol, t: SymbolT},
|
||||
{i: SymbolType , t: SymbolT},
|
||||
]};
|
||||
{i: SymbolGenericType, t: SymbolT},
|
||||
]};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue