Skip to content
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:

  1. Use a findlib-enabled myocamlbuild.ml
    Copy this file into your project directory
  2. Tell ocamlbuild to use batteries through a _tags file:
    <*>: pkg_batteries,pkg_threads
  3. Use open Batteries in your source files to allow referring to BatFoo as just Foo. This also integrates BatList and all other stdlib-extensions into the standard module names.
  4. Compile with ocamlbuild foo.byte where foo 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

Clone this wiki locally