fez-lisp 1.6.2 → 1.6.4
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.js +1 -1
- package/package.json +1 -1
- package/src/check.js +1 -31
package/package.json
CHANGED
package/src/check.js
CHANGED
@@ -1204,38 +1204,8 @@ export const typeCheck = (ast, ctx = SPECIAL_FORM_TYPES) => {
|
|
1204
1204
|
)})`
|
1205
1205
|
)
|
1206
1206
|
if (name in env) {
|
1207
|
-
// const [head, ...tail] = isLeaf(rest.at(-1))
|
1208
|
-
// ? [rest.at(-1)]
|
1209
|
-
// : rest.at(-1)
|
1210
|
-
// const ref = env[name]
|
1211
|
-
// if (ref) {
|
1212
|
-
// if (getType(ref[STATS]) === APPLY && head[TYPE] !== APPLY)
|
1213
|
-
// throw new TypeError(
|
1214
|
-
// `Miss-matching type for (${name}) predifined expected type is (${toTypeNames(
|
1215
|
-
// APPLY
|
1216
|
-
// )}) but got (${stringifyArgs(exp)})`
|
1217
|
-
// )
|
1218
|
-
// const returns = deepLambdaReturn(
|
1219
|
-
// hasBlock(tail) ? tail.at(-1) : tail,
|
1220
|
-
// (result) => result[VALUE] !== KEYWORDS.IF
|
1221
|
-
// )
|
1222
|
-
// const [rhead] = isLeaf(returns) ? [returns] : returns
|
1223
|
-
// const rightRef = env[rhead[VALUE]]
|
1224
|
-
// if (rightRef)
|
1225
|
-
// if (
|
1226
|
-
// !equalReturns(ref[STATS], rightRef[STATS]) ||
|
1227
|
-
// !equalSubReturns(ref[STATS], rightRef[STATS])
|
1228
|
-
// )
|
1229
|
-
// throw new TypeError(
|
1230
|
-
// `Miss-matching return type for (${name}) predifined expected return is (${formatSubType(
|
1231
|
-
// getReturns(ref[STATS])
|
1232
|
-
// )}) but got (${formatSubType(
|
1233
|
-
// getReturns(rightRef[STATS])
|
1234
|
-
// )}) (${stringifyArgs(exp)})`
|
1235
|
-
// )
|
1236
|
-
// }
|
1237
1207
|
Types.set(withScope(name, env), () => formatType(name, env))
|
1238
|
-
break
|
1208
|
+
if (!env[env[SCOPE_NAME]]) break
|
1239
1209
|
}
|
1240
1210
|
// Predicate name consistency
|
1241
1211
|
const rightHand = rest.at(-1)
|