Module Db.Sparecode

module Sparecode: sig .. end

Interface for the unused code detection.


val get : (select_annot:bool -> select_slice_pragma:bool -> Project.t) Pervasives.ref

Remove in each function what isn't used to compute its outputs, or its annotations when select_annot is true, or its slicing pragmas when select_slice_pragmas is true.

val rm_unused_globals : (?new_proj_name:string -> ?project:Project.t -> unit -> Project.t)
Pervasives.ref

Remove unused global types and variables from the given project (the current one if no project given). The source project is not modified. The result is in the returned new project.