forked from ocaml-batteries-team/batteries-included
/
README
63 lines (44 loc) · 1.83 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
*** Welcome to Batteries Included ***
OCaml Batteries Included: a community-maintained foundation library
for your OCaml projecs.
Batteries Included serves the following purposes:
* define a standard set of libraries which may be
expected on every compliant installation of OCaml
* organize these libraries into a hierarchy of modules,
with one source of documentation
* provide a consistent API for otherwise independent
libraries.
*** Building Batteries Included ***
**** Requirements ****
You will need
* OCaml >= 3.11
* OMake (http://omake.metaprl.org/index.html)
* Findlib (http://projects.camlcity.org/projects/findlib.html/)
* Camomile >= 0.7 (http://camomile.sourceforge.net/)
* OUnit to build and run the tests
**** Configuration and installation ****
To install the full version of OCaml Batteries Included in the default
directory (/usr/local/), execute
$ omake all
$ sudo omake install
[optional]
$ omake doc
$ sudo omake install-doc
To test your install, execute
$ omake test
*** 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.
*** 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 Included ***
See doc/batteries/GUIDELINES (may apply to AAA-batteries)