# The core library

This chapter describes the functions provided by the Caml Light core library. This library is special in two ways:

- It is automatically linked with the user's object code files by the `camlc` command (chapter 5). Hence, the globals defined by these libraries can be used in standalone programs without having to add any `.zo` file on the command line for the linking phase. Similarly, in interactive use, these globals can be used in toplevel phrases without having to load any `.zo` file in memory.

- The interfaces for the modules below are automatically ``opened'' when a compilation starts, or when the toplevel system is launched. Hence, it is possible to use unqualified identifiers to refer to the functions provided by these modules, without adding `#open` directives. Actually, the list of automatically opened modules depend on the `-O` option given to the compiler or to the toplevel system:

  `-O` option | Opened modules (reverse opening order)
  --- | ---
  `-O cautious` (default) | `io`, `eq`, `int`, `float`, `ref`, `pair`, `list`, `vect`, `char`, `string`, `bool`, `exc`, `stream`, `builtin`
  `-O fast` | `io`, `eq`, `int`, `float`, `ref`, `pair`, `list`, `fvect`, `fchar`, `fstring`, `bool`, `exc`, `stream`, `builtin`
  `-O none` | `builtin`

- Conventions
- `bool`: boolean operations
- `builtin`: base types and constructors
- `char`: character operations
- `eq`: generic comparisons
- `exc`: exceptions
- `fchar`: character operations, without sanity checks
- `float`: operations on floating-point numbers
- `fstring`: string operations, without sanity checks
- `fvect`: operations on vectors, without sanity checks
- `int`: operations on integers
- `io`: buffered input and output
- `list`: operations on lists
- `pair`: operations on pairs
- `ref`: operations on references
- `stream`: operations on streams
- `string`: string operations
- `vect`: operations on vectors