replace 'prompt' example by 'environment'
This commit is contained in:
parent
f8008aa25d
commit
b1c2e7836d
15 changed files with 317 additions and 517 deletions
|
|
@ -1,7 +1,9 @@
|
|||
import { inspect } from "node:util";
|
||||
import { eqType, getSymbol } from "../primitives/type.js";
|
||||
import { zip } from "../util/util.js";
|
||||
import { pretty, prettyT } from '../util/pretty.js';
|
||||
import { isTypeVar, TYPE_VARS } from "../primitives/typevars.js";
|
||||
import { inspectType } from "../meta/type_constructor.js";
|
||||
|
||||
// helper for creating generic types
|
||||
// for instance, the type:
|
||||
|
|
@ -150,6 +152,7 @@ const __unify = (fType, aType, fStack=[], aStack=[]) => {
|
|||
type: {
|
||||
symbol: fType.symbol,
|
||||
params: unifiedParams,
|
||||
[inspect.custom]: inspectType,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
|
@ -177,6 +180,7 @@ export const substitute = (type, substitutions, stack=[]) => {
|
|||
}
|
||||
return substitute(param, substitutions, [...stack, parent]);
|
||||
}),
|
||||
[inspect.custom]: inspectType,
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue