package rotor

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

Module Refactoring_deps

A module to represent a collection of dependencies between refactorings. We have a model where particular refactorings depend upon other refactorings being applied in order to be correct themselves. We also keep various metadata about these dependencies, including provenance information - i.e. what generated a particular dependency.

module type S = sig ... end

The signature for Dependency collections, of which this module is the canonical implementation.

include S with module Repr := Refactoring_repr
type t

The abstract type of a collection of refactoring dependencies.

type source = Compiler.Location.t

The source of a dependency.

type descr =
  1. | ModuleInclude
  2. | ModuleIsAliased
  3. | ModuleSubstitutedInSignature
  4. | SignatureInclude
  5. | SignatureIsAliased
  6. | InterfaceImplemented
  7. | FunctorApplied
  8. | ModuleIsFunctorArg
    (*

    The nature of the dependency - why was it generated?

    *)
type provenance = source * descr

Provenance of a dependency.

module Elt : sig ... end

The Elt submodule represents refactoring dependencies.

val empty : t

The empty collection of dependencies.

val add : Refactoring_repr.t -> Elt.t -> t -> t

add r d deps adds a dependency of r upon d arising from to deps and returns the resulting dependency collection.

val add_all : Refactoring_repr.t -> Elt.Set.t -> t -> t

add_all r ds deps adds a dependency of r upon each of the dependencies in ds to deps and returns the resulting dependency collection.

val merge : t -> t -> t

merges two collections of dependencies.

val equal : t -> t -> bool

Tests two collections of dependecies for equality.

val find : Refactoring_repr.t -> t -> Elt.Set.t

find r deps returns a set of all the dependencies of of r in deps.

val dependents : t -> Refactoring_repr.Set.t

The set of all dependents, i.e. all refactorings for which dependencies are registered.

OCaml

Innovation. Community. Security.