Commit graph

1055 commits

Author SHA1 Message Date
Simon Cruanes
9ec34f8bf8
fix(CCSeq): correct conditional compilation version for init
Seq.init was added in OCaml 4.14, not 4.11. This aligns the
implementation with the interface which was already correctly
marked with [@@@iflt 4.14].
2026-02-12 08:52:46 -05:00
Emmanuel Arrighi
35803e586c CCFormat(fix): restaure the behaviour of CCFormat.opt 2026-02-06 19:42:59 +01:00
Emmanuel Arrighi
8f30ce25b6 Revert "CCFun(cleanup): align CCFun.compose with the stdlib"
This reverts commit b649ac9dc5.
2026-02-06 19:42:59 +01:00
Emmanuel Arrighi
b8f1048ce4 CCString(cleanup): remove function always existing in stdlib > 4.08 2026-02-06 19:42:59 +01:00
Emmanuel Arrighi
9eb002304f CCSet(cleanup): remove function always in Stdlib for > 4.08 2026-02-06 19:42:59 +01:00
Emmanuel Arrighi
d80d36106b CCSeq(chore): sync with stdlib 2026-02-06 19:42:59 +01:00
Emmanuel Arrighi
405dfa4891 chore: inline the doc of the included modules 2026-02-06 14:36:44 +01:00
Emmanuel Arrighi
30f7ac7551 CCResult(cleanup): sync CCResult with Stdlib.Result. 2026-02-06 14:28:56 +01:00
Emmanuel Arrighi
3af76f266c CCPair(chore): sync CCPair with Stdlib.Pair 2026-02-06 12:34:00 +01:00
Emmanuel Arrighi
bb31265e52 CCOption(cleanup): remove functions that are in the stdlib 2026-02-06 12:16:28 +01:00
Emmanuel Arrighi
5e60c0d237 CCNativeint(cleanup): cleanup with bump ocaml version to 4.08 2026-02-06 11:28:06 +01:00
Emmanuel Arrighi
571f9f3793 CCMap(cleanup): clean function that are in the stdlib 2026-02-06 11:17:18 +01:00
Fardale
0cd4bbf240 CCList(cleanup): clean functions that are in the stdlib 2026-02-06 10:44:54 +01:00
Fardale
52fc619335 CCInt(chore): conditionally define function existing in newer OCaml 2026-02-06 10:44:54 +01:00
Fardale
b8684b77df CCInt64(chore): conditionally define function existing in newer OCaml 2026-02-06 10:44:54 +01:00
Fardale
bf7f4897c6 CCInt32(chore): add condition around functions existing in newer OCaml 2026-02-06 10:44:54 +01:00
Fardale
8268e29c48 CCHashtbl(cleanup): remove function always present on 4.08 2026-02-06 10:44:54 +01:00
Fardale
3516c5dc0e 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".
2026-02-06 10:44:54 +01:00
Fardale
b649ac9dc5 CCFun(cleanup): align CCFun.compose with the stdlib
Conditionally define CCFun.compose and align its definition with the
stdlib. The arguments are now swapped.
2026-02-06 10:44:54 +01:00
Fardale
74b787f7e6 CCEither(cleanup): conditionnally use the Either module
Include the Either module when available (ocaml >= 4.12)
2026-02-06 10:44:54 +01:00
Fardale
f05c07d20d CCChar(cleanup): remove CCChar.compare from the mli
Char.compare already existe
2026-02-06 10:44:54 +01:00
Fardale
6a6ccbbc5c CCInt64(cleanup): remove function always present on 4.08 2026-02-06 10:36:29 +01:00
Fardale
9e3baf8ff1 CCInt32(cleanup): remove function always present on 4.08 2026-02-06 10:36:29 +01:00
Fardale
88f093b64d CCInt(cleanup): remove function always present on 4.08 2026-02-06 10:36:29 +01:00
Fardale
0522770173 CCFloat(cleanup): remove function always present on 4.08 2026-02-06 10:36:29 +01:00
Fardale
5576ad71cc CCBool(cleanup): remove function always present on 4.08 2026-02-06 10:36:29 +01:00
Fardale
fcbde4b187 CCArray(cleanup): remove function always present on 4.08 2026-02-06 10:36:29 +01:00
Simon Cruanes
5461dcc07a
prepare for 3.17
Some checks failed
format / format (push) Has been cancelled
Build and Test / build (push) Has been cancelled
2026-01-12 20:16:42 -05:00
Simon Cruanes
eab2e1d33f
try to make the test_random uniformity test more robust
Some checks failed
format / format (push) Has been cancelled
Build and Test / build (push) Has been cancelled
just increase the sample size.
2025-12-20 11:19:45 -05:00
Simon Cruanes
c72b60fd6f
do simplify the code a bit
closer to the original solution, too. Avoids a redundant `:= []`.
2025-12-20 11:15:15 -05:00
Simon Cruanes
15b421c54e
faster List.take_drop thanks to a trick by nojb
https://discuss.ocaml.org/t/efficient-implementation-of-list-split/17616/2
pretty cool.
2025-12-20 11:08:30 -05:00
Simon Cruanes
c1b13f1c7f
feat: add CCAtomic.update_cas
Some checks failed
format / format (push) Has been cancelled
Build and Test / build (push) Has been cancelled
2025-12-08 13:41:29 -05:00
Simon Cruanes
7c8adbd9fc
move to ocamlformat 0.27, format code 2025-11-25 20:11:54 -05:00
István Donkó
14ad490c7e fix: insert missing symbol into range doc comments
Some checks failed
Build and Test / build (push) Has been cancelled
Build and Test / format (push) Has been cancelled
2025-10-27 12:03:46 -04:00
Simon Cruanes
99dba20fa6
prepare for 3.16
Some checks failed
Build and Test / build (push) Has been cancelled
Build and Test / format (push) Has been cancelled
2025-05-27 09:22:31 -04:00
Simon Cruanes
f934db1e9c
fix: compat with OCaml 5.4
Some checks are pending
Build and Test / build (push) Waiting to run
Build and Test / format (push) Waiting to run
close #477
2025-05-26 23:44:02 -04:00
Simon Cruanes
14ad8c1f2a
format
Some checks failed
Build and Test / build (push) Has been cancelled
Build and Test / format (push) Has been cancelled
2025-05-06 22:24:04 -04:00
Simon Cruanes
ab7d0fcc09
fix: oob(!!) in CCHash.bytes
Some checks are pending
Build and Test / build (push) Waiting to run
Build and Test / format (push) Waiting to run
2025-05-06 10:01:31 -04:00
Simon Cruanes
4613aafb30
feat: add CCFun.with_return
Some checks failed
Build and Test / build (push) Has been cancelled
Build and Test / format (push) Has been cancelled
2025-02-07 16:57:56 -05:00
Adlertz, Niclas
4294dc7ca3 Add square brackets in comment for CCList.return
Some checks failed
Build and Test / build (push) Has been cancelled
Build and Test / format (push) Has been cancelled
2025-01-28 22:19:11 -05:00
Alexander
2dcaa12fb7 Fixed docstring typo. 2025-01-04 11:19:57 -05:00
Alexander
b95e2de65b Added functions to the Char module to check common character properties. 2025-01-04 09:18:51 -05:00
Alexander Lucas
8bb3801a52 Fixed formatting of CCString.rtake_while. 2025-01-01 10:22:42 -05:00
Alexander Lucas
d29ed7ee72 Renamed predicate parameter of take_while, rtake_while from p to f, aligining it with pre-existing drop_while. 2025-01-01 09:55:26 -05:00
Alexander Lucas
699b370220 Updated String and StringLabels interfaces to reflect take_while, rtake_while. 2025-01-01 09:34:06 -05:00
mobotsar
6c8569a7d9
Update CCString.mli to align parameter names in mli descriptions and implementations. 2025-01-01 00:48:58 -05:00
mobotsar
1498158a4f
Update CCString.mli for take_while, rtake_while 2025-01-01 00:47:17 -05:00
mobotsar
d8c00f96be
Update CCString.ml with take_while, rtake_while
Added two functions to the `CCString` module addressing #463 following the style of `CCString.drop_while` and `CCString.rdrop_while`. Corresponding `CCString.mli` changes to follow.
2025-01-01 00:35:55 -05:00
mobotsar
2e8d70f073
Update CCEither.mli fixing type in docstring
Changed "form OCaml 4.12" to "from OCaml 4.12".
2024-12-31 22:25:55 -05:00
Simon Cruanes
2fda76a5f7
factor implem for Vec.{find,find_i} 2024-12-13 00:19:05 -05:00