@primmel/primmel 1.21.13 → 1.21.14

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.
@@ -1 +1 @@
1
- {"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/check.ts"],"names":[],"mappings":"AAmYA,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAW3B,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAsE7C,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB;yEACqE;IACrE,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,qDAAqD;AACrD,MAAM,WAAW,YAAY;IAC3B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAChC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACtC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AA+CD,wBAAgB,YAAY,CAC1B,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,YAAiB,GACzB,UAAU,EAAE,CAyzPd;AAoBD,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,EAAE,CAwFjE;AA4BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAOH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,QAAQ,GAAG,UAAU,EAAE,CAoCvE;AAUD,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,UAAU,EAAE,CAmFnE;AAWD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,GAAG,UAAU,EAAE,CAi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AQ,EAAE,QAAQ,GAAG,UAAU,EAAE,CA6FhE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,UAAU,EAAE,CAoBhE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,UAAU,EAAE,CA8CnE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,UAAU,EAAE,CA0HhE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,QAAQ,GACjB,UAAU,EAAE,CAuNd"}
package/dist/src/check.js CHANGED
@@ -1120,9 +1120,17 @@ function checkPackage(dir, options = {}) {
1120
1120
  if (INLINE_FUNCTION_WORDS.has(call)) {
1121
1121
  continue;
1122
1122
  }
1123
+ if (globalExprNames.has(call)) {
1124
+ // a declared callable — the calculation registry (twin-cert's
1125
+ // mpe(…), R 49's relative_error(…))
1126
+ continue;
1127
+ }
1123
1128
  if (call.includes('.')) {
1124
1129
  const root = call.split('.')[0];
1125
- if (argNames.has(root) || root === 'self' || CONTEXT_ROOTS.has(root)) {
1130
+ if (argNames.has(root) ||
1131
+ globalExprNames.has(root) ||
1132
+ root === 'self' ||
1133
+ CONTEXT_ROOTS.has(root)) {
1126
1134
  // the method rides its declared object — the root is the check
1127
1135
  continue;
1128
1136
  }
@@ -1277,6 +1285,21 @@ function checkPackage(dir, options = {}) {
1277
1285
  return null;
1278
1286
  case 'str':
1279
1287
  return null;
1288
+ case 'bool':
1289
+ return null;
1290
+ case 'ifelse': {
1291
+ kindOf(node.cond);
1292
+ const l = kindOf(node.then);
1293
+ const r = kindOf(node.else);
1294
+ if (l !== undefined &&
1295
+ r !== undefined &&
1296
+ l !== null &&
1297
+ r !== null &&
1298
+ l !== r) {
1299
+ kindMixErr(node, l, r);
1300
+ }
1301
+ return l !== undefined && l !== null ? l : r;
1302
+ }
1280
1303
  case 'name': {
1281
1304
  const root = node.path[0];
1282
1305
  if (node.path.length > 1 &&
@@ -1327,8 +1350,13 @@ function checkPackage(dir, options = {}) {
1327
1350
  case 'nav':
1328
1351
  // the iteration predicate's truth over the collection: the
1329
1352
  // boolean iterators; select keeps the source's kind — its
1330
- // element kind is the collection's, unknown here
1331
- return node.op === 'select' ? undefined : null;
1353
+ // element kind is the collection's, unknown here; collect
1354
+ // projects to a collection of the body's element kind
1355
+ return node.op === 'select'
1356
+ ? undefined
1357
+ : node.op === 'collect'
1358
+ ? kindOf(node.body)
1359
+ : null;
1332
1360
  case 'binop': {
1333
1361
  if (['<=', '>=', '<', '>', '=', '!=', '≠'].includes(node.op)) {
1334
1362
  const l = kindOf(node.left);