Commit Graph

10 Commits

Author SHA1 Message Date
Veit Heller
0a7a83543d
fix: quasiquoting breaks List.pairs (#1431) 2022-08-30 15:40:13 +02:00
Tim Dévé
d7ad0b2629
feat: Adds Dynamic.sort & improves output of failing dynamic tests (#1411)
* feat: Adds Dynamic.sort

* test: Adds tests for Dynamic.sort

* refactor: Makes dynamic test handler display diff

of expected vs actual instead of displaying "true" : "true"

* test: Removes complex implementation of list-equal-unordered

Replaces it with sort + equal. While this is less "correct", having
complex untested functions within test files is undesirable. This
implementation is "good enough" for lists of integers.
2022-04-09 07:04:16 +02:00
Veit Heller
0efb9825f0
feat: add Dynamic.List.find-index (#1316) 2021-09-17 05:58:39 +02:00
Veit Heller
092b249ac7
feat: add List.remove-nth (#1277) 2021-07-13 17:54:15 +02:00
Veit Heller
fd9ceef1ae
docs: add docstrings to some dynamic functions (#1191) 2021-03-30 10:22:18 +02:00
Veit Heller
007d020e05
refactor: use assert-dynamic-equal in test (#1186) 2021-03-16 11:14:01 +01:00
Veit Heller
dacc13560b
feat: add dynamic Map type (#1168)
* feat: add dynamic map prototype

* feat: feature parity for dynamic map

* docs: document dynamic map

* test: add dynamic map tests

* fix: defdynamics are handled in getBinderDescription

* test: i forgot to add dynamic tests, whoops
2021-02-11 09:12:58 +01:00
Veit Heller
a6a52c7605
feat: a proper dynamic numeric tower (#1140)
* feat: a proper dynamic numeric tower

The following things were changed and/or added:
- `Dynamic.neg` was added
- `Dynamic.mod` was changed to work on float values
- `Dynamic.cxr` was changed to work with `0` instructions
- `Dynamic.=` was changed to ignore the type of the number
- `Dynamic.round` was added
- dynamic arithmetic was changed to respect the numeric type tower
- the instances of `Eq` and `Ord` for `Number` are no longer derived, so that they work across numeric types
- the instance of `Num` for `Number` was changed to work across numeric types
- `promoteNumber` was added as a type function to implement the numeric tower.

The numeric tower is as follows:
Byte -> Int -> Long -> Float -> Double

* test: add tests for cxr, neg, and =

* test: add tests for Dynamic.round
2021-01-26 06:19:00 +01:00
Veit Heller
e966f36a58
feat: add walk* (#1134) 2021-01-17 23:34:11 +01:00
Erik Svedäng
f78fd16a71
refactor: Move code out of Macros.carp into other files (#1014)
* refactor: Move code out of Macros.carp into other files

* fix: Move back some macros needed in --no-core mode

* refactor: Remove weird 'evaluate' macros

* fix: Put back more macros

* fix: Remove transitive loading of Macros.carp

* refactor: Remove ArrayMacros.carp and put 'for' at top of Array.carp instead

* refactor: More splitting up

* refactor: Move back save-docs

* fix: Moved back some stuff

Co-authored-by: Erik Svedang <erik@Eriks-iMac.local>
2020-11-28 12:53:18 +01:00