Commit Graph

13 Commits

Author SHA1 Message Date
hellerve
fb3ef6a47f core: add Bool.zero 2020-06-23 12:26:53 +02:00
Scott Olsen
f13a2fdd9d Add some more calls to implement to make tests pass 2020-05-10 13:32:22 -04: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
Jorge Acereda
4a4107fffd Preserve includes order in generated output. 2019-10-03 00:23:27 +02:00
Erik Svedäng
b438edf09c BUGFIX: Parser now must consume whole input. 2018-06-01 10:24:46 +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
0f99128f9c Moved simplified dictionary code to generic struct examples. 2018-01-28 22:54:59 +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
e17b6b892c core: minor fixes 2017-12-04 19:17:52 +01:00
hellerve
631e2ab95f testing: added Test module 2017-10-23 16:07:54 +02:00
Erik Svedäng
d4f1910bce Added Bool module. Fixed error in test selection.carp 2017-10-11 10:52:18 +02:00