package batteries
Install
Dune Dependency
Authors
Maintainers
Sources
md5=d02c4f044e53edca010de46f9139ce00
sha512=99a5afa3604c4cf0c849c670111d617f7f255acb0da043b73ddffdf0e299948bce52516ee31921f269de6088156c4e0a187e0b931543c6819c6b25966b303281
Description
Published: 15 Sep 2023
README
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.
Building Batteries
Requirements
You will need the following libraries:
OCaml >= 3.12.1
Findlib >= 1.5.3
GNU make
OUnit to build and run the tests (optional)
qtest >= 2.0.1 to build and run the tests (optional)
ocaml-benchmark to build and run the performance tests (optional)
Configuration and Installation
To install the full version of Batteries, execute
$ make all
$ make 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 Extlib
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 the guidelines wiki page.
If you use emacs, the file batteries_dev.el
has extra highlighting to support writing quicktests.
Dependencies (5)
- num
-
ocamlfind
>= "1.5.3"
- camlp-streams
-
ocaml
>= "4.02.3" & < "5.1.1"
-
dune
>= "2.7"
Dev Dependencies (4)
Used by (79)
- acp4
-
acpc
>= "2.0.0"
- bamboo
- bookaml
-
bst
>= "5.0.0"
- camlhighlight
- ccss
-
clangml
< "4.0.0"
-
clangml-transforms
< "0.24"
-
cpm
>= "4.0.0"
- csvprovider
-
daft
>= "0.0.4"
-
distributed
< "0.3.0"
-
earlybird
< "1.0.0"
-
electrumAnalyzer
< "0.3.5-2"
-
expect
>= "0.0.4"
- fasmifra
- fstar
- gen-bs
-
get_line
>= "4.0.0"
-
goblint
>= "2.0.0"
-
goblint-cil
>= "1.8.0" & < "2.0.0"
-
grib
< "0.11.0"
- gtk-light
- hdf
-
horned_worm
< "0.3.1"
- hts_shrink
- jasmin
-
jhupllib
>= "0.2.2"
-
jingoo
< "1.2.13"
- karamel
- kmt
-
kremlin
< "transition"
- lambdoc
- lbvs_consent
-
lilis
< "0.2.1"
- line_oriented
- linwrap
- liquid_syntax
- markdown
- merlin-acme
- modelica_ml
-
molenc
< "15.4.0" | >= "16.5.0"
- monadlib
- mutf8
- obandit
- obigstore
- odnnr
-
ogen
= "0.1.2"
- omlr
- oplsr
- oranger
- orf
-
orrandomForest
>= "3.0.0"
- orsvm_e1071
- orxgboost
- otetris
- pa_comprehension
- pardi
- pds-reachability
-
pgocaml
>= "1.7" & < "2.0"
- portia
- ppx_nanocaml
- profound
- rankers
-
redis
< "0.2.1"
- remu_ts
-
resource-pooling
< "0.2"
- simple-bmc
- sparrow
- spirv
-
sqlexpr
>= "0.5.5" & < "0.7.1"
- svmwrap
- telegraml
- testsimple
- typeid
-
ucorelib
>= "0.1.0"
-
vcardgen
>= "1.1"
-
yajl-extra
>= "0.7.3"