fez-lisp 1.5.159 → 1.5.160
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/baked/std-T.js +1 -1
- package/lib/baked/std.js +1 -1
- package/package.json +1 -1
- package/src/check.js +4 -2
- package/src/utils.js +7 -4
package/package.json
CHANGED
package/src/check.js
CHANGED
@@ -1132,6 +1132,7 @@ export const typeCheck = (ast, ctx = SPECIAL_FORM_TYPES) => {
|
|
1132
1132
|
exp
|
1133
1133
|
)})`
|
1134
1134
|
)
|
1135
|
+
|
1135
1136
|
if (name in env) {
|
1136
1137
|
Types.set(withScope(name, env), () => formatType(name, env))
|
1137
1138
|
break
|
@@ -1175,6 +1176,7 @@ export const typeCheck = (ast, ctx = SPECIAL_FORM_TYPES) => {
|
|
1175
1176
|
name,
|
1176
1177
|
check
|
1177
1178
|
})
|
1179
|
+
// TODO: remove this as maybe it is not needed
|
1178
1180
|
check(rightHand, env, exp)
|
1179
1181
|
})
|
1180
1182
|
check(rightHand, env, exp)
|
@@ -1312,9 +1314,9 @@ export const typeCheck = (ast, ctx = SPECIAL_FORM_TYPES) => {
|
|
1312
1314
|
})
|
1313
1315
|
break
|
1314
1316
|
default:
|
1315
|
-
if (copy[ret[VALUE]])
|
1317
|
+
if (copy[ret[VALUE]]) {
|
1316
1318
|
setReturnRef(ref[STATS], copy[ret[VALUE]][STATS])
|
1317
|
-
else
|
1319
|
+
} else
|
1318
1320
|
stagger(stack, 'append', [ret, copy], () => {
|
1319
1321
|
if (copy[ret[VALUE]])
|
1320
1322
|
setReturnRef(ref[STATS], copy[ret[VALUE]][STATS])
|
package/src/utils.js
CHANGED
@@ -175,10 +175,13 @@ const isDefinition = (x) =>
|
|
175
175
|
x[TYPE] === APPLY && x[VALUE] === KEYWORDS.DEFINE_VARIABLE
|
176
176
|
// [[, [, libs]]] is because std is wrapped in (apply (lambda (do ...)))
|
177
177
|
const toDeps = ([[, [, libs]]]) =>
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
178
|
+
// slice 1 so we get rid of do
|
179
|
+
libs
|
180
|
+
.slice(1)
|
181
|
+
.reduce(
|
182
|
+
(a, x, i) => a.set(x.at(1)[VALUE], { value: x, index: i }),
|
183
|
+
new Map()
|
184
|
+
)
|
182
185
|
const deepShake = (tree, deps, visited = new Set(), ignored = new Set()) => {
|
183
186
|
const type = tree[TYPE]
|
184
187
|
const value = tree[VALUE]
|