package ocaml-migrate-parsetree

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

State a rewriter can access

type config = {
  1. tool_name : string;
  2. include_dirs : string list;
  3. load_path : string list;
  4. debug : bool;
  5. for_package : string option;
}
type cookies

Registering rewriters

type 'types rewriter = config -> cookies -> 'types Migrate_parsetree_versions.get_mapper
val register : name:string -> ?reset_args:(unit -> unit) -> ?args:(Arg.key * Arg.spec * Arg.doc) list -> 'types Migrate_parsetree_versions.ocaml_version -> 'types rewriter -> unit

Running registered rewriters

val run_as_ast_mapper : string list -> Ast_mapper.mapper
val run_as_ppx_rewriter : unit -> 'a
val run_main : unit -> 'a
OCaml

Innovation. Community. Security.