Commit Graph

39 Commits

Author SHA1 Message Date
Veit Heller
d3a6ca562f
docs: document core modules (#1271) 2021-07-05 14:48:35 +02:00
Scott Olsen
26131f2b1c Add remaining implements declarations 2020-05-10 22:53:35 -04: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
Erik Svedäng
1a0b003745 Remove defn for /= 2019-09-27 15:48:10 +02:00
Erik Svedäng
e8e641de99 Merge branch 'misc-fixes' of https://github.com/jacereda/Carp into jacereda-misc-fixes 2019-09-27 15:37:36 +02:00
Jorge Acereda
7b7cb5d1e5 Substitute /= interface by a generic. 2019-09-20 23:49:20 +02:00
Jorge Acereda
336b43a2af Add DoubleRef./= 2019-09-18 18:51:36 +02:00
Jorge Acereda
08af49dc62 Working on generics.
- Added Generics module.
- Some Geometry/Vector* functions hardcoded parameters to Double.
2019-09-08 13:02:04 +02:00
hellerve
9848e8fb34 multiple fixes:
- don’t do function copying in benchmarking
- fix the array_update benchmark
- add Filepath.file-from-path
- add tests for the `Filepath` module
- reformat a lot of documentation
2019-02-15 14:48:49 +01:00
hellerve
289fa8b011 core: add to-bytes 2018-06-07 18:30:57 +02:00
hellerve
032249b342 core: add random module (referencing #227) 2018-05-22 19:34:38 +02:00
hellerve
f3e559dc28 docs: more documentation work 2018-05-12 16:08:48 +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
33aeab7c82 FIXED: Fails to find the correct Array.str when calling println* in a do-form. 2018-01-28 05:56:03 +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
b561713add core: added random to vector and double; added random and random-between interfaces 2017-12-28 18:02:50 +01:00
Your Name
3f0c5047f1 Changed pi symbol to 'pi' 2017-12-14 22:48:19 +01:00
Erik Svedäng
b0cdc65f4b Implemented 'add-ref' and 'zero' for Int/Float/Double. Allows nice 'Array.sum' function. 2017-12-04 07:21:35 +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
ba2aa70a55 double: improve precision of pi and e 2017-11-22 18:25:03 +01:00
hellerve
64a82c2730 float: added all math function in math.h 2017-11-16 09:46:06 +01:00
hellerve
d346673a74 double: added all math function in math.h 2017-11-15 14:06:49 +01:00
hellerve
0990ed60cd core: add /= wherever = is defined 2017-11-14 18:09:18 +01:00
hellerve
e3a0da969a statistics: updated tests 2017-11-07 15:06:47 +01:00
hellerve
5c6556e406 bench: first version 2017-11-06 18:08:07 +01:00
hellerve
120116a70a vector2: integrated test suite 2017-10-25 13:07:52 +02:00
hellerve
81c2af23f1 vectors: most things work 2017-10-25 13:07:52 +02:00
hellerve
6dc31855d8 vectors: added a few math primitives and made most functions work 2017-10-25 13:07:52 +02:00
Erik Svedäng
510d0f3f1a More todos. 2017-10-19 18:34:44 +02:00
Erik Svedäng
09fc80599a Renamed some functions in Double and Float. 2017-10-13 16:11:23 +02:00
Erik Svedäng
cebc0a98d9 Modules explained. 2017-10-13 16:04:06 +02:00
Erik Svedäng
8573098dca str-function generated for structs 2017-10-10 20:13:58 +02:00
Erik Svedäng
c80526cfaa REPLACE WITH HASKELL VERSION 2017-06-26 11:15:03 +02:00