-
Notifications
You must be signed in to change notification settings - Fork 106
/
ChangeLog
886 lines (713 loc) · 25.7 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
Changelog
=========
## NEXT_RELEASE
- Add reset, find_opt and Seq functions to BatHashtbl
#1133
(Simmo Saan)
- Add Stdlib type equality to Set.Make, Map.Make and Hashtbl.Make
#1132
(Simmo Saan)
## v3.8.0 (minor release)
- support OCaml 5.2
#1127
(kit-ty-kate)
## v3.7.2 (bugfix release)
- support OCaml 5.1.1
#1124
(kit-ty-kate)
## v3.7.1 (minor release)
- fix CI tests (dune clean && dune build @src/runtest)
#1121
(Simo Saan)
- fix documentation errors for BatSet, BatMap and BatSplay
#1120
(Simmo Saan)
- compatibility with OCaml 5.1.0
#1117
(kit-ty-kate)
- bugfix impacting BatString.split_on_string
#1112
(Guido Martinez, review by Francois Berenger)
- add batteries.unthreaded to dune file
#1104
(Stephen Sherratt)
- add optional dependency to dune in opam file
#1103
(Stephen Sherratt)
- Finish switch to dune
#1098 dune build
#1099 dune runtest
(Simmo Saan, review by Francois Berenger)
## v3.6.0 (minor release)
- BatBuffer.enum rewritten to work with OCaml-5
(Francois Berenger)
- Fix 'make doc'
#1097
(Simmo Saan)
- Remove dependence to oasis
#1095
(Simmo Saan)
- Fix compilation and unit tests for OCaml 5.0.0
#1094
#1087
#1086
(Simmo Saan, Francois Berenger)
- Bug correction in BatString.split_on_string
#1089
(Francois Berenger, report by Lucas Franceschino)
- bug correction in BatBitset.inter
#1091
(report by Yongho Yoon, fix by Gabriel Scherer)
- Support new OCaml 5 unix primitive names
#1082
(David Allsopp, review by Francois Berenger)
- BatRandom.choice on an empty enum now throws Empty instead of
Invalid_argument "Random.int" previously
#1080
(Nicolas Tollenaere, review by Francois Berenger)
## v3.5.1 (minor release)
- expose BatHashtbl.stats : ('a, 'b) t -> statistics
#1079
(Francois Berenger, request by Simmo Saan)
## v3.5.0 (minor release)
- add covariances to types of maps and sets
#1065
(Jean-Christophe Léchenet)
- BatHashtbl.for_all: ('a -> 'b -> bool) -> ('a, 'b) t -> bool
#1069
(Francois Berenger)
- BatHashtbl.exists: ('a -> 'b -> bool) -> ('a,'b) t -> bool
#1070
(Francois Berenger)
- BatFilename.with_temp_file: ?temp_dir:string -> string -> string -> (string -> 'a) -> 'a
#1071
(Francois Berenger, review by Cedric Cellier)
## v3.4.0 (minor release)
- BatString.edit_distance: faster; unsafe array accesses
#1061
(Francois Berenger)
- BatBytes.{fold_left,fold_right,for_all,exists,starts_with,ends_with,split_on_char}
#1050
Code from the stdlib introduced in OCaml-4.13.0.
(Francois Berenger)
- BatArray.{find_opt,fold_left_map,find_map,combine}
#1047,#1046,#1048,#1049
Most code comes from the stdlib and was introduced in OCaml-4.13.0.
(Francois Berenger)
- BatSet.is_singleton: t -> bool
#1042
(Francois Berenger, review by Gabriel Scherer)
- fix a bug in Bashtbl.Make(T).of_{list,enum}
#1038, #1039
(Gabriel Scherer, report by Johnny Bock Andersen)
- BatList.ExceptionLess: added reduce, min, max and min_max
Now, BatList.min and max also accept a ~cmp optional parameter;
defaulting to Pervasives.compare.
#1037
(Nicolas Tollenaere, review by Francois Berenger)
- DynArray.remove_at alias for DynArray.delete
#1033
(Florent Monnier, review by Francois Berenger)
- Fix several deprecated warnings for "float" and "noalloc"
#729
Since 4.03: [@@unboxed] and [@@noalloc] respectively
(Thibault Suzanne, review by Francois Berenger)
## v3.3.0 (minor release)
- Several fixes for OCaml-4.12
#994, #992,
(kit-ty-kate)
- Support for ocaml-multicore in the Gc module
#991
(kit-ty-kate, review by Gabriel Scherer)
- Significant work preparing switch to dune
#1025, #1024, #1023, #1022, #1021, #1020, #1019, #1017
(Gabriel Scherer, review by Francois Berenger)
- Remove `-rectypes` from BatFingerTree and simpler implementation
#1012
(Gabriel Scherer)
- new BatEither module; available in all OCaml versions supported by batteries
#1027
The implementation comes from the stdlib and is due to Gabriel Scherer.
(Francois Berenger, review by Gabriel Scherer)
- BatList.partition_map: ('a -> ('b, 'c) BatEither.t) -> 'a list ->
'b list * 'c list
#1028
(Francois Berenger, review by Gabriel Scherer)
- BatSet: added several missing methods for compatibility with stdlib.
The implementation of filter, map and filter_map was adapted from
stdlib, authors of the original implementation are Xavier Leroy,
Albin Coquereau and Gabriel Scherer
#1006, #1008
(Jakob Krainz, review by Gabriel Scherer)
- BatSeq: compatibility with stdlib.Seq
#1005, #1007
(Jakob Krainz, review by Gabriel Scherer)
- BatMap, BatSplay: find_first, find_first_opt, find_last, find_last_opt,
to_rev_seq
For compatibility with the stdlib.
The implementation in BatMap was adapted from stdlib;
authors of the original implementation are Albin Coquereau
and Gabriel de Perthuis.
#1000, #1031
(Jakob Krainz, review by Gabriel Scherer)
- BatArray.remove_at: int -> 'a array -> 'a array
#996
For compatibility with BatList
(Francois Berenger, review by Cedric Cellier)
- BatDynArray: several new functions
BatDynArray now exposes almost the same functionalities as BatArray
#872
(andrepd, review by Florent Monnier and Francois Berenger)
- BatDynArray: uniformization of exceptions and more documentation
#988
(Florent Monnier, review by Francois Berenger)
- BatDynArray: user input checks in left, right, tail
#987
(Florent Monnier, review by Francois Berenger)
- Fix stack overflow on Int32/64.pow with negative exponent (issue #989)
#990
(Cedric Cellier, review by Francois Berenger)
- BatList.unfold_exn is an alias for unfold_exc.
BatRefList.find_exn is an alias for find_exc.
#978
(Cedric Cellier, review by Francois Berenger)
## v3.2.0 (minor release)
- BatArray.fold_while: ('acc -> 'a -> bool) -> ('acc -> 'a -> 'acc) ->
'acc -> 'a array -> 'acc * int
#974
(Francois Berenger, review by Cedric Cellier)
- Support for OCaml 4.12
#980
(kit-ty-kate)
- BatArray.fold is an alias for fold_left
#976
(Francois Berenger)
- BatList.fold is an alias for fold_left
#975
(Francois Berenger)
- BatArray.count_matching: ('a -> bool) -> 'a array -> int
#972
(Francois Berenger)
- BatList.count_matching: ('a -> bool) -> 'a list -> int
#816
(Francois Berenger)
- Provide an explicitly unthreaded package
For Dune, provide an alternative batteries.unthreaded package
#970
(Jerome Vouillon)
- BatList.findi: correct documentation
#967
(Francois Berenger)
- BatOptParse.unprogify: bug fix (issue #965)
'%prog' was replaced only once, now it is always replaced
(in accordance with the documentation)
#966
(Francois Berenger, report by OnkV)
- Expose Map.remove_exn and Set.remove_exn: 'a -> 'a t -> 'a t
#954
(Cedric Cellier)
## v3.1.0 (minor release)
This minor release adds support for OCaml 4.11.
- Compatibility fixes for OCaml-4.11
#962
(Jerome Vouillon)
- BatEnum: added combination
#518
(Chimrod, review by hcarty)
- fix benchmarks
#956
(Cedric Cellier)
- BatFile: added count_lines
#953
(Francois Berenger, review by Cedric Cellier)
- BatArray: use unsafe_get and unsafe_set more often
#947
(Francois Berenger, review by Cedric Cellier)
- fix some tests for ocaml-4.10.0
#944
(kit-ty-kate)
- BatResult: BatPervasives.result is now equal to Stdlib.result
instead of sharing constructors without being the same type
#939, #957
(Clément Busschaert, Cedric Cellier).
## v3.0.0 (major release)
- added BatSplay.find_opt and BatMap.find_opt
#941
(nicoTolly, review by Francois Berenger)
- BatList and BatArray: sum of an empty container now return 0 rather than
raising an exception.
#519
(Cedric Cellier, report by Simon Cruanes, review by François Berenger)
- BatString: split_on_char and nsplit now return a sigle empty string (rather
than an empty list) on empty strings.
#845, #846
(Cedric Cellier, report by Thibault Suzanne, review by François Berenger)
- BatSeq: change Exceptionless.combine signature to make it really
exceptionless.
#418
(Cedric Cellier, report by Hezekiah M. Carty, review by François Berenger)
- BatOo: This module was unwelcomed and has been removed
#848
(Cedric Cellier, report by Max Mouratov, review by François Berenger)
- BatFilename: Added to Batteries from the stdlib, with the addition of
split_extension.
#445
(Cedric Cellier, report and review by François Berenger)
- BatSet: the Infix module is no more, as it was incompatible with
metaocaml
#908
(Cedric Cellier, review by Gabriel Scherer and François Berenger)
- BatIO: make the ?cleanup parameter of BatIO.input_channel true by default:
closing the returned input will close the underlying input channel
#109, #489
(Simon Cruanes, report by Michael Ekstrand)
- BatArray: add split : 'a BatOrd.ord -> 'a array -> 'a -> int * int
search for the range equal to a given element in a sorted array
#443, #470
(Simon Cruanes, Gabriel Scherer, request by François Berenger)
- BatEnum: BatEnum.combine is now curried, just like List.combine,
its signature changes from:
val combine: 'a t * 'b t -> ('a * 'b) t
to
val combine: 'a t -> 'b t -> ('a * 'b) t
#578
(François Berenger)
- PSet: add a ?cmp argument to every function that creates a PSet:
of_enum, of_list, of_array
are changed. The default value is Pervasives.compare.
#679
(Cedric Cellier)
## v2.11.0 (minor release)
This minor release fixes a few bugs or interface mismatch with OCaml stdlib,
and is compatible with BER MetaOCaml.
This is the last planned release of the v2 series.
Next planned release (v3.0.0) will introduce some API changes.
Notable changes:
- Add Unix.with_locked_file
#904
(Simon Cruanes, Cedric Cellier, review by Francois Berenger)
- Build with -strict-sequence
#927
(Armaël Guéneau, review by Francois Berenger)
- Add Legacy.Result for OCaml >= 4.8.0
#913
(Cedric Cellier, review by Francois Berenger)
- Remove BatOo
#915
(Cedric Cellier, review by Francois Berenger)
- Add BatFilename
#910
(Cedric Cellier, review by Francois Berenger)
- Make batteries usable with BER MetaOCaml
#909
(Cedric Cellier, review by Francois Berenger and Gabriel Scherer)
- Unix.sleepf is provided across all OCaml versions;
previously it was only for OCaml >= 4.03.0
#930
(Francois Berenger, review by Cedric Cellier)
## v2.10.0 (minor release)
This minor release adds support for OCaml 4.08.0.
This release is compatible with OCaml 4.08.0, but it is not complete
with respect to the standard library of OCaml 4.08.0: this release saw
a lot of changes to the standard library, which have not yet been made
available in the corresponding Batteries module. This means that users
of OCaml 4.08.0 (and Batteries 2.10.0) will have access to these
functions, but users of older OCaml versions (and Batteries 2.10.0)
will not. If you are looking for this kind of backward-compatibility
of new functions, as provided by previous Batteries releases, we
recommend trying the 'stdcompat' library.
- added LazyList.equal: ('a -> 'b -> bool) -> 'a t -> 'b t -> bool
#811
(Marshall Abrams, review by Gabriel Scherer)
- added BatList.fold_while : ('acc -> 'a -> bool) -> ('acc -> 'a -> 'acc) ->
'acc -> 'a list -> 'acc * 'a list
#889
(Francois Berenger, Thibault Suzanne)
- fix `BatNum.of_float_string` on inputs between -1 and 0:
"-0.5" or "-.5" would be interpreted as "0.5" or ".5".
#886, #887
(Gabriel Scherer, report by Marcel Hark)
- added BatHashtbl.merge and merge_all
#891
(Cedric Cellier, Francois Berenger, Gabriel Scherer)
- added Unix.with_locked_file
#904
(Cedric Cellier, Francois Berenger)
## v2.9.0 (minor release)
This minor release adds support for OCaml 4.07.0, as well as a certain
number of fixes, improvements and documentation clarification from our
contributors. Thanks in particular to Max Mouratov for his varied
contributions.
This release is compatible with OCaml 4.07.0, but it is not complete
with respect to the standard library of OCaml 4.07.0: this release saw
a lot of changes to the standard library, which have not yet been made
available in the corresponding Batteries module. This means that users
of OCaml 4.07.0 (and Batteries 2.9.0) will have access to these
functions, but users of older OCaml versions (and Batteries 2.9.0)
will not. If you are looking for this kind of backward-compatibility
of new functions, as provided by previous Batteries releases, we
recommend trying the new 'stdcompat' library by Thierry Martinez:
https://github.com/thierry-martinez/stdcompat
Full changelog:
- add `BatString.cut_on_char : char -> int -> string -> string`
(Kahina Fekir, Thibault Suzanne, request by François Bérenger)
#807, #856
- add `BatString.index_after_n : char -> int -> string -> int`
(Kahina Fekir)
- faster BatArray.partition
#829
(Francois Berenger, Gabriel Scherer)
- add `BatArray.split: ('a * 'b) array -> 'a array * 'b array`
#826
(Francois Berenger)
- add `BatString.count_string: string -> string -> int`
#799
(Francois Berenger)
- Int: optimized implementation of Safe_int.mul
#808, #851
(Max Mouratov)
- Fix: in case of conflicted bindings, [Map.union m1 m2] should
prefer the value from [m2], as stated in documentation.
#814
(Max Mouratov)
- Fix: [Map.update k1 k2 v m] did not work correctly when [k1 = k2].
#833
(Max Mouratov)
- Fix: [Map.update k1 k2 v m] should throw [Not_found] if [k1] is not bound
in [m], as stated in documentation.
#833
(Max Mouratov)
- Fix: [Set.update x y s] should throw [Not_found] if [x] is not in [s],
as stated in documentation.
#833
(Max Mouratov)
- Fix: documentation of BatList.{hd,last} to match implementation w.r.t
raised exceptions
#840, #754
(FkHina)
- Fix: [Array.insert] should throw a more relevant message on invalid indices
instead of the generic [invalid_arg "index out of bounds].
The assertion is now documented.
#841
(Max Mouratov)
- Implementation of [Array.insert] now uses [unsafe_get] and [unsafe_set].
#841
(Max Mouratov)
- Fix documentation of [String.right].
#849, #844
(Max Mouratov, reported by Thibault Suzanne)
- Fix: [Heap.del_min] should throw [Invalid_argument] with the specified
"del_min" message instead of "find_min_tree".
#850
(Max Mouratov)
- More uniform and correct [Invalid_argument] messages.
#850
(Max Mouratov)
- Optimization of List.unique_cmp (using Set instead of Map).
#852
(Max Mouratov)
- Documentation of List.append and List.concat should not include invalid
estimates of stack usage.
#854
(Max Mouratov)
- Implementation of String should use unsafe versions of [set] and [get].
#836
(Max Mouratov, review by Gabriel Scherer)
- Fix erroneous mentions of [Different_list_size] in List.mli.
#857, #744
(Max Mouratov, reported by Christoph Höger)
- fix Map.equal (for polymorphic maps) with custom equality function
#865
(Ralf Vogler)
- ocamlfind plugin support in META file
(Arlen Cox)
#867
## v2.8.0 (minor release)
This minor release supports the -safe-string mode for OCaml
compilation, enforcing a type-level separation between (immutable)
strings and mutable byte sequences.
- support -safe-string compilation
#673
(Gabriel Scherer)
- Support for the upcoming OCaml release 4.06
(Gabriel Scherer)
## v2.7.0 (minor release)
This minor release is the first to support OCaml 4.05.0. As with
previous OCaml versions, we backported new 4.05.0 convenience function
from the compiler stdlib, allowing Batteries user to use them with
older OCaml versions, and thus write backward-compatible code. In
particular, the new *_opt functions returning option values instead of
exceptions are all backported.
- BatNum: fix of_float_string to handle negative numbers properly
#780
(Anton Yabchinskiy)
- added BatArray.min_max
#757
(Francois Berenger)
- added a Label module to BatVect
#763
(Varun Gandhi, review by Francois Berenger, Gabriel Scherer, Thibault Suzanne)
- fix documentation of BatVect.insert to match (correct) implementation
#766, #767
(Gabriel Scherer, report by Varun Gandhi)
- avoid using exceptions for internal control-flow
#768, #769
This purely internal change should improve performances when using
js_of_ocaml, which generates much slower code for local exceptions
raising/catching than the native OCaml backend.
Internal exceptions (trough the BatReturn label) have been removed
from the modules BatString, BatSubstring and BatVect.
(Gabriel Scherer, request and review by Clément Pit-Claudel)
- added `BatVect.find_opt : ('a -> bool) -> 'a t -> 'a option`
and BatVect.Make.find_opt
#769
(Gabriel Scherer)
- Documents exceptions for List.(min, max)
#770
(Varun Gandhi)
- BatText: bugfixes in `rindex{,_from}` and `rcontains_from`
#775
(Gabriel Scherer)
- Support for the new OCaml release 4.05
the `*_opt` functions and List.compare_lengths, compare_length_with
are also backported to older OCaml releases, so code using them from
Batteries should be backwards-compatible
#777, #779
(Tej Chajed, Gabriel Scherer)
## v2.6.0 (minor release)
- added Bat{Set,Map,Splay}.any and fixed Bat{Map,Splay}.choose
#751
(Cedric Cellier)
- added BatList.favg and faster BatList.fsum
#746
(Gabriel Scherer, Francois Berenger)
- install .cmt and .cmti files
#740
(Francois Berenger, Gabriel Scherer)
- BatMap: added find_default
#730
(Francois Berenger)
- added scripts/test_install.sh
#743
(Francois Berenger)
- BatHashtbl: added {to|of}_list, bindings
#728
(Francois Berenger, Thibault Suzanne)
- added {BatList|BatArray}.shuffle
#702, #707
(Francois Berenger, Gabriel Scherer)
- Clarification and improvements to the documentation
#682, #685, #693
(Florian Angeletti, Johannes Kloos, Michael Färber)
- make `LazyList.split_at` lazy:
`split_at : int -> 'a t -> 'a t * 'a t`
would previously eagerly force the prefix of the list
and only be lazy in its second returned value.
#694
(Michael Färber, Gabriel Scherer, Thibault Suzanne)
- Add `List.{map2i,iter2i}`
#696
(Thibault Suzanne)
- Added `Result.{map,map_both}`
#705
(Ifaz Kabir)
- Add {BatSet,BatMap}.{Int,Int32,Int64,Nativeint,Float,Char,String} as
common instantions of the respective `Make` functor.
#709, #712
(Thibault Suzanne, François Bérenger)
- BatString: add `chop : ?l:int -> ?r:int -> string -> string`
#714, #716
(Gabriel Scherer, request by François Bérenger)
- BatSet: make `to_array` allocate the resulting array at first
instead of using Dynarray (faster, uses less memory).
#724
(Thibault Suzanne)
- BatList: add `fold_left_map : ('a -> 'b -> 'a * 'c) -> 'a -> 'b list -> 'a * 'c list`
#734
(Thibault Suzanne, review by Gabriel Scherer, request by Oscar Gauthier)
- add ``BatList.frange : float -> [< `To | `Downto ] -> float -> int -> float list``
``frange 0. `To 1. 3`` is `[0.; 0.5; 1.]`.
#745
(François Bérenger)
## v2.5.3
Batteries 2.5.3 synchronizes library functions with OCaml 4.04+beta2,
and will hopefully be an extension of the upcoming OCaml 4.04 release.
- Compatibility with OCaml 4.04.
5e63a9a756f
(Gabriel Scherer)
## v2.5.1, v2.5.2
Batteries 2.5.1 and 2.5.2 fix a silly packaging bug in Batteries 2.5.0.
## v2.5.0
Batteries 2.5.0 is a minor release whose main change is that it is
compatible with the newly released OCaml 4.03.
Note that Batteries 2.5.0 is compatible with older OCaml releases as
well, and provides back-ported versions of most standard library
functions made available in 4.03 only. For example,
BatString.uppercase_ascii is usable under all OCaml versions.
If the documentation of a Batteries function says
@since 2.5.0
then it is available under all supported OCaml version (3.12.1 and up).
If it says
@since 2.5.0 and OCaml 4.03.0
then it is only available under OCaml 4.03.0.
- BatTuple: add Tuple{N}.make : 'a1 -> ... -> 'an -> 'a1 * ... * 'an
#657
(Thibault Suzanne)
- BatBig_int: fix sequence operators (--), (---) to avoid polymorphic comparison
#674, #675, #676
(Pieter Goetschalckx and Cedric Cellier)
- Extend all Batteries module to cover OCaml 4.03 features
#670
(Gabriel Scherer, KC Sivaramakrishnan)
## v2.4.0
- BatBitSet: use Bytes instead of String
(Gabriel Scherer)
- BatHashtbl: fix hash computation bug introduced by 4.01 (issue #609)
(Gabriel Scherer, report by Martin Neuhäußer)
- BatText: synchronize nsplit to match BatString.nsplit
(Gabriel Scherer)
- BatLazyList: fix remove_all_such documentation
(Xavier Van de Woestyne)
- BatMap: add pop_min_binding: 'a t -> (key * 'a) * 'a t
and pop_max_binding: 'a t -> (key * 'a) * 'a t
(Francois Berenger)
- BatMap: add at_rank_exn: int -> ('key, 'a) t -> ('key * 'a)
and update: key -> key -> 'a -> 'a t -> 'a t
(Francois Berenger)
- BatEnum: add interleave: 'a t array -> 'a t
(Aleksey Z. Arens)
- BatFormat: expose asprintf for V>=4.01
(Ralf Vogler)
- BatSet: add at_rank_exn: int -> t -> elt
and update: elt -> elt -> t -> t
(Francois Berenger)
- BatUTF8: add enum: t -> BatUChar.t BatEnum.t
(Kevin Brubeck Unhammer)
- BatSet: add to_array: t -> elt array
and of_array: elt array -> t
and test for to_list
(Francois Berenger)
- BatSet: add pop_max: 'a t -> 'a * 'a t
and pop_min: 'a t -> 'a * 'a t
(Francois Berenger)
- BatSplay: hardened against read-only-data compiler optimization
(Gabriel Scherer)
- BatList: simplified interleave implementation
(Francois Berenger)
- BatOption: add Infix.(>>=): 'a option -> ('a -> 'b option) -> 'b option
(Herry Herry)
- BatHashtbl: modify now have same semantics than replace for the key
(Anders Fugmann)
- BatHashtbl: more efficient modify_opt and modify_def
(Anders Fugmann)
- BatFormat: add pp_print_list: ?pp_sep:(formatter -> unit -> unit) ->
(formatter -> 'a -> unit) ->
(formatter -> 'a list -> unit)
and pp_print_text: formatter -> string -> unit
(Christoph Höger)
- BatEnum: add uniq_by: ('a -> 'a -> bool) -> 'a t -> 'a t
and uniqq: 'a t -> 'a t
(Max Mouratov)
- BatEnum: fix uniq to use structural comparison
(Max Mouratov)
- BatUnix: add run_and_read: string -> process_status * string
(Francois Berenger)
- BatCache: use hashmap to speed up lru_cache
(Sang Kil Cha)
- BatQueue: add filter: ('a -> bool) -> 'a t -> 'a t
and filter_inplace: ('a -> bool) -> 'a t -> unit
and filter_map: ('a -> 'b option) -> 'a t -> 'b t
(Gabriel Scherer)
## v2.3.0
- improved test coverage
(Simon Cruanes and Xavier Van de Woestyne)
- Enum: bugfix in clamp
(Simon Cruanes)
- Stream: add concat_map
(Gabriel Radanne)
- List: fix a stack-overflow bug in transpose
(Gabriel Scherer)
- List: add unfold_exc : (unit -> a) -> 'a list * exn
(François Berenger)
- List: add fold_righti and fold_lefti
(François Berenger)
- Substring : fix fold_left, add fold_lefti, fold_righti
(Xavier Van de Woestyne)
- String : add fold_lefti and fold_righti
(Xavier Van de Woestyne)
- Set.Make: add of_list
(Jacques-Pascal Deplaix)
- AvlTree: add (check : 'a tree -> bool) to check well-formedness
(Simon Cruanes)
- Hashtbl: make modify_opt/def resize the table to preserve amortized costs
(Mads Hartmann, report by user 'jj-issuu')
- Enum: fix combine's count in presence of infinite enums
(Gabriel Scherer, report by user 'mwnx')
- Makefile: add a qtest-byte target
(Gabriel Scherer)
- List: add modify_opt_at: int -> ('a -> 'a option) -> 'a list -> 'a list
(Gabriel Scherer)
- List: add modify_at: int -> ('a -> 'a) -> 'a list -> 'a list
(Gabriel Scherer)
- List: add remove_at: int -> 'a list -> 'a list
(François Berenger)
- Int: add copysign
(Simon Cruanes)
- Deque: add rotate_forward, rotate_backward : 'a dq -> 'a dq
(Max Mouratov)
- Int: fix overflow checking in Safe_int.mul
(Max Mouratov, Christopher Zimmermann)
- add a local OPAM description, allows to use
opam pin add batteries [email protected]:ocaml-batteries-team/batteries-included.git
(Vincent Bernardoff)
- Queue: add map : ('a -> 'b) -> 'a t -> 'b t
(Christopher Zimmermann)
- compatibility with 4.02:
+ Printf: remove CamlinternalPr for OCaml versions >= 4.02
(Ralf Vogler)
+ Printf: legacy code assumed (string = fmt)
(Gabriel Scherer)
+ new 4.02 functions:
String.mapi (String.init was already in Batteries)
List.sort_uniq (List.sort_unique existed before)
Array.make_float (less efficient implementation provided for <4.02 versions)
a BatBytes module relying on ocamlfind's compatibility module
bytes-related functions in Buffer,Digest,Marshal,Printexc,Stream,Unix
new Printexc callstack interface (not available for <4.02 versions)
(Gabriel Scherer)
## v2.2.0
- cartesian product in batSet
- Enum.concat_map alias
- UChar.is_ascii
- equality and enumeration (from, to UChar enum) in batText
- String.find_all function
- Seq.iteri, mapi, iter2, map2 (see issue #417)
- cartesian product of enums (issue #442)
- List.subset
- Array.bsearch dichotomic search (issue #433)
- Enum.print_at_most (issue #425)
- BatOption.ord instance, (issue #393)
- Fix infinite loop in BitSet
- Levenshtein distance on strings
- Seq.{of_list, equal}
- basic .merlin file for merlin users
- BatDeque.eq function to compare Deques by content
- BatteriesExceptionless
- More explicit overriding of ocamlbuild rules, use batteries.mllib
- Add Kahan summation (numerically-accurate sum of floats) to List,Array,Enum
- Add BatOption.some
- (text) improve element indexing in BatList's mli documentation
- Add BatList.filteri_map
- Compatibility with ocaml 4.01
- Add BatList.filteri
- Add Set.split_lt and split_le
- Add split_opt wherever there is split
- Add List.range
- Add the new O_CLOEXEC flag to Unix.open_flag in version 4.01
- Fix BatMutex.DebugMutex.id is always 0.
- Simplify List.partition code
- Add List.ntake and List.takedrop
- Added List.Acc.create and use it
- Add a LazyList.eager_fold_right alias to LazyList.fold_right, with sane argument order
- and many tests and documentation
- cleanup of whitespace