fez-lisp 1.6.57 → 1.6.58

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "fez-lisp",
3
3
  "description": "Lisp interpreted & compiled to JavaScript",
4
4
  "author": "AT290690",
5
- "version": "1.6.57",
5
+ "version": "1.6.58",
6
6
  "type": "module",
7
7
  "main": "index.js",
8
8
  "keywords": [
package/src/check.js CHANGED
@@ -1003,9 +1003,9 @@ export const typeCheck = (
1003
1003
  throw new TypeError(
1004
1004
  `Incorrect type of argument (${i}) for (${
1005
1005
  first[VALUE]
1006
- }). Expected (${toTypeNames(
1007
- getType(expected)
1008
- )}) but got (${toTypeNames(getReturn(actual))}) (${stringifyArgs(
1006
+ }). Expected (${formatSubType(
1007
+ getTypes(expected)
1008
+ )}) but got (${formatSubType(getReturns(actual))}) (${stringifyArgs(
1009
1009
  exp
1010
1010
  )}) (check #16)`
1011
1011
  )
@@ -1111,10 +1111,10 @@ export const typeCheck = (
1111
1111
  local[lambdaName][STATS][ARGUMENTS][j][STATS][
1112
1112
  SIGNATURE
1113
1113
  ]
1114
- }). Expected (${toTypeNames(
1115
- getType(expected[STATS])
1116
- )}) but got (${toTypeNames(
1117
- getType(actual[STATS])
1114
+ }). Expected (${formatSubType(
1115
+ getTypes(expected[STATS])
1116
+ )}) but got (${formatSubType(
1117
+ getTypes(actual[STATS])
1118
1118
  )}) (${stringifyArgs(exp)}) (check #780)`
1119
1119
  )
1120
1120
  else if (!equalSubReturns(expected[STATS], actual[STATS]))
@@ -1123,10 +1123,10 @@ export const typeCheck = (
1123
1123
  expected[STATS][SIGNATURE]
1124
1124
  }) the (${KEYWORDS.ANONYMOUS_FUNCTION}) argument of (${
1125
1125
  first[VALUE]
1126
- }) at position (${i}). Expected (${toTypeNames(
1127
- getReturn(expected[STATS])
1128
- )}) but got (${toTypeNames(
1129
- getReturn(actual[STATS])
1126
+ }) at position (${i}). Expected (${formatSubType(
1127
+ getReturns(expected[STATS])
1128
+ )}) but got (${formatSubType(
1129
+ getReturns(actual[STATS])
1130
1130
  )}) (${stringifyArgs(exp)}) (check #784)`
1131
1131
  )
1132
1132
  // else
@@ -1690,13 +1690,9 @@ export const typeCheck = (
1690
1690
  first[VALUE]
1691
1691
  }). Expected (${formatSubType(
1692
1692
  getTypes(args[i][STATS])
1693
- )}) but got (${
1694
- rest[i][TYPE] === ATOM
1695
- ? toTypeNames(rest[i][TYPE])
1696
- : formatSubType(
1697
- getTypes(env[rest[i][VALUE]][STATS])
1698
- )
1699
- }) (${stringifyArgs(exp)}) (check #203)`
1693
+ )}) but got (${toTypeNames(
1694
+ NUMBER
1695
+ )}) (${stringifyArgs(exp)}) (check #203)`
1700
1696
  )
1701
1697
  }
1702
1698
  break
@@ -1719,8 +1715,8 @@ export const typeCheck = (
1719
1715
  first[VALUE]
1720
1716
  }) at position (${i}). Expected (${
1721
1717
  STATIC_TYPES.ABSTRACTION
1722
- }) but got (${toTypeNames(
1723
- getType(args[i][STATS])
1718
+ }) but got (${formatSubType(
1719
+ getTypes(args[i][STATS])
1724
1720
  )}) (${stringifyArgs(exp)}) (check #111)`
1725
1721
  )
1726
1722
  else if (getType(args[i][STATS]) === APPLY)
package/src/types.js CHANGED
@@ -88,6 +88,7 @@ export const toTypeNames = (type) => {
88
88
  case BOOLEAN:
89
89
  return 'Boolean'
90
90
  case ATOM:
91
+ return 'Atom'
91
92
  case NUMBER:
92
93
  return 'Number'
93
94
  // case ATOM: