Commit Graph

29 Commits

Author SHA1 Message Date
Veit Heller
d3a6ca562f
docs: document core modules (#1271) 2021-07-05 14:48:35 +02:00
Jorge Acereda
58a61dd42e Add support for cross-compilation. 2020-10-10 20:01:18 +02:00
hellerve
06607c2203 core: make bit-* interfaces 2020-07-08 21:11:28 +02:00
hellerve
5f408229a1 core: add missing longref implements procs 2020-05-18 23:02:26 +02:00
scottolsen
040e9e4391 Add an implements primitive, update core
This change adds a new primitive Implements which changes interface
implementations from being implicit to being explicit. Going forward,
users will have to declare (implements <interface> <implementation>) to
explicitly add a function to an interface. This provides two benefits:

- Prevents unwitting name clashes. Previously, if one defined a function
  that happened to have the same name as an interface, it was
  automatically assumed the function implemented that interface when this
  is not always the intention, especially in large programs.
- Name flexibility. One can now implement an interface with a function
  that has a different name than the interface, which allows for greater
  flexibility.

I've updated core to make the necessary calls to the new primitive.

Since str and copy are derived automatically for types, we treat these
functions as a special case and auto-implement the interfaces.
2020-05-09 12:59:47 -04:00
hellerve
38af3d344a safe arithmetic: disable on windows 2020-04-24 10:28:00 +02:00
hellerve
ae3f9c49b8 core: add Long.MAX, Long.MIN, and Long.zero 2020-02-13 16:00:53 +01:00
Jorge Acereda
7b7cb5d1e5 Substitute /= interface by a generic. 2019-09-20 23:49:20 +02:00
hellerve
f60f72f4b4 core: add todo macro 2019-06-22 20:18:32 +02:00
hellerve
e3c1a31ec6 core: add neg protocol and add to int and long 2018-05-07 21:57:15 +02:00
hellerve
01f366f2c8 core: remove interdependencies between modules 2018-02-27 15:10:42 +01:00
hellerve
b7ea8d1487 core: namespaced split-up carp headers 2018-02-27 15:08:39 +01:00
hellerve
f56b1ff93f core: split up core.h, installment 1 2018-02-27 15:08:36 +01:00
Erik Svedäng
8281dfa109 Made inc, dec, max, min into interfaces. Changed Array.max/min to new
names. Fixed tests and removed special max/min from Statistics module.
2018-01-29 07:14:56 +01:00
hellerve
eba07aeb34 core: added numerical ref modules 2018-01-15 16:27:05 +01:00
hellerve
f93eb16615 core: add cmp interface; src: better sort 2018-01-15 16:10:11 +01:00
hellerve
7c9eaeac9f core: made format not leak memory; test: added test for format and fmt 2017-12-30 20:16:31 +01:00
hellerve
eccddd00fe format: added simple versions of format (work on issue #108) 2017-12-30 15:13:56 +01:00
hellerve
4e53130f53 long & int: updated tests 2017-11-29 17:28:05 +01:00
hellerve
fba4e8ba5e long & int: added binary arithmetic 2017-11-29 17:26:51 +01:00
Erik Svedäng
7d3931c46a
Merge pull request #117 from hellerve/misc
Miscellaneous fixes
2017-11-29 15:50:12 +01:00
hellerve
911076276e all: miscellaneous fixes 2017-11-29 15:28:21 +01:00
hellerve
0e8558f6c3 long: added int conversion 2017-11-29 11:45:20 +01:00
Erik Svedäng
7b5a0aa7eb All tests run, but can still confuse the type checker, see "expression_problem.carp" 2017-11-27 12:36:17 +01:00
hellerve
b3d19ae9da int/long: added math functions 2017-11-17 12:26:01 +01:00
hellerve
40c19b138e int/long: added safe arithmetic 2017-11-16 21:19:39 +01:00
Erik Svedäng
39c405bfb6 Remove duplicated function '/=' in Long.carp 2017-11-14 22:30:21 +01:00
hellerve
0990ed60cd core: add /= wherever = is defined 2017-11-14 18:09:18 +01:00
hellerve
3a03969717 all: added long type 2017-10-25 19:17:53 +02:00