Skip to content
This repository

Merge pull request #526 from Drup/master

concat_map inlining for BatStream and BatEnum
latest commit 49b11edd78
gasche gasche authored
Octocat-spinner-32 benchsuite Update bitset.ml January 14, 2014
Octocat-spinner-32 build Update packdoc.ml January 14, 2014
Octocat-spinner-32 examples Merge branch 'v1.4.3' June 05, 2012
Octocat-spinner-32 howto small patch to howto/release.md February 03, 2014
Octocat-spinner-32 qtest Update README.md January 14, 2014
Octocat-spinner-32 scripts version management scripts April 12, 2014
Octocat-spinner-32 src Merge pull request #526 from Drup/master April 14, 2014
Octocat-spinner-32 testsuite Update tests and documentation for dump February 25, 2014
Octocat-spinner-32 .gitignore Compatibility with ocaml 4.01 October 05, 2013
Octocat-spinner-32 .mailmap add a .mailmap entry July 01, 2013
Octocat-spinner-32 .merlin basic .merlin file for merlin users November 11, 2013
Octocat-spinner-32 .travis.sh Travis support, with build status in README January 05, 2014
Octocat-spinner-32 .travis.yml Travis support, with build status in README January 05, 2014
Octocat-spinner-32 ChangeLog changelog January 17, 2014
Octocat-spinner-32 FAQ Update FAQ to add help on "unbound module batteries" error. July 15, 2012
Octocat-spinner-32 LICENSE Updating pointer to clause 3 in LE text to clause 2 as it should be. February 07, 2011
Octocat-spinner-32 META.in Remove mention of the removed syntax extensions from the META file February 20, 2013
Octocat-spinner-32 Makefile add a qtest-byte Makefile target April 04, 2014
Octocat-spinner-32 README.folders Update README.folders January 14, 2014
Octocat-spinner-32 README.md Update tests and documentation for dump February 25, 2014
Octocat-spinner-32 _oasis release 2.2.0 January 17, 2014
Octocat-spinner-32 _tags Remove all syntax extensions and estring November 21, 2012
Octocat-spinner-32 batteries_dev.el emacs mode: updating it to qtest2 February 19, 2012
Octocat-spinner-32 battop.ml Put version number in toplevel banner November 21, 2012
Octocat-spinner-32 check_raise add a style check for '@since NEXT_RELEASE' October 26, 2013
Octocat-spinner-32 myocamlbuild.ml More explicit overridding of ocamlbuild rules October 27, 2013
Octocat-spinner-32 ocamlinit Fix a typo in ocamlinit that prevents it from loading correctly. June 22, 2012
Octocat-spinner-32 plot benchmark: fingertrees or sequences in general February 18, 2012
Octocat-spinner-32 setup.ml bump version to 2.1 July 18, 2013
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.2.5
  • [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.