package codept-lib

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

Module UnitSource

Functions for handling unit (aka .ml/.mli) files

Sourcemodule Pth = Paths.Simple

Module abbreviations

Sourcetype precision =
  1. | Exact
  2. | Approx

Precision of the inferred module-level signature

Sourcetype 'ext t = {
  1. path : Namespaced.t;
    (*

    module path of the compilation unit

    *)
  2. src : Pkg.t;
    (*

    source file of the compilation unit

    *)
  3. kind : M2l.kind;
  4. precision : precision;
  5. code : M2l.t;
  6. more : 'ext;
}

Base type

Sourcetype ext = {
  1. signature : Module.signature;
  2. dependencies : Deps.t;
}

Extension for output type

Sourcetype 'ext base = 'ext t
Sourcetype s = unit t
Sourcetype u = ext t
Sourcetype r = u
Sourceval signature : r -> Module.signature
Sourceval deps : r -> Deps.t
Sourceval local_dependencies : r -> Deps.dep list
Sourceval update : Deps.t -> r -> r
Sourceval lift : Module.signature -> Deps.t -> s -> u

Conversion function between input and output types

Sourceval proj : u -> s
Sourceval read_file : Fault.handler -> Read.kind -> string -> Namespaced.t -> s

read_file polycy kind filename pth reads the file filename, extracting the corresponding m2l ast and associating it to the path pth. If the file is not synctatically valid Ocaml and syntax errors are not set to critical level in polycy, the approximative parser is used.

Sourceval pp : Format.formatter -> u -> unit

Pretty-printing function

Sourceval pp_input : Format.formatter -> s -> unit
Sourcetype 'a pair = {
  1. ml : 'a;
  2. mli : 'a;
}

Pair of implementation/interface units

Sourceval map : ('a -> 'b) pair -> 'a pair -> 'b pair
Sourceval unimap : ('a -> 'b) -> 'a pair -> 'b pair
Sourceval adder : ('a -> 'b -> 'b) -> 'b pair -> (M2l.kind * 'a) -> 'b pair
Sourcemodule Group : sig ... end

Group handles pair of ml/mli files together

Sourcemodule Set : Set.S with type elt = u

Unit sets

OCaml

Innovation. Community. Security.