package coq-core

  1. Overview
  2. Docs
The Coq Proof Assistant -- Core Binaries and Tools

Install

Dune Dependency

Authors

Maintainers

Sources

coq-8.18.0.tar.gz
md5=8d852367b54f095d9fbabd000304d450
sha512=46922d5f2eb6802a148a52fd3e7f0be8370c93e7bc33cee05cf4a2044290845b10ccddbaa306f29c808e7c5019700763e37e45ff6deb507b874a4348010fed50

doc/coq-core.vernac/Declaremods/index.html

Module DeclaremodsSource

Modules

Rigid / flexible module signature

Sourcetype 'a module_signature =
  1. | Enforce of 'a
    (*

    ... : T

    *)
  2. | Check of 'a list
    (*

    ... <: T1 <: T2, possibly empty

    *)

Which module inline annotations should we honor, either None or the ones whose level is less or equal to the given integer

Sourcetype inline =
  1. | NoInline
  2. | DefaultInline
  3. | InlineAt of int

Kinds of modules

Sourcetype module_params = (Names.lident list * (Constrexpr.module_ast * inline)) list
Sourcetype module_params_expr = (Names.MBId.t list * module_expr) list
Libraries i.e. modules on disk
Sourcetype library_name = Names.DirPath.t
Sourcetype library_objects
Sourcemodule Synterp : sig ... end
Sourcemodule Interp : sig ... end

declare_module id fargs typ exprs declares module id, from functor arguments fargs, with final type typ. exprs is usually of length 1 (Module definition with a concrete body), but it could also be empty ("Declare Module", with non-empty typ), or multiple (body of the shape M <+ N <+ ...).

Sourceval start_library : library_name -> unit
Sourceval append_end_library_hook : (unit -> unit) -> unit

append a function to be executed at end_library

...

iter_all_interp_segments iterate over all segments, the modules' segments first and then the current segment. Modules are presented in an arbitrary order. The given function is applied to all leaves (together with their section path). Ignores synterp objects.

Sourceval iter_all_interp_segments : (Nametab.object_prefix -> Libobject.t -> unit) -> unit
Sourceval debug_print_modtab : unit -> Pp.t

For printing modules, process_module_binding adds names of bound module (and its components) to Nametab. It also loads objects associated to it. It may raise a Failure when the bound module hasn't an atomic type.

Sourceval process_module_binding : Names.MBId.t -> (Constr.t * Univ.AbstractContext.t option) Declarations.module_alg_expr -> unit

Compatibility layer

Sourceval import_module : Libobject.open_filter -> export:Lib.export_flag -> Names.ModPath.t -> unit
Sourceval end_module : unit -> Names.ModPath.t
Sourceval end_modtype : unit -> Names.ModPath.t
Sourceval declare_include : (Constrexpr.module_ast * inline) list -> unit
OCaml

Innovation. Community. Security.