Commit Graph

29 Commits

Author SHA1 Message Date
Veit Heller
d3a6ca562f
docs: document core modules (#1271) 2021-07-05 14:48:35 +02:00
Veit Heller
459a62e61f
feat: add Char.to-byte and Char.from-byte (#1187) 2021-03-16 11:14:16 +01: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
hellerve
07a21d76b5 core: fix type of Char.zero 2020-01-29 11:48:31 +01:00
hellerve
eb9c236249 core: simplify Char.meaning 2019-10-28 17:19:31 +01:00
Jorge Acereda
7b7cb5d1e5 Substitute /= interface by a generic. 2019-09-20 23:49:20 +02:00
Jorge Acereda
c76177dfa7 Implement zero for Char. 2019-06-14 13:02:03 +02:00
hellerve
f470e17f99 core: add Char.alpha?, Char.num?, and Char.alphanum? 2019-03-06 16:35:37 +01: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
2d4239ed6b core: rename Char.upper-case and Char.lower-case with ? 2018-09-25 16:40:02 +02:00
hellerve
0114ae806a core: add Char.upper-case and Char.lower-case 2018-09-25 16:14:38 +02:00
Chris Hall
16bdd7f854 Adding comparison operators to Char and CharRef 2018-06-26 17:08:58 +10:00
hellerve
b2c57e16d3 core: initial documentation work 2018-05-12 16:08:48 +02:00
Erik Svedäng
00105618a4 A few extra functions for handling files and char pointers. 2018-03-18 14:40:49 +01:00
Erik Svedäng
0301837072 More useable signature for 'Array.element-count'. 2018-03-12 12:11:33 +01:00
hellerve
93171ccbaa core: regex api seems to work completely 2018-02-28 11:18:57 +01: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
hellerve
d32fe4102f core: added a few more functions to stdlib 2018-01-02 18:13:52 +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
66912d0ebe core: fixed limiter in chars 2017-12-29 10:28:46 +01:00
hellerve
6897606f39 core: added random & random-between to char, random to string 2017-12-28 18:10:38 +01:00
Erik Svedäng
46004c7e69 A function for getting the numeric meaning of the chars '0' - '9'. 2017-12-01 12:02:36 +01:00
hellerve
911076276e all: miscellaneous fixes 2017-11-29 15:28:21 +01:00
Erik Svedäng
9f60aba18d strdup is handled properly by the memory balancer 2017-11-22 16:25:05 +01:00
hellerve
99573e335f core: bugfix in String.from-chars; added Char.to-int and Char.from-int 2017-11-14 18:33:03 +01:00
Erik Svedäng
c80526cfaa REPLACE WITH HASKELL VERSION 2017-06-26 11:15:03 +02:00