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.
BatBitSet Efficient bit sets.BatCache The data structure for a manual cache with keys 'a and values 'b.BatDeque Functional double-ended queuesBatDllist A mutable, imperative, circular, doubly linked list libraryBatDynArray Dynamic arrays.BatEnum Enumeration over abstract collection of elements.BatFingerTree This module implements a generic finger tree datastructure as described here: Finger Trees: A Simple General-purpose Data Structure http://www.soi.city.ac.uk/~ross/papers/FingerTree.pdfBatGlobal Mutable global variable.BatHashcons Hash consing of data structuresBatHeap Functional heaps over ordered typesBatIMap DIET Maps from integers, packed using rangesBatISet DIET : Discrete Interval Encoding TreesBatLazyList Lazy lists of elements.BatMultiPMap Polymorphic Multi-Map.BatRefList Reference on lists.BatSeq Sequence of elementsBatSplay Maps over ordered types based on splay trees.BatText Heavyweight strings ("ropes")BatUChar Unicode characters.BatUref Unifiable references using destructive union-findBatUTF8 UTF-8 encoded Unicode strings. The type is normal string.BatVect Extensible vectors with constant-time append/prepend.BatBase64 Base64 codec.BatCharParser Parsing character strings.BatFile File manipulation.BatInterfaces Common signatures for data structures.BatIO High-order abstract I/O.BatLog Simple loggingBatLogger Logging Library.BatNumber A common interface for numbers.BatOptParse Modules for GNU getopt(3)-style command line parsing.BatParserCo A simple parser combinator library.BatResult Monadic results of computations that can raise exceptionsBatReturn Local exceptions/labels/goto/return.BatBool Operations on booleansBatChar Operations on characters.BatFloat BatInt Operations on integers.BatInt32 32-bit integers.BatInt64 64-bit integers.BatNativeint Processor-native integers.BatOption Functions for the option type.BatRef Operations on references.BatTuple Tuples.BatUnit Operations on unit.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.
BatArray Array operations.BatBigarray Additional and modified functions for big arrays.BatBig_int Operations on arbitrary-precision integers.BatBuffer Extensible string buffers.BatBytes Byte sequence operations.BatComplex Additional and modified functions for complex numbers.BatDigest MD5 message digest.BatFormat BatGc Memory management control and statistics; finalised values.BatGenlex A generic lexical analyzer.BatHashtbl Extra functions over hashtables.BatLexing Simple lexing using ocaml conventionsBatList BatMap BatMarshal Marshaling of data structures.BatNum Operation on arbitrary-precision numbers.BatPervasives Additional functions.BatPrintexc Facilities for printing exceptions.BatPrintf BatQueue First-in first-out queues.BatRandom Pseudo-random number generators (PRNG).BatScanf Formatted input functions.BatSet Sets over ordered types.BatStack Last-in first-out stacks.BatStream Streams and stream parsersBatString String operations.BatSys System interface.BatUnix Low-level interface to the operating system (both Unix and Windows).These modules are available only when compiling with threads. To use them, do open BatteriesThread at the top of your code.
BatConcurrent Definition of concurrency primitives.BatMutex Locks for mutual exclusion.BatRMutex Reentrant MutexesThese 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.
BatBounded Bounded valuesBatOrd BatPathGen Filepath handling.BatSubstring BatAvlTree Internals of ISet and IMap, usable as generic tree libraryBatInnerIO Core of the BatIO module.BatInnerWeaktbl Weak hash table library for OCaml, with an interface compatible with the standard Hashtbl module.