Module Refactoring

module Core : sig ... end

A module containing core types and values common to (and importable by) all refactorings.

module Repr = Refactoring_repr
module Deps = Refactoring_deps

A module implementing the identity refactoring

val mk_repr : (string * string list) -> Repr.t

mk_repr r params returns a representation of the refactoring named r initialised with params. Raises Not_found if no such refactoring exists.

val of_repr : Repr.t -> (module Refactoring_sigs.Refactoring)

of_repr r returns a module that performs the refactoring described by r.

val get : (string * string list) -> (module Refactoring_sigs.Refactoring)

get r params is exactly of_repr (mk_repr r params).

apply r cb applies the refactoring described by r to the codebase cb and returns a pair of the resulting refactoring dependency set and a map giving the replacements to be applied to each source file.

apply_all rs cb applies the refactorings described by the representations in rs to the codebase cb and returns a pair of the resulting refactoring dependency set and a map giving the replacements to be applied to each source file.