package codept-lib

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

Module ModuleSource

Sourcemodule Arg : sig ... end

Arg submodule for functor arguments

Sourcemodule Divergence : sig ... end

Every time a module with an unknown signature is opened, it can possibly shadows all modules present in the current, or none. The Divergence module is use to store information about such divergence point, in order to be able to pinpoint to the user the exact moment where dependency computation might have gone awry.

Sourcemodule Origin : sig ... end

Module origin

Sourcetype origin = Origin.t

Type-level tags

Sourcetype extended = private
  1. | Extended
Sourcetype simple = private
  1. | Simple
Sourcetype tracked_signature = {
  1. origin : Origin.t;
  2. signature : signature;
}

Signature with tracked origin

Sourceand _ ty =
  1. | Sig : tracked_signature -> 'any ty
    (*

    Classic module

    *)
  2. | Alias : {
    1. path : Namespaced.t;
      (*

      Path.To.Target: projecting this path may create new dependencies

      *)
    2. phantom : Divergence.t option;
      (*

      Track potential delayed dependencies after divergent accident:

        module M = A  (* Alias { name = M; path = [A] } *)
        open Unknownable (* <- divergence *)
        open M (* Alias{ phantom = Some divergence } *)

      In the example above, M could be the local module .M, triggering the delayed alias dependency A. Or it could be a submodule Unknownable.M. Without sufficient information, codept defaults to computing an upper bound of dependencies, and therefore considers that M is .M, and the inferred dependencies for the above code snipet is {A,Unknowable} .

      *)
    } -> extended ty
  3. | Abstract : Id.t -> 'any ty
    (*

    Abstract module type may be refined during functor application, keeping track of their identity is thus important

    *)
  4. | Fun : 'a ty Arg.t option * 'a ty -> 'a ty
  5. | Namespace : dict -> extended ty
    (*

    Namespace are open bundle of modules

    *)

Core module or alias

Sourceand definition = {
  1. modules : dict;
  2. module_types : dict;
}
Sourceand signature =
  1. | Blank
    (*

    Unknown signature, used as for extern module, placeholder, …

    *)
  2. | Exact of definition
  3. | Divergence of {
    1. point : Divergence.t;
    2. before : signature;
    3. after : definition;
    }
    (*

    A divergent signature happens when a signature inference is disturbed by opening or including an unknowable module: module A = … include Extern (* <- divergence *) module B = A (* <- which A is this: .A or Extern.A ?*)

    *)
Sourceand dict = t Name.map
Sourcetype sty = simple ty
Sourcetype named = Name.t * t
Sourcetype level =
  1. | Module
  2. | Module_type
Sourcetype modul_ = t
Sourceval is_exact : t -> bool

Helper function

Sourceval is_functor : t -> bool
Sourcemodule Dict : sig ... end
Sourceval spirit_away : Divergence.t -> t -> t

transform to a ghost module

Sourceval empty : 'a Name.map
Sourceval create : ?origin:origin -> signature -> tracked_signature
Sourceval with_namespace : Paths.S.t -> Name.t -> t -> named
Sourceval namespace : Namespaced.t -> named
Sourceval aliases : t -> Namespaced.t list
Sourceval mockup : ?origin:Origin.t -> ?path:Pkg.t -> Name.t -> tracked_signature

Create a mockup module with empty signature

Printers

Sourceval pp : Format.formatter -> t -> unit
Sourceval reflect : Format.formatter -> t -> unit
Sourceval pp_signature : Format.formatter -> signature -> unit
Sourceval reflect_signature : Format.formatter -> signature -> unit
Sourceval reflect_modules : Format.formatter -> dict -> unit
Sourceval pp_alias : Format.formatter -> Paths.Expr.t option -> unit
Sourceval pp_level : Format.formatter -> level -> unit
Sourceval pp_mdict : Format.formatter -> dict -> unit
Sourceval pp_pair : Format.formatter -> (string * t) -> unit
Sourceval pp_arg : Format.formatter -> t Arg.t -> unit
Sourcemodule Schema : sig ... end
Sourcemodule Def : sig ... end

Helper functions for definitions

Sourcemodule Equal : sig ... end

Equalities

Sourcemodule Sig : sig ... end

Helper functions for signature

Sourcemodule Partial : sig ... end

Anonymous module and other partial definitions

Sourcemodule Namespace : sig ... end
OCaml

Innovation. Community. Security.