Module Ppxlib.Ast_builder

Ast_builder is a module to generate OCaml AST fragments. It provides a shorter syntax than directly using the Parsetree constructors, as well as a better stability than the constructors.

For a detailed explanation on this module, refer to the relevant part of the manual.

API

module Default : sig ... end

Helpers taking a ~loc argument. This module is meant to be opened or aliased.

module type Loc = sig ... end
module type S = sig ... end
module Make (Loc : Loc) : S

Build Ast helpers with the location argument factorized.

val make : Location.t -> (module S)

Functional version of Make.