Fardale
881af122e4
CCInt64(chore): conditionally define function existing in newer OCaml
2024-12-25 19:30:26 +01:00
Fardale
54cd6dd83d
CCInt32(chore): add condition around functions existing in newer OCaml
2024-12-25 19:25:28 +01:00
Fardale
13252a9513
CCHashtbl(cleanup): remove function always present on 4.08
2024-12-25 15:18:54 +01:00
Fardale
1de3036e0c
CCFormat(feat): add option and result, change opt
...
Add CCFormat.option and CCFormat.result as aliases to
Format.pp_print_option and Format.pp_print_result. Make CCFormat.opt an
alias of CCFormat.option, as such this add an optional argument to print
the case "None" but change the default behaviour. Previously, it as
printing "some _" or "none" now it print something only in the case of
"Some x" and just "x".
2024-12-25 15:10:40 +01:00
Fardale
2aa8416b1c
CCFun(cleanup): align CCFun.compose with the stdlib
...
Conditionally define CCFun.compose and align its definition with the
stdlib. The arguments are now swapped.
2024-12-25 15:10:40 +01:00
Fardale
931b28ec47
CCEither(cleanup): conditionnally use the Either module
...
Include the Either module when available (ocaml >= 4.12)
2024-12-25 14:56:14 +01:00
Fardale
5a3c7c7971
CCChar(cleanup): remove CCChar.compare from the mli
...
Char.compare already existe
2024-12-25 14:56:14 +01:00
Fardale
e2ef6a750c
update CHANGELOG with current breaking changes
2024-12-25 14:56:14 +01:00
Fardale
180667fd64
CCInt64(cleanup): remove function always present on 4.08
2024-12-25 14:56:14 +01:00
Fardale
bd5518fc44
CCInt32(cleanup): remove function always present on 4.08
2024-12-25 14:56:14 +01:00
Fardale
755055c960
CCInt(cleanup): remove function always present on 4.08
2024-12-25 14:56:14 +01:00
Fardale
103011db35
CCFloat(cleanup): remove function always present on 4.08
2024-12-25 14:56:14 +01:00
Fardale
da45e33501
CCBool(cleanup): remove function always present on 4.08
2024-12-25 13:23:17 +01:00
Fardale
1fd377e5c1
CCArray(cleanup): remove function always present on 4.08
2024-12-25 13:19:30 +01:00
Simon Cruanes
2fda76a5f7
factor implem for Vec.{find,find_i}
2024-12-13 00:19:05 -05:00
Simon Cruanes
cad41d70d6
ocamlformat
2024-12-13 00:17:53 -05:00
John Hester
b140a50c46
feat: add CCVector.findi
2024-12-13 00:15:27 -05:00
Simon Cruanes
e1de3da1e3
prepare for 3.15
2024-11-18 12:22:16 -05:00
Simon Cruanes
f02df05b35
additional fix for #454 on OCaml 4.10..4.12
2024-11-18 12:22:16 -05:00
Simon Cruanes
477e9cc7ca
remove warning in tests
2024-11-18 12:22:15 -05:00
Simon Cruanes
921db438f2
chore: in CI, run tests in release profile
...
this is required to be able to repro #454
2024-11-18 12:22:15 -05:00
Simon Cruanes
303f51f93d
chore: add 4.10 to compat matrix
2024-11-18 12:22:15 -05:00
Simon Cruanes
6dcaddb7c6
fixes and format
2024-11-15 11:02:38 -05:00
seprov
8d8f1d4145
Add split_result ( #459 )
...
add `CCList.split_result` (@seprov)
2024-11-15 11:01:20 -05:00
Fardale
9cfedad7ba
feat: add pretty printer to CCMultiSet
2024-11-05 18:25:51 +01:00
Simon Cruanes
9bef25b6e2
format
2024-10-02 12:31:53 -04:00
Simon Cruanes
afb93cfc43
Merge pull request #457 from gmevel/linear-heap-building
...
Improvements to CCHeap
2024-10-02 10:04:42 -04:00
Simon Cruanes
3c530f47f4
Merge branch 'main' into linear-heap-building
2024-10-02 10:04:34 -04:00
Simon Cruanes
3efaa02d9d
update test output
2024-09-17 14:50:42 -04:00
Simon Cruanes
69f0e9b624
test: better regression test for #454
2024-09-17 14:04:09 -04:00
Simon Cruanes
c959e396b3
fix #454 : work around a weird miscompilation
2024-09-17 12:51:07 -04:00
Simon Cruanes
6ab811f79b
prepare for 3.14
2024-09-10 08:47:46 -04:00
Simon Cruanes
9f8c2efe64
add missing @since tags
2024-09-03 13:12:12 -04:00
Simon Cruanes
07cfdb0d94
format
2024-09-03 13:11:57 -04:00
Simon Cruanes
5abb63517c
Merge pull request #458 from benbellick/add-predicate-combinator
...
predicate combinators: and_p and or_p
2024-09-03 13:11:50 -04:00
Benjamin Bellick
c6cb572230
and_p -> and_pred, or_p -> or_pred
2024-09-03 11:59:43 -05:00
Ben Bellick
1dc046c6e9
fix formatting
2024-08-24 10:53:59 -05:00
Ben Bellick
df0e442956
predicate combinators: and_p and or_p
2024-08-24 10:26:01 -05:00
Simon Cruanes
65fc920427
feat pp: add a bunch of extensions
...
thanks to @grayswandyr
2024-08-19 12:17:58 -04:00
Glen Mével
5d315503e1
CCHeap: building from almost-sorted sequences
2024-08-09 14:46:17 +02:00
Glen Mével
a24e1f7472
doc/CCHeap: fix English, improve wording, add sections
2024-07-31 17:50:35 +02:00
Glen Mével
13db1c31e9
tests/CCHeap: add tests
2024-07-31 16:03:06 +02:00
Glen Mével
92676f5513
tests/CCHeap: reorder tests
2024-07-31 03:27:52 +02:00
Glen Mével
78e67a9f4a
tests/CCHeap: improve existing tests
...
- label all tests
- decouple tests about different heap functions
- random instances now have better coverage of possible cases:
+ more variability in size
(previously, some tests were limited to a fixed size)
+ high probability of duplicates
(previously, the probability of duplicates was negligible,
because elements were drawn uniformly from the full `int` range)
- the test for `of_list, take_exn` is now more precise
(added a duplicate element)
- the test for `to_list_sorted` is now more precise
(checks that the resulting list is what we want,
instead of just checking that it is sorted)
- the test for `filter` is now more precise
(also checks that no element has been spuriously dropped)
- more uniform style for easier reading, using `|>`
2024-07-31 03:27:52 +02:00
Glen Mével
fdfc806afb
CCHeap: avoid boxing in delete_one
2024-07-31 03:27:52 +02:00
Glen Mével
6c810eb83d
doc/CCHeap: document (==) for merge
2024-07-31 03:27:52 +02:00
Glen Mével
3f95fd44e6
perf/CCHeap: filter, delete_all in O(n) and ensure (==)
...
- for `delete_all` this is a bugfix
(physical equality was documented but not implemented)
- `delete_one` is unchanged, it already had complexity O(n)
and ensured physical equality
2024-07-31 03:27:49 +02:00
Glen Mével
806bb8c7bc
perf/CCHeap: heap building in O(n)
2024-07-31 02:19:33 +02:00
Glen Mével
cc2dd6d829
doc/CCHeap: move filter down
2024-07-27 04:57:43 +02:00
Glen Mével
8349a4d244
doc/CCHeap: fix grammar, improve doc of delete_{one,all}
2024-07-27 04:57:41 +02:00