package rotor
Install
Dune Dependency
Authors
Maintainers
Sources
md5=372ca9b6a7af2fdd99d5117d376870b4
sha512=6f5473951437a48bf9ae7a5d22a4283c02bed6a6e5c7bc02fc5f28dc5c28720f3e2c69f32a2a0c5b9447c2bc8c83746bb4de5b67909a98cc8921527582727063
doc/rotor/Refactoring/index.html
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
module Identity : Refactoring_sigs.Refactoring
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)
.
val apply :
Repr.t ->
?filedeps:Fileinfos.Graph.t ->
Codebase.t ->
Deps.t * Refactoring_sigs.result Fileinfos.Map.t
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.
val apply_all :
Repr.Set.t ->
?filedeps:Fileinfos.Graph.t ->
Codebase.t ->
Deps.t * Refactoring_sigs.result Fileinfos.Map.t
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.