Skip to content

Commits on Source 12

......@@ -21,7 +21,6 @@ bench.log
qtest/all_tests.ml
qtest2/all_tests.ml
qtest.targets.log
coverage
setup.data
setup.log
src/batUnix.mli
......
OPAM_DEPENDS="ocamlfind ounit qtest"
case "$OCAML_VERSION,$OPAM_VERSION" in
3.12.1,1.0.0) ppa=avsm/ocaml312+opam10 ;;
3.12.1,1.1.0) ppa=avsm/ocaml312+opam11 ;;
4.00.1,1.0.0) ppa=avsm/ocaml40+opam10 ;;
4.00.1,1.1.0) ppa=avsm/ocaml40+opam11 ;;
4.01.0,1.0.0) ppa=avsm/ocaml41+opam10 ;;
4.01.0,1.1.0) ppa=avsm/ocaml41+opam11 ;;
case "$OCAML_VERSION" in
3.12.1.1.0) ppa=avsm/ocaml312+opam11 ;;
4.00.1.0.0) ppa=avsm/ocaml40+opam10 ;;
4.00.1.1.0) ppa=avsm/ocaml40+opam11 ;;
4.01.0.0.0) ppa=avsm/ocaml41+opam10 ;;
4.01.0.1.0) ppa=avsm/ppa ;;
4.0[234567].*) ppa=
*) echo Unknown $OCAML_VERSION,$OPAM_VERSION; exit 1 ;;
esac
echo "yes" | sudo add-apt-repository ppa:$ppa
sudo apt-get update -qq
sudo apt-get install -qq ocaml ocaml-native-compilers camlp4-extra opam
sudo apt-get install -qq opam
export OPAMYES=1
export OPAMVERBOSE=1
echo OCaml version
ocaml -version
echo OPAM versions
opam --version
opam --git-version
opam init
opam init --compiler=$OCAML_VERSION
eval `opam config env`
echo "==== Installing $OPAM_DEPENDS ===="
......@@ -30,8 +25,9 @@ opam install ${OPAM_DEPENDS}
echo "==== Build ===="
make
echo "==== Tests ===="
echo "==== Internal tests ===="
make test-native
#echo "==== Doc ===="
#make doc
echo "==== Install and use test ===="
opam pin add -n -k path batteries .
make test-build-from-install
language: c
script: bash -ex .travis.sh
env:
- OCAML_VERSION=3.12.1 OPAM_VERSION=1.1.0
- OCAML_VERSION=4.00.1 OPAM_VERSION=1.1.0
- OCAML_VERSION=4.01.0 OPAM_VERSION=1.1.0
# - OCAML_VERSION=3.12.1 OPAM_VERSION=1.0.0
# - OCAML_VERSION=4.00.1 OPAM_VERSION=1.0.0
# - OCAML_VERSION=4.01.0 OPAM_VERSION=1.0.0
- OCAML_VERSION=3.12.1
- OCAML_VERSION=4.00.1
- OCAML_VERSION=4.01.0
- OCAML_VERSION=4.02.3
- OCAML_VERSION=4.03.0
- OCAML_VERSION=4.04.2
- OCAML_VERSION=4.05.0
- OCAML_VERSION=4.06.0
- OCAML_VERSION=4.07.0
- OCAML_VERSION=4.08.0
# notifications:
# email:
# - simon.cruanes.2007+travis@m4x.org
# - add other adresses here (or batteries-devel or something?)
# - add other addresses here (or batteries-devel or something?)
Changelog
---------
## 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)
## 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)
......@@ -249,7 +468,7 @@ then it is only available under OCaml 4.03.0.
- basic .merlin file for merlin users
- BatDeque.eq function to compare Deques by content
- BatteriesExceptionless
- More explicit overridding of ocamlbuild rules, use batteries.mllib
- 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
......
......@@ -9,3 +9,7 @@ archive(byte) ="batteries.cma"
archive(byte,mt) +="batteriesThread.cma"
archive(native) ="batteries.cmxa"
archive(native,mt) +="batteriesThread.cmxa"
plugin(byte) ="batteries.cma"
plugin(byte,mt) +="batteriesThread.cma"
plugin(native) ="batteries.cmxs"
plugin(native,mt) +="batteriesThread.cmxs"
......@@ -49,6 +49,12 @@ endif
OPT_INSTALL_FILES = _build/src/*.cmx _build/src/*.a _build/src/*.cmxa \
_build/src/*.cmxs _build/src/*.lib
ifneq ($(QTEST_SEED),)
QTEST_SEED_FLAG = --seed $(QTEST_SEED)
else
QTEST_SEED_FLAG =
endif
# What to build
TARGETS = src/batteries.cma
TARGETS += src/batteriesHelp.cmo
......@@ -80,7 +86,7 @@ else
endif
endif
.PHONY: all clean doc install uninstall reinstall test qtest qtest-clean camfail camfailunk coverage man test_install
.PHONY: all clean doc install uninstall reinstall test qtest qtest-clean camfail camfailunk man test_install
all:
@echo "Build mode:" $(MODE)
......@@ -163,6 +169,7 @@ clean-prefilter:
# `_build` directory.
DONTTEST=src/batteriesHelp.ml \
src/batteries_compattest.ml \
src/batConcreteQueue_402.ml src/batConcreteQueue_403.ml
TESTABLE ?= $(filter-out $(DONTTEST),\
$(wildcard src/*.ml) $(wildcard src/*.mlv))
......@@ -207,21 +214,22 @@ qtest-byte-clean:
@${MAKE} _build/$(QTESTDIR)/all_tests.byte
qtest-byte: qtest-byte-clean
@_build/$(QTESTDIR)/all_tests.byte
@_build/$(QTESTDIR)/all_tests.byte $(QTEST_SEED_FLAG)
qtest-native-clean:
@${RM} $(QTESTDIR)/all_tests.ml
@${MAKE} _build/$(QTESTDIR)/all_tests.native
@${MAKE} _build/$(QTESTDIR)/all_tests.native $(QTEST_SEED_FLAG)
qtest-native: prefilter qtest-native-clean
@_build/$(QTESTDIR)/all_tests.native
@_build/$(QTESTDIR)/all_tests.native $(QTEST_SEED_FLAG)
qtest-clean:
@${RM} $(QTESTDIR)/all_tests.ml
@${MAKE} _build/$(QTESTDIR)/all_tests.$(EXT)
qtest: qtest-clean
@_build/$(QTESTDIR)/all_tests.$(EXT)
@_build/$(QTESTDIR)/all_tests.$(EXT) $(QTEST_SEED_FLAG)
### run all unit tests
##############################################
......@@ -269,7 +277,7 @@ release:
$(MAKE) release-cleaned
# assumes irreproachably pristine working directory
release-cleaned: setup.ml doc test
release-cleaned: setup.ml doc test-native
git archive --format=tar --prefix=batteries-$(VERSION)/ HEAD \
| gzip > batteries-$(VERSION).tar.gz
......@@ -281,12 +289,3 @@ setup.ml: _oasis
# uploads the current documentation to github hdoc2/ directory
upload-docs:
make doc && git checkout gh-pages && rm -f hdoc2/*.html && cp _build/batteries.docdir/*.html hdoc2/ && git add hdoc2/*.html && git commit -a -m"Update to latest documentation" && git push github gh-pages
###############################################################################
# CODE COVERAGE REPORTS
###############################################################################
coverage/index.html: $(TESTDEPS) $(QTESTDIR)/all_tests.ml
$(OCAMLBUILD) $(OCAMLBUILDFLAGS) coverage/index.html
coverage: coverage/index.html
......@@ -24,25 +24,24 @@ You will need the following libraries:
* [OCaml][] >= 3.12.1
* [Findlib][] >= 1.5.3
* [qtest][] >= 2.0.1
* GNU make
* [OUnit][] to build and run the tests (optional)
* [qtest][] >= 2.0.1 to build and run the tests (optional)
* [ocaml-benchmark][] to build and run the performance tests (optional)
* [bisect][] to compute the coverage of the test suite (optional)
[Findlib]: http://projects.camlcity.org/projects/findlib.html/
[OCaml]: http://caml.inria.fr/ocaml/release.en.html
[qtest]: http://batteries.vhugot.com/qtest/
[Camomile]: http://camomile.sourceforge.net/
[OUnit]: http://ounit.forge.ocamlcore.org/
[ocaml-benchmark]: http://ocaml-benchmark.forge.ocamlcore.org/
[bisect]: http://bisect.x9c.fr/
### Configuration and Installation
To install the full version of Batteries, execute
$ make all
$ make test test [ optional ]
$ make test [ optional ]
$ sudo make install
$ make doc [ optional ]
......@@ -82,7 +81,7 @@ ExtLib Compatibility
--------------------
If your project currently uses [ExtLib][], most likely you can just change
`-package extlib` to `-package batteries` and add `open Extlibcompat`
`-package extlib` to `-package batteries` and add `open Extlib`
to the top of any extlib-using modules. Batteries' modules are all
named BatFoo to differentiate them from extlib's modules, so one can
use Batteries and ExtLib in the same project.
......@@ -96,9 +95,9 @@ have a corresponding module in batteries at the moment.
Extending Batteries
-------------------
See doc/batteries/GUIDELINES and the [guidelines wiki page][batwiki-dev].
See the [guidelines wiki page][batwiki-dev].
[batwiki-dev]: https://github.com/ocaml-batteries-team/batteries-included/wiki/Developers-guidelines
If you use emacs, the file `batteries_dev.el` has extra highlighting to support writing quicktests.
If you use emacs, the file [`batteries_dev.el`](/batteries_dev.el) has extra highlighting to support writing quicktests.
OASISFormat: 0.4
OCamlVersion: >= 3.12.1
Name: batteries
Version: 2.6.0
Version: 2.10.0
Authors: Batteries Included Team
License: LGPL-2.1 with OCaml linking exception
LicenseFile: LICENSE
......@@ -31,4 +31,3 @@ SourceRepository master
Library "batteries"
Path: src/
......@@ -10,3 +10,6 @@ true: package(bytes), warn_-3, bin_annot
".git": -traverse
"examples": -traverse
<src/batOpaqueInnerSys.*>: opaque
true: safe_string
true: no_alias_deps
(*
* Top - An interpreted preambule for the toplevel
* Top - An interpreted preamble for the toplevel
* Copyright (C) 2009 David Rajchenbach-Teller, LIFO, Universite d'Orleans
*
* This library is free software; you can redistribute it and/or
......@@ -63,8 +63,10 @@ open Batteries;;
#install_printer BatteriesPrint.print_uchar;;
#install_printer BatteriesPrint.print_ustring;;
#install_printer BatteriesPrint.print_rope;;
(*
#install_printer BatteriesPrint.print_string_cap_rw;;
#install_printer BatteriesPrint.print_string_cap_ro;;
*)
#install_printer BatteriesPrint.string_dynarray;;
#install_printer BatteriesPrint.int_dynarray;;
#install_printer BatteriesPrint.char_dynarray;;
......
......@@ -117,7 +117,7 @@ let nreplace_thelema2 ~str ~sub ~by =
loop_copy 0 0 idxes ;
newstr
(* Independantly, MadRoach implemented the same idea with less luck aparently *)
(* Independently, MadRoach implemented the same idea with less luck apparently *)
let nreplace_madroach ~str ~sub ~by =
let strlen = String.length str
and sublen = String.length sub
......@@ -132,7 +132,7 @@ let nreplace_madroach ~str ~sub ~by =
BatEnum.from (fun () -> let i = find !nexti in nexti := i+1; i) in
(* collect all positions where we need to replace,
* skipping overlapping occurences *)
* skipping overlapping occurrences *)
let todo =
let skip_unto = ref 0 in
find_simple sub str |>
......
......@@ -21,6 +21,8 @@ the
{{:https://github.com/ocaml-batteries-team/batteries-included/wiki/Getting-started}Getting
started manual}.
Modules listed below can also be referenced as [Batteries.<short name>]--where [<short name>] is the module name without the initial "Bat"--or as [<short name>] alone, if [Batteries] has been [open]ed. For example, [BatLazyList] can also be used as [Batteries.LazyList], or as [LazyList] after executing [open Batteries].
Do you have suggestions? Remarks? Bug reports ? To contact us or to be
kept informed, don't hesitate to visit our
{{:http://batteries.forge.ocamlcore.org/}website},
......
From c09d02f65d20c183149698cad56c1d9715b4267a Mon Sep 17 00:00:00 2001
From: Gabriel Scherer <gabriel.scherer@gmail.com>
Date: Sun, 29 Oct 2017 18:06:05 +0100
Subject: [PATCH] make our inline tests compatible with older OCaml versions
Newer qtest versions introduced API changes that makes our code
incompatible with older qtest versions, and they are also incompatible
with some OCaml versions that Batteries support. The present patch
removes all advanced qtest modules from the Batteries inline test
(at the cost of slightly reducing the breadth of the coverage in
some case); applying it should make it possible to test Batteries
under 3.12.1 and 4.00.1 for example.
Please consider rebasing this commit with new changes if the
old-qtest-incompatible features start being used in other places.
---
src/batArray.mlv | 22 ++++++++++++----------
src/batInnerShuffle.ml | 2 +-
src/batList.mlv | 5 +++--
3 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/src/batArray.mlv b/src/batArray.mlv
index 005c4df0..79ee6f94 100644
--- a/src/batArray.mlv
+++ b/src/batArray.mlv
@@ -175,7 +175,7 @@ let findi p xs =
in
loop 0
(*$Q findi
- (Q.pair (Q.array Q.small_int) (Q.fun1 Q.Observable.int Q.bool)) (fun (a, Q.Fun(_,f)) -> \
+ (Q.array Q.small_int) (fun a -> let f n = (n mod 4 = 0) in \
try let index = findi f a in \
let i = ref (-1) in \
for_all (fun elt -> incr i; \
@@ -187,7 +187,7 @@ let findi p xs =
let find p xs = xs.(findi p xs)
(*$Q find
- (Q.pair (Q.array Q.small_int) (Q.fun1 Q.Observable.int Q.bool)) (fun (a, Q.Fun(_,f)) -> \
+ (Q.array Q.small_int) (fun a -> let f n = (n mod 4 = 0) in \
let a = map (fun x -> `a x) a in \
let f (`a x) = f x in\
try let elt = find f a in \
@@ -217,7 +217,7 @@ let filter p xs =
assert false
)
(*$Q filter
- (Q.pair (Q.array Q.small_int) (Q.fun1 Q.Observable.int Q.bool)) (fun (a, Q.Fun(_,f)) -> \
+ (Q.array Q.small_int) (fun a -> let f n = (n mod 4 = 0) in \
let b = Array.to_list (filter f a) in \
let b' = List.filter f (Array.to_list a) in \
List.for_all (fun (x,y) -> x = y) (List.combine b b') \
@@ -276,7 +276,7 @@ let partition p xs =
r) in
xs1, xs2
(*$Q partition
- (Q.pair (Q.array Q.small_int) (Q.fun1 Q.Observable.int Q.bool)) (fun (a, Q.Fun(_,f)) -> \
+ (Q.array Q.small_int) (fun a -> let f n = (n mod 4 = 0) in \
let b1, b2 = partition f a in \
let b1, b2 = Array.to_list b1, Array.to_list b2 in \
let b1', b2' = List.partition f (Array.to_list a) in \
@@ -370,8 +370,8 @@ let range xs = BatEnum.(--^) 0 (Array.length xs)
let filter_map p xs =
of_enum (BatEnum.filter_map p (enum xs))
(*$Q filter_map
- (Q.pair (Q.array Q.small_int) (Q.fun1 Q.Observable.int (Q.option Q.int))) \
- (fun (a, Q.Fun (_,f)) -> \
+ (Q.array Q.small_int) (fun a -> \
+ let f n = if (n mod 4 = 0) then Some n else None in \
let a' = filter (fun elt -> f elt <> None) a in \
let a' = map (f %> BatOption.get) a' in \
let a = filter_map f a in \
@@ -661,8 +661,9 @@ let decorate_stable_sort f xs =
= [|(0,2);(1,2);(1,3);(1,4)|]
*)
(*$Q decorate_stable_sort
- (Q.pair (Q.array Q.small_int) (Q.fun1 Q.Observable.int (Q.option Q.int))) \
- (fun (a, Q.Fun(_,f)) -> is_sorted_by f (decorate_stable_sort f a))
+ (Q.array Q.small_int) (fun a -> \
+ let f n = if (n mod 4 = 0) then Some n else None in \
+ is_sorted_by f (decorate_stable_sort f a))
*)
let decorate_fast_sort f xs =
@@ -670,8 +671,9 @@ let decorate_fast_sort f xs =
let () = fast_sort (fun (i,_) (j,_) -> Pervasives.compare i j) decorated in
map (fun (_,x) -> x) decorated
(*$Q decorate_fast_sort
- (Q.pair (Q.array Q.small_int) (Q.fun1 Q.Observable.int (Q.option Q.int))) \
- (fun (a, Q.Fun(_,f)) -> is_sorted_by f (decorate_fast_sort f a))
+ (Q.array Q.small_int) (fun a -> \
+ let f n = if (n mod 4 = 0) then Some n else None in \
+ is_sorted_by f (decorate_fast_sort f a))
*)
let bsearch cmp arr x =
diff --git a/src/batInnerShuffle.ml b/src/batInnerShuffle.ml
index 4bcda867..3593a8f8 100644
--- a/src/batInnerShuffle.ml
+++ b/src/batInnerShuffle.ml
@@ -12,7 +12,7 @@ let array_shuffle ?state a =
done
(*$Q
- Q.(array_of_size Gen.(2--15) small_int) (fun a -> \
+ Q.(array_of_size (fun _ -> 10) small_int) (fun a -> \
let a' = Array.copy a in \
array_shuffle a'; \
(Array.to_list a' |> List.sort Pervasives.compare) = \
diff --git a/src/batList.mlv b/src/batList.mlv
index 9208b765..d7c5d6ce 100644
--- a/src/batList.mlv
+++ b/src/batList.mlv
@@ -232,8 +232,9 @@ let map f = function
loop r t;
inj r
(*$Q map
- (Q.pair (Q.fun1 Q.Observable.int Q.int) (Q.list Q.small_int)) \
- (fun (Q.Fun (_,f),l) -> map f l = List.map f l)
+ (Q.list Q.small_int) (fun l -> \
+ let f n = n+1 in \
+ map f l = List.map f l)
*)
let rec drop n = function
--
2.13.6
......@@ -79,7 +79,7 @@ let has_parent a ~parent:b =
result
let merge_info_opt a b =
verbose ("Merging informations");
verbose ("Merging information");
if a <> b then
begin
verbose ("1: "^(string_of_info_opt a));
......
......@@ -102,7 +102,7 @@ let has_parent a ~parent:b =
let roots = ["Batteries"]
let merge_info_opt a b =
verbose ("Merging informations");
verbose ("Merging information");
if a <> b then
begin
verbose ("1: "^(string_of_info_opt a));
......
......@@ -78,7 +78,7 @@ let add_include_dir dir = dirs := dir :: !dirs
module String_set = Set.Make(String)
(* All depencies of the file being parsed *)
(* All dependencies of the file being parsed *)
let dependencies = ref String_set.empty
(* Where to write dependencies *)
......@@ -302,7 +302,7 @@ let rec parse_eol stream =
| _ ->
Loc.raise loc (Stream.Error "end of line expected")
(* Return wether a keyword can be interpreted as an identifier *)
(* Return whether a keyword can be interpreted as an identifier *)
let keyword_is_id str =
let rec aux i =
if i = String.length str then
......@@ -516,13 +516,13 @@ type state = {
(* Input stream *)
mutable bol : bool;
(* Wether we are at the beginning of a line *)
(* Whether we are at the beginning of a line *)
mutable stack : context list;
(* Nested contexts *)
on_eoi : Gram.Token.t * Loc.t -> Gram.Token.t * Loc.t;
(* Eoi handler, it is used to restore the previous sate on #include
(* Eoi handler, it is used to restore the previous state on #include
directives *)
}
......
......@@ -77,7 +77,7 @@ type t = private int
type t
#endif
(* It is also possible to split the expression over multible lines by
(* It is also possible to split the expression over multiple lines by
using parentheses: *)
#let ocaml_major_version = fst ocaml_version
......@@ -101,7 +101,7 @@ let x = 1
is what is allowed:
- litterals booleans, integers, strings and characters:
- basic interger operations: +, -, /, *, mod
- basic integer operations: +, -, /, *, mod
- value comparing: =, <>, <, >, <=, >=
- maximum and minimum: max, min
- basic boolean operations: or, ||, &&, not
......
ocaml-batteries (2.10.0-1) unstable; urgency=medium
* Team upload
* New upstream release
* Add libnum-ocaml-dev to Build-Depends
* Update Vcs-*
* Update debian/watch
-- Stéphane Glondu <glondu@debian.org> Tue, 12 Nov 2019 10:49:10 +0100
ocaml-batteries (2.6.0-1) unstable; urgency=medium
* Team upload
......
......@@ -10,6 +10,7 @@ Build-Depends:
ocaml-findlib (>= 1.4),
libcamomile-ocaml-dev (>= 0.8),
libounit-ocaml-dev,
libnum-ocaml-dev,
ocamlbuild,
dh-ocaml (>= 0.9.5~)
Standards-Version: 3.9.2
......
......@@ -7,10 +7,10 @@ Subject: Do not enforce sanity-check rules
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index bb858a8..f567146 100644
index ddd86a5..4f26759 100644
--- a/Makefile
+++ b/Makefile
@@ -97,7 +97,7 @@ batteries.odocl: src/batteries.mllib src/batteriesThread.mllib
@@ -103,7 +103,7 @@ batteries.odocl: src/batteries.mllib src/batteriesThread.mllib
cat $^ > $@
doc: batteries.odocl
......