Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3 #933

Merged
merged 336 commits into from
Jan 9, 2020
Merged

V3 #933

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
336 commits
Select commit Hold shift + click to select a range
9f4cae1
Changelog: add review information for #768
gasche Aug 9, 2017
f86a670
Merge pull request #768 from gasche/less-exceptions
gasche Aug 9, 2017
bdbf26f
remove exceptions in BatVect.{exists,for_all}
gasche Jul 14, 2017
26a6aaa
remove exceptions in BatVect.find
gasche Jul 29, 2017
f80a751
BatVect: expose find_opt and harmonize variable names in .mli section
gasche Jul 30, 2017
feef5ba
remove exceptions in BatVect.Make.{for_all,exists}
gasche Jul 30, 2017
6601b94
remove exceptions in BatVect.Make.find
gasche Jul 30, 2017
2d28dd3
tests for BatVect.Make functions
gasche Jul 30, 2017
2d792e1
expose BatVect.Make.find_opt
gasche Jul 30, 2017
51e235f
less exceptions in batVect: changelog entry
gasche Jul 30, 2017
891f3d6
Merge pull request #769 from gasche/less-exceptions-batvect
gasche Aug 9, 2017
665f60a
Makefile: introduce a QTEST_SEED variable to set qtest random seed
gasche Aug 9, 2017
46a35e5
Merge pull request #774 from gasche/qtest-seed-flag
gasche Aug 11, 2017
443300d
Fix some issues in the README
tchajed Aug 11, 2017
76342a0
Merge pull request #776 from tchajed/readme-fixes
gasche Aug 11, 2017
711a5c3
Fix compilation with OCaml 4.05.0
tchajed Aug 11, 2017
0db9866
Fixes based on @gasche's comments
tchajed Aug 11, 2017
5b325ca
Add support for new APIs
tchajed Aug 11, 2017
a0bcb16
Update for compatibility with qcheck 0.6
tchajed Aug 11, 2017
5f12ddd
Merge pull request #777 from tchajed/fix-4.05.0-compat
gasche Aug 11, 2017
9b5676f
Simplify dependency restriction on qtest
tchajed Aug 12, 2017
c8c88a8
Merge pull request #778 from tchajed/qcheck-0.6-compat
gasche Aug 12, 2017
151a06f
batText: add tests and fix a bug in `rindex{,_from}`
gasche Jul 30, 2017
0c0987b
batText: add tests for contains_from and fix documentation bug (excep…
gasche Jul 30, 2017
007308e
batText: add tests to rcontains_from and fix bug in passing
gasche Jul 30, 2017
df8f3f4
battext changes: ChangeLog entry
gasche Aug 13, 2017
33cb173
Merge pull request #775 from gasche/tests-battext
gasche Aug 13, 2017
407bb5f
batNum: handle negatives in of_float_string
a12n Aug 13, 2017
ed11ab6
ChangeLog entry on BatNum.of_float_string
a12n Aug 13, 2017
95758e7
Merge pull request #780 from a12n/num-of_float_string
gasche Aug 14, 2017
7499931
BatNum.of_float_string: extra testcase
gasche Aug 14, 2017
d2f0d51
Backport new 4.05 functions (#779)
gasche Aug 14, 2017
396f350
batBytes: minor compatibility fix
gasche Aug 14, 2017
63cbfbc
release summary (#782)
gasche Aug 15, 2017
7dcff5c
add a "num" dependency to mirror upstream opam file (#783)
gasche Aug 15, 2017
94a1128
next release will be 2.7.0
Aug 16, 2017
81504d0
simplification to the opam file so that it is easier to compare with …
Aug 16, 2017
afd55bf
added note explaining that BatX is also Batteries.X
mars0i Aug 30, 2017
294e3d6
substitued the for a
mars0i Aug 30, 2017
636c58c
added explanation for case when Batteries is opened
mars0i Aug 30, 2017
b9dd83e
added example illustrating the BatX -> Batteries.X mapping.
mars0i Aug 30, 2017
d682509
Merge pull request #785 from mars0i/master
gasche Aug 30, 2017
8327cf0
safe-string: make Lexing safe
gasche Apr 17, 2016
44a3a21
safe-string: make Big_int safe
gasche Apr 17, 2016
180f9b9
safe-string: make Buffer safe
gasche Apr 17, 2016
d64443a
safe-string: make Digest safe
gasche Apr 17, 2016
8cbb5d5
safe-string: make Genlex safe
gasche Apr 17, 2016
d12b5f1
safe-string: make IO safe
gasche Apr 18, 2016
310259b
safe-string: make Format safe
gasche Apr 19, 2016
6153fee
safe-string: make Int32 safe
gasche Apr 19, 2016
1a9b980
safe-string: make Marshal safe
gasche Apr 19, 2016
4bbf690
safe-string: make Pervasives safe
gasche Apr 19, 2016
1c5f96a
safe-string: make Printf safe
gasche Apr 19, 2016
aed6515
safe-string: make String safe (but String.Cap)
gasche Apr 20, 2016
dd4dbb4
safe-string: adapt String.Cap
gasche Apr 20, 2016
bcb538c
safe-string: make Unix safe
gasche Apr 20, 2016
5d67375
safe-string: make Base64 safe
gasche Apr 20, 2016
4b50dcc
safe-string: make BitSet safe
gasche Apr 20, 2016
b5cd62c
safe-string: make Substring safe
gasche Apr 20, 2016
7bc0550
safe-string: make Text safe
gasche Apr 20, 2016
ea80aa7
_tags: actually enforce safe_string
gasche Apr 20, 2016
f788c75
safe-string: make BatBytes safe
gasche Sep 23, 2017
2b67824
-safe-string: Changelog
gasche Sep 23, 2017
ce92e34
Merge pull request #673 from gasche/safe-string
gasche Oct 6, 2017
aaae4d9
[minor] exclude compattest.ml from qtest
gasche Oct 13, 2017
8b4f02c
add 4.06-only Array.Floatarray primitive module
gasche Oct 13, 2017
dbfaeb3
add 4.06-only Uchar.t functions in Buffer
gasche Oct 13, 2017
a141a3e
4.06 Bigarray functions
gasche Oct 13, 2017
6599409
4.06 Unix functions
gasche Oct 13, 2017
233194c
4.06: Changes entry
gasche Oct 13, 2017
3ab86ec
Merge pull request #797 from gasche/4.06
gasche Oct 15, 2017
e069e28
fix more FloatArray failures in the test targets
gasche Oct 15, 2017
a171d87
added BatString.count_char
Oct 23, 2017
1171462
added count_string
Oct 23, 2017
b89b821
safe-string: fix compatibility with OCaml <=4.02
gasche Oct 29, 2017
60ffa0f
a prebaked patch to try our inline tests on older OCaml versions
gasche Oct 29, 2017
0fb8cc4
Merge pull request #799 from UnixJunkie/count_string
gasche Nov 7, 2017
0ae9a35
mention count_string
Nov 8, 2017
10e2dd1
Revert "added count_string"
gasche Nov 11, 2017
7c5e3ca
missing @since tags
gasche Nov 12, 2017
3589ab3
update scripts/replace_since.sh
gasche Nov 12, 2017
0d70684
refresh @since NEXT_RELEASE tags with new version
gasche Nov 12, 2017
1adc778
bump _oasis version number
gasche Nov 12, 2017
b060974
Update setup.ml based on _oasis
gasche Nov 14, 2017
bc10ba1
Revert "mention count_string"
gasche Nov 14, 2017
e733374
batString: safe-string-ready map_first_char
gasche Nov 14, 2017
2947712
first commit after v2.8.0
gasche Nov 14, 2017
ede4c7e
Revert "Revert "added count_string""
gasche Nov 14, 2017
6016193
Revert "Revert "mention count_string""
gasche Nov 14, 2017
de9d8a9
move count_string's ChangeLog entry into the new section
gasche Nov 14, 2017
7b382ec
BatInt.Safe_int.mul performance improvements
murmour Nov 19, 2017
0659a90
Add ChangeLog entry
murmour Dec 2, 2017
4478906
Merge pull request #808 from murmour/SafeInt.mul-tweak
gasche Dec 2, 2017
e86cc0f
disable print_string_cap_ro/rw to match #673
iitalics Dec 2, 2017
af61097
Merge pull request #813 from iitalics/battop_string_cap
gasche Dec 3, 2017
98ea947
Fix: incorrect behaviour of Map.union
murmour Dec 3, 2017
f6f282f
Add a test case for Map.union
murmour Dec 3, 2017
cb53707
Add ChangeLog entry
murmour Dec 4, 2017
fa586a4
Merge pull request #814 from murmour/Map.union-fix
thizanne Dec 4, 2017
4d236e5
added BatSeq.{to_buffer|to_string|of_string}
Dec 20, 2017
7814de3
Cosmetic tweaks in BatMap.mli
murmour Dec 27, 2017
e58dd28
Merge pull request #821 from murmour/master
gasche Dec 27, 2017
32354bc
Document that Map.extract can raise Not_found. (#825)
rixed Jan 9, 2018
51666cf
added BatArray.split
Jan 12, 2018
56ec05c
updated ChangeLog
Jan 12, 2018
ecd6514
Merge pull request #826 from UnixJunkie/array_split
gasche Jan 12, 2018
478e71e
Clarified documentation for `next` in LazyList (#810)
mars0i Jan 12, 2018
f8c9239
Revised docs for seq, unfold, from_loop in LazyList (#806)
mars0i Jan 12, 2018
dbc839e
improve MultiPMap documentation (#827)
Jan 16, 2018
def3ef8
simpler (and faster?) implementation of BatArray.partition (#829)
Jan 22, 2018
1e80fcf
updated changelog
Jan 22, 2018
e042945
removed previously added exception types
Jan 22, 2018
a0fdd83
updated ocamldoc for BatSeq.of_string
Jan 23, 2018
ba89393
Compile Batteries with -no-alias-deps
rixed Feb 7, 2018
a046dda
Fix: Map.update was broken
murmour Feb 15, 2018
217b47e
Fix: Map.update did not throw an exception on failure
murmour Feb 15, 2018
88c5358
Fix: Set.update did not throw an exception on failure
murmour Feb 15, 2018
3488512
Merge pull request #833 from murmour/BatMap.update-fix
gasche Feb 15, 2018
f9b60e4
Fix typo
murmour Feb 16, 2018
85e6812
Simplify Set.cartesian_product
murmour Feb 16, 2018
17dfbeb
Remove a redundant exception from BatOption.ml
murmour Feb 16, 2018
5154d54
Simplify Text.concat
murmour Feb 16, 2018
8c4769c
Merge pull request #837 from murmour/harmless-tweaks
gasche Feb 20, 2018
6a03d73
Fix typos (#838)
murmour Feb 20, 2018
b8d07e1
Merge pull request #832 from rixed/test_no_alias_deps
gasche Feb 20, 2018
eca92a5
Fix: Array.insert error message improvement
murmour Feb 26, 2018
d49092d
Implementation of Array.insert now uses unsafe_{get,set}
murmour Feb 26, 2018
2b6c373
Merge pull request #841 from murmour/Array.insert-fix
gasche Feb 26, 2018
022c40d
Do not depend upon bisect any longer
rixed Mar 1, 2018
18a6711
Merge pull request #843 from rixed/no-more-bisect
gasche Mar 1, 2018
970c224
Corrected documentation for batList {last, hd} (#840)
kahinaFekir Mar 2, 2018
19e8fbf
Fix docstring of String.right (#849)
murmour Mar 15, 2018
dbc4de9
BatInt.Safe_int.mul performance improvements
murmour Dec 8, 2017
94b2269
Update ChangeLog
murmour Mar 20, 2018
56ef424
A clean-up of invalid_arg uses
murmour Feb 16, 2018
6fcda53
Add ChangeLog entry
murmour Mar 17, 2018
c6074f5
Restructuring of Heap.del_min
murmour Mar 20, 2018
5200d13
Merge pull request #850 from murmour/invalid_arg-cleanup
gasche Mar 20, 2018
af81afb
Optimization of List.unique_cmp
murmour Mar 17, 2018
f744be4
Add ChangeLog entry
murmour Mar 22, 2018
be9a426
Merge pull request #852 from murmour/List.unique_cmp-tweak
gasche Mar 22, 2018
f171727
Fix docstrings of List.append and List.concat
murmour Mar 24, 2018
f32b4d8
Merge pull request #854 from murmour/List-doc-tweaks
gasche Mar 24, 2018
07ec094
BatString.ml should use unsafe versions of set and get
murmour Feb 19, 2018
3da2c6e
batString: annotate unsafe_{get,set} with static reasoning in comment…
gasche Feb 20, 2018
b3dd694
BatString.ml: annotate unsafe_{get,set} with static assertions
murmour Mar 7, 2018
1cbc430
Merge pull request #836 from murmour/String-tweaks
gasche Mar 24, 2018
cd8053b
Remove mention of IO.flush_out that does not exist.
rixed Mar 25, 2018
0478c88
Merge pull request #855 from rixed/master
gasche Mar 26, 2018
d3c350a
List.mli: remove erroneous mentions of Different_list_size
murmour Apr 2, 2018
97f9859
List.ml: clean-up invalid_arg messages
murmour Apr 2, 2018
d63e883
Add ChangeLog entry
murmour Apr 2, 2018
77bc732
Merge pull request #857 from murmour/List-doc-tweaks
gasche Apr 2, 2018
c6ea18c
Add String.cut (#856)
kahinaFekir May 2, 2018
dea2aad
better exception string in BatString.index_after_n
May 2, 2018
54c3796
better ocamldoc for BatHashtbl.find_default (#859)
May 2, 2018
e7beccc
Rename cut to cut_on_char in Changelog
thizanne May 4, 2018
75fa197
Merge pull request #860 from thizanne/string_cut
gasche May 4, 2018
8463bdb
Fix build on OCaml < 4.05
murmour May 5, 2018
613a968
Merge pull request #851 from murmour/SafeInt.mul-tweak
gasche May 5, 2018
33a7575
Merge pull request #861 from murmour/master
gasche May 5, 2018
e700ba3
Fix a regression in BatInt.Safe_int.mul
murmour May 7, 2018
515260c
Merge pull request #862 from murmour/SafeInt.mul-tweak
gasche May 7, 2018
660d93c
Make doc of String.index_from a bit clearer (#864)
rixed May 28, 2018
2996924
Map.equal used (=) instead of argument
vogler May 30, 2018
47a59fc
Merge pull request #865 from vogler/Map.equal
gasche May 30, 2018
c98c16c
Changelog entry for #865
gasche May 31, 2018
5f9ec0c
Adding ocamlfind plugin support (#867)
arlencox Jun 21, 2018
9906569
changelog update for PR 867
UnixJunkie Jun 21, 2018
7183691
Update batVect.mli
yaseersheriff Aug 31, 2018
6e11d58
Merge pull request #875 from yaseersheriff/patch-1
gasche Sep 1, 2018
801acb4
batInnerWeaktbl: separate interface from Hashtbl for compatibility
gasche Sep 8, 2018
cc98a78
4.07 compatibility fixes
gasche Sep 8, 2018
4fc4f7f
testsuite: remove test_interface.ml, subsumed by 'make test-compat'
gasche Sep 8, 2018
aab5c43
beef up Travis checking
gasche Sep 8, 2018
b00fd24
prepare release 2.9.0
gasche Sep 8, 2018
5dd231c
Update setup.ml based on _oasis
gasche Sep 8, 2018
f059493
prepare the 2.9.0 release
gasche Sep 8, 2018
ab70758
Update setup.ml based on _oasis
gasche Sep 8, 2018
45b48f7
first commit after 2.9.0
gasche Sep 8, 2018
750ba31
Merge pull request #876 from gasche/compat-4.07.0
gasche Sep 11, 2018
c9560c9
extend the Changelog (#877)
gasche Sep 12, 2018
6ec08df
Fix Dllist.skip
Firobe Dec 9, 2018
70baa2e
Merge pull request #885 from Firobe/patch-1
gasche Dec 9, 2018
116f73f
batNum: fix the testsuite
gasche Feb 12, 2019
57077fe
fix a batNum.of_float_sting bug on inputs in ]-1; 0[.
gasche Feb 12, 2019
99ef1fa
Merge pull request #887 from gasche/batNum-fix
gasche Feb 12, 2019
162208b
added BatList.fold_while (#889)
UnixJunkie Apr 4, 2019
acc7d2e
Fixing basic typos (#890)
Fourchaux Apr 10, 2019
fb252bc
Gc: add new 4.08 fields
gasche Jul 11, 2019
6227355
Array: reorder type and include to avoid error
gasche Jul 11, 2019
7b93505
re-export Bigarray.*.map_file functions removed in 4.08
gasche Jul 11, 2019
65cf7ca
Int32: incorrect primitive names
gasche Jul 11, 2019
f529626
Lexing: no support for disabling position-tracking
gasche Jul 11, 2019
e6cbf3d
Unix: we don't support the new (link ?follow) parameter on older OCamls
gasche Jul 11, 2019
3bd87d7
add CI testing for 4.08
gasche Jul 11, 2019
dca5aed
Merge pull request #899 from gasche/4.08-compat
gasche Jul 12, 2019
2456368
Corrected BatDeque.is_empty documentation.
zepalmer Jul 16, 2019
e7971ea
Merge pull request #901 from zepalmer/master
gasche Jul 16, 2019
283ac27
Hashtbl merge (#892)
rixed Jul 29, 2019
f320d27
BatString.count_char uses a while loop instead of fold
UnixJunkie Jul 29, 2019
2e73d11
Merge pull request #798 from UnixJunkie/count_char
gasche Jul 30, 2019
e162669
Merge pull request #819 from UnixJunkie/batseq_to_string
gasche Jul 30, 2019
3180492
Current module name seems Extlib, not Extlibcompat (#873)
catalin-hritcu Jul 31, 2019
60a0bcf
Add lazylist equal predicate (#811)
mars0i Jul 31, 2019
a1ebfde
updated ChangeLog
UnixJunkie Jul 31, 2019
f2849af
get rid of >=4.02 syntax in BatHashtbl.merge
UnixJunkie Jul 31, 2019
eabac78
BatHashtbl: avoid |> when possible
UnixJunkie Jul 31, 2019
6d8e30d
some more files need preprocessing
UnixJunkie Jul 31, 2019
96bd3d6
BatArray: 4.07 compat
UnixJunkie Jul 31, 2019
9dfe850
BatBuffer: 4.07 and 4.08 compat
UnixJunkie Jul 31, 2019
37d8ec5
BatBytes: 4.07 and 4.08 compat
UnixJunkie Jul 31, 2019
02bf956
BatInt32: 4.08 compat
UnixJunkie Jul 31, 2019
6e7ee35
BatInt64: 4.08 compat
UnixJunkie Jul 31, 2019
1878c50
BatLexing: 4.08 compat
UnixJunkie Jul 31, 2019
2273fa8
BatList: 4.08 compat
UnixJunkie Jul 31, 2019
5e336d3
BatNativeint: 4.08 compat
UnixJunkie Jul 31, 2019
103b462
BatPrintexc: 4.08 compat
UnixJunkie Jul 31, 2019
a712c0d
BatQueue: 4.07 and 4.08 compat
UnixJunkie Jul 31, 2019
1c4eb97
BatString: 4.08 compat
UnixJunkie Jul 31, 2019
bd76e83
BatSys: 4.08 compat
UnixJunkie Jul 31, 2019
cfd174d
BatUnix: 4.08 compat
UnixJunkie Jul 31, 2019
9fded5a
BatString: to_seq{i} and of_seq are from OCaml 4.07, not 4.08
UnixJunkie Aug 1, 2019
ff27a68
added missing NEXT_RELEASE tags in many places
UnixJunkie Aug 1, 2019
fd1ca0f
next release will be 2.10.0
UnixJunkie Aug 19, 2019
c3a880a
Update setup.ml based on _oasis
UnixJunkie Aug 19, 2019
9c4a180
updated opam file with bits from the one in opam-repository
UnixJunkie Aug 19, 2019
badd970
repaired upload-docs target in Makefile
UnixJunkie Aug 19, 2019
613a336
start of next release
UnixJunkie Aug 19, 2019
9d3ab53
Fix compilation by BER MetaOCaml (#909)
rixed Sep 27, 2019
549a0f9
Add BatFilename (#910)
rixed Sep 30, 2019
4d34e6a
s/RELASE/RELEASE (#911)
rixed Sep 30, 2019
9cdd373
Improve toplevel printability of predefined sets (#912)
rixed Sep 30, 2019
f8aef1e
Remove BatOo (#915)
rixed Sep 30, 2019
1a2ccff
Make BatSeq.Exceptionless.combine really exceptionless (#917)
rixed Sep 30, 2019
d563bd2
BatString.split_on_char and nsplit must never return an empty list (#…
rixed Sep 30, 2019
43068b3
Add Legacy.Result for OCaml >= 4.8.0 (#913)
rixed Sep 30, 2019
3c323ef
List.sum [] is now 0 (#916)
rixed Oct 1, 2019
76975d7
Remove Legacy.Sort for OCaml >= 4.08 (#926)
rixed Oct 21, 2019
d5ac8a2
Build with -strict-sequence (#927)
Armael Oct 30, 2019
29b7620
with_locked_file (#904)
rixed Oct 30, 2019
73b2085
Release v2.11.0 (#931)
rixed Dec 16, 2019
21809c4
make Unix.sleepf available under all OCaml versions (#930)
UnixJunkie Dec 16, 2019
7281079
the '|>' operator was not available in old versions of the stdlib (e.…
UnixJunkie Dec 16, 2019
dff125e
BatBytes was missing unsafe_blit_string's signature to compile on 4.09.0
UnixJunkie Dec 16, 2019
30abf8b
provide signatures of new functions from 4.09.0 in BatPrintexc
UnixJunkie Dec 16, 2019
7b53eef
BatSys: change in argv declaration for ocaml >= 4.09.0
UnixJunkie Dec 16, 2019
565dbea
updated opam file
UnixJunkie Dec 16, 2019
a7f1789
bits for next release
UnixJunkie Dec 16, 2019
ac058d0
Merge branch 'master' into v3
rixed Dec 18, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,45 @@ Changelog
#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.
Expand Down Expand Up @@ -79,6 +118,10 @@ recommend trying the 'stdcompat' library.
#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
Expand Down
2 changes: 1 addition & 1 deletion _tags
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ true: package(bytes), warn_-3, bin_annot
<src/batOpaqueInnerSys.*>: opaque
true: safe_string
true: no_alias_deps

true: strict_sequence
4 changes: 2 additions & 2 deletions opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ authors: "OCaml batteries-included team"
homepage: "http://batteries.forge.ocamlcore.org/"
bug-reports: "https://github.com/ocaml-batteries-team/batteries-included/issues"
dev-repo: "git://github.com/ocaml-batteries-team/batteries-included.git"
license: "LGPL-2.1+ with OCaml linking exception"
license: "LGPL-2.1-or-later with OCaml-LGPL-linking-exception"
doc: "http://ocaml-batteries-team.github.io/batteries-included/hdoc2/"
build: [
["ocaml" "setup.ml" "-configure" "--prefix" prefix]
Expand All @@ -18,7 +18,7 @@ build: [
install: [make "install"]
remove: ["ocamlfind" "remove" "batteries"]
depends: [
"ocaml" {>= "3.12.1"}
"ocaml" {>= "4.00.0" & < "4.10.0"}
"ocamlfind" {build & >= "1.5.3"}
"ocamlbuild" {build}
"qtest" {with-test & >= "2.5"}
Expand Down
6 changes: 3 additions & 3 deletions setup.ml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(* setup.ml generated for the first time by OASIS v0.2.0 *)

(* OASIS_START *)
(* DO NOT EDIT (digest: 8eacb5fc3c01b3f2ec2fa94f8db2c52a) *)
(* DO NOT EDIT (digest: c538dc9cea7562212bf9319fabb10941) *)
(*
Regenerated by OASIS v0.4.11
Visit http://oasis.forge.ocamlcore.org for more information and
Expand Down Expand Up @@ -6742,7 +6742,7 @@ let setup_t =
{
oasis_version = "0.4";
ocaml_version = Some (OASISVersion.VGreaterEqual "3.12.1");
version = "2.10.0";
version = "2.11.0";
license =
OASISLicense.DEP5License
(OASISLicense.DEP5Unit
Expand Down Expand Up @@ -7019,7 +7019,7 @@ let setup_t =
};
oasis_fn = Some "_oasis";
oasis_version = "0.4.11";
oasis_digest = Some "\031B\"\198\141\157`Yd\200\159F\169\162\127\022";
oasis_digest = Some "\197\026\147\198c\239\0223\026_)\201>2\152\150";
oasis_exec = None;
oasis_setup_args = [];
setup_update = false
Expand Down
2 changes: 2 additions & 0 deletions src/batBytes.mliv
Original file line number Diff line number Diff line change
Expand Up @@ -666,3 +666,5 @@ let s = Bytes.of_string "hello"

##V<4.4##external unsafe_fill : t -> int -> int -> char -> unit = "caml_fill_string" "noalloc"
##V>=4.4##external unsafe_fill: t -> int -> int -> char -> unit = "caml_fill_bytes" "noalloc"

##V>=4.09##external unsafe_blit_string : string -> int -> bytes -> int -> int -> unit = "caml_blit_string" "noalloc"
49 changes: 33 additions & 16 deletions src/batFilename.mliv
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ val parent_dir_name : string

val dir_sep : string
(** The directory separator (e.g. [/] in Unix).
@since NEXT_RELEASE and OCaml 3.11.2 *)
@since 2.11.0 and OCaml 3.11.2 *)

val concat : string -> string -> string
(** [concat dir file] returns a file name that designates file
Expand Down Expand Up @@ -73,7 +73,7 @@ val chop_suffix : string -> string -> string
##V>=4.8## this does not match exactly the interpretation of case-insensitive
##V>=4.8## filename equivalence from Windows.
##V>=4.8##
##V>=4.8## @since NEXT_RELEASE and OCaml 4.08
##V>=4.8## @since 2.11.0 and OCaml 4.08
##V>=4.8##*)


Expand All @@ -89,7 +89,7 @@ val chop_suffix : string -> string -> string
##V>=4.4## If such a suffix does not exist, [extension name] is the empty
##V>=4.4## string.
##V>=4.4##
##V>=4.4## @since NEXT_RELEASE and OCaml 4.04
##V>=4.4## @since 2.11.0 and OCaml 4.04
##V>=4.4##*)

##V>=4.4##val remove_extension : string -> string
Expand All @@ -101,7 +101,7 @@ val chop_suffix : string -> string -> string
##V>=4.4##
##V>=4.4## [remove_extension s ^ extension s = s]
##V>=4.4##
##V>=4.4## @since NEXT_RELEASE and OCaml 4.04
##V>=4.4## @since 2.11.0 and OCaml 4.04
##V>=4.4##*)

val chop_extension : string -> string
Expand Down Expand Up @@ -141,22 +141,22 @@ val temp_file : ?temp_dir: string -> string -> string -> string
*)

val open_temp_file :
?mode: open_flag list -> ?perms: int -> ?temp_dir: string -> string ->
string -> string * out_channel
?mode: open_flag list ->
##V>4.2## ?perms: int ->
?temp_dir: string -> string ->
string -> string * out_channel
(** Same as {!Filename.temp_file}, but returns both the name of a fresh
temporary file, and an output channel opened (atomically) on
this file. This function is more secure than [temp_file]: there
is no risk that the temporary file will be modified (e.g. replaced
by a symbolic link) before the program opens it. The optional argument
[mode] is a list of additional flags to control the opening of the file.
It can contain one or several of [Open_append], [Open_binary],
and [Open_text]. The default is [[Open_text]] (open in text mode). The
file is created with permissions [perms] (defaults to readable and
writable only by the file owner, [0o600]).
and [Open_text]. The default is [[Open_text]] (open in text mode).
##V>4.2## The file is created with permissions [perms] (defaults to readable and
##V>4.2## writable only by the file owner, [0o600]).

@raise Sys_error if the file could not be opened.
@before 4.03.0 no ?perms optional argument
@before 3.11.2 no ?temp_dir optional argument
*)

##V>=4.0##val get_temp_dir_name : unit -> string
Expand All @@ -166,24 +166,24 @@ val open_temp_file :
##V>=4.0## Under Windows, the value of the [TEMP] environment variable, or "."
##V>=4.0## if the variable is not set.
##V>=4.0## The temporary directory can be changed with {!Filename.set_temp_dir_name}.
##V>=4.0## @since NEXT_RELEASE and OCaml 4.00.0
##V>=4.0## @since 2.11.0 and OCaml 4.00.0
##V>=4.0##*)

##V>=4.0##val set_temp_dir_name : string -> unit
##V>=4.0##(** Change the temporary directory returned by {!Filename.get_temp_dir_name}
##V>=4.0## and used by {!Filename.temp_file} and {!Filename.open_temp_file}.
##V>=4.0## @since NEXT_RELEASE and OCaml 4.00.0
##V>=4.0## @since 2.11.0 and OCaml 4.00.0
##V>=4.0##*)

val temp_dir_name : string
[@@ocaml.deprecated "Use Filename.get_temp_dir_name instead"]
##V>=4.2## [@@ocaml.deprecated "Use Filename.get_temp_dir_name instead"]
(** The name of the initial temporary directory:
Under Unix, the value of the [TMPDIR] environment variable, or "/tmp"
if the variable is not set.
Under Windows, the value of the [TEMP] environment variable, or "."
if the variable is not set.
@deprecated You should use {!Filename.get_temp_dir_name} instead.
@since NEXT_RELEASE and OCaml 3.09.1
@since 2.11.0 and OCaml 3.09.1
*)

val quote : string -> string
Expand Down Expand Up @@ -226,9 +226,26 @@ val quote : string -> string
##V>4.9## Raise [Failure] if the command cannot be escaped on the current platform.
##V>4.9##*)

##V<4.4## val extension : string -> string
##V<4.4##(* extension name is the shortest suffix ext of name0 where:
##V<4.4##
##V<4.4## - name0 is the longest suffix of name that does not contain a directory separator;
##V<4.4## - ext starts with a period;
##V<4.4## - ext is preceded by at least one non-period character in name0.
##V<4.4## If such a suffix does not exist, extension name is the empty string.
##V<4.4##
##V<4.4## @since 2.11.0 *)

##V<4.4## val remove_extension : string -> string
##V<4.4##(* Return the given file name without its extension, as defined in
##V<4.4## Filename.extension. If the extension is empty, the function returns
##V<4.4## the given file name.
##V<4.4##
##V<4.4## @since 2.11.0 *)

val split_extension : string -> string * string
(** [split_extension s] returns both the filename [s] without its extension
and its extension in two distinct strings.
For instance, [split_extension "foo.bar"] returns the pair ["foo",".bar"].

@since NEXT_RELEASE *)
@since 2.11.0 *)
31 changes: 31 additions & 0 deletions src/batFilename.ml → src/batFilename.mlv
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,37 @@

include Filename

##V<4.4## let is_dir_sep name i =
##V<4.4## try
##V<4.4## for j = 0 to String.length dir_sep - 1 do
##V<4.4## if i + j >= String.length name ||
##V<4.4## name.[i + j] != dir_sep.[j] then raise Exit
##V<4.4## done;
##V<4.4## true
##V<4.4## with Exit ->
##V<4.4## false
##V<4.4##
##V<4.4## let extension_len name =
##V<4.4## let rec check i0 i =
##V<4.4## if i < 0 || is_dir_sep name i then 0
##V<4.4## else if name.[i] = '.' then check i0 (i - 1)
##V<4.4## else String.length name - i0
##V<4.4## in
##V<4.4## let rec search_dot i =
##V<4.4## if i < 0 || is_dir_sep name i then 0
##V<4.4## else if name.[i] = '.' then check i (i - 1)
##V<4.4## else search_dot (i - 1)
##V<4.4## in
##V<4.4## search_dot (String.length name - 1)
##V<4.4##
##V<4.4## let remove_extension name =
##V<4.4## let l = extension_len name in
##V<4.4## if l = 0 then name else String.sub name 0 (String.length name - l)
##V<4.4##
##V<4.4## let extension name =
##V<4.4## let l = extension_len name in
##V<4.4## if l = 0 then "" else String.sub name (String.length name - l) l

let split_extension s =
remove_extension s, extension s

Expand Down
2 changes: 1 addition & 1 deletion src/batGc.mliv
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ val finalise : ('a -> unit) -> 'a -> unit
##V>=4.4## finalisation function attached with `GC.finalise` are always
##V>=4.4## called before the finalisation function attached with `GC.finalise_last`.
##V>=4.4##
##V>=4.4## @since NEXT_RELEASE and OCaml 4.04
##V>=4.4## @since 2.11.0 and OCaml 4.04
##V>=4.4##*)

val finalise_release : unit -> unit;;
Expand Down
6 changes: 3 additions & 3 deletions src/batIO.mli
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ module Incubator : sig
?last:string ->
?sep:string ->
?indent:int ->
(Format.formatter -> 'a -> 'b) -> Format.formatter -> 'a array -> unit
(Format.formatter -> 'a -> unit) -> Format.formatter -> 'a array -> unit
(** Print the contents of an array, with [first] preceding the first item
(default: ["\[|"]), [last] following the last item (default: ["|\]"])
and [sep] separating items (default: ["; "]). A printing function must
Expand All @@ -972,7 +972,7 @@ module Incubator : sig
?last:string ->
?sep:string ->
?indent:int ->
(Format.formatter -> 'a -> 'b) -> Format.formatter -> 'a BatEnum.t -> unit
(Format.formatter -> 'a -> unit) -> Format.formatter -> 'a BatEnum.t -> unit
(** Print the contents of an enum, with [first] preceding the first item
(default: [""]), [last] following the last item (default: [""])
and [sep] separating items (default: [" "]). A printing function must
Expand All @@ -992,7 +992,7 @@ module Incubator : sig
?last:string ->
?sep:string ->
?indent:int ->
(Format.formatter -> 'a -> 'b) -> Format.formatter -> 'a list -> unit
(Format.formatter -> 'a -> unit) -> Format.formatter -> 'a list -> unit
(** Print the contents of a list, with [first] preceding the first item
(default: ["\["]), [last] following the last item (default: ["\]"])
and [sep] separating items (default: ["; "]). A printing function must
Expand Down
2 changes: 1 addition & 1 deletion src/batInnerPervasives.mlv
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ let ok = function

let wrap f x = try Ok (f x) with ex -> Error ex

let forever f x = ignore (while true do f x done)
let forever f x = ignore (while true do ignore (f x) done)

let ignore_exceptions f x = try ignore (f x) with _ -> ()

Expand Down
2 changes: 1 addition & 1 deletion src/batLazyList.ml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ let make n x =

let iter f l =
let rec aux l = match next l with
| Cons (x, t) -> (f x; aux t)
| Cons (x, t) -> (ignore (f x); aux t)
| Nil -> ()
in aux l

Expand Down
4 changes: 2 additions & 2 deletions src/batList.mliv
Original file line number Diff line number Diff line change
Expand Up @@ -299,13 +299,13 @@ val min : 'a list -> 'a
val sum : int list -> int
(** [sum l] returns the sum of the integers of [l].
Returns [0] on the empty list.
Note: prior to NEXT_RELEASE, used to raise Invalid_argument on the empty list.
Note: prior to 2.11.0, used to raise Invalid_argument on the empty list.
*)

val fsum : float list -> float
(** [fsum l] returns the sum of the floats of [l].
Returns [0.] on the empty list.
Note: prior to NEXT_RELEASE, used to raise Invalid_argument on the empty list.
Note: prior to 2.11.0, used to raise Invalid_argument on the empty list.
*)

val favg : float list -> float
Expand Down
16 changes: 15 additions & 1 deletion src/batPrintexc.mliv
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ val print : _ BatInnerIO.output -> exn -> unit
##V>=4.4## raw_backtrace_slot -> raw_backtrace_slot option
##V>=4.4##(** [get_raw_backtrace_next_slot slot] returns the next slot inlined, if any.
##V>=4.4##
##V>=4.4## @since NEXT_RELEASE and OCaml 4.04
##V>=4.4## @since 2.11.0 and OCaml 4.04
##V>=4.4##*)


Expand All @@ -348,3 +348,17 @@ val print : _ BatInnerIO.output -> exn -> unit

##V>=4.08##type t = exn = ..
##V>=4.08##(** The type of exception values. *)

##V>=4.09##val use_printers: exn -> string option
##V>=4.09##(** [Printexc.use_printers e] returns [None] if there are no registered
##V>=4.09## printers and [Some s] with else as the resulting string otherwise.
##V>=4.09##
##V>=4.09## @since 2.11.0 and OCaml 4.09
##V>=4.09##*)

##V>=4.09##val to_string_default: exn -> string
##V>=4.09##(** [Printexc.to_string_default e] returns a string representation of the
##V>=4.09## exception [e], ignoring all registered exception printers.
##V>=4.09##
##V>=4.09## @since 2.11.0 and OCaml 4.09
##V>=4.09##*)
4 changes: 2 additions & 2 deletions src/batRefList.ml
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,12 @@ module Index = struct

let index pred rl =
let index = ref (-1) in
List.find (fun it -> incr index; pred it; ) !rl;
ignore (List.find (fun it -> incr index; pred it; ) !rl);
!index

let index_of rl item =
let index = ref (-1) in
List.find (fun it -> incr index; it = item; ) !rl;
ignore (List.find (fun it -> incr index; it = item; ) !rl);
!index

let at_index rl pos = List.nth !rl pos
Expand Down
Loading