Batteries user guide

OCaml Batteries Included documentation.

OCaml Batteries included (or simply "Batteries") is a community-driven effort to standardize on an consistent, documented, and comprehensive development platform for the OCaml programming language.

For the moment, Batteries Included concentrates on:

For more information on the installation of Batteries Included, please read the Installation guide and for an example using it in different build systems, we have the 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 opened. 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 website, Git repo, and our Issue tracker.

New Data Structures in Batteries

New Modules in Batteries

Builtin Types as Modules

Extensions to the Standard Library

These modules have base library equivalents. When using open Batteries, BatFoo will replace Foo, so that the new functions are easily available without a Bat prefix on the module name. As well, BatPervasives is opened into the global namespace. Finally, the previous versions of replaced modules are available in the Legacy module, i.e. Legacy.Unix and Legacy.Pervasives.

These modules are available only when compiling with threads. To use them, do open BatteriesThread at the top of your code.

Incubator

These modules are available only inside Batteries.Incubator. Their interface is not guaranteed stable, and may be changed at any time, including with backwards incompatible changes between point releases. They are included for testing and stabilization until they can be finalized and moved to batteries proper.

Internal Modules