Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
OCaml Other

Merge pull request #628 from vogler/master

expose `Format.asprintf` for V>=4.01, fixes #597
latest commit 5dc3f07010
@gasche gasche authored
Failed to load latest commit information.
benchsuite Update bitset.ml
build Move the prefilterin logic from Makefile to ocamlbuild
examples Merge branch 'v1.4.3'
howto improve howto/release.md to avoid META issues in the future
qtest Update README.md
scripts version management scripts
src expose `Format.asprintf` for V>=4.01, fixes #597
testsuite Update tests and documentation for dump
.gitignore expose `Format.asprintf` for V>=4.01, fixes #597
.mailmap add a .mailmap entry
.merlin basic .merlin file for merlin users
.travis.sh Travis support, with build status in README
.travis.yml Travis support, with build status in README
ChangeLog ChangeLog
FAQ Update FAQ to add help on "unbound module batteries" error.
LICENSE Updating pointer to clause 3 in LE text to clause 2 as it should be.
META.in bytes is missing in META
Makefile Move the prefilterin logic from Makefile to ocamlbuild
README.folders Update README.folders
README.md require ocamlfind>=1.5.3 for the full Bytes compatibility package
_oasis bump version in _oasis
_tags add a batBytes module simply including ocamlfind's Bytes module
batteries_dev.el emacs mode: updating it to qtest2
battop.ml Put version number in toplevel banner
check_raise add a style check for '@since NEXT_RELEASE'
myocamlbuild.ml Move the prefilterin logic from Makefile to ocamlbuild
ocamlinit Fix a typo in ocamlinit that prevents it from loading correctly.
opam require ocamlfind>=1.5.3 for the full Bytes compatibility package
plot benchmark: fingertrees or sequences in general
setup.ml bump version in _oasis

README.md

Welcome to OCaml Batteries Included

OCaml Batteries Included, or just Batteries, is a community-maintained foundation library for your OCaml projects. Batteries

  • defines a standard set of libraries which may be expected on every compliant installation of OCaml;

  • organizes these libraries into a hierarchy of modules, with a single source of documentation; and

  • provides a consistent API for otherwise independent libraries.

Build Status

Building Batteries

Requirements

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)
  • ocaml-benchmark to build and run the performance tests (optional)
  • bisect to compute the coverage of the test suite (optional)

Configuration and Installation

To install the full version of Batteries, execute

$ make all
$ make test test          [ optional ]
$ sudo make install

$ make doc                [ optional ]
$ sudo make install-doc   [ optional ]

If you want the documentation installed elsewhere, set this before starting the build process because this location is stored in the Batteries_config module generated during compilation.

$ export DOCROOT=/path/to/new/docroot/

To disable native compilation:

$ export BATTERIES_NATIVE=false

To disable building of native shared libraries:

$ export BATTERIES_NATIVE_SHLIB=false

Using Batteries

To get started using Batteries at the toplevel, copy the ocamlinit file to ~/.ocamlinit:

$ cp ocamlinit ~/.ocamlinit

If you already have findlib in your ~/.ocamlinit, you only need the last line in our ocamlinit to load batteries.

More usage help available on the batteries-included wiki.

ExtLib Compatibility

If your project currently uses ExtLib, most likely you can just change -package extlib to -package batteries and add open Extlibcompat 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.

COMPATIBILITY NOTE: If you're using ExtLib's Unzip module, it does not have a corresponding module in batteries at the moment.

Extending Batteries

See doc/batteries/GUIDELINES and the guidelines wiki page.

If you use emacs, the file batteries_dev.el has extra highlighting to support writing quicktests.

Something went wrong with that request. Please try again.