package rocq-runtime
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=8d522602d23e7a665631826dab9aa92b
sha512=f4f76a6a178e421c99ee7a331a2fd97a06e9c5d0168d7e60c44e3820d8e1a124370ea104ad90c7f87a9a1e9d87b2d0d7d2d387c998feeaed4a75ed04e176a4be
doc/rocq-runtime.interp/Dumpglob/index.html
Module DumpglobSource
This file implements the Coq's .glob file format, which provides information about the objects that are defined and referenced from a Coq file.
The .glob file format is notably used by coqdoc and coq2html to generate links and other documentation meta-data.
Note that we consider this format a legacy one, and no stability guarantees are provided as of today, as we search to replace this format with a more structured and strongly-typed API.
However, we do provide up to date documentation about the format of .glob files below.
The .glob file format
.glob files contain a header, and then a list of entries, with one line per entry.
.glob header
The header consists of two lines:
DIGEST: %md5sum_of_file F%modpath
where %modpath is the fully-qualified module name of the library that the .glob file refers to. %md5sum_of_file may be NO if -dump-glob file was used.
.glob entries
There are 2 kinds of .glob entries:
- *definitions*: these entries correspond to definitions of inductives, functions, binders, notations. They are written as:
%kind %bc:%ec %secpath %name
where %kind is one of {ax,def,coe,subclass,canonstruc,ex,scheme,proj,inst,meth,defax,prfax,thm,prim,class,var,indrec,rec,corec,ind,variant,coind,constr,not,binder,lib,mod,modtype}, meaning:
axAxiom, Parameter or Variable(s), Hypothes,es, Context outside any sectiondefDefinitioncoeCoertionthmTheoremsubclassSub ClasscanonstrucCanonical DeclarationexExampleschemeSchemeclassClass declarationprojProjection from a structureinstInstancemethClass MethoddefaxDefinitional assumptionprfaxLogical assumptionprimPrimitivevarsection Variable reference (Variable,s, Hypothes,es, Context)indrecInductiverecInductive (variant)corecCoinductiveindRecordvariantRecord (variant)coindCoinductive RecordconstrConstructornotNotationbinderBinderlibRequiremodModule Reference (Import, Module start / end)modtypeModule Type
%bc and %ec are respectively the start and end byte locations in the file (0-indexed), multiple entries can share the same %bc and %ec %secpath the section path (or <> if no section path) and %name the name of the defined object, or also <> in where no name applies.
Section paths are ...
- In the case of notations,
%nameis encoded as:entry:scope:notation_keywhere_is used to replace spaces in the notation key,%entryis left empty if the notation entry isconstr, and similarly%scopeis empty if the corresponding notation has no associated scope.
- For binding variables,
:numberis added to distinguish uniquely different binding variables of the same name in a file.
- *references*: which identify the object a particular document piece of text points to; their format is:
R%bc:%ec %filepath %secpath %name %kind
where %bc, %ec, %name, and %kind are as the above; %filepath contains the file module path the object that the references lives in, whereas %name may contain non-file non-directory module names.
push_output o temporarily overrides the output location to o. The original output can be restored using pop_output
Restores the original output that was overridden by push_output
Alias for push_output NoGlob
Deprecated alias for pop_output
val dump_notation_location :
(int * int) list ->
Constrexpr.notation ->
(Notation.notation_location * Notation_term.scope_name option) ->
unitval dump_notation :
Constrexpr.notation CAst.t ->
Notation_term.scope_name option ->
bool ->
unitRegistration of constant information