The OCaml Compiler API

Warning

This library is part of the internal OCaml compiler API, and is not the language standard library. There are no compatibility guarantees between releases, so code written against these modules must be willing to depend on specific OCaml compiler versions.

Ast_iterator

Ast_iterator.iterator enables AST inspection using open recursion.

CamlinternalMenhirLib
Ast_invariants

Check AST invariants

Ast_mapper

The interface of a -ppx rewriter

Printast

Raw printer for Parsetree

Builtin_attributes

Support for some of the builtin attributes

Pprintast

Pretty-printers for Parsetree

Parse

Entry points in the parser

Location

Source code locations (ranges of positions), used in parsetree

Ast_helper

Helpers to produce Parsetree fragments

Syntaxerr

Auxiliary type for reporting syntax errors

Attr_helper

Helpers for attributes

Asttypes

Auxiliary AST types used by parsetree and typedtree.

Lexer

The lexical analyzer

Longident

Long identifiers, used in parsetree.

Parser
Docstrings

Documentation comments

Parsetree

Abstract syntax tree produced by parsing

Depend

Module dependencies.

Terminfo

Basic interface to the terminfo database

Clflags

Command line flags

Arg_helper

Decipher command line arguments of the form <value> | <key>=<value>,...

Targetint

Target processor-native integers.

Profile

Compiler performance recording

Strongly_connected_components

Kosaraju's algorithm for strongly connected components.

Load_path

Management of include directories.

Build_path_prefix_map

Rewrite paths for reproducible builds

Identifiable

Uniform interface for common data structures over various things.

Ccomp

Compiling C files and building C libraries

Misc

Miscellaneous useful types and functions

Numbers

Modules about numbers, some of which satisfy Identifiable.S.

Consistbl

Consistency tables: for checking consistency of module CRCs

Warnings

Warning definitions

Config

System configuration

Typemod

Type-checking of the module language and typed ast plugin hooks

Simplif

Lambda simplification and lambda plugin hooks

Pparse

Driver for the parser, external preprocessors and ast plugin hooks