-
Notifications
You must be signed in to change notification settings - Fork 106
Home
thelema edited this page Sep 30, 2010
·
28 revisions
Welcome to the batteries-included wiki!
Installing Batteries documents how to install Batteries.
API documentation is available through github.
To get started using batteries after installation, ocamlbuild does a good job:
- Use a findlib-enabled myocamlbuild.ml
Copy this file into your project directory - Tell
ocamlbuild
to use batteries through a_tags
file:
<*>: pkg_batteries,pkg_threads
- Use
open Batteries
in your source files to allow referring toBatFoo
as justFoo
. This also integrates BatList and all other stdlib-extensions into the standard module names. - Compile with
ocamlbuild foo.byte
wherefoo
is the name of your main module.
If you’re already using OMake, add the following to your OMakefile:
OCAMLPACKS[] += batteries
OCAMLFLAGS += -thread
And if your project is really simple(one file), you can use findlib directly:
ocamlfind ocamlc -thread -package batteries -linkpkg foo.ml -o foo
Check out our [[RoadMap][RoadMap/Wishlist]] document to see some plans for future batteries