package batteries
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=1fd7bddce07cf5d244fc9427f7b5e4d4
sha512=c0f2a0fdc8253e0ea999d8d4c58bfbf32b18d251a2e1d9656bf279de5f01a33e9aabac3af4d95f465f8b671e7711ebd37218043face233340a0c11b08fa62f78
doc/index.html
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:
- data structures
- file manipulation
- inputs and outputs
- concurrency
- numbers
- text, including Unicode
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
BatBitSetEfficient bit sets.BatCacheBatDequeFunctional double-ended queuesBatDllistA mutable, imperative, circular, doubly linked list libraryBatDynArrayDynamic arrays.BatEnumEnumeration over abstract collection of elements.BatFingerTreeThis 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.pdfBatGlobalMutable global variable.BatHashconsHash consing of data structuresBatHeapFunctional heaps over ordered typesBatIMapDIET Maps from integers, packed using rangesBatISetDIET : Discrete Interval Encoding TreesBatLazyListLazy lists of elements.BatMultiPMapPolymorphic Multi-Map.BatRefListReference on lists.BatSeqSequence of elementsBatSplayMaps over ordered types based on splay trees.BatTextHeavyweight strings ("ropes")BatUCharUnicode characters.BatUrefUnifiable references using destructive union-findBatUTF8UTF-8 encoded Unicode strings. The type is normal string.BatVectExtensible vectors with constant-time append/prepend.
New Modules in Batteries
BatBase64Base64 codec.BatCharParserParsing character strings.BatFileFile manipulation.BatInterfacesCommon signatures for data structures.BatIOHigh-order abstract I/O.BatLogBatLoggerBatNumberA common interface for numbers.BatOptParseModules for GNUgetopt(3)-style command line parsing.BatParserCoA simple parser combinator library.BatResultMonadic results of computations that can raise exceptionsBatReturnLocal exceptions/labels/goto/return.
Builtin Types as Modules
BatBoolOperations on booleansBatCharOperations on characters.BatFloatBatIntOperations on integers.BatInt32BatInt6464-bit integers.BatNativeintProcessor-native integers.BatOptionFunctions for the option type.BatRefOperations on references.BatTupleTuples.BatUnitOperations onunit.
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.
BatArrayBatBigarrayAdditional and modified functions for big arrays.BatBig_intOperations on arbitrary-precision integers.BatBufferExtensible string buffers.BatComplexAdditional and modified functions for complex numbers.BatDigestBatFormatBatGcMemory management control and statistics; finalised values.BatGenlexA generic lexical analyzer.BatHashtblExtra functions over hashtables.BatLexingSimple lexing using ocaml conventionsBatListBatMapBatMarshalMarshaling of data structures.BatNumOperation on arbitrary-precision numbers.BatPervasivesBatPrintexcFacilities for printing exceptions.BatPrintfBatQueueFirst-in first-out queues.BatRandomPseudo-random number generators (PRNG).BatScanfFormatted input functions.BatSetSets over ordered types.BatStackLast-in first-out stacks.BatStreamStreams and stream parsersBatStringString operations.BatSysSystem interface.BatUnixLow-level interface to the operating system (both Unix and Windows).
Thread-related Modules
These modules are available only when compiling with threads. To use them, do open BatteriesThread at the top of your code.
BatConcurrentDefinition of concurrency primitives.BatMutexLocks for mutual exclusion.BatRMutexReentrant Mutexes
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.
BatBoundedBounded valuesBatOrdBatPathGenFilepath handling.BatSubstring
Internal Modules
BatAvlTreeInternals of ISet and IMap, usable as generic tree libraryBatInnerIOCore of the BatIO module.BatInnerWeaktblWeak hash table library for OCaml, with an interface compatible with the standard Hashtbl module.