aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar pboutill <pboutill@85f007b7-540e-0410-9357-904b9bb8a0f7>2010-04-29 09:56:37 +0000
committerGravatar pboutill <pboutill@85f007b7-540e-0410-9357-904b9bb8a0f7>2010-04-29 09:56:37 +0000
commitf73d7c4614d000f068550b5144d80b7eceed58e9 (patch)
tree4fa9a679a6e55269cc5c7cf24fce725acb2574b5
parent552e596e81362e348fc17fcebcc428005934bed6 (diff)
Move from ocamlweb to ocamdoc to generate mli documentation
dev/ocamlweb-doc has been erased. I hope no one still use the "new-parse" it generate. In dev/, make html will generate in dev/html/ "clickable version of mlis". (as the caml standard library) make coq.pdf will generate nearly the same awfull stuff that coq.ps was. make {kernel,lib,parsing,..}.{dot,png} will do the dependancy graph of the given directory. ocamldoc comment syntax is here : http://caml.inria.fr/pub/docs/manual-ocaml/manual029.html The possibility to put graphs in pdf/html seems to be lost. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12969 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--dev/Makefile53
-rw-r--r--dev/docintro50
-rw-r--r--dev/html/style.css220
-rw-r--r--dev/ocamlweb-doc/Makefile90
-rw-r--r--dev/ocamlweb-doc/ast.ml47
-rw-r--r--dev/ocamlweb-doc/intro.tex25
-rw-r--r--dev/ocamlweb-doc/lex.mll81
-rw-r--r--dev/ocamlweb-doc/macros.tex7
-rw-r--r--dev/ocamlweb-doc/parse.ml183
-rw-r--r--dev/ocamlweb-doc/preamble.tex8
-rw-r--r--dev/ocamlweb-doc/syntax.mly224
-rw-r--r--interp/constrextern.mli36
-rw-r--r--interp/constrintern.mli55
-rw-r--r--interp/coqlib.mli83
-rw-r--r--interp/dumpglob.mli18
-rw-r--r--interp/genarg.mli44
-rw-r--r--interp/implicit_quantifiers.mli20
-rw-r--r--interp/modintern.mli20
-rw-r--r--interp/notation.mli84
-rw-r--r--interp/ppextend.mli20
-rw-r--r--interp/reserve.mli14
-rw-r--r--interp/smartlocate.mli28
-rw-r--r--interp/syntax_def.mli18
-rw-r--r--interp/topconstr.mli97
-rw-r--r--kernel/cbytecodes.mli85
-rw-r--r--kernel/cbytegen.mli8
-rw-r--r--kernel/cemitcodes.mli5
-rw-r--r--kernel/closure.mli78
-rw-r--r--kernel/conv_oracle.mli24
-rw-r--r--kernel/cooking.mli18
-rw-r--r--kernel/declarations.mli132
-rw-r--r--kernel/entries.mli39
-rw-r--r--kernel/environ.mli126
-rw-r--r--kernel/esubst.mli33
-rw-r--r--kernel/indtypes.mli23
-rw-r--r--kernel/inductive.mli55
-rw-r--r--kernel/mod_subst.mli48
-rw-r--r--kernel/mod_typing.mli16
-rw-r--r--kernel/modops.mli20
-rw-r--r--kernel/names.mli68
-rw-r--r--kernel/pre_env.mli28
-rw-r--r--kernel/reduction.mli36
-rw-r--r--kernel/retroknowledge.mli42
-rw-r--r--kernel/safe_typing.mli46
-rw-r--r--kernel/sign.mli43
-rw-r--r--kernel/subtyping.mli16
-rw-r--r--kernel/term.mli336
-rw-r--r--kernel/term_typing.mli16
-rw-r--r--kernel/type_errors.mli22
-rw-r--r--kernel/typeops.mli52
-rw-r--r--kernel/univ.mli45
-rw-r--r--kernel/vconv.mli20
-rw-r--r--kernel/vm.mli29
-rw-r--r--lib/bigint.mli20
-rw-r--r--lib/dnet.mli54
-rw-r--r--lib/dyn.mli16
-rw-r--r--lib/envars.mli17
-rw-r--r--lib/explore.mli22
-rw-r--r--lib/flags.mli34
-rw-r--r--lib/fmap.mli2
-rw-r--r--lib/gmap.mli18
-rw-r--r--lib/gmapl.mli16
-rw-r--r--lib/gset.mli16
-rw-r--r--lib/hashcons.mli18
-rw-r--r--lib/heap.mli38
-rw-r--r--lib/option.mli18
-rw-r--r--lib/pp.mli43
-rw-r--r--lib/pp_control.mli20
-rw-r--r--lib/predicate.mli36
-rw-r--r--lib/profile.mli40
-rw-r--r--lib/rtree.mli47
-rw-r--r--lib/segmenttree.mli2
-rw-r--r--lib/system.mli29
-rw-r--r--lib/tlm.mli20
-rw-r--r--lib/tries.mli4
-rw-r--r--lib/util.mli116
-rw-r--r--library/decl_kinds.mli38
-rw-r--r--library/declare.mli40
-rw-r--r--library/declaremods.mli44
-rw-r--r--library/decls.mli16
-rw-r--r--library/dischargedhypsmap.mli21
-rw-r--r--library/global.mli39
-rw-r--r--library/goptions.mli42
-rw-r--r--library/heads.mli20
-rw-r--r--library/impargs.mli32
-rw-r--r--library/lib.mli76
-rw-r--r--library/libnames.mli66
-rw-r--r--library/libobject.mli25
-rw-r--r--library/library.mli48
-rw-r--r--library/nameops.mli28
-rwxr-xr-xlibrary/nametab.mli68
-rw-r--r--library/states.mli23
-rw-r--r--library/summary.mli16
-rw-r--r--parsing/egrammar.mli22
-rw-r--r--parsing/extend.mli28
-rw-r--r--parsing/extrawit.mli18
-rw-r--r--parsing/g_intsyntax.mli16
-rw-r--r--parsing/g_natsyntax.mli16
-rw-r--r--parsing/g_zsyntax.mli16
-rw-r--r--parsing/lexer.mli18
-rw-r--r--parsing/pcoq.mli74
-rw-r--r--parsing/ppconstr.mli16
-rw-r--r--parsing/pptactic.mli18
-rw-r--r--parsing/ppvernac.mli14
-rw-r--r--parsing/prettyp.mli27
-rw-r--r--parsing/printer.mli38
-rw-r--r--parsing/printmod.mli16
-rw-r--r--parsing/q_util.mli14
-rw-r--r--parsing/tactic_printer.mli18
-rw-r--r--pretyping/cases.mli18
-rw-r--r--pretyping/cbv.mli31
-rw-r--r--pretyping/classops.mli50
-rw-r--r--pretyping/coercion.mli32
-rw-r--r--pretyping/detyping.mli28
-rw-r--r--pretyping/evarconv.mli22
-rw-r--r--pretyping/evarutil.mli81
-rw-r--r--pretyping/evd.mli96
-rw-r--r--pretyping/indrec.mli30
-rw-r--r--pretyping/inductiveops.mli37
-rw-r--r--pretyping/matching.mli40
-rw-r--r--pretyping/namegen.mli46
-rw-r--r--pretyping/pattern.mli28
-rw-r--r--pretyping/pretype_errors.mli36
-rw-r--r--pretyping/pretyping.mli44
-rwxr-xr-xpretyping/recordops.mli46
-rw-r--r--pretyping/reductionops.mli62
-rw-r--r--pretyping/retyping.mli22
-rw-r--r--pretyping/tacred.mli49
-rw-r--r--pretyping/term_dnet.mli48
-rw-r--r--pretyping/termops.mli86
-rw-r--r--pretyping/typeclasses.mli34
-rw-r--r--pretyping/typeclasses_errors.mli20
-rw-r--r--pretyping/typing.mli30
-rw-r--r--pretyping/unification.mli28
-rw-r--r--pretyping/vnorm.mli18
-rw-r--r--proofs/clenv.mli88
-rw-r--r--proofs/clenvtac.mli20
-rw-r--r--proofs/evar_refiner.mli20
-rw-r--r--proofs/logic.mli24
-rw-r--r--proofs/pfedit.mli83
-rw-r--r--proofs/proof_type.mli48
-rw-r--r--proofs/redexpr.mli27
-rw-r--r--proofs/refiner.mli74
-rw-r--r--proofs/tacmach.mli26
-rw-r--r--proofs/tactic_debug.mli42
-rw-r--r--tactics/auto.mli77
-rw-r--r--tactics/autorewrite.mli24
-rw-r--r--tactics/btermdn.mli18
-rw-r--r--tactics/contradiction.mli16
-rw-r--r--tactics/dhyp.mli18
-rw-r--r--tactics/dn.mli5
-rw-r--r--tactics/eauto.mli18
-rw-r--r--tactics/elim.mli18
-rw-r--r--tactics/elimschemes.mli20
-rw-r--r--tactics/eqschemes.mli22
-rw-r--r--tactics/evar_tactics.mli14
-rw-r--r--tactics/extraargs.mli16
-rw-r--r--tactics/extratactics.mli14
-rw-r--r--tactics/hiddentac.mli32
-rw-r--r--tactics/hipattern.mli62
-rw-r--r--tactics/inv.mli16
-rw-r--r--tactics/nbtermdn.mli18
-rw-r--r--tactics/refine.mli14
-rw-r--r--tactics/tacinterp.mli54
-rw-r--r--tactics/tacticals.mli66
-rw-r--r--tactics/tactics.mli90
-rw-r--r--tactics/termdn.mli32
-rw-r--r--toplevel/auto_ind_decl.mli25
-rw-r--r--toplevel/autoinstance.mli28
-rw-r--r--toplevel/cerrors.mli18
-rw-r--r--toplevel/class.mli28
-rw-r--r--toplevel/classes.mli46
-rw-r--r--toplevel/command.mli63
-rw-r--r--toplevel/coqinit.mli16
-rw-r--r--toplevel/coqtop.mli18
-rw-r--r--toplevel/discharge.mli14
-rw-r--r--toplevel/himsg.mli18
-rw-r--r--toplevel/ind_tables.mli28
-rw-r--r--toplevel/indschemes.mli32
-rw-r--r--toplevel/lemmas.mli31
-rw-r--r--toplevel/libtypes.mli32
-rw-r--r--toplevel/metasyntax.mli32
-rw-r--r--toplevel/mltop.mli40
-rw-r--r--toplevel/record.mli30
-rw-r--r--toplevel/search.mli20
-rw-r--r--toplevel/toplevel.mli38
-rw-r--r--toplevel/usage.mli22
-rw-r--r--toplevel/vernac.mli26
-rw-r--r--toplevel/vernacentries.mli25
-rw-r--r--toplevel/vernacinterp.mli18
-rw-r--r--toplevel/whelp.mli16
191 files changed, 3547 insertions, 3986 deletions
diff --git a/dev/Makefile b/dev/Makefile
new file mode 100644
index 000000000..4693bd136
--- /dev/null
+++ b/dev/Makefile
@@ -0,0 +1,53 @@
+include ../config/Makefile
+
+LOCALINCLUDES=-I ../config -I ../tools -I ../tools/coqdoc \
+ -I ../scripts -I ../lib -I ../kernel -I ../kernel/byterun -I ../library \
+ -I ../proofs -I ../tactics -I ../pretyping \
+ -I ../interp -I ../toplevel -I ../parsing -I ../ide/utils -I ../ide \
+ -I ../plugins/omega -I ../plugins/romega \
+ -I ../plugins/ring -I ../plugins/dp -I ../plugins/setoid_ring \
+ -I ../plugins/xml -I ../plugins/extraction \
+ -I ../plugins/fourier -I ../plugins/cc \
+ -I ../plugins/funind -I ../plugins/firstorder \
+ -I ../plugins/field -I ../plugins/subtac -I ../plugins/rtauto \
+ -I ../plugins/recdef
+
+MLINCLUDES=$(LOCALINCLUDES) -I $(MYCAMLP4LIB)
+
+MLIS=$(wildcard ../lib/*.mli ../kernel/*.mli ../library/*.mli \
+ ../pretyping/*.mli ../interp/*.mli \
+ ../parsing/*.mli ../proofs/*.mli \
+ ../tactics/*.mli ../toplevel/*.mli)
+
+all:: html coq.pdf
+
+newsyntax.dvi: newsyntax.tex
+ latex $<
+ latex $<
+
+coq.dvi: coq.tex
+ latex coq
+ latex coq
+
+coq.tex::
+ ocamldoc -latex -rectypes -I /usr/lib/ocaml/camlp5 $(MLINCLUDES)\
+ $(MLIS) -t "Coq mlis documentation" -intro docintro -o coq.tex
+
+html::
+ ocamldoc -html -rectypes -I /usr/lib/ocaml/camlp5 $(MLINCLUDES)\
+ $(MLIS) -d html -colorize-code \
+ -t "Coq mlis documentation" -intro docintro -css-style style.css
+
+%.dot: ../%
+ ocamldoc -rectypes $(MLINCLUDES) -t $* -dot -dot-reduce ../$*/*.ml ../$*/*.mli -o $@
+
+%.png: %.dot
+ dot -Tpng $< -o $@
+
+clean::
+ rm -f *~ *.log *.aux
+
+.SUFFIXES: .tex .png
+
+%.pdf: %.tex
+ pdflatex $< && pdflatex $< \ No newline at end of file
diff --git a/dev/docintro b/dev/docintro
new file mode 100644
index 000000000..3d37d5374
--- /dev/null
+++ b/dev/docintro
@@ -0,0 +1,50 @@
+{!indexlist}
+
+This is Coq, a proof assistant for the Calculus of Inductive Construction.
+This document describes the implementation of Coq.
+It has been automatically generated from the source of
+Coq using ocamldoc, a literate programming tool for
+Objective Caml freely available at http://caml.inria.fr/.
+The source files are organized in several directories ordered like that:
+
+{ol {- Utility libraries : lib
+
+describes the various utility libraries used in the code
+of Coq.}
+{- Kernel : kernel
+
+describes the \Coq\ kernel, which is a type checker for the Calculus
+of Inductive Construction.}
+{- Library : library
+
+describes the Coq library, which is made of two parts:
+- a general mechanism to keep a trace of all operations and of
+ the state of the system, with backtrack capabilities;
+- a global environment for the CCI, with functions to export and
+ import compiled modules.
+
+}
+{- Pretyping : pretyping
+
+}
+{- Front abstract syntax of terms : interp
+
+describes the translation from Coq context-dependent
+front abstract syntax of terms {v front v} to and from the
+context-free, untyped, raw form of constructions {v rawconstr v}.}
+{- Parsers and printers : parsing
+
+describes the implementation of the \Coq\ parsers and printers.}
+{- Proof engine : proofs
+
+describes the Coq proof engine, which is also called
+the ``refiner'', since it provides a way to build terms by successive
+refining steps. Those steps are either primitive rules or higher-level
+tactics.}
+{- Tacticts : tactics
+
+describes the Coq main tactics.}
+{- Toplevel : toplevel
+
+describes the highest modules of the Coq system.}
+}
diff --git a/dev/html/style.css b/dev/html/style.css
new file mode 100644
index 000000000..b8f02a15f
--- /dev/null
+++ b/dev/html/style.css
@@ -0,0 +1,220 @@
+a:visited {
+ color: #416DFF; text-decoration: none;
+}
+
+a:link {
+ color: #416DFF; text-decoration: none;
+}
+
+a:hover {
+ color: Red; text-decoration: none; background-color: #5FFF88
+}
+
+a:active {
+ color: Red; text-decoration: underline;
+}
+
+.keyword {
+ font-weight: bold; color: Red
+}
+
+.keywordsign {
+ color: #C04600
+}
+
+.superscript {
+ font-size: 4
+}
+
+.subscript {
+ font-size: 4
+}
+
+.comment {
+ color: Green
+}
+
+.constructor {
+ color: Blue
+}
+
+.type {
+ color: #5C6585
+}
+
+.string {
+ color: Maroon
+}
+
+.warning {
+ color: Red; font-weight: bold
+}
+
+.info {
+ margin-left: 3em; margin-right: 3em
+}
+
+.param_info {
+ margin-top: 4px; margin-left: 3em; margin-right: 3em
+}
+
+.code {
+ color: #465F91;
+}
+
+h1 {
+ font-size: 20pt; text-align: center;
+}
+
+h5, h6, div.h7, div.h8, div.h9 {
+ font-size: 20pt;
+ border: 1px solid #000000;
+ margin-top: 5px;
+ margin-bottom: 2px;
+ text-align: center;
+ padding: 2px;
+}
+
+h5 {
+ background-color: #90FDFF;
+}
+
+h6 {
+ background-color: #016699;
+ color: white;
+}
+
+div.h7 {
+ background-color: #E0FFFF;
+}
+
+div.h8 {
+ background-color: #F0FFFF;
+}
+
+div.h9 {
+ background-color: #FFFFFF;
+}
+
+.typetable, .indextable, .paramstable {
+ border-style: hidden;
+}
+
+.paramstable {
+ padding: 5pt 5pt;
+}
+
+body {
+ background-color: white;
+}
+
+tr {
+ background-color: white;
+}
+
+td.typefieldcomment {
+ background-color: #FFFFFF;
+ font-size: smaller;
+}
+
+pre {
+ margin-bottom: 4px;
+}
+
+div.sig_block {
+ margin-left: 2em;
+}
+
+
+h2 {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 16pt;
+ font-weight: normal;
+ border-bottom: 1px solid #dadada;
+ border-top: 1px solid #dadada;
+ color: #101010;
+ background: #eeeeff;
+ margin: 25px 0px 10px 0px;
+ padding: 1px 1px 1px 1px;
+}
+
+h3 {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 12pt;
+ color: #016699;
+ font-weight: bold;
+ padding: 15px 0 0 0ex;
+ margin: 5px 0 0 0;
+}
+
+h4 {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 10pt;
+ color: #016699;
+ padding: 15px 0 0 0ex;
+ margin: 5px 0 0 0;
+}
+
+/* Here starts the overwrite of default rules to give a better look */
+
+body {
+ font-family: Calibri, Georgia, Garamond, Baskerville, serif;
+ font-size: 12pt;
+ background-color: white;
+}
+
+a:link, a {
+ color: #6895c3 !important;
+}
+
+a:hover {
+ color: #2F4459 !important;
+ background-color: white;
+}
+
+hr {
+ height: 1px;
+ color: #016699;
+ background-color: #016699;
+ border-width: 0;
+}
+
+h1, h1 a:link, h1 a:visited, h1 a {
+ font-family: Cambria, Georgia, Garamond, Baskerville, serif;
+ color: #016699;
+}
+
+.navbar {
+ float: left;
+}
+
+.navbar a, .navbar a:link, .navbar a:visited {
+ color: #016699;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: bold;
+ font-size: 80%;
+}
+
+.keyword {
+ color: #c13939;
+}
+
+.constructor {
+ color: #3c8f7e;
+}
+
+pre, code {
+ font-family: "DejaVu Sans Mono", "Bitstream Vera Mono", "Courrier New", monospace;
+ white-space: normal;
+ font-size: 9pt;
+ font-weight: bold;
+}
+
+.type br {
+ display: none;
+}
+
+.info {
+ margin-left: 1em;
+ font-size: 12pt;
+}
diff --git a/dev/ocamlweb-doc/Makefile b/dev/ocamlweb-doc/Makefile
deleted file mode 100644
index 3189d7c51..000000000
--- a/dev/ocamlweb-doc/Makefile
+++ /dev/null
@@ -1,90 +0,0 @@
-include ../../config/Makefile
-
-LOCALINCLUDES=-I ../../config -I ../../tools -I ../../tools/coqdoc \
- -I ../../scripts -I ../../lib -I ../../kernel -I ../../kernel/byterun -I ../../library \
- -I ../../proofs -I ../../tactics -I ../../pretyping \
- -I ../../interp -I ../../toplevel -I ../../parsing -I ../../ide/utils -I ../../ide \
- -I ../../plugins/omega -I ../../plugins/romega \
- -I ../../plugins/ring -I ../../plugins/dp -I ../../plugins/setoid_ring \
- -I ../../plugins/xml -I ../../plugins/extraction \
- -I ../../plugins/fourier \
- -I ../../plugins/cc \
- -I ../../plugins/funind -I ../../plugins/firstorder \
- -I ../../plugins/field -I ../../plugins/subtac -I ../../plugins/rtauto \
- -I ../../plugins/recdef
-
-MLINCLUDES=$(LOCALINCLUDES) -I $(MYCAMLP4LIB)
-
-
-all:: newparse coq.ps minicop.ps
-#newsyntax.dvi minicoq.dvi
-
-
-OBJS=lex.cmo ast.cmo parse.cmo syntax.cmo
-
-newparse: $(OBJS) syntax.mli lex.ml syntax.ml
- ocamlc -o newparse $(OBJS)
-
-%.cmo: %.ml
- ocamlc -c $<
-
-%.cmi: %.mli
- ocamlc -c $<
-
-%.ml: %.mll
- ocamllex $<
-
-%.ml: %.mly
- ocamlyacc -v $<
-
-%.mli: %.mly
- ocamlyacc -v $<
-
-clean::
- rm -f *.cm* *.output syntax.ml syntax.mli lex.ml newparse
-
-parse.cmo: ast.cmo
-syntax.cmi: parse.cmo
-syntax.cmo: lex.cmo parse.cmo syntax.cmi
-lex.cmo: syntax.cmi
-ast.cmo: ast.ml
-
-newsyntax.dvi: newsyntax.tex
- latex $<
- latex $<
-
-coq.dvi: coq.tex
- latex coq
- latex coq
-
-coq.tex::
- ocamlweb -p "\usepackage{epsfig}" \
- macros.tex intro.tex \
- ../../lib/{doc.tex,*.mli} ../../kernel/{doc.tex,*.mli} ../../library/{doc.tex,*.mli} \
- ../../pretyping/{doc.tex,*.mli} ../../interp/{doc.tex,*.mli} \
- ../../parsing/{doc.tex,*.mli} ../../proofs/{doc.tex,*.mli} \
- ../../tactics/{doc.tex,*.mli} ../../toplevel/{doc.tex,*.mli} \
- -o coq.tex
-
-
-depend:: kernel.dep.ps library.dep.ps pretyping.dep.ps parsing.dep.ps \
- proofs.dep.ps tactics.dep.ps toplevel.dep.ps interp.dep.ps
-
-%.dot: ../../%
- ocamldoc -rectypes $(MLINCLUDES) -t $* -dot -dot-reduce ../../$*/*.ml ../../$*/*.mli -o $@
-
-%.dep.ps: %.dot
- dot -Tps $< -o $@
-
-clean::
- rm -f *~ *.log *.aux
-
-.SUFFIXES: .tex .dvi .ps .cmo .cmi .mli .ml .mll .mly
-
-%.dvi: %.tex
- latex $< && latex $<
-
-%.ps: %.dvi
- dvips $< -o $@
-
-
diff --git a/dev/ocamlweb-doc/ast.ml b/dev/ocamlweb-doc/ast.ml
deleted file mode 100644
index 4eb135d83..000000000
--- a/dev/ocamlweb-doc/ast.ml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-type constr_ast =
- Pair of constr_ast * constr_ast
-| Prod of binder list * constr_ast
-| Lambda of binder list * constr_ast
-| Let of string * constr_ast * constr_ast
-| LetCase of binder list * constr_ast * constr_ast
-| IfCase of constr_ast * constr_ast * constr_ast
-| Eval of red_fun * constr_ast
-| Infix of string * constr_ast * constr_ast
-| Prefix of string * constr_ast
-| Postfix of string * constr_ast
-| Appl of constr_ast * constr_arg list
-| ApplExpl of string list * constr_ast list
-| Scope of string * constr_ast
-| Qualid of string list
-| Prop | Set | Type
-| Int of string
-| Hole
-| Meta of string
-| Fixp of fix_kind *
- (string * binder list * constr_ast * string option * constr_ast) list *
- string
-| Match of case_item list * constr_ast option *
- (pattern list * constr_ast) list
-
-and red_fun = Simpl
-
-and binder = string * constr_ast
-
-and constr_arg = string option * constr_ast
-
-and fix_kind = Fix | CoFix
-
-and case_item = constr_ast * (string option * constr_ast option)
-
-and pattern =
- PatAs of pattern * string
-| PatType of pattern * constr_ast
-| PatConstr of string * pattern list
-| PatVar of string
-
-let mk_cast c t =
- if t=Hole then c else Infix(":",c,t)
-
-let mk_lambda bl t =
- if bl=[] then t else Lambda(bl,t)
diff --git a/dev/ocamlweb-doc/intro.tex b/dev/ocamlweb-doc/intro.tex
deleted file mode 100644
index 4cec8673f..000000000
--- a/dev/ocamlweb-doc/intro.tex
+++ /dev/null
@@ -1,25 +0,0 @@
-
-\ocwsection This is \Coq, a proof assistant for the \CCI.
-This document describes the implementation of \Coq.
-It has been automatically generated from the source of
-\Coq\ using \textsf{ocamlweb}, a literate programming tool for
-\textsf{Objective Caml}\footnote{\Coq, \textsf{Objective Caml} and
- \textsf{ocamlweb} are all freely available at
- \textsf{http://coq.inria.fr/}, \textsf{http://caml.inria.fr/} and
- \textsf{http://www.lri.fr/\~{}filliatr/ocamlweb}.}.
-The source files are organized in several directories, which are
-described here as separate chapters.
-
-\begin{center}
- \begin{tabular}{p{10cm}rr}
- Chapter & section & page \\[0.5em]
- \hline\\[0.2em]
- Utility libraries \dotfill & \refsec{lib} & \pageref{lib} \\[0.5em]
- Kernel \dotfill & \refsec{kernel} & \pageref{kernel} \\[0.5em]
- Library \dotfill & \refsec{library} & \pageref{library} \\[0.5em]
- Pretyping \dotfill & \refsec{pretyping} & \pageref{pretyping} \\[0.5em]
- Proof engine \dotfill & \refsec{proofs} & \pageref{proofs} \\[0.5em]
- Tactics \dotfill & \refsec{tactics} & \pageref{tactics} \\[0.5em]
- Toplevel \dotfill & \refsec{toplevel}& \pageref{toplevel}\\[0.5em]
- \end{tabular}
-\end{center} \ No newline at end of file
diff --git a/dev/ocamlweb-doc/lex.mll b/dev/ocamlweb-doc/lex.mll
deleted file mode 100644
index 059526d9b..000000000
--- a/dev/ocamlweb-doc/lex.mll
+++ /dev/null
@@ -1,81 +0,0 @@
-
-{
- open Lexing
- open Syntax
-
- let chan_out = ref stdout
-
- let comment_depth = ref 0
- let print s = output_string !chan_out s
-
- exception Fin_fichier
-
-}
-
-let space = [' ' '\t' '\n']
-let letter = ['a'-'z' 'A'-'Z']
-let digit = ['0'-'9']
-
-let identifier = letter (letter | digit | ['_' '\''])*
-let number = digit+
-let oper = ['-' '+' '/' '*' '|' '>' '<' '=' '%' '#' '$' ':' '\\' '?'
- '.' '!' '@' ]+
-
-rule token = parse
- | "let" {LET}
- | "in" {IN}
- | "match" {MATCH}
- | "with" {WITH}
- | "end" {END}
- | "and" {AND}
- | "fun" {FUN}
- | "if" {IF}
- | "then" {THEN}
- | "else" {ELSE}
- | "eval" {EVAL}
- | "for" {FOR}
- | "Prop" {PROP}
- | "Set" {SET}
- | "Type" {TYPE}
- | "fix" {FIX}
- | "cofix" {COFIX}
- | "struct" {STRUCT}
- | "as" {AS}
-
- | "Simpl" {SIMPL}
-
- | "_" {WILDCARD}
- | "(" {LPAR}
- | ")" {RPAR}
- | "{" {LBRACE}
- | "}" {RBRACE}
- | "!" {BANG}
- | "@" {AT}
- | ":" {COLON}
- | ":=" {COLONEQ}
- | "." {DOT}
- | "," {COMMA}
- | "->" {OPER "->"}
- | "=>" {RARROW}
- | "|" {BAR}
- | "%" {PERCENT}
-
- | '?' { META(ident lexbuf)}
- | number { INT(Lexing.lexeme lexbuf) }
- | oper { OPER(Lexing.lexeme lexbuf) }
- | identifier { IDENT (Lexing.lexeme lexbuf) }
- | "(*" (*"*)"*) { comment_depth := 1;
- comment lexbuf;
- token lexbuf }
- | space+ { token lexbuf}
- | eof { EOF }
-
-and ident = parse
- | identifier { Lexing.lexeme lexbuf }
-
-and comment = parse
- | "(*" (*"*)"*) { incr comment_depth; comment lexbuf }
- | (*"(*"*) "*)"
- { decr comment_depth; if !comment_depth > 0 then comment lexbuf }
- | eof { raise Fin_fichier }
- | _ { comment lexbuf }
diff --git a/dev/ocamlweb-doc/macros.tex b/dev/ocamlweb-doc/macros.tex
deleted file mode 100644
index 6beacf7b0..000000000
--- a/dev/ocamlweb-doc/macros.tex
+++ /dev/null
@@ -1,7 +0,0 @@
-
-% macros for coq.tex
-
-\newcommand{\Coq}{\textsf{Coq}}
-\newcommand{\CCI}{Calculus of Inductive Constructions}
-
-\newcommand{\refsec}[1]{\textbf{\ref{#1}}} \ No newline at end of file
diff --git a/dev/ocamlweb-doc/parse.ml b/dev/ocamlweb-doc/parse.ml
deleted file mode 100644
index b145fffda..000000000
--- a/dev/ocamlweb-doc/parse.ml
+++ /dev/null
@@ -1,183 +0,0 @@
-
-open Ast
-
-type assoc = L | R | N
-
-let level = function
- | "--" -> 70,L
- | "=" -> 70,N
- | "+" -> 60,L
- | "++" -> 60,R
- | "+++" -> 60,R
- | "-" -> 60,L
- | "*" -> 50,L
- | "/" -> 50,L
- | "**" -> 40,R
- | ":" -> (100,R)
- | "->" -> (90,R)
- | s -> failwith ("unknowm operator '"^s^"'")
-
-let fixity = function
- | "--" -> [L]
- | "=" -> [N]
- | ("+"|"-"|"*"|"/") -> [L;N]
- | "++" -> [R]
- | _ -> [L;N;R]
-
-let ground_oper = function
- ("-"|"+") -> true
- | _ -> false
-
-let is_prefix op = List.mem L (fixity op)
-let is_infix op = List.mem N (fixity op)
-let is_postfix op = List.mem R (fixity op)
-
-let mk_inf op t1 t2 =
- if not (is_infix op) then failwith (op^" not infix");
- Infix(op,t1,t2)
-
-let mk_post op t =
- if not (is_postfix op) then failwith (op^" not postfix");
- Postfix(op,t)
-
-
-(* Pb avec ground_oper: pas de diff entre -1 et -(1) *)
-let mk_pre op t =
- if not (is_prefix op) then failwith (op^" not prefix");
- if ground_oper op then
- match t with
- | Int i -> Int (op^i)
- | _ -> Prefix(op,t)
- else Prefix(op,t)
-
-(* teste si on peut reduire op suivi d'un op de niveau (n,a)
- si la reponse est false, c'est que l'op (n,a) doit se reduire
- avant *)
-let red_left_op (nl,al) (nr,ar) =
- if nl < nr then true
- else
- if nl = nr then
- match al,ar with
- | (L|N), L -> true
- | R, (R|N) -> false
- | R, L -> failwith "conflit d'assoc: ambigu"
- | (L|N), (R|N) -> failwith "conflit d'assoc: blocage"
- else false
-
-
-type level = int * assoc
-type stack =
- | PrefixOper of string list
- | Term of constr_ast * stack
- | Oper of string list * string * constr_ast * stack
-
-let rec str_ast = function
- | Infix(op,t1,t2) -> str_ast t1 ^ " " ^ op ^ " " ^ str_ast t2
- | Postfix(op,t) -> str_ast t ^ " " ^ op
- | Prefix(op,t) -> op ^ " " ^ str_ast t
- | _ -> "_"
-
-let rec str_stack = function
- | PrefixOper ops -> String.concat " " (List.rev ops)
- | Term (t,s) -> str_stack s ^ " (" ^ str_ast t ^ ")"
- | Oper(ops,lop,t,s) ->
- str_stack (Term(t,s)) ^ " " ^ lop ^ " " ^
- String.concat " " (List.rev ops)
-
-let pps s = prerr_endline (str_stack s)
-let err s stk = failwith (s^": "^str_stack stk)
-
-
-let empty = PrefixOper []
-
-let check_fixity_term stk =
- match stk with
- Term _ -> err "2 termes successifs" stk
- | _ -> ()
-
-let shift_term t stk =
- check_fixity_term stk;
- Term(t,stk)
-
-let shift_oper op stk =
- match stk with
- | Oper(ops,lop,t,s) -> Oper(op::ops,lop,t,s)
- | Term(t,s) -> Oper([],op,t,s)
- | PrefixOper ops -> PrefixOper (op::ops)
-
-let is_reducible lv stk =
- match stk with
- | Oper([],iop,_,_) -> red_left_op (level iop) lv
- | Oper(op::_,_,_,_) -> red_left_op (level op) lv
- | PrefixOper(op::_) -> red_left_op (level op) lv
- | _ -> false
-
-let reduce_head (t,stk) =
- match stk with
- | Oper([],iop,t1,s) ->
- (Infix(iop,t1,t), s)
- | Oper(op::ops,lop,t',s) ->
- (mk_pre op t, Oper(ops,lop,t',s))
- | PrefixOper(op::ops) ->
- (Prefix(op,t), PrefixOper ops)
- | _ -> assert false
-
-let rec reduce_level lv (t,s) =
- if is_reducible lv s then reduce_level lv (reduce_head (t, s))
- else (t, s)
-
-let reduce_post op (t,s) =
- let (t',s') = reduce_level (level op) (t,s) in
- (mk_post op t', s')
-
-let reduce_posts stk =
- match stk with
- Oper(ops,iop,t,s) ->
- let pts1 = reduce_post iop (t,s) in
- List.fold_right reduce_post ops pts1
- | Term(t,s) -> (t,s)
- | PrefixOper _ -> failwith "reduce_posts"
-
-
-let shift_infix op stk =
- let (t,s) = reduce_level (level op) (reduce_posts stk) in
- Oper([],op,t,s)
-
-let is_better_infix op stk =
- match stk with
- | Oper(ops,iop,t,s) ->
- is_postfix iop &&
- List.for_all is_postfix ops &&
- (not (is_prefix op) || red_left_op (level iop) (level op))
- | Term _ -> false
- | _ -> assert false
-
-let parse_oper op stk =
- match stk with
- | PrefixOper _ ->
- if is_prefix op then shift_oper op stk else failwith "prefix_oper"
- | Oper _ ->
- if is_infix op then
- if is_better_infix op stk then shift_infix op stk
- else shift_oper op stk
- else if is_prefix op then shift_oper op stk
- else if is_postfix op then
- let (t,s) = reduce_post op (reduce_posts stk) in
- Term(t,s)
- else assert false
- | Term(t,s) ->
- if is_infix op then shift_infix op stk
- else if is_postfix op then
- let (t2,s2) = reduce_post op (t,s) in Term(t2,s2)
- else failwith "infix/postfix"
-
-let parse_term = shift_term
-
-let rec close_stack stk =
- match stk with
- Term(t,PrefixOper []) -> t
- | PrefixOper _ -> failwith "expression sans atomes"
- | _ ->
- let (t,s) = reduce_head (reduce_posts stk) in
- close_stack (Term(t,s))
-
diff --git a/dev/ocamlweb-doc/preamble.tex b/dev/ocamlweb-doc/preamble.tex
deleted file mode 100644
index 2cd21f022..000000000
--- a/dev/ocamlweb-doc/preamble.tex
+++ /dev/null
@@ -1,8 +0,0 @@
-\documentclass[11pt]{article}
-\usepackage[latin1]{inputenc}
-\usepackage[T1]{fontenc}
-\usepackage{ocamlweb}
-\pagestyle{ocamlweb}
-\usepackage{fullpage}
-\usepackage{epsfig}
-\begin{document}
diff --git a/dev/ocamlweb-doc/syntax.mly b/dev/ocamlweb-doc/syntax.mly
deleted file mode 100644
index bfc7d5ccf..000000000
--- a/dev/ocamlweb-doc/syntax.mly
+++ /dev/null
@@ -1,224 +0,0 @@
-%{
-open Ast
-open Parse
-%}
-
-%token <string> META INT IDENT
-%token <string> OPER
-%token LPAR RPAR BAR COMMA COLON BANG FUN DOT RARROW LET COLONEQ IN IF
-%token THEN ELSE EVAL AT FOR PROP SET TYPE WILDCARD FIX
-%token COFIX MATCH WITH END AND LBRACE RBRACE STRUCT AS SIMPL PERCENT
-%token EOF
-
-%start main
-%type <Ast.constr_ast> main
-
-%start constr
-%type <Ast.constr_ast> constr
-
-%start simple_constr
-%type <Ast.constr_ast> simple_constr
-
-%%
-
-main:
- constr EOF { $1 }
-;
-
-
-paren_constr:
- constr COMMA paren_constr { Pair($1,$3) }
- | constr { $1 }
-;
-
-constr:
- binder_constr { $1 }
- | oper_constr { close_stack $1 }
-;
-
-binder_constr:
- BANG ne_binders DOT constr { Prod($2, $4) }
- | FUN ne_binders type_cstr RARROW constr { Lambda($2,mk_cast $5 $3) }
- | LET IDENT binders type_cstr COLONEQ constr IN constr
- { Let($2,mk_lambda $3 (mk_cast $6 $4),$8) }
- | LET LPAR comma_binders RPAR COLONEQ constr IN constr
- { LetCase($3,$6,$8) }
- | IF constr THEN constr ELSE constr { IfCase($2,$4,$6) }
- | fix_constr { $1 }
- | EVAL rfun IN constr { Eval($2,$4) }
-;
-
-comma_binders:
- ne_comma_binders { $1 }
- | { [] }
-;
-
-ne_comma_binders:
- binder COMMA ne_comma_binders { $1 :: $3 }
- | binder { [$1] }
-;
-
-rfun:
- SIMPL { Simpl }
-;
-
-
-/* 2 Conflits shift/reduce */
-oper_constr:
- oper_constr oper appl_constr
- { parse_term $3 (parse_oper $2 $1) }
- | oper_constr oper binder_constr
- { parse_term $3 (parse_oper $2 $1) }
- | oper_constr oper { parse_oper $2 $1 }
- | { empty }
- | appl_constr { parse_term $1 empty }
-;
-
-oper:
- OPER {$1}
- | COLON {":"}
-;
-
-appl_constr:
- simple_constr ne_appl_args { Appl($1,$2) }
- | AT global simple_constrs { ApplExpl($2,$3) }
- | simple_constr { $1 }
-;
-
-appl_arg:
- AT INT COLONEQ simple_constr { (Some $2,$4) }
- | simple_constr { (None,$1) }
-;
-
-ne_appl_args:
- appl_arg { [$1] }
- | appl_arg ne_appl_args { $1::$2 }
-;
-
-simple_constr:
- atomic_constr { $1 }
- | match_constr { $1 }
- | LPAR paren_constr RPAR { $2 }
- | simple_constr PERCENT IDENT { Scope($3,$1) }
-;
-
-simple_constrs:
- simple_constr simple_constrs { $1::$2 }
- | { [] }
-;
-
-atomic_constr:
- global { Qualid $1 }
- | PROP { Prop }
- | SET { Set }
- | TYPE { Type }
- | INT { Int $1 }
- | WILDCARD { Hole }
- | META { Meta $1 }
-;
-
-global:
- IDENT DOT global { $1 :: $3 }
- | IDENT { [$1] }
-;
-
-/* Conflit normal */
-fix_constr:
- fix_kw fix_decl
- { let (id,_,_,_,_ as fx) = $2 in Fixp($1,[fx],id) }
- | fix_kw fix_decl fix_decls FOR IDENT { Fixp($1, $2::$3, $5) }
-;
-
-fix_kw: FIX {Fix} | COFIX {CoFix}
-;
-
-fix_decl:
- IDENT binders type_cstr annot COLONEQ constr { ($1,$2,$3,$4,$6) }
-;
-
-fix_decls:
- AND fix_decl fix_decls { $2::$3 }
- | AND fix_decl { [$2] }
-;
-
-annot:
- LBRACE STRUCT IDENT RBRACE { Some $3 }
- | { None }
-;
-
-match_constr:
- MATCH case_items case_type WITH branches END { Match($2,$3,$5) }
-;
-
-case_items:
- case_item { [$1] }
- | case_item COMMA case_items { $1::$3 }
-;
-
-case_item:
- constr pred_pattern { ($1,$2) }
-;
-
-case_type:
- RARROW constr { Some $2 }
- | { None }
-;
-
-pred_pattern:
- AS IDENT COLON constr { (Some $2, Some $4) }
- | AS IDENT { (Some $2, None) }
- | COLON constr { (None, Some $2) }
- | { (None,None) }
-;
-
-branches:
- BAR branch_list { $2 }
- | branch_list { $1 }
- | { [] }
-;
-
-branch_list:
- patterns RARROW constr { [$1, $3] }
- | patterns RARROW constr BAR branch_list { ($1,$3)::$5 }
-;
-
-patterns:
- pattern { [$1] }
- | pattern COMMA patterns { $1::$3 }
-;
-
-pattern:
- pattern AS IDENT { PatAs($1,$3) }
- | pattern COLON constr { PatType($1,$3) }
- | IDENT simple_patterns { PatConstr($1,$2) }
- | simple_pattern { $1 }
-;
-
-simple_pattern:
- IDENT { PatVar $1 }
- | LPAR pattern RPAR { $2 }
-;
-
-simple_patterns:
- simple_pattern { [$1] }
- | simple_pattern simple_patterns { $1::$2 }
-;
-
-binder:
- IDENT { ($1,Hole) }
- | LPAR IDENT type_cstr RPAR { ($2,$3) }
-;
-
-binders:
- ne_binders { $1 }
- | { [] }
-
-ne_binders:
- binder { [$1] }
- | binder ne_binders { $1::$2 }
-;
-
-type_cstr:
- COLON constr { $2 }
- | { Hole }
-;
diff --git a/interp/constrextern.mli b/interp/constrextern.mli
index 08a74e614..f52ec8fd8 100644
--- a/interp/constrextern.mli
+++ b/interp/constrextern.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Util
open Names
open Term
@@ -21,12 +20,11 @@ open Rawterm
open Pattern
open Topconstr
open Notation
-(*i*)
-(* v7->v8 translation *)
+(** v7->v8 translation *)
val check_same_type : constr_expr -> constr_expr -> unit
-(* Translation of pattern, cases pattern, rawterm and term into syntax
+(** Translation of pattern, cases pattern, rawterm and term into syntax
trees for printing *)
val extern_cases_pattern : Idset.t -> cases_pattern -> cases_pattern_expr
@@ -34,7 +32,7 @@ val extern_rawconstr : Idset.t -> rawconstr -> constr_expr
val extern_rawtype : Idset.t -> rawconstr -> constr_expr
val extern_constr_pattern : names_context -> constr_pattern -> constr_expr
-(* If [b=true] in [extern_constr b env c] then the variables in the first
+(** If [b=true] in [extern_constr b env c] then the variables in the first
level of quantification clashing with the variables in [env] are renamed *)
val extern_constr : bool -> env -> constr -> constr_expr
@@ -45,7 +43,7 @@ val extern_sort : sorts -> rawsort
val extern_rel_context : constr option -> env ->
rel_context -> local_binder list
-(* Printing options *)
+(** Printing options *)
val print_implicits : bool ref
val print_implicits_defensive : bool ref
val print_arguments : bool ref
@@ -55,25 +53,25 @@ val print_universes : bool ref
val print_no_symbol : bool ref
val print_projections : bool ref
-(* Debug printing options *)
+(** Debug printing options *)
val set_debug_global_reference_printer :
(loc -> global_reference -> reference) -> unit
-(* This governs printing of implicit arguments. If [with_implicits] is
+(** This governs printing of implicit arguments. If [with_implicits] is
on and not [with_arguments] then implicit args are printed prefixed
by "!"; if [with_implicits] and [with_arguments] are both on the
function and not the arguments is prefixed by "!" *)
val with_implicits : ('a -> 'b) -> 'a -> 'b
val with_arguments : ('a -> 'b) -> 'a -> 'b
-(* This forces printing of coercions *)
+(** This forces printing of coercions *)
val with_coercions : ('a -> 'b) -> 'a -> 'b
-(* This forces printing universe names of Type{.} *)
+(** This forces printing universe names of Type\{.\} *)
val with_universes : ('a -> 'b) -> 'a -> 'b
-(* This suppresses printing of numeral and symbols *)
+(** This suppresses printing of numeral and symbols *)
val without_symbols : ('a -> 'b) -> 'a -> 'b
-(* This prints metas as anonymous holes *)
+(** This prints metas as anonymous holes *)
val with_meta_as_hole : ('a -> 'b) -> 'a -> 'b
diff --git a/interp/constrintern.mli b/interp/constrintern.mli
index 5a62541db..4ba2bc587 100644
--- a/interp/constrintern.mli
+++ b/interp/constrintern.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Term
open Sign
@@ -20,9 +19,9 @@ open Pattern
open Topconstr
open Termops
open Pretyping
-(*i*)
-(*s Translation from front abstract syntax of term to untyped terms (rawconstr)
+(** {6 Sect } *)
+(** Translation from front abstract syntax of term to untyped terms (rawconstr)
The translation performs:
@@ -33,7 +32,7 @@ open Pretyping
- insert existential variables for implicit arguments
*)
-(* To interpret implicits and arg scopes of recursive variables while
+(** To interpret implicits and arg scopes of recursive variables while
internalizing inductive types and recursive definitions, and also
projection while typing records.
@@ -49,11 +48,11 @@ type var_internalization_data =
Impargs.implicits_list *
scope_name option list
-(* A map of free variables to their implicit arguments and scopes *)
+(** A map of free variables to their implicit arguments and scopes *)
type internalization_env =
(identifier * var_internalization_data) list
-(* Contains also a list of identifiers to automatically apply to the variables*)
+(** Contains also a list of identifiers to automatically apply to the variables*)
type full_internalization_env =
identifier list * internalization_env
@@ -76,7 +75,7 @@ type ltac_sign = identifier list * unbound_ltac_var_map
type raw_binder = (name * binding_kind * rawconstr option * rawconstr)
-(*s Internalisation performs interpretation of global names and notations *)
+(** {6 Internalisation performs interpretation of global names and notations } *)
val intern_constr : evar_map -> env -> constr_expr -> rawconstr
@@ -92,15 +91,15 @@ val intern_pattern : env -> cases_pattern_expr ->
val intern_context : bool -> evar_map -> env -> local_binder list -> raw_binder list
-(*s Composing internalization with pretyping *)
+(** {6 Composing internalization with pretyping } *)
-(* Main interpretation function *)
+(** Main interpretation function *)
val interp_gen : typing_constraint -> evar_map -> env ->
?impls:full_internalization_env -> ?allow_patvar:bool -> ?ltacvars:ltac_sign ->
constr_expr -> constr
-(* Particular instances *)
+(** Particular instances *)
val interp_constr : evar_map -> env ->
constr_expr -> constr
@@ -115,7 +114,7 @@ val interp_open_constr_patvar : evar_map -> env -> constr_expr -> evar_map * c
val interp_casted_constr : evar_map -> env -> ?impls:full_internalization_env ->
constr_expr -> types -> constr
-(* Accepting evars and giving back the manual implicits in addition. *)
+(** Accepting evars and giving back the manual implicits in addition. *)
val interp_casted_constr_evars_impls : ?evdref:(evar_map ref) -> ?fail_evar:bool -> env ->
?impls:full_internalization_env -> constr_expr -> types -> constr * manual_implicits
@@ -134,29 +133,29 @@ val interp_casted_constr_evars : evar_map ref -> env ->
val interp_type_evars : evar_map ref -> env -> ?impls:full_internalization_env ->
constr_expr -> types
-(*s Build a judgment *)
+(** {6 Build a judgment } *)
val interp_constr_judgment : evar_map -> env -> constr_expr -> unsafe_judgment
-(* Interprets constr patterns *)
+(** Interprets constr patterns *)
val intern_constr_pattern :
evar_map -> env -> ?as_type:bool -> ?ltacvars:ltac_sign ->
constr_pattern_expr -> patvar list * constr_pattern
-(* Raise Not_found if syndef not bound to a name and error if unexisting ref *)
+(** Raise Not_found if syndef not bound to a name and error if unexisting ref *)
val intern_reference : reference -> global_reference
-(* Expands abbreviations (syndef); raise an error if not existing *)
+(** Expands abbreviations (syndef); raise an error if not existing *)
val interp_reference : ltac_sign -> reference -> rawconstr
-(* Interpret binders *)
+(** Interpret binders *)
val interp_binder : evar_map -> env -> name -> constr_expr -> types
val interp_binder_evars : evar_map ref -> env -> name -> constr_expr -> types
-(* Interpret contexts: returns extended env and context *)
+(** Interpret contexts: returns extended env and context *)
val interp_context_gen : (env -> rawconstr -> types) ->
(env -> rawconstr -> unsafe_judgment) ->
@@ -169,18 +168,18 @@ val interp_context : ?fail_anonymous:bool ->
val interp_context_evars : ?fail_anonymous:bool ->
evar_map ref -> env -> local_binder list -> (env * rel_context) * manual_implicits
-(* Locating references of constructions, possibly via a syntactic definition *)
-(* (these functions do not modify the glob file) *)
+(** Locating references of constructions, possibly via a syntactic definition
+ (these functions do not modify the glob file) *)
val is_global : identifier -> bool
val construct_reference : named_context -> identifier -> constr
val global_reference : identifier -> constr
val global_reference_in_absolute_module : dir_path -> identifier -> constr
-(* Interprets into a abbreviatable constr *)
+(** Interprets into a abbreviatable constr *)
val interp_aconstr : ?impls:full_internalization_env ->
identifier list * identifier list -> constr_expr -> interpretation
-(* Globalization leak for Grammar *)
+(** Globalization leak for Grammar *)
val for_grammar : ('a -> 'b) -> 'a -> 'b
diff --git a/interp/coqlib.mli b/interp/coqlib.mli
index 6bb79c8b6..5148461a9 100644
--- a/interp/coqlib.mli
+++ b/interp/coqlib.mli
@@ -1,25 +1,25 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Libnames
open Nametab
open Term
open Pattern
-(*i*)
-(*s This module collects the global references, constructions and
+(** {6 Sect } *)
+(** This module collects the global references, constructions and
patterns of the standard library used in ocaml files *)
-(*s [find_reference caller_message [dir;subdir;...] s] returns a global
+(** {6 Sect } *)
+(** [find_reference caller_message [dir;subdir;...] s] returns a global
reference to the name dir.subdir.(...).s; the corresponding module
must have been required or in the process of being compiled so that
it must be used lazyly; it raises an anomaly with the given message
@@ -29,39 +29,39 @@ type message = string
val find_reference : message -> string list -> string -> global_reference
-(* [coq_reference caller_message [dir;subdir;...] s] returns a
+(** [coq_reference caller_message [dir;subdir;...] s] returns a
global reference to the name Coq.dir.subdir.(...).s *)
val coq_reference : message -> string list -> string -> global_reference
-(* idem but return a term *)
+(** idem but return a term *)
val coq_constant : message -> string list -> string -> constr
-(* Synonyms of [coq_constant] and [coq_reference] *)
+(** Synonyms of [coq_constant] and [coq_reference] *)
val gen_constant : message -> string list -> string -> constr
val gen_reference : message -> string list -> string -> global_reference
-(* Search in several modules (not prefixed by "Coq") *)
+(** Search in several modules (not prefixed by "Coq") *)
val gen_constant_in_modules : string->string list list-> string -> constr
val arith_modules : string list list
val zarith_base_modules : string list list
val init_modules : string list list
-(* For tactics/commands requiring vernacular libraries *)
+(** For tactics/commands requiring vernacular libraries *)
val check_required_library : string list -> unit
-(*s Global references *)
+(** {6 Global references } *)
-(* Modules *)
+(** Modules *)
val logic_module : dir_path
val logic_type_module : dir_path
val datatypes_module_name : string list
val logic_module_name : string list
-(* Natural numbers *)
+(** Natural numbers *)
val nat_path : full_path
val glob_nat : global_reference
val path_of_O : constructor
@@ -69,7 +69,7 @@ val path_of_S : constructor
val glob_O : global_reference
val glob_S : global_reference
-(* Booleans *)
+(** Booleans *)
val glob_bool : global_reference
val path_of_true : constructor
val path_of_false : constructor
@@ -77,12 +77,13 @@ val glob_true : global_reference
val glob_false : global_reference
-(* Equality *)
+(** Equality *)
val glob_eq : global_reference
val glob_identity : global_reference
val glob_jmeq : global_reference
-(*s Constructions and patterns related to Coq initial state are unknown
+(** {6 Sect } *)
+(** Constructions and patterns related to Coq initial state are unknown
at compile time. Therefore, we can only provide methods to build
them at runtime. This is the purpose of the [constr delayed] and
[constr_pattern delayed] types. Objects of this time needs to be
@@ -96,7 +97,7 @@ type coq_bool_data = {
andb_true_intro : constr}
val build_bool_type : coq_bool_data delayed
-(*s For Equality tactics *)
+(** {6 For Equality tactics } *)
type coq_sigma_data = {
proj1 : constr;
proj2 : constr;
@@ -106,7 +107,8 @@ type coq_sigma_data = {
val build_sigma_set : coq_sigma_data delayed
val build_sigma_type : coq_sigma_data delayed
-(* Non-dependent pairs in Set from Datatypes *)
+
+(** Non-dependent pairs in Set from Datatypes *)
val build_prod : coq_sigma_data delayed
type coq_eq_data = {
@@ -121,17 +123,19 @@ val build_coq_eq_data : coq_eq_data delayed
val build_coq_identity_data : coq_eq_data delayed
val build_coq_jmeq_data : coq_eq_data delayed
-val build_coq_eq : constr delayed (* = [(build_coq_eq_data()).eq] *)
-val build_coq_eq_refl : constr delayed (* = [(build_coq_eq_data()).refl] *)
-val build_coq_eq_sym : constr delayed (* = [(build_coq_eq_data()).sym] *)
+val build_coq_eq : constr delayed (** = [(build_coq_eq_data()).eq] *)
+val build_coq_eq_refl : constr delayed (** = [(build_coq_eq_data()).refl] *)
+val build_coq_eq_sym : constr delayed (** = [(build_coq_eq_data()).sym] *)
val build_coq_f_equal2 : constr delayed
-(* Data needed for discriminate and injection *)
+(** Data needed for discriminate and injection *)
type coq_inversion_data = {
- inv_eq : constr; (* : forall params, t -> Prop *)
- inv_ind : constr; (* : forall params P y, eq params y -> P y *)
- inv_congr: constr (* : forall params B (f:t->B) y, eq params y -> f c=f y *)
+ inv_eq : constr; (** : forall params, args -> Prop *)
+ inv_ind : constr; (** : forall params P (H : P params) args, eq params args
+ -> P args *)
+ inv_congr: constr (** : forall params B (f:t->B) args, eq params args ->
+ f params = f args *)
}
val build_coq_inversion_eq_data : coq_inversion_data delayed
@@ -139,21 +143,22 @@ val build_coq_inversion_identity_data : coq_inversion_data delayed
val build_coq_inversion_jmeq_data : coq_inversion_data delayed
val build_coq_inversion_eq_true_data : coq_inversion_data delayed
-(* Specif *)
+(** Specif *)
val build_coq_sumbool : constr delayed
-(*s Connectives *)
-(* The False proposition *)
+(** {6 Sect } *)
+(** Connectives
+ The False proposition *)
val build_coq_False : constr delayed
-(* The True proposition and its unique proof *)
+(** The True proposition and its unique proof *)
val build_coq_True : constr delayed
val build_coq_I : constr delayed
-(* Negation *)
+(** Negation *)
val build_coq_not : constr delayed
-(* Conjunction *)
+(** Conjunction *)
val build_coq_and : constr delayed
val build_coq_conj : constr delayed
val build_coq_iff : constr delayed
@@ -161,10 +166,10 @@ val build_coq_iff : constr delayed
val build_coq_iff_left_proj : constr delayed
val build_coq_iff_right_proj : constr delayed
-(* Disjunction *)
+(** Disjunction *)
val build_coq_or : constr delayed
-(* Existential quantifier *)
+(** Existential quantifier *)
val build_coq_ex : constr delayed
val coq_eq_ref : global_reference lazy_t
diff --git a/interp/dumpglob.mli b/interp/dumpglob.mli
index f6d7baefe..7235fe172 100644
--- a/interp/dumpglob.mli
+++ b/interp/dumpglob.mli
@@ -1,12 +1,12 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
-
-(* $Id$ *)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
+
+(** {% $ %}Id: dumpglob.mli 11252 2008-07-24 11:16:48Z notin {% $ %} *)
val open_glob_file : string -> unit
diff --git a/interp/genarg.mli b/interp/genarg.mli
index fab5ff33e..50abd351e 100644
--- a/interp/genarg.mli
+++ b/interp/genarg.mli
@@ -1,10 +1,10 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
@@ -26,9 +26,9 @@ type 'a or_by_notation =
val loc_of_or_by_notation : ('a -> loc) -> 'a or_by_notation -> loc
-(* In globalize tactics, we need to keep the initial [constr_expr] to recompute*)
-(* in the environment by the effective calls to Intro, Inversion, etc *)
-(* The [constr_expr] field is [None] in TacDef though *)
+(** In globalize tactics, we need to keep the initial [constr_expr] to recompute
+ in the environment by the effective calls to Intro, Inversion, etc
+ The [constr_expr] field is [None] in TacDef though *)
type rawconstr_and_expr = rawconstr * constr_expr option
type open_constr_expr = unit * constr_expr
@@ -51,9 +51,9 @@ and or_and_intro_pattern_expr = (loc * intro_pattern_expr) list list
val pr_intro_pattern : intro_pattern_expr located -> Pp.std_ppcmds
val pr_or_and_intro_pattern : or_and_intro_pattern_expr -> Pp.std_ppcmds
-(* The route of a generic argument, from parsing to evaluation
+(** The route of a generic argument, from parsing to evaluation
-\begin{verbatim}
+{% \begin{%}verbatim{% }%}
parsing in_raw out_raw
char stream ----> rawtype ----> constr_expr generic_argument --------|
encapsulation decaps |
@@ -76,7 +76,7 @@ val pr_or_and_intro_pattern : or_and_intro_pattern_expr -> Pp.std_ppcmds
|
V
effective use
-\end{verbatim}
+{% \end{%}verbatim{% }%}
To distinguish between the uninterpreted (raw), globalized and
interpreted worlds, we annotate the type [generic_argument] by a
@@ -84,7 +84,7 @@ phantom argument which is either [constr_expr], [rawconstr] or
[constr].
Transformation for each type :
-\begin{verbatim}
+{% \begin{%}verbatim{% }%}
tag raw open type cooked closed type
BoolArgType bool bool
@@ -107,10 +107,10 @@ List0ArgType of argument_type
List1ArgType of argument_type
OptArgType of argument_type
ExtraArgType of string '_a '_b
-\end{verbatim}
+{% \end{%}verbatim{% }%}
*)
-(* All of [rlevel], [glevel] and [tlevel] must be non convertible
+(** All of [rlevel], [glevel] and [tlevel] must be non convertible
to ensure the injectivity of the type inference from type
['co generic_argument] to [('a,'co) abstract_argument_type];
this guarantees that, for 'co fixed, the type of
@@ -222,7 +222,7 @@ val wit_pair :
('b,'co) abstract_argument_type ->
('a * 'b,'co) abstract_argument_type
-(* ['a generic_argument] = (Sigma t:type. t[[constr/'a]]) *)
+(** ['a generic_argument] = (Sigma t:type. t[[constr/'a]]) *)
type 'a generic_argument
val fold_list0 :
@@ -238,7 +238,7 @@ val fold_pair :
('a generic_argument -> 'a generic_argument -> 'c) ->
'a generic_argument -> 'c
-(* [app_list0] fails if applied to an argument not of tag [List0 t]
+(** [app_list0] fails if applied to an argument not of tag [List0 t]
for some [t]; it's the responsability of the caller to ensure it *)
val app_list0 : ('a generic_argument -> 'b generic_argument) ->
@@ -255,7 +255,7 @@ val app_pair :
('a generic_argument -> 'b generic_argument)
-> 'a generic_argument -> 'b generic_argument
-(* create a new generic type of argument: force to associate
+(** create a new generic type of argument: force to associate
unique ML types at each of the three levels *)
val create_arg : string ->
('a,tlevel) abstract_argument_type
@@ -265,7 +265,7 @@ val create_arg : string ->
val exists_argtype : string -> bool
type argument_type =
- (* Basic types *)
+ (** Basic types *)
| BoolArgType
| IntArgType
| IntOrVarArgType
@@ -275,7 +275,7 @@ type argument_type =
| IdentArgType of bool
| VarArgType
| RefArgType
- (* Specific types *)
+ (** Specific types *)
| SortArgType
| ConstrArgType
| ConstrMayEvalArgType
@@ -300,7 +300,7 @@ val out_gen :
('a,'co) abstract_argument_type -> 'co generic_argument -> 'a
-(* [in_generic] is used in combination with camlp4 [Gramext.action] magic
+(** [in_generic] is used in combination with camlp4 [Gramext.action] magic
[in_generic: !l:type, !a:argument_type -> |a|_l -> 'l generic_argument]
diff --git a/interp/implicit_quantifiers.mli b/interp/implicit_quantifiers.mli
index 1feae81f5..7362d7de5 100644
--- a/interp/implicit_quantifiers.mli
+++ b/interp/implicit_quantifiers.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Decl_kinds
open Term
@@ -22,7 +21,6 @@ open Topconstr
open Util
open Libnames
open Typeclasses
-(*i*)
val declare_generalizable : Vernacexpr.locality_flag -> (identifier located) list option -> unit
@@ -30,7 +28,7 @@ val ids_of_list : identifier list -> Idset.t
val destClassApp : constr_expr -> loc * reference * constr_expr list
val destClassAppExpl : constr_expr -> loc * reference * (constr_expr * explicitation located option) list
-(* Fragile, should be used only for construction a set of identifiers to avoid *)
+(** Fragile, should be used only for construction a set of identifiers to avoid *)
val free_vars_of_constr_expr : constr_expr -> ?bound:Idset.t ->
identifier list -> identifier list
@@ -38,7 +36,7 @@ val free_vars_of_constr_expr : constr_expr -> ?bound:Idset.t ->
val free_vars_of_binders :
?bound:Idset.t -> Names.identifier list -> local_binder list -> Idset.t * Names.identifier list
-(* Returns the generalizable free ids in left-to-right
+(** Returns the generalizable free ids in left-to-right
order with the location of their first occurence *)
val generalizable_vars_of_rawconstr : ?bound:Idset.t -> ?allowed:Idset.t ->
diff --git a/interp/modintern.mli b/interp/modintern.mli
index e528b7af7..e025447b5 100644
--- a/interp/modintern.mli
+++ b/interp/modintern.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Declarations
open Environ
open Entries
@@ -16,16 +15,15 @@ open Util
open Libnames
open Names
open Topconstr
-(*i*)
-(* Module expressions and module types are interpreted relatively to
+(** Module expressions and module types are interpreted relatively to
eventual functor or funsig arguments. *)
val interp_modtype : env -> module_ast -> module_struct_entry
val interp_modexpr : env -> module_ast -> module_struct_entry
-(* The following function tries to interprete an ast as a module,
+(** The following function tries to interprete an ast as a module,
and in case of failure, interpretes this ast as a module type.
The boolean is true for a module, false for a module type *)
diff --git a/interp/notation.mli b/interp/notation.mli
index f52e17cc8..91f262b48 100644
--- a/interp/notation.mli
+++ b/interp/notation.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Util
open Pp
open Bigint
@@ -19,18 +18,19 @@ open Rawterm
open Topconstr
open Ppextend
-(*i*)
+(**/**)
-(**********************************************************************)
-(* Scopes *)
+(*********************************************************************
+ Scopes *)
-(*s A scope is a set of interpreters for symbols + optional
+(** {6 Sect } *)
+(** A scope is a set of interpreters for symbols + optional
interpreter and printers for integers + optional delimiters *)
type level = precedence * tolerability list
type delimiters = string
type scope
-type scopes (* = [scope_name list] *)
+type scopes (** = [scope_name list] *)
type local_scopes = tmp_scope_name option * scope_name list
@@ -39,35 +39,35 @@ val declare_scope : scope_name -> unit
val current_scopes : unit -> scopes
-(* Check where a scope is opened or not in a scope list, or in
+(** Check where a scope is opened or not in a scope list, or in
* the current opened scopes *)
val scope_is_open_in_scopes : scope_name -> scopes -> bool
val scope_is_open : scope_name -> bool
-(* Open scope *)
+(** Open scope *)
val open_close_scope :
- (* locality *) bool * (* open *) bool * scope_name -> unit
+ (** locality *) bool * (* open *) bool * scope_name -> unit
-(* Extend a list of scopes *)
+(** Extend a list of scopes *)
val empty_scope_stack : scopes
val push_scope : scope_name -> scopes -> scopes
-(* Declare delimiters for printing *)
+(** Declare delimiters for printing *)
val declare_delimiters : scope_name -> delimiters -> unit
val find_delimiters_scope : loc -> delimiters -> scope_name
-(*s Declare and uses back and forth an interpretation of primitive token *)
+(** {6 Declare and uses back and forth an interpretation of primitive token } *)
-(* A numeral interpreter is the pair of an interpreter for **integer**
+(** A numeral interpreter is the pair of an interpreter for **integer**
numbers in terms and an optional interpreter in pattern, if
negative numbers are not supported, the interpreter must fail with
an appropriate error message *)
type notation_location = (dir_path * dir_path) * string
type required_module = full_path * string list
-type cases_pattern_status = bool (* true = use prim token in patterns *)
+type cases_pattern_status = bool (** true = use prim token in patterns *)
type 'a prim_token_interpreter =
loc -> 'a -> rawconstr
@@ -81,7 +81,7 @@ val declare_numeral_interpreter : scope_name -> required_module ->
val declare_string_interpreter : scope_name -> required_module ->
string prim_token_interpreter -> string prim_token_uninterpreter -> unit
-(* Return the [term]/[cases_pattern] bound to a primitive token in a
+(** Return the [term]/[cases_pattern] bound to a primitive token in a
given scope context*)
val interp_prim_token : loc -> prim_token -> local_scopes ->
@@ -89,7 +89,7 @@ val interp_prim_token : loc -> prim_token -> local_scopes ->
val interp_prim_token_cases_pattern : loc -> prim_token -> name ->
local_scopes -> cases_pattern * (notation_location * scope_name option)
-(* Return the primitive token associated to a [term]/[cases_pattern];
+(** Return the primitive token associated to a [term]/[cases_pattern];
raise [No_match] if no such token *)
val uninterp_prim_token :
@@ -100,9 +100,9 @@ val uninterp_prim_token_cases_pattern :
val availability_of_prim_token :
prim_token -> scope_name -> local_scopes -> delimiters option option
-(*s Declare and interpret back and forth a notation *)
+(** {6 Declare and interpret back and forth a notation } *)
-(* Binds a notation in a given scope to an interpretation *)
+(** Binds a notation in a given scope to an interpretation *)
type interp_rule =
| NotationRule of scope_name option * notation
| SynDefRule of kernel_name
@@ -112,39 +112,39 @@ val declare_notation_interpretation : notation -> scope_name option ->
val declare_uninterpretation : interp_rule -> interpretation -> unit
-(* Return the interpretation bound to a notation *)
+(** Return the interpretation bound to a notation *)
val interp_notation : loc -> notation -> local_scopes ->
interpretation * (notation_location * scope_name option)
-(* Return the possible notations for a given term *)
+(** Return the possible notations for a given term *)
val uninterp_notations : rawconstr ->
(interp_rule * interpretation * int option) list
val uninterp_cases_pattern_notations : cases_pattern ->
(interp_rule * interpretation * int option) list
-(* Test if a notation is available in the scopes *)
-(* context [scopes]; if available, the result is not None; the first *)
-(* argument is itself not None if a delimiters is needed *)
+(** Test if a notation is available in the scopes
+ context [scopes]; if available, the result is not None; the first
+ argument is itself not None if a delimiters is needed *)
val availability_of_notation : scope_name option * notation -> local_scopes ->
(scope_name option * delimiters option) option
-(*s Declare and test the level of a (possibly uninterpreted) notation *)
+(** {6 Declare and test the level of a (possibly uninterpreted) notation } *)
val declare_notation_level : notation -> level -> unit
-val level_of_notation : notation -> level (* raise [Not_found] if no level *)
+val level_of_notation : notation -> level (** raise [Not_found] if no level *)
(*s** Miscellaneous *)
val interp_notation_as_global_reference : loc -> (global_reference -> bool) ->
notation -> delimiters option -> global_reference
-(* Checks for already existing notations *)
+(** Checks for already existing notations *)
val exists_notation_in_scope : scope_name option -> notation ->
interpretation -> bool
-(* Declares and looks for scopes associated to arguments of a global ref *)
+(** Declares and looks for scopes associated to arguments of a global ref *)
val declare_arguments_scope :
- bool (* true=local *) -> global_reference -> scope_name option list -> unit
+ bool (** true=local *) -> global_reference -> scope_name option list -> unit
val find_arguments_scope : global_reference -> scope_name option list
@@ -153,7 +153,7 @@ val declare_ref_arguments_scope : global_reference -> unit
val compute_arguments_scope : Term.types -> scope_name option list
-(* Building notation key *)
+(** Building notation key *)
type symbol =
| Terminal of string
@@ -164,7 +164,7 @@ type symbol =
val make_notation_key : symbol list -> notation
val decompose_notation_key : notation -> symbol list
-(* Prints scopes (expects a pure aconstr printer) *)
+(** Prints scopes (expects a pure aconstr printer) *)
val pr_scope : (rawconstr -> std_ppcmds) -> scope_name -> std_ppcmds
val pr_scopes : (rawconstr -> std_ppcmds) -> std_ppcmds
val locate_notation : (rawconstr -> std_ppcmds) -> notation ->
@@ -172,13 +172,13 @@ val locate_notation : (rawconstr -> std_ppcmds) -> notation ->
val pr_visibility: (rawconstr -> std_ppcmds) -> scope_name option -> std_ppcmds
-(**********************************************************************)
-(*s Printing rules for notations *)
+(*********************************************************************
+ s Printing rules for notations *)
-(* Declare and look for the printing rule for symbolic notations *)
+(** Declare and look for the printing rule for symbolic notations *)
type unparsing_rule = unparsing list * precedence
val declare_notation_printing_rule : notation -> unparsing_rule -> unit
val find_notation_printing_rule : notation -> unparsing_rule
-(**********************************************************************)
-(* Rem: printing rules for primitive token are canonical *)
+(*********************************************************************
+ Rem: printing rules for primitive token are canonical *)
diff --git a/interp/ppextend.mli b/interp/ppextend.mli
index 3d09587d0..984696cda 100644
--- a/interp/ppextend.mli
+++ b/interp/ppextend.mli
@@ -1,21 +1,19 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Pp
open Names
-(*i*)
-(*s Pretty-print. *)
+(** {6 Pretty-print. } *)
-(* Dealing with precedences *)
+(** Dealing with precedences *)
type precedence = int
diff --git a/interp/reserve.mli b/interp/reserve.mli
index a83e66c4a..4cc2eff5a 100644
--- a/interp/reserve.mli
+++ b/interp/reserve.mli
@@ -1,10 +1,10 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
diff --git a/interp/smartlocate.mli b/interp/smartlocate.mli
index 682484f57..b505e7db7 100644
--- a/interp/smartlocate.mli
+++ b/interp/smartlocate.mli
@@ -1,37 +1,37 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
-(* $Id:$ *)
+(** {% $ %}Id:{% $ %} *)
open Util
open Names
open Libnames
open Genarg
-(* [locate_global_with_alias] locates global reference possibly following
+(** [locate_global_with_alias] locates global reference possibly following
a notation if this notation has a role of aliasing; raise Not_found
if not bound in the global env; raise an error if bound to a
syntactic def that does not denote a reference *)
val locate_global_with_alias : qualid located -> global_reference
-(* Extract a global_reference from a reference that can be an "alias" *)
+(** Extract a global_reference from a reference that can be an "alias" *)
val global_of_extended_global : extended_global_reference -> global_reference
-(* Locate a reference taking into account possible "alias" notations *)
+(** Locate a reference taking into account possible "alias" notations *)
val global_with_alias : reference -> global_reference
-(* The same for inductive types *)
+(** The same for inductive types *)
val global_inductive_with_alias : reference -> inductive
-(* Locate a reference taking into account notations and "aliases" *)
+(** Locate a reference taking into account notations and "aliases" *)
val smart_global : reference or_by_notation -> global_reference
-(* The same for inductive types *)
+(** The same for inductive types *)
val smart_global_inductive : reference or_by_notation -> inductive
diff --git a/interp/syntax_def.mli b/interp/syntax_def.mli
index b4da6dd7a..6b57b497a 100644
--- a/interp/syntax_def.mli
+++ b/interp/syntax_def.mli
@@ -1,23 +1,21 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Util
open Names
open Topconstr
open Rawterm
open Nametab
open Libnames
-(*i*)
-(* Syntactic definitions. *)
+(** Syntactic definitions. *)
type syndef_interpretation = (identifier * subscopes) list * aconstr
diff --git a/interp/topconstr.mli b/interp/topconstr.mli
index 2f25be94c..02e6d1eeb 100644
--- a/interp/topconstr.mli
+++ b/interp/topconstr.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Pp
open Util
open Names
@@ -16,20 +15,20 @@ open Libnames
open Rawterm
open Term
open Mod_subst
-(*i*)
-(*s This is the subtype of rawconstr allowed in syntactic extensions *)
-(* No location since intended to be substituted at any place of a text *)
-(* Complex expressions such as fixpoints and cofixpoints are excluded, *)
-(* non global expressions such as existential variables also *)
+(** {6 Sect } *)
+(** This is the subtype of rawconstr allowed in syntactic extensions
+ No location since intended to be substituted at any place of a text
+ Complex expressions such as fixpoints and cofixpoints are excluded,
+ non global expressions such as existential variables also *)
type aconstr =
- (* Part common to [rawconstr] and [cases_pattern] *)
+ (** Part common to [rawconstr] and [cases_pattern] *)
| ARef of global_reference
| AVar of identifier
| AApp of aconstr * aconstr list
| AList of identifier * identifier * aconstr * aconstr * bool
- (* Part only in [rawconstr] *)
+ (** Part only in [rawconstr] *)
| ALambda of name * aconstr * aconstr
| AProd of name * aconstr * aconstr
| ALetIn of name * aconstr * aconstr
@@ -46,20 +45,20 @@ type aconstr =
| APatVar of patvar
| ACast of aconstr * aconstr cast_type
-(**********************************************************************)
-(* Translate a rawconstr into a notation given the list of variables *)
-(* bound by the notation; also interpret recursive patterns *)
+(*********************************************************************
+ Translate a rawconstr into a notation given the list of variables
+ bound by the notation; also interpret recursive patterns *)
val aconstr_of_rawconstr : identifier list -> rawconstr -> aconstr
-(* Name of the special identifier used to encode recursive notations *)
+(** Name of the special identifier used to encode recursive notations *)
val ldots_var : identifier
-(* Equality of rawconstr (warning: only partially implemented) *)
+(** Equality of rawconstr (warning: only partially implemented) *)
val eq_rawconstr : rawconstr -> rawconstr -> bool
-(**********************************************************************)
-(* Re-interpret a notation as a rawconstr, taking care of binders *)
+(*********************************************************************
+ Re-interpret a notation as a rawconstr, taking care of binders *)
val rawconstr_of_aconstr_with_binders : loc ->
('a -> name -> 'a * name) ->
@@ -67,9 +66,9 @@ val rawconstr_of_aconstr_with_binders : loc ->
val rawconstr_of_aconstr : loc -> aconstr -> rawconstr
-(**********************************************************************)
-(* [match_aconstr metas] matches a rawconstr against an aconstr with *)
-(* metavariables in [metas]; raise [No_match] if the matching fails *)
+(*********************************************************************
+ [match_aconstr metas] matches a rawconstr against an aconstr with
+ metavariables in [metas]; raise [No_match] if the matching fails *)
exception No_match
@@ -80,19 +79,19 @@ type tmp_scope_name = scope_name
type subscopes = tmp_scope_name option * scope_name list
type interpretation =
- (* regular vars of notation / recursive parts of notation / body *)
+ (** regular vars of notation / recursive parts of notation / body *)
((identifier * subscopes) list * (identifier * subscopes) list) * aconstr
val match_aconstr : rawconstr -> interpretation ->
(rawconstr * subscopes) list * (rawconstr list * subscopes) list
-(**********************************************************************)
-(* Substitution of kernel names in interpretation data *)
+(*********************************************************************
+ Substitution of kernel names in interpretation data *)
val subst_interpretation : substitution -> interpretation -> interpretation
-(**********************************************************************)
-(*s Concrete syntax for terms *)
+(*********************************************************************
+ s Concrete syntax for terms *)
type notation = string
@@ -101,17 +100,17 @@ type explicitation = ExplByPos of int * identifier option | ExplByName of identi
type binder_kind =
| Default of binding_kind
| Generalized of binding_kind * binding_kind * bool
- (* Inner binding, outer bindings, typeclass-specific flag
+ (** Inner binding, outer bindings, typeclass-specific flag
for implicit generalization of superclasses *)
type abstraction_kind = AbsLambda | AbsPi
-type proj_flag = int option (* [Some n] = proj of the n-th visible argument *)
+type proj_flag = int option (** [Some n] = proj of the n-th visible argument *)
type prim_token = Numeral of Bigint.bigint | String of string
type 'a notation_substitution =
- 'a list * (* for recursive notations: *) 'a list list
+ 'a list * (** for recursive notations: *) 'a list list
type cases_pattern_expr =
| CPatAlias of loc * cases_pattern_expr * identifier
@@ -162,7 +161,7 @@ and cofix_expr =
and recursion_order_expr =
| CStructRec
| CWfRec of constr_expr
- | CMeasureRec of constr_expr * constr_expr option (* measure, relation *)
+ | CMeasureRec of constr_expr * constr_expr option (** measure, relation *)
(** Anonymous defs allowed ?? *)
and local_binder =
@@ -175,8 +174,8 @@ and typeclass_context = typeclass_constraint list
type constr_pattern_expr = constr_expr
-(**********************************************************************)
-(* Utilities on constr_expr *)
+(*********************************************************************
+ Utilities on constr_expr *)
val constr_loc : constr_expr -> loc
@@ -190,7 +189,7 @@ val occur_var_constr_expr : identifier -> constr_expr -> bool
val default_binder_kind : binder_kind
-(* Specific function for interning "in indtype" syntax of "match" *)
+(** Specific function for interning "in indtype" syntax of "match" *)
val ids_of_cases_indtype : constr_expr -> identifier list
val mkIdentC : identifier -> constr_expr
@@ -210,32 +209,32 @@ val index_of_annot : local_binder list -> identifier located option -> int optio
val abstract_constr_expr : constr_expr -> local_binder list -> constr_expr
val prod_constr_expr : constr_expr -> local_binder list -> constr_expr
-(* Same as [abstract_constr_expr] and [prod_constr_expr], with location *)
+(** Same as [abstract_constr_expr] and [prod_constr_expr], with location *)
val mkCLambdaN : loc -> local_binder list -> constr_expr -> constr_expr
val mkCProdN : loc -> local_binder list -> constr_expr -> constr_expr
-(* For binders parsing *)
+(** For binders parsing *)
-(* With let binders *)
+(** With let binders *)
val names_of_local_binders : local_binder list -> name located list
-(* Does not take let binders into account *)
+(** Does not take let binders into account *)
val names_of_local_assums : local_binder list -> name located list
-(* Used in typeclasses *)
+(** Used in typeclasses *)
val fold_constr_expr_with_binders : (identifier -> 'a -> 'a) ->
('a -> 'b -> constr_expr -> 'b) -> 'a -> 'b -> constr_expr -> 'b
-(* Used in correctness and interface; absence of var capture not guaranteed *)
-(* in pattern-matching clauses and in binders of the form [x,y:T(x)] *)
+(** Used in correctness and interface; absence of var capture not guaranteed
+ in pattern-matching clauses and in binders of the form [x,y:T(x)] *)
val map_constr_expr_with_binders :
(identifier -> 'a -> 'a) -> ('a -> constr_expr -> constr_expr) ->
'a -> constr_expr -> constr_expr
-(**********************************************************************)
-(* Concrete syntax for modules and module types *)
+(*********************************************************************
+ Concrete syntax for modules and module types *)
type with_declaration_ast =
| CWith_Module of identifier list located * qualid located
@@ -246,11 +245,11 @@ type module_ast =
| CMapply of module_ast * module_ast
| CMwith of module_ast * with_declaration_ast
-type module_ast_inl = module_ast * bool (* honor the inline annotations or not *)
+type module_ast_inl = module_ast * bool (** honor the inline annotations or not *)
type 'a module_signature =
- | Enforce of 'a (* ... : T *)
- | Check of 'a list (* ... <: T1 <: T2, possibly empty *)
+ | Enforce of 'a (** ... : T *)
+ | Check of 'a list (** ... <: T1 <: T2, possibly empty *)
val ntn_loc :
Util.loc -> constr_expr notation_substitution -> string -> (int * int) list
diff --git a/kernel/cbytecodes.mli b/kernel/cbytecodes.mli
index f4dc0b14d..a8860d6d8 100644
--- a/kernel/cbytecodes.mli
+++ b/kernel/cbytecodes.mli
@@ -38,42 +38,43 @@ type instruction =
| Kpush
| Kpop of int
| Kpush_retaddr of Label.t
- | Kapply of int (* number of arguments *)
- | Kappterm of int * int (* number of arguments, slot size *)
- | Kreturn of int (* slot size *)
+ | Kapply of int (** number of arguments *)
+ | Kappterm of int * int (** number of arguments, slot size *)
+ | Kreturn of int (** slot size *)
| Kjump
| Krestart
- | Kgrab of int (* number of arguments *)
- | Kgrabrec of int (* rec arg *)
- | Kclosure of Label.t * int (* label, number of free variables *)
+ | Kgrab of int (** number of arguments *)
+ | Kgrabrec of int (** rec arg *)
+ | Kclosure of Label.t * int (** label, number of free variables *)
| Kclosurerec of int * int * Label.t array * Label.t array
- (* nb fv, init, lbl types, lbl bodies *)
+ (** nb fv, init, lbl types, lbl bodies *)
| Kclosurecofix of int * int * Label.t array * Label.t array
- (* nb fv, init, lbl types, lbl bodies *)
+ (** nb fv, init, lbl types, lbl bodies *)
| Kgetglobal of constant
| Kconst of structured_constant
- | Kmakeblock of int * tag (* size, tag *)
+ | Kmakeblock of int * tag (** size, tag *)
| Kmakeprod
| Kmakeswitchblock of Label.t * Label.t * annot_switch * int
- | Kswitch of Label.t array * Label.t array (* consts,blocks *)
+ | Kswitch of Label.t array * Label.t array (** consts,blocks *)
| Kpushfields of int
| Kfield of int
| Ksetfield of int
| Kstop
| Ksequence of bytecodes * bytecodes
-(* spiwack: instructions concerning integers *)
- | Kbranch of Label.t (* jump to label, is it needed ? *)
- | Kaddint31 (* adds the int31 in the accu
+
+(** spiwack: instructions concerning integers *)
+ | Kbranch of Label.t (** jump to label, is it needed ? *)
+ | Kaddint31 (** adds the int31 in the accu
and the one ontop of the stack *)
- | Kaddcint31 (* makes the sum and keeps the carry *)
- | Kaddcarrycint31 (* sum +1, keeps the carry *)
- | Ksubint31 (* subtraction modulo *)
- | Ksubcint31 (* subtraction, keeps the carry *)
- | Ksubcarrycint31 (* subtraction -1, keeps the carry *)
- | Kmulint31 (* multiplication modulo *)
- | Kmulcint31 (* multiplication, result in two
+ | Kaddcint31 (** makes the sum and keeps the carry *)
+ | Kaddcarrycint31 (** sum +1, keeps the carry *)
+ | Ksubint31 (** subtraction modulo *)
+ | Ksubcint31 (** subtraction, keeps the carry *)
+ | Ksubcarrycint31 (** subtraction -1, keeps the carry *)
+ | Kmulint31 (** multiplication modulo *)
+ | Kmulcint31 (** multiplication, result in two
int31, for exact computation *)
- | Kdiv21int31 (* divides a double size integer
+ | Kdiv21int31 (** divides a double size integer
(represented by an int31 in the
accumulator and one on the top of
the stack) by an int31. The result
@@ -81,23 +82,23 @@ type instruction =
rest.
If the divisor is 0, it returns
0. *)
- | Kdivint31 (* euclidian division (returns a pair
+ | Kdivint31 (** euclidian division (returns a pair
quotient,rest) *)
- | Kaddmuldivint31 (* generic operation for shifting and
+ | Kaddmuldivint31 (** generic operation for shifting and
cycling. Takes 3 int31 i j and s,
and returns x*2^s+y/(2^(31-s) *)
- | Kcompareint31 (* unsigned comparison of int31
+ | Kcompareint31 (** unsigned comparison of int31
cf COMPAREINT31 in
kernel/byterun/coq_interp.c
for more info *)
- | Khead0int31 (* Give the numbers of 0 in head of a in31*)
- | Ktail0int31 (* Give the numbers of 0 in tail of a in31
+ | Khead0int31 (** Give the numbers of 0 in head of a in31*)
+ | Ktail0int31 (** Give the numbers of 0 in tail of a in31
ie low bits *)
- | Kisconst of Label.t (* conditional jump *)
- | Kareconst of int*Label.t (* conditional jump *)
- | Kcompint31 (* dynamic compilation of int31 *)
- | Kdecompint31 (* dynamix decompilation of int31 *)
-(* /spiwack *)
+ | Kisconst of Label.t (** conditional jump *)
+ | Kareconst of int*Label.t (** conditional jump *)
+ | Kcompint31 (** dynamic compilation of int31 *)
+ | Kdecompint31 (** dynamix decompilation of int31
+ /spiwack *)
and bytecodes = instruction list
@@ -107,25 +108,25 @@ type fv_elem = FVnamed of identifier | FVrel of int
type fv = fv_elem array
-(* spiwack: this exception is expected to be raised by function expecting
+(** spiwack: this exception is expected to be raised by function expecting
closed terms. *)
exception NotClosed
(*spiwack: both type have been moved from Cbytegen because I needed then
for the retroknowledge *)
type vm_env = {
- size : int; (* longueur de la liste [n] *)
- fv_rev : fv_elem list (* [fvn; ... ;fv1] *)
+ size : int; (** longueur de la liste [n] *)
+ fv_rev : fv_elem list (** [fvn; ... ;fv1] *)
}
type comp_env = {
- nb_stack : int; (* nbre de variables sur la pile *)
- in_stack : int list; (* position dans la pile *)
- nb_rec : int; (* nbre de fonctions mutuellement *)
- (* recursives = nbr *)
- pos_rec : instruction list; (* instruction d'acces pour les variables *)
- (* de point fix ou de cofix *)
+ nb_stack : int; (** nbre de variables sur la pile *)
+ in_stack : int list; (** position dans la pile *)
+ nb_rec : int; (** nbre de fonctions mutuellement *)
+ (** recursives = nbr *)
+ pos_rec : instruction list; (** instruction d'acces pour les variables *)
+ (** de point fix ou de cofix *)
offset : int;
in_env : vm_env ref
}
@@ -140,7 +141,7 @@ type block =
| Bstrconst of structured_constant
| Bmakeblock of int * block array
| Bconstruct_app of int * int * int * block array
- (* tag , nparams, arity *)
+ (** tag , nparams, arity *)
| Bspecial of (comp_env -> block array -> int -> bytecodes -> bytecodes) * block array
- (* compilation function (see get_vm_constant_dynamic_info in
+ (** compilation function (see get_vm_constant_dynamic_info in
retroknowledge.mli for more info) , argument array *)
diff --git a/kernel/cbytegen.mli b/kernel/cbytegen.mli
index f33fd6cb0..bf9c0be26 100644
--- a/kernel/cbytegen.mli
+++ b/kernel/cbytegen.mli
@@ -7,20 +7,20 @@ open Pre_env
val compile : env -> constr -> bytecodes * bytecodes * fv
- (* init, fun, fv *)
+ (** init, fun, fv *)
val compile_constant_body :
env -> constr_substituted option -> bool -> bool -> body_code
- (* opaque *) (* boxed *)
+ (** opaque *) (* boxed *)
-(* spiwack: this function contains the information needed to perform
+(** spiwack: this function contains the information needed to perform
the static compilation of int31 (trying and obtaining
a 31-bit integer in processor representation at compile time) *)
val compile_structured_int31 : bool -> constr array ->
structured_constant
-(* this function contains the information needed to perform
+(** this function contains the information needed to perform
the dynamic compilation of int31 (trying and obtaining a
31-bit integer in processor representation at runtime when
it failed at compile time *)
diff --git a/kernel/cemitcodes.mli b/kernel/cemitcodes.mli
index 965228fa1..547155423 100644
--- a/kernel/cemitcodes.mli
+++ b/kernel/cemitcodes.mli
@@ -7,7 +7,8 @@ type reloc_info =
| Reloc_getglobal of constant
type patch = reloc_info * int
-(* A virer *)
+
+(** A virer *)
val subst_patch : Mod_subst.substitution -> patch -> patch
type emitcodes
@@ -37,4 +38,4 @@ val is_boxed : to_patch_substituted -> bool
val subst_to_patch_subst : Mod_subst.substitution -> to_patch_substituted -> to_patch_substituted
val to_memory : bytecodes * bytecodes * fv -> to_patch
- (* init code, fun code, fv *)
+ (** init code, fun code, fv *)
diff --git a/kernel/closure.mli b/kernel/closure.mli
index 5cb6fc97c..ce339ab33 100644
--- a/kernel/closure.mli
+++ b/kernel/closure.mli
@@ -1,28 +1,27 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Pp
open Names
open Term
open Environ
open Esubst
-(*i*)
-(* Flags for profiling reductions. *)
+(** Flags for profiling reductions. *)
val stats : bool ref
val share : bool ref
val with_stats: 'a Lazy.t -> 'a
-(*s Delta implies all consts (both global (= by
+(** {6 Sect } *)
+(** Delta implies all consts (both global (= by
[kernel_name]) and local (= by [Rel] or [Var])), all evars, and letin's.
Rem: reduction of a Rel/Var bound to a term is Delta, but reduction of
a LetIn expression is Letin reduction *)
@@ -32,12 +31,12 @@ val with_stats: 'a Lazy.t -> 'a
val all_opaque : transparent_state
val all_transparent : transparent_state
-(* Sets of reduction kinds. *)
+(** Sets of reduction kinds. *)
module type RedFlagsSig = sig
type reds
type red_kind
- (* The different kinds of reduction *)
+ (** The different kinds of reduction *)
val fBETA : red_kind
val fDELTA : red_kind
val fIOTA : red_kind
@@ -45,25 +44,25 @@ module type RedFlagsSig = sig
val fCONST : constant -> red_kind
val fVAR : identifier -> red_kind
- (* No reduction at all *)
+ (** No reduction at all *)
val no_red : reds
- (* Adds a reduction kind to a set *)
+ (** Adds a reduction kind to a set *)
val red_add : reds -> red_kind -> reds
- (* Removes a reduction kind to a set *)
+ (** Removes a reduction kind to a set *)
val red_sub : reds -> red_kind -> reds
- (* Adds a reduction kind to a set *)
+ (** Adds a reduction kind to a set *)
val red_add_transparent : reds -> transparent_state -> reds
- (* Build a reduction set from scratch = iter [red_add] on [no_red] *)
+ (** Build a reduction set from scratch = iter [red_add] on [no_red] *)
val mkflags : red_kind list -> reds
- (* Tests if a reduction kind is set *)
+ (** Tests if a reduction kind is set *)
val red_set : reds -> red_kind -> bool
- (* Gives the constant list *)
+ (** Gives the constant list *)
val red_get_const : reds -> bool * evaluable_global_reference list
end
@@ -89,19 +88,19 @@ val create: ('a infos -> constr -> 'a) -> reds -> env ->
(existential -> constr option) -> 'a infos
val evar_value : 'a infos -> existential -> constr option
-(************************************************************************)
-(*s Lazy reduction. *)
+(***********************************************************************
+ s Lazy reduction. *)
-(* [fconstr] is the type of frozen constr *)
+(** [fconstr] is the type of frozen constr *)
type fconstr
-(* [fconstr] can be accessed by using the function [fterm_of] and by
+(** [fconstr] can be accessed by using the function [fterm_of] and by
matching on type [fterm] *)
type fterm =
| FRel of int
- | FAtom of constr (* Metas and Sorts *)
+ | FAtom of constr (** Metas and Sorts *)
| FCast of fconstr * cast_kind * fconstr
| FFlex of table_key
| FInd of inductive
@@ -118,8 +117,8 @@ type fterm =
| FCLOS of constr * fconstr subs
| FLOCKED
-(************************************************************************)
-(*s A [stack] is a context of arguments, arguments are pushed by
+(***********************************************************************
+ s A [stack] is a context of arguments, arguments are pushed by
[append_stack] one array at a time but popped with [decomp_stack]
one by one *)
@@ -143,12 +142,13 @@ val stack_tail : int -> stack -> stack
val stack_nth : stack -> int -> fconstr
val zip_term : (fconstr -> constr) -> constr -> stack -> constr
-(* To lazy reduce a constr, create a [clos_infos] with
+(** To lazy reduce a constr, create a [clos_infos] with
[create_clos_infos], inject the term to reduce with [inject]; then use
a reduction function *)
val inject : constr -> fconstr
-(* mk_atom: prevents a term from being evaluated *)
+
+(** mk_atom: prevents a term from being evaluated *)
val mk_atom : constr -> fconstr
val fterm_of : fconstr -> fterm
@@ -156,33 +156,33 @@ val term_of_fconstr : fconstr -> constr
val destFLambda :
(fconstr subs -> constr -> fconstr) -> fconstr -> name * fconstr * fconstr
-(* Global and local constant cache *)
+(** Global and local constant cache *)
type clos_infos
val create_clos_infos :
?evars:(existential->constr option) -> reds -> env -> clos_infos
-(* Reduction function *)
+(** Reduction function *)
-(* [norm_val] is for strong normalization *)
+(** [norm_val] is for strong normalization *)
val norm_val : clos_infos -> fconstr -> constr
-(* [whd_val] is for weak head normalization *)
+(** [whd_val] is for weak head normalization *)
val whd_val : clos_infos -> fconstr -> constr
-(* [whd_stack] performs weak head normalization in a given stack. It
+(** [whd_stack] performs weak head normalization in a given stack. It
stops whenever a reduction is blocked. *)
val whd_stack :
clos_infos -> fconstr -> stack -> fconstr * stack
-(* Conversion auxiliary functions to do step by step normalisation *)
+(** Conversion auxiliary functions to do step by step normalisation *)
-(* [unfold_reference] unfolds references in a [fconstr] *)
+(** [unfold_reference] unfolds references in a [fconstr] *)
val unfold_reference : clos_infos -> table_key -> fconstr option
val eq_table_key : table_key -> table_key -> bool
-(************************************************************************)
-(*i This is for lazy debug *)
+(***********************************************************************
+ i This is for lazy debug *)
val lift_fconstr : int -> fconstr -> fconstr
val lift_fconstr_vect : int -> fconstr array -> fconstr array
@@ -200,4 +200,4 @@ val kl : clos_infos -> fconstr -> constr
val to_constr : (lift -> fconstr -> constr) -> lift -> fconstr -> constr
val optimise_closure : fconstr subs -> constr -> fconstr subs * constr
-(* End of cbn debug section i*)
+(** End of cbn debug section i*)
diff --git a/kernel/conv_oracle.mli b/kernel/conv_oracle.mli
index 86e108c6f..35e09072f 100644
--- a/kernel/conv_oracle.mli
+++ b/kernel/conv_oracle.mli
@@ -1,22 +1,22 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
open Names
-(* Order on section paths for unfolding.
+(** Order on section paths for unfolding.
If [oracle_order kn1 kn2] is true, then unfold kn1 first.
Note: the oracle does not introduce incompleteness, it only
tries to postpone unfolding of "opaque" constants. *)
val oracle_order : 'a tableKey -> 'a tableKey -> bool
-(* Priority for the expansion of constant in the conversion test.
+(** Priority for the expansion of constant in the conversion test.
* Higher levels means that the expansion is less prioritary.
* (And Expand stands for -oo, and Opaque +oo.)
* The default value (transparent constants) is [Level 0].
@@ -26,14 +26,14 @@ val transparent : level
val get_strategy : 'a tableKey -> level
-(* Sets the level of a constant.
+(** Sets the level of a constant.
* Level of RelKey constant cannot be set. *)
val set_strategy : 'a tableKey -> level -> unit
val get_transp_state : unit -> transparent_state
-(*****************************)
-(* Summary operations *)
+(****************************
+ Summary operations *)
type oracle
val init : unit -> unit
val freeze : unit -> oracle
diff --git a/kernel/cooking.mli b/kernel/cooking.mli
index db35031d9..5f30bce62 100644
--- a/kernel/cooking.mli
+++ b/kernel/cooking.mli
@@ -1,10 +1,10 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
@@ -14,7 +14,7 @@ open Declarations
open Environ
open Univ
-(*s Cooking the constants. *)
+(** {6 Cooking the constants. } *)
type work_list = identifier array Cmap.t * identifier array Mindmap.t
@@ -28,7 +28,7 @@ val cook_constant :
constr_substituted option * constant_type * constraints * bool * bool
* bool
-(*s Utility functions used in module [Discharge]. *)
+(** {6 Utility functions used in module [Discharge]. } *)
val expmod_constr : work_list -> constr -> constr
diff --git a/kernel/declarations.mli b/kernel/declarations.mli
index 2fb2cb81c..c6cf8a751 100644
--- a/kernel/declarations.mli
+++ b/kernel/declarations.mli
@@ -1,30 +1,27 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Univ
open Term
open Cemitcodes
open Sign
open Mod_subst
-(*i*)
-(* This module defines the internal representation of global
+(** This module defines the internal representation of global
declarations. This includes global constants/axioms, mutual
inductive definitions, modules and module types *)
type engagement = ImpredicativeSet
-(**********************************************************************)
-(*s Representation of constants (Definition/Axiom) *)
+(** {6 Representation of constants (Definition/Axiom) } *)
type polymorphic_arity = {
poly_param_levels : universe option list;
@@ -41,7 +38,7 @@ val from_val : constr -> constr_substituted
val force : constr_substituted -> constr
type constant_body = {
- const_hyps : section_context; (* New: younger hyp at top *)
+ const_hyps : section_context; (** New: younger hyp at top *)
const_body : constr_substituted option;
const_type : constant_type;
const_body_code : to_patch_substituted;
@@ -52,8 +49,7 @@ type constant_body = {
val subst_const_body : substitution -> constant_body -> constant_body
-(**********************************************************************)
-(*s Representation of mutual inductive types in the kernel *)
+(** {6 Representation of mutual inductive types in the kernel } *)
type recarg =
| Norec
@@ -72,12 +68,12 @@ val recarg_length : wf_paths -> int -> int
val subst_wf_paths : substitution -> wf_paths -> wf_paths
-(*
-\begin{verbatim}
+(**
+{% \begin{verbatim} %}
Inductive I1 (params) : U1 := c11 : T11 | ... | c1p1 : T1p1
...
with In (params) : Un := cn1 : Tn1 | ... | cnpn : Tnpn
-\end{verbatim}
+{% \end{verbatim} %}
*)
type monomorphic_inductive_arity = {
@@ -90,94 +86,72 @@ type inductive_arity =
| Polymorphic of polymorphic_arity
type one_inductive_body = {
+(** {8 Primitive datas } *)
-(* Primitive datas *)
+ mind_typename : identifier; (** Name of the type: [Ii] *)
- (* Name of the type: [Ii] *)
- mind_typename : identifier;
+ mind_arity_ctxt : rel_context; (** Arity context of [Ii] with parameters: [forall params, Ui] *)
- (* Arity context of [Ii] with parameters: [forall params, Ui] *)
- mind_arity_ctxt : rel_context;
+ mind_arity : inductive_arity; (** Arity sort and original user arity if monomorphic *)
- (* Arity sort and original user arity if monomorphic *)
- mind_arity : inductive_arity;
+ mind_consnames : identifier array; (** Names of the constructors: [cij] *)
- (* Names of the constructors: [cij] *)
- mind_consnames : identifier array;
-
- (* Types of the constructors with parameters: [forall params, Tij],
- where the Ik are replaced by de Bruijn index in the context
- I1:forall params, U1 .. In:forall params, Un *)
mind_user_lc : types array;
+ (** Types of the constructors with parameters: [forall params, Tij],
+ where the Ik are replaced by de Bruijn index in the
+ context I1:forall params, U1 .. In:forall params, Un *)
-(* Derived datas *)
+(** {8 Derived datas } *)
- (* Number of expected real arguments of the type (no let, no params) *)
- mind_nrealargs : int;
+ mind_nrealargs : int; (** Number of expected real arguments of the type (no let, no params) *)
- (* Length of realargs context (with let, no params) *)
- mind_nrealargs_ctxt : int;
+ mind_nrealargs_ctxt : int; (** Length of realargs context (with let, no params) *)
- (* List of allowed elimination sorts *)
- mind_kelim : sorts_family list;
+ mind_kelim : sorts_family list; (** List of allowed elimination sorts *)
- (* Head normalized constructor types so that their conclusion is atomic *)
- mind_nf_lc : types array;
+ mind_nf_lc : types array; (** Head normalized constructor types so that their conclusion is atomic *)
- (* Length of the signature of the constructors (with let, w/o params)
- (not to be used in the kernel!) *)
mind_consnrealdecls : int array;
+ (** Length of the signature of the constructors (with let, w/o params)
+ (not used in the kernel) *)
- (* Signature of recursive arguments in the constructors *)
- mind_recargs : wf_paths;
+ mind_recargs : wf_paths; (** Signature of recursive arguments in the constructors *)
-(* Datas for bytecode compilation *)
+(** {8 Datas for bytecode compilation } *)
- (* number of constant constructor *)
- mind_nb_constant : int;
+ mind_nb_constant : int; (** number of constant constructor *)
- (* number of no constant constructor *)
- mind_nb_args : int;
+ mind_nb_args : int; (** number of no constant constructor *)
mind_reloc_tbl : Cbytecodes.reloc_table;
}
type mutual_inductive_body = {
- (* The component of the mutual inductive block *)
- mind_packets : one_inductive_body array;
+ mind_packets : one_inductive_body array; (** The component of the mutual inductive block *)
- (* Whether the inductive type has been declared as a record *)
- mind_record : bool;
+ mind_record : bool; (** Whether the inductive type has been declared as a record *)
- (* Whether the type is inductive or coinductive *)
- mind_finite : bool;
+ mind_finite : bool; (** Whether the type is inductive or coinductive *)
- (* Number of types in the block *)
- mind_ntypes : int;
+ mind_ntypes : int; (** Number of types in the block *)
- (* Section hypotheses on which the block depends *)
- mind_hyps : section_context;
+ mind_hyps : section_context; (** Section hypotheses on which the block depends *)
- (* Number of expected parameters *)
- mind_nparams : int;
+ mind_nparams : int; (** Number of expected parameters *)
- (* Number of recursively uniform (i.e. ordinary) parameters *)
- mind_nparams_rec : int;
+ mind_nparams_rec : int; (** Number of recursively uniform (i.e. ordinary) parameters *)
- (* The context of parameters (includes let-in declaration) *)
- mind_params_ctxt : rel_context;
+ mind_params_ctxt : rel_context; (** The context of parameters (includes let-in declaration) *)
- (* Universes constraints enforced by the inductive declaration *)
- mind_constraints : constraints;
+ mind_constraints : constraints; (** Universes constraints enforced by the inductive declaration *)
}
val subst_mind : substitution -> mutual_inductive_body -> mutual_inductive_body
-(**********************************************************************)
-(*s Modules: signature component specifications, module types, and
- module declarations *)
+(** {6 Modules: signature component specifications, module types, and
+ module declarations } *)
type structure_field_body =
| SFBconst of constant_body
@@ -199,29 +173,29 @@ and with_declaration_body =
| With_definition_body of identifier list * constant_body
and module_body =
- { (*absolute path of the module*)
+ { (** absolute path of the module *)
mod_mp : module_path;
- (* Implementation *)
+ (** Implementation *)
mod_expr : struct_expr_body option;
- (* Signature *)
+ (** Signature *)
mod_type : struct_expr_body;
- (* algebraic structure expression is kept
+ (** algebraic structure expression is kept
if it's relevant for extraction *)
mod_type_alg : struct_expr_body option;
- (* set of all constraint in the module *)
+ (** set of all constraint in the module *)
mod_constraints : constraints;
- (* quotiented set of equivalent constant and inductive name *)
+ (** quotiented set of equivalent constant and inductive name *)
mod_delta : delta_resolver;
mod_retroknowledge : Retroknowledge.action list}
and module_type_body =
{
- (*Path of the module type*)
+ (** Path of the module type *)
typ_mp : module_path;
typ_expr : struct_expr_body;
- (* algebraic structure expression is kept
+ (** algebraic structure expression is kept
if it's relevant for extraction *)
typ_expr_alg : struct_expr_body option ;
typ_constraints : constraints;
- (* quotiented set of equivalent constant and inductive name *)
+ (** quotiented set of equivalent constant and inductive name *)
typ_delta :delta_resolver}
diff --git a/kernel/entries.mli b/kernel/entries.mli
index 20fbbb8e7..2cfdf9314 100644
--- a/kernel/entries.mli
+++ b/kernel/entries.mli
@@ -1,43 +1,40 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Univ
open Term
open Sign
-(*i*)
-(* This module defines the entry types for global declarations. This
+(** This module defines the entry types for global declarations. This
information is entered in the environments. This includes global
constants/axioms, mutual inductive definitions, modules and module
types *)
-(*s Local entries *)
+(** {6 Local entries } *)
type local_entry =
| LocalDef of constr
| LocalAssum of constr
-(*s Declaration of inductive types. *)
+(** {6 Declaration of inductive types. } *)
-(* Assume the following definition in concrete syntax:
-\begin{verbatim}
-Inductive I1 (x1:X1) ... (xn:Xn) : A1 := c11 : T11 | ... | c1n1 : T1n1
+(** Assume the following definition in concrete syntax:
+{v Inductive I1 (x1:X1) ... (xn:Xn) : A1 := c11 : T11 | ... | c1n1 : T1n1
...
-with Ip (x1:X1) ... (xn:Xn) : Ap := cp1 : Tp1 | ... | cpnp : Tpnp.
-\end{verbatim}
-then, in $i^{th}$ block, [mind_entry_params] is [[xn:Xn;...;x1:X1]];
-[mind_entry_arity] is [Ai], defined in context [[[x1:X1;...;xn:Xn]];
+with Ip (x1:X1) ... (xn:Xn) : Ap := cp1 : Tp1 | ... | cpnp : Tpnp. v}
+
+then, in i{^ th} block, [mind_entry_params] is [xn:Xn;...;x1:X1];
+[mind_entry_arity] is [Ai], defined in context [x1:X1;...;xn:Xn];
[mind_entry_lc] is [Ti1;...;Tini], defined in context [[A'1;...;A'p;x1:X1;...;xn:Xn]] where [A'i] is [Ai] generalized over [[x1:X1;...;xn:Xn]].
*)
@@ -53,7 +50,7 @@ type mutual_inductive_entry = {
mind_entry_params : (identifier * local_entry) list;
mind_entry_inds : one_inductive_entry list }
-(*s Constants (Definition/Axiom) *)
+(** {6 Constants (Definition/Axiom) } *)
type definition_entry = {
const_entry_body : constr;
@@ -67,7 +64,7 @@ type constant_entry =
| DefinitionEntry of definition_entry
| ParameterEntry of parameter_entry
-(*s Modules *)
+(** {6 Modules } *)
type specification_entry =
diff --git a/kernel/environ.mli b/kernel/environ.mli
index 667a0ed43..fce149e10 100644
--- a/kernel/environ.mli
+++ b/kernel/environ.mli
@@ -1,26 +1,24 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Term
open Declarations
open Sign
-(*i*)
-(*s Unsafe environments. We define here a datatype for environments.
+(** Unsafe environments. We define here a datatype for environments.
Since typing is not yet defined, it is not possible to check the
informations added in environments, and that is why we speak here
of ``unsafe'' environments. *)
-(* Environments have the following components:
+(** Environments have the following components:
- a context for de Bruijn variables
- a context for de Bruijn variables vm values
- a context for section variables and goal assumptions
@@ -50,27 +48,27 @@ val named_context_val : env -> named_context_val
val engagement : env -> engagement option
-(* is the local context empty *)
+(** is the local context empty *)
val empty_context : env -> bool
-(************************************************************************)
-(*s Context of de Bruijn variables ([rel_context]) *)
+(** {5 Context of de Bruijn variables ([rel_context]) } *)
+
val nb_rel : env -> int
val push_rel : rel_declaration -> env -> env
val push_rel_context : rel_context -> env -> env
val push_rec_types : rec_declaration -> env -> env
-(* Looks up in the context of local vars referred by indice ([rel_context]) *)
-(* raises [Not_found] if the index points out of the context *)
+(** Looks up in the context of local vars referred by indice ([rel_context])
+ raises [Not_found] if the index points out of the context *)
val lookup_rel : int -> env -> rel_declaration
val evaluable_rel : int -> env -> bool
-(*s Recurrence on [rel_context] *)
+(** {6 Recurrence on [rel_context] } *)
+
val fold_rel_context :
(env -> rel_declaration -> 'a -> 'a) -> env -> init:'a -> 'a
-(************************************************************************)
-(* Context of variables (section variables and goal assumptions) *)
+(** {5 Context of variables (section variables and goal assumptions) } *)
val named_context_of_val : named_context_val -> named_context
val named_vals_of_val : named_context_val -> Pre_env.named_vals
@@ -78,7 +76,7 @@ val val_of_named_context : named_context -> named_context_val
val empty_named_context_val : named_context_val
-(* [map_named_val f ctxt] apply [f] to the body and the type of
+(** [map_named_val f ctxt] apply [f] to the body and the type of
each declarations.
*** /!\ *** [f t] should be convertible with t *)
val map_named_val :
@@ -90,8 +88,8 @@ val push_named_context_val :
-(* Looks up in the context of local vars referred by names ([named_context]) *)
-(* raises [Not_found] if the identifier is not found *)
+(** Looks up in the context of local vars referred by names ([named_context])
+ raises [Not_found] if the identifier is not found *)
val lookup_named : variable -> env -> named_declaration
val lookup_named_val : variable -> named_context_val -> named_declaration
@@ -99,34 +97,36 @@ val evaluable_named : variable -> env -> bool
val named_type : variable -> env -> types
val named_body : variable -> env -> constr option
-(*s Recurrence on [named_context]: older declarations processed first *)
+(** {6 Recurrence on [named_context]: older declarations processed first } *)
val fold_named_context :
(env -> named_declaration -> 'a -> 'a) -> env -> init:'a -> 'a
-(* Recurrence on [named_context] starting from younger decl *)
+(** Recurrence on [named_context] starting from younger decl *)
val fold_named_context_reverse :
('a -> named_declaration -> 'a) -> init:'a -> env -> 'a
-(* This forgets named and rel contexts *)
+(** This forgets named and rel contexts *)
val reset_context : env -> env
-(* This forgets rel context and sets a new named context *)
+
+(** This forgets rel context and sets a new named context *)
val reset_with_named_context : named_context_val -> env -> env
-(************************************************************************)
-(*s Global constants *)
-(*s Add entries to global environment *)
-val add_constant : constant -> constant_body -> env -> env
+(** {5 Global constants }
+ {6 Add entries to global environment } *)
-(* Looks up in the context of global constant names *)
-(* raises [Not_found] if the required path is not found *)
+val add_constant : constant -> constant_body -> env -> env
+(** Looks up in the context of global constant names
+ raises [Not_found] if the required path is not found *)
val lookup_constant : constant -> env -> constant_body
val evaluable_constant : constant -> env -> bool
-(*s [constant_value env c] raises [NotEvaluableConst Opaque] if
+(** {6 Sect } *)
+(** [constant_value env c] raises [NotEvaluableConst Opaque] if
[c] is opaque and [NotEvaluableConst NoBody] if it has no
body and [Not_found] if it does not exist in [env] *)
+
type const_evaluation_result = NoBody | Opaque
exception NotEvaluableConst of const_evaluation_result
@@ -134,44 +134,45 @@ val constant_value : env -> constant -> constr
val constant_type : env -> constant -> constant_type
val constant_opt_value : env -> constant -> constr option
-(************************************************************************)
-(*s Inductive types *)
+(** {5 Inductive types } *)
+
val add_mind : mutual_inductive -> mutual_inductive_body -> env -> env
-(* Looks up in the context of global inductive names *)
-(* raises [Not_found] if the required path is not found *)
+(** Looks up in the context of global inductive names
+ raises [Not_found] if the required path is not found *)
val lookup_mind : mutual_inductive -> env -> mutual_inductive_body
-(************************************************************************)
-(*s Modules *)
+(** {5 Modules } *)
+
val add_modtype : module_path -> module_type_body -> env -> env
-(* [shallow_add_module] does not add module components *)
+(** [shallow_add_module] does not add module components *)
val shallow_add_module : module_path -> module_body -> env -> env
val lookup_module : module_path -> env -> module_body
val lookup_modtype : module_path -> env -> module_type_body
-(************************************************************************)
-(*s Universe constraints *)
+(** {5 Universe constraints } *)
+
val set_universes : Univ.universes -> env -> env
val add_constraints : Univ.constraints -> env -> env
val set_engagement : engagement -> env -> env
-(************************************************************************)
-(* Sets of referred section variables *)
-(* [global_vars_set env c] returns the list of [id]'s occurring either
+(** {6 Sets of referred section variables }
+ [global_vars_set env c] returns the list of [id]'s occurring either
directly as [Var id] in [c] or indirectly as a section variable
dependent in a global reference occurring in [c] *)
+
val global_vars_set : env -> constr -> Idset.t
-(* the constr must be a global reference *)
+
+(** the constr must be a global reference *)
val vars_of_global : env -> constr -> identifier list
val keep_hyps : env -> Idset.t -> section_context
-(************************************************************************)
-(*s Unsafe judgments. We introduce here the pre-type of judgments, which is
+(** {5 Unsafe judgments. }
+ We introduce here the pre-type of judgments, which is
actually only a datatype to store a term with its type and the type of its
type. *)
@@ -188,23 +189,22 @@ type unsafe_type_judgment = {
utj_type : sorts }
-(*s Compilation of global declaration *)
+(** {6 Compilation of global declaration } *)
val compile_constant_body :
env -> constr_substituted option -> bool -> bool -> Cemitcodes.body_code
- (* opaque *) (* boxed *)
+ (** opaque *) (* boxed *)
exception Hyp_not_found
-(* [apply_to_hyp sign id f] split [sign] into [tail::(id,_,_)::head] and
+(** [apply_to_hyp sign id f] split [sign] into [tail::(id,_,_)::head] and
return [tail::(f head (id,_,_) (rev tail))::head].
the value associated to id should not change *)
-
val apply_to_hyp : named_context_val -> variable ->
(named_context -> named_declaration -> named_context -> named_declaration) ->
named_context_val
-(* [apply_to_hyp_and_dependent_on sign id f g] split [sign] into
+(** [apply_to_hyp_and_dependent_on sign id f g] split [sign] into
[tail::(id,_,_)::head] and
return [(g tail)::(f (id,_,_))::head]. *)
val apply_to_hyp_and_dependent_on : named_context_val -> variable ->
@@ -219,9 +219,10 @@ val insert_after_hyp : named_context_val -> variable ->
val remove_hyps : identifier list -> (named_declaration -> named_declaration) -> (Pre_env.lazy_val -> Pre_env.lazy_val) -> named_context_val -> named_context_val
-(* spiwack: functions manipulating the retroknowledge *)
-open Retroknowledge
+open Retroknowledge
+(** functions manipulating the retroknowledge
+ @author spiwack *)
val retroknowledge : (retroknowledge->'a) -> env -> 'a
val registered : env -> field -> bool
@@ -232,19 +233,18 @@ val register : env -> field -> Retroknowledge.entry -> env
-(******************************************************************)
-(* spiwack: a few declarations for the "Print Assumption" command *)
-
+(** a few declarations for the "Print Assumption" command
+ @author spiwack *)
type context_object =
- | Variable of identifier (* A section variable or a Let definition *)
- | Axiom of constant (* An axiom or a constant. *)
- | Opaque of constant (* An opaque constant. *)
+ | Variable of identifier (** A section variable or a Let definition *)
+ | Axiom of constant (** An axiom or a constant. *)
+ | Opaque of constant (** An opaque constant. *)
-(* AssumptionSet.t is a set of [assumption] *)
+(** AssumptionSet.t is a set of [assumption] *)
module OrderedContextObject : Set.OrderedType with type t = context_object
module ContextObjectMap : Map.S with type key = context_object
-(* collects all the assumptions (optionally including opaque definitions)
+(** collects all the assumptions (optionally including opaque definitions)
on which a term relies (together with their type) *)
val assumptions : ?add_opaque:bool -> transparent_state -> constr -> env -> Term.types ContextObjectMap.t
diff --git a/kernel/esubst.mli b/kernel/esubst.mli
index bf1d23241..bbb3d838e 100644
--- a/kernel/esubst.mli
+++ b/kernel/esubst.mli
@@ -1,15 +1,16 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*s Explicit substitutions of type ['a]. *)
-(* - ESID(n) = %n END bounded identity
+(** {6 Sect } *)
+(** Explicit substitutions of type ['a].
+ - ESID(n) = %n END bounded identity
* - CONS([|t1..tn|],S) = (S.t1...tn) parallel substitution
* (beware of the order: indice 1 is substituted by tn)
* - SHIFT(n,S) = (^n o S) terms in S are relocated with n vars
@@ -21,15 +22,16 @@ type 'a subs =
| SHIFT of int * 'a subs
| LIFT of int * 'a subs
-(* Derived constructors granting basic invariants *)
+(** Derived constructors granting basic invariants *)
val subs_cons: 'a array * 'a subs -> 'a subs
val subs_shft: int * 'a subs -> 'a subs
val subs_lift: 'a subs -> 'a subs
val subs_liftn: int -> 'a subs -> 'a subs
-(* [subs_shift_cons(k,s,[|t1..tn|])] builds (^k s).t1..tn *)
+
+(** [subs_shift_cons(k,s,[|t1..tn|])] builds (^k s).t1..tn *)
val subs_shift_cons: int * 'a subs * 'a array -> 'a subs
-(* [expand_rel k subs] expands de Bruijn [k] in the explicit substitution
+(** [expand_rel k subs] expands de Bruijn [k] in the explicit substitution
* [subs]. The result is either (Inl(lams,v)) when the variable is
* substituted by value [v] under lams binders (i.e. v *has* to be
* shifted by lams), or (Inr (k',p)) when the variable k is just relocated
@@ -38,17 +40,18 @@ val subs_shift_cons: int * 'a subs * 'a array -> 'a subs
*)
val expand_rel: int -> 'a subs -> (int * 'a, int * int option) Util.union
-(* Tests whether a substitution behaves like the identity *)
+(** Tests whether a substitution behaves like the identity *)
val is_subs_id: 'a subs -> bool
-(* Composition of substitutions: [comp mk_clos s1 s2] computes a
+(** Composition of substitutions: [comp mk_clos s1 s2] computes a
* substitution equivalent to applying s2 then s1. Argument
* mk_clos is used when a closure has to be created, i.e. when
* s1 is applied on an element of s2.
*)
val comp : ('a subs * 'a -> 'a) -> 'a subs -> 'a subs -> 'a subs
-(*s Compact representation of explicit relocations. \\
+(** {6 Sect } *)
+(** Compact representation of explicit relocations. \\
[ELSHFT(l,n)] == lift of [n], then apply [lift l].
[ELLFT(n,l)] == apply [l] to de Bruijn > [n] i.e under n binders. *)
type lift =
diff --git a/kernel/indtypes.mli b/kernel/indtypes.mli
index 0cbe15034..c29e5475d 100644
--- a/kernel/indtypes.mli
+++ b/kernel/indtypes.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Univ
open Term
@@ -16,13 +15,13 @@ open Declarations
open Environ
open Entries
open Typeops
-(*i*)
-(*s The different kinds of errors that may result of a malformed inductive
+(** {6 Sect } *)
+(** The different kinds of errors that may result of a malformed inductive
definition. *)
-(* Errors related to inductive constructions *)
+(** Errors related to inductive constructions *)
type inductive_error =
| NonPos of env * constr * constr
| NotEnoughArgs of env * constr * constr
@@ -37,7 +36,7 @@ type inductive_error =
exception InductiveError of inductive_error
-(*s The following function does checks on inductive declarations. *)
+(** {6 The following function does checks on inductive declarations. } *)
val check_inductive :
env -> mutual_inductive_entry -> mutual_inductive_body
diff --git a/kernel/inductive.mli b/kernel/inductive.mli
index 8fe8eb11f..7f2b08844 100644
--- a/kernel/inductive.mli
+++ b/kernel/inductive.mli
@@ -1,24 +1,22 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Univ
open Term
open Declarations
open Environ
-(*i*)
-(*s Extracting an inductive type from a construction *)
+(** {6 Extracting an inductive type from a construction } *)
-(* [find_m*type env sigma c] coerce [c] to an recursive type (I args).
+(** [find_m*type env sigma c] coerce [c] to an recursive type (I args).
[find_rectype], [find_inductive] and [find_coinductive]
respectively accepts any recursive type, only an inductive type and
only a coinductive type.
@@ -30,31 +28,32 @@ val find_coinductive : env -> types -> inductive * constr list
type mind_specif = mutual_inductive_body * one_inductive_body
-(*s Fetching information in the environment about an inductive type.
+(** {6 Sect } *)
+(** Fetching information in the environment about an inductive type.
Raises [Not_found] if the inductive type is not found. *)
val lookup_mind_specif : env -> inductive -> mind_specif
-(*s Functions to build standard types related to inductive *)
+(** {6 Functions to build standard types related to inductive } *)
val ind_subst : mutual_inductive -> mutual_inductive_body -> constr list
val type_of_inductive : env -> mind_specif -> types
val elim_sorts : mind_specif -> sorts_family list
-(* Return type as quoted by the user *)
+(** Return type as quoted by the user *)
val type_of_constructor : constructor -> mind_specif -> types
-(* Return constructor types in normal form *)
+(** Return constructor types in normal form *)
val arities_of_constructors : inductive -> mind_specif -> types array
-(* Return constructor types in user form *)
+(** Return constructor types in user form *)
val type_of_constructors : inductive -> mind_specif -> types array
-(* Transforms inductive specification into types (in nf) *)
+(** Transforms inductive specification into types (in nf) *)
val arities_of_specif : mutual_inductive -> mind_specif -> types array
-(* [type_case_branches env (I,args) (p:A) c] computes useful types
+(** [type_case_branches env (I,args) (p:A) c] computes useful types
about the following Cases expression:
<p>Cases (c :: (I args)) of b1..bn end
It computes the type of every branch (pattern variables are
@@ -69,20 +68,20 @@ val build_branches_type :
inductive -> mutual_inductive_body * one_inductive_body ->
constr list -> constr -> types array
-(* Return the arity of an inductive type *)
+(** Return the arity of an inductive type *)
val mind_arity : one_inductive_body -> rel_context * sorts_family
val inductive_sort_family : one_inductive_body -> sorts_family
-(* Check a [case_info] actually correspond to a Case expression on the
+(** Check a [case_info] actually correspond to a Case expression on the
given inductive type. *)
val check_case_info : env -> inductive -> case_info -> unit
-(*s Guard conditions for fix and cofix-points. *)
+(** {6 Guard conditions for fix and cofix-points. } *)
val check_fix : env -> fixpoint -> unit
val check_cofix : env -> cofixpoint -> unit
-(*s Support for sort-polymorphic inductive types *)
+(** {6 Support for sort-polymorphic inductive types } *)
val type_of_inductive_knowing_parameters :
env -> one_inductive_body -> types array -> types
@@ -92,8 +91,8 @@ val max_inductive_sort : sorts array -> universe
val instantiate_universes : env -> rel_context ->
polymorphic_arity -> types array -> rel_context * sorts
-(***************************************************************)
-(* Debug *)
+(**************************************************************
+ Debug *)
type size = Large | Strict
type subterm_spec =
@@ -102,13 +101,13 @@ type subterm_spec =
| Not_subterm
type guard_env =
{ env : env;
- (* dB of last fixpoint *)
+ (** dB of last fixpoint *)
rel_min : int;
- (* inductive of recarg of each fixpoint *)
+ (** inductive of recarg of each fixpoint *)
inds : inductive array;
- (* the recarg information of inductive family *)
+ (** the recarg information of inductive family *)
recvec : wf_paths array;
- (* dB of variables denoting subterms *)
+ (** dB of variables denoting subterms *)
genv : subterm_spec Lazy.t list;
}
diff --git a/kernel/mod_subst.mli b/kernel/mod_subst.mli
index a948d1647..53925955e 100644
--- a/kernel/mod_subst.mli
+++ b/kernel/mod_subst.mli
@@ -1,19 +1,19 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*s [Mod_subst] *)
+(** {6 [Mod_subst] } *)
open Names
open Term
-(* A delta_resolver maps name (constant, inductive, module_path)
+(** A delta_resolver maps name (constant, inductive, module_path)
to canonical name *)
type delta_resolver
@@ -35,30 +35,30 @@ val add_mp_delta_resolver : module_path -> module_path -> delta_resolver
val add_delta_resolver : delta_resolver -> delta_resolver -> delta_resolver
-(* Apply the substitution on the domain of the resolver *)
+(** Apply the substitution on the domain of the resolver *)
val subst_dom_delta_resolver : substitution -> delta_resolver -> delta_resolver
-(* Apply the substitution on the codomain of the resolver *)
+(** Apply the substitution on the codomain of the resolver *)
val subst_codom_delta_resolver : substitution -> delta_resolver -> delta_resolver
val subst_dom_codom_delta_resolver :
substitution -> delta_resolver -> delta_resolver
-(* *_of_delta return the associated name of arg2 in arg1 *)
+(** *_of_delta return the associated name of arg2 in arg1 *)
val constant_of_delta : delta_resolver -> constant -> constant
val mind_of_delta : delta_resolver -> mutual_inductive -> mutual_inductive
val delta_of_mp : delta_resolver -> module_path -> module_path
-(* Extract the set of inlined constant in the resolver *)
+(** Extract the set of inlined constant in the resolver *)
val inline_of_delta : delta_resolver -> kernel_name list
-(* remove_mp is used for the computation of a resolver induced by Include P *)
+(** remove_mp is used for the computation of a resolver induced by Include P *)
val remove_mp_delta_resolver : delta_resolver -> module_path -> delta_resolver
-(* mem tests *)
+(** mem tests *)
val mp_in_delta : module_path -> delta_resolver -> bool
val con_in_delta : constant -> delta_resolver -> bool
@@ -69,20 +69,20 @@ val mind_in_delta : mutual_inductive -> delta_resolver -> bool
val empty_subst : substitution
-(* add_* add [arg2/arg1]{arg3} to the substitution with no
+(** add_* add [arg2/arg1]\{arg3\} to the substitution with no
sequential composition *)
val add_mbid :
mod_bound_id -> module_path -> delta_resolver -> substitution -> substitution
val add_mp :
module_path -> module_path -> delta_resolver -> substitution -> substitution
-(* map_* create a new substitution [arg2/arg1]{arg3} *)
+(** map_* create a new substitution [arg2/arg1]\{arg3\} *)
val map_mbid :
mod_bound_id -> module_path -> delta_resolver -> substitution
val map_mp :
module_path -> module_path -> delta_resolver -> substitution
-(* sequential composition:
+(** sequential composition:
[substitute (join sub1 sub2) t = substitute sub2 (substitute sub1 t)]
*)
val join : substitution -> substitution -> substitution
@@ -97,9 +97,9 @@ val debug_string_of_subst : substitution -> string
val debug_pr_subst : substitution -> Pp.std_ppcmds
val debug_string_of_delta : delta_resolver -> string
val debug_pr_delta : delta_resolver -> Pp.std_ppcmds
-(*i*)
+(**/**)
-(* [subst_mp sub mp] guarantees that whenever the result of the
+(** [subst_mp sub mp] guarantees that whenever the result of the
substitution is structutally equal [mp], it is equal by pointers
as well [==] *)
@@ -115,7 +115,7 @@ val subst_kn :
val subst_con :
substitution -> constant -> constant * constr
-(* Here the semantics is completely unclear.
+(** Here the semantics is completely unclear.
What does "Hint Unfold t" means when "t" is a parameter?
Does the user mean "Unfold X.t" or does she mean "Unfold y"
where X.t is later on instantiated with y? I choose the first
@@ -123,14 +123,14 @@ val subst_con :
val subst_evaluable_reference :
substitution -> evaluable_global_reference -> evaluable_global_reference
-(* [replace_mp_in_con mp mp' con] replaces [mp] with [mp'] in [con] *)
+(** [replace_mp_in_con mp mp' con] replaces [mp] with [mp'] in [con] *)
val replace_mp_in_kn : module_path -> module_path -> kernel_name -> kernel_name
-(* [subst_mps sub c] performs the substitution [sub] on all kernel
+(** [subst_mps sub c] performs the substitution [sub] on all kernel
names appearing in [c] *)
val subst_mps : substitution -> constr -> constr
-(* [occur_*id id sub] returns true iff [id] occurs in [sub]
+(** [occur_*id id sub] returns true iff [id] occurs in [sub]
on either side *)
val occur_mbid : mod_bound_id -> substitution -> bool
diff --git a/kernel/mod_typing.mli b/kernel/mod_typing.mli
index 63f7696c4..188e4809c 100644
--- a/kernel/mod_typing.mli
+++ b/kernel/mod_typing.mli
@@ -1,20 +1,18 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Declarations
open Environ
open Entries
open Mod_subst
open Names
-(*i*)
val translate_module : env -> module_path -> bool -> module_entry
diff --git a/kernel/modops.mli b/kernel/modops.mli
index 3488a312f..0c61e773b 100644
--- a/kernel/modops.mli
+++ b/kernel/modops.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Util
open Names
open Univ
@@ -16,9 +15,8 @@ open Environ
open Declarations
open Entries
open Mod_subst
-(*i*)
-(* Various operations on modules and module types *)
+(** Various operations on modules and module types *)
val module_body_of_type : module_path -> module_type_body -> module_body
@@ -36,7 +34,7 @@ val subst_signature : substitution -> structure_body -> structure_body
val add_signature :
module_path -> structure_body -> delta_resolver -> env -> env
-(* adds a module and its components, but not the constraints *)
+(** adds a module and its components, but not the constraints *)
val add_module : module_body -> env -> env
val check_modpath_equiv : env -> module_path -> module_path -> unit
diff --git a/kernel/names.mli b/kernel/names.mli
index e4d2c9322..f712c8d19 100644
--- a/kernel/names.mli
+++ b/kernel/names.mli
@@ -1,51 +1,53 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*s Identifiers *)
+(** {6 Identifiers } *)
type identifier
type name = Name of identifier | Anonymous
-(* Parsing and printing of identifiers *)
+
+(** Parsing and printing of identifiers *)
val string_of_id : identifier -> string
val id_of_string : string -> identifier
val id_ord : identifier -> identifier -> int
-(* Identifiers sets and maps *)
+(** Identifiers sets and maps *)
module Idset : Set.S with type elt = identifier
module Idpred : Predicate.S with type elt = identifier
module Idmap : Map.S with type key = identifier
-(*s Directory paths = section names paths *)
+(** {6 Directory paths = section names paths } *)
type module_ident = identifier
module ModIdmap : Map.S with type key = module_ident
type dir_path
-(* Inner modules idents on top of list (to improve sharing).
+(** Inner modules idents on top of list (to improve sharing).
For instance: A.B.C is ["C";"B";"A"] *)
val make_dirpath : module_ident list -> dir_path
val repr_dirpath : dir_path -> module_ident list
val empty_dirpath : dir_path
-(* Printing of directory paths as ["coq_root.module.submodule"] *)
+(** Printing of directory paths as ["coq_root.module.submodule"] *)
val string_of_dirpath : dir_path -> string
-(*s Unique identifier to be used as "self" in structures and
+(** {6 Sect } *)
+(** Unique identifier to be used as "self" in structures and
signatures - invisible for users *)
type label
type mod_self_id
-(* The first argument is a file name - to prevent conflict between
+(** The first argument is a file name - to prevent conflict between
different files *)
val make_msid : dir_path -> string -> mod_self_id
val repr_msid : mod_self_id -> int * string * dir_path
@@ -55,7 +57,7 @@ val refresh_msid : mod_self_id -> mod_self_id
val debug_string_of_msid : mod_self_id -> string
val string_of_msid : mod_self_id -> string
-(*s Unique names for bound modules *)
+(** {6 Unique names for bound modules } *)
type mod_bound_id
val make_mbid : dir_path -> string -> mod_bound_id
@@ -65,7 +67,7 @@ val label_of_mbid : mod_bound_id -> label
val debug_string_of_mbid : mod_bound_id -> string
val string_of_mbid : mod_bound_id -> string
-(*s Names of structure elements *)
+(** {6 Names of structure elements } *)
val mk_label : string -> label
val string_of_label : label -> string
@@ -76,11 +78,11 @@ val id_of_label : label -> identifier
module Labset : Set.S with type elt = label
module Labmap : Map.S with type key = label
-(*s The module part of the kernel name *)
+(** {6 The module part of the kernel name } *)
type module_path =
| MPfile of dir_path
| MPbound of mod_bound_id
- (* | MPapp of module_path * module_path very soon *)
+ (** | MPapp of module_path * module_path very soon *)
| MPdot of module_path * label
@@ -91,18 +93,18 @@ val string_of_mp : module_path -> string
module MPset : Set.S with type elt = module_path
module MPmap : Map.S with type key = module_path
-(* Name of the toplevel structure *)
+(** Name of the toplevel structure *)
val initial_msid : mod_self_id
-val initial_path : module_path (* [= MPself initial_msid] *)
+val initial_path : module_path (** [= MPself initial_msid] *)
-(* Initial "seed" of the unique identifier generator *)
+(** Initial "seed" of the unique identifier generator *)
val initial_dir : dir_path
-(*s The absolute names of objects seen by kernel *)
+(** {6 The absolute names of objects seen by kernel } *)
type kernel_name
-(* Constructor and destructor *)
+(** Constructor and destructor *)
val make_kn : module_path -> dir_path -> label -> kernel_name
val repr_kn : kernel_name -> module_path * dir_path * label
@@ -118,17 +120,19 @@ module KNpred : Predicate.S with type elt = kernel_name
module KNmap : Map.S with type key = kernel_name
-(*s Specific paths for declarations *)
+(** {6 Specific paths for declarations } *)
type variable = identifier
type constant
type mutual_inductive
-(* Beware: first inductive has index 0 *)
+
+(** Beware: first inductive has index 0 *)
type inductive = mutual_inductive * int
-(* Beware: first constructor has index 1 *)
+
+(** Beware: first constructor has index 1 *)
type constructor = inductive * int
-(* *_env modules consider an order on user part of names
+(** *_env modules consider an order on user part of names
the others consider an order on canonical part of names*)
module Cmap : Map.S with type key = constant
module Cmap_env : Map.S with type key = constant
@@ -191,7 +195,7 @@ val index_of_constructor : constructor -> int
val eq_ind : inductive -> inductive -> bool
val eq_constructor : constructor -> constructor -> bool
-(* Better to have it here that in Closure, since required in grammar.cma *)
+(** Better to have it here that in Closure, since required in grammar.cma *)
type evaluable_global_reference =
| EvalVarRef of identifier
| EvalConstRef of constant
@@ -199,7 +203,7 @@ type evaluable_global_reference =
val eq_egr : evaluable_global_reference -> evaluable_global_reference
-> bool
-(* Hash-consing *)
+(** Hash-consing *)
val hcons_names : unit ->
(constant -> constant) *
(mutual_inductive -> mutual_inductive) * (dir_path -> dir_path) *
@@ -220,8 +224,8 @@ val full_transparent_state : transparent_state
val var_full_transparent_state : transparent_state
val cst_full_transparent_state : transparent_state
-type inv_rel_key = int (* index in the [rel_context] part of environment
- starting by the end, {\em inverse}
+type inv_rel_key = int (** index in the [rel_context] part of environment
+ starting by the end, {e inverse}
of de Bruijn indice *)
type id_key = inv_rel_key tableKey
diff --git a/kernel/pre_env.mli b/kernel/pre_env.mli
index 718132b32..619c1afcb 100644
--- a/kernel/pre_env.mli
+++ b/kernel/pre_env.mli
@@ -1,12 +1,12 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
-(* $Id$ *)
+(** {% $ %}Id: pre_env.mli 12406 2009-10-21 15:12:52Z soubiran {% $ %} *)
open Util
open Names
@@ -15,7 +15,7 @@ open Univ
open Term
open Declarations
-(* The type of environments. *)
+(** The type of environments. *)
type key = int option ref
@@ -57,25 +57,27 @@ val empty_named_context_val : named_context_val
val empty_env : env
-(* Rel context *)
+(** Rel context *)
val nb_rel : env -> int
val push_rel : rel_declaration -> env -> env
val lookup_rel_val : int -> env -> lazy_val
val env_of_rel : int -> env -> env
-(* Named context *)
+
+(** Named context *)
val push_named_context_val :
named_declaration -> named_context_val -> named_context_val
val push_named : named_declaration -> env -> env
val lookup_named_val : identifier -> env -> lazy_val
val env_of_named : identifier -> env -> env
-(* Global constants *)
+
+(** Global constants *)
val lookup_constant_key : constant -> env -> constant_key
val lookup_constant : constant -> env -> constant_body
-(* Mutual Inductives *)
+(** Mutual Inductives *)
val lookup_mind : mutual_inductive -> env -> mutual_inductive_body
diff --git a/kernel/reduction.mli b/kernel/reduction.mli
index f2c9df156..06d4478b2 100644
--- a/kernel/reduction.mli
+++ b/kernel/reduction.mli
@@ -1,21 +1,19 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Term
open Environ
open Closure
-(*i*)
-(************************************************************************)
-(*s Reduction functions *)
+(***********************************************************************
+ s Reduction functions *)
val whd_betaiotazeta : constr -> constr
val whd_betadeltaiota : env -> constr -> constr
@@ -23,8 +21,8 @@ val whd_betadeltaiota_nolet : env -> constr -> constr
val nf_betaiota : constr -> constr
-(************************************************************************)
-(*s conversion functions *)
+(***********************************************************************
+ s conversion functions *)
exception NotConvertible
exception NotConvertibleVect of int
@@ -53,7 +51,7 @@ val conv_leq :
val conv_leq_vecti :
?evars:(existential->constr option) -> types array conversion_function
-(* option for conversion *)
+(** option for conversion *)
val set_vm_conv : (conv_pb -> types conversion_function) -> unit
val vm_conv : conv_pb -> types conversion_function
@@ -63,18 +61,18 @@ val default_conv_leq : types conversion_function
(************************************************************************)
-(* Builds an application node, reducing beta redexes it may produce. *)
+(** Builds an application node, reducing beta redexes it may produce. *)
val beta_appvect : constr -> constr array -> constr
-(* Builds an application node, reducing the [n] first beta-zeta redexes. *)
+(** Builds an application node, reducing the [n] first beta-zeta redexes. *)
val betazeta_appvect : int -> constr -> constr array -> constr
-(* Pseudo-reduction rule Prod(x,A,B) a --> B[x\a] *)
+(** Pseudo-reduction rule Prod(x,A,B) a --> B[x\a] *)
val hnf_prod_applist : env -> types -> constr list -> types
-(************************************************************************)
-(*s Recognizing products and arities modulo reduction *)
+(***********************************************************************
+ s Recognizing products and arities modulo reduction *)
val dest_prod : env -> types -> rel_context * types
val dest_prod_assum : env -> types -> rel_context * types
diff --git a/kernel/retroknowledge.mli b/kernel/retroknowledge.mli
index 0f1cdc8e2..19f30cd8f 100644
--- a/kernel/retroknowledge.mli
+++ b/kernel/retroknowledge.mli
@@ -1,24 +1,22 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Term
-(*i*)
type retroknowledge
-(* aliased type for clarity purpose*)
+(** aliased type for clarity purpose*)
type entry = (constr, types) kind_of_term
-(* the following types correspond to the different "things"
+(** the following types correspond to the different "things"
the kernel can learn about.*)
type nat_field =
| NatType
@@ -58,25 +56,26 @@ type int31_field =
| Int31Tail0
type field =
-(* | KEq
+
+(** | KEq
| KNat of nat_field
| KN of n_field *)
| KInt31 of string*int31_field
-(* This type represent an atomic action of the retroknowledge. It
- is stored in the compiled libraries *)
-(* As per now, there is only the possibility of registering things
+(** This type represent an atomic action of the retroknowledge. It
+ is stored in the compiled libraries
+ As per now, there is only the possibility of registering things
the possibility of unregistering or changing the flag is under study *)
type action =
| RKRegister of field*entry
-(* initial value for retroknowledge *)
+(** initial value for retroknowledge *)
val initial_retroknowledge : retroknowledge
-(* Given an identifier id (usually Const _)
+(** Given an identifier id (usually Const _)
and the continuation cont of the bytecode compilation
returns the compilation of id in cont if it has a specific treatment
or raises Not_found if id should be compiled as usual *)
@@ -103,28 +102,29 @@ val get_vm_constant_dynamic_info : retroknowledge -> entry ->
Cbytecodes.comp_env ->
Cbytecodes.block array ->
int -> Cbytecodes.bytecodes -> Cbytecodes.bytecodes
-(* Given a type identifier, this function is used before compiling a match
+
+(** Given a type identifier, this function is used before compiling a match
over this type. In the case of 31-bit integers for instance, it is used
to add the instruction sequence which would perform a dynamic decompilation
in case the argument of the match is not in coq representation *)
val get_vm_before_match_info : retroknowledge -> entry -> Cbytecodes.bytecodes
-> Cbytecodes.bytecodes
-(* Given a type identifier, this function is used by pretyping/vnorm.ml to
+(** Given a type identifier, this function is used by pretyping/vnorm.ml to
recover the elements of that type from their compiled form if it's non
standard (it is used (and can be used) only when the compiled form
is not a block *)
val get_vm_decompile_constant_info : retroknowledge -> entry -> int -> Term.constr
-(* the following functions are solely used in Pre_env and Environ to implement
+(** the following functions are solely used in Pre_env and Environ to implement
the functions register and unregister (and mem) of Environ *)
val add_field : retroknowledge -> field -> entry -> retroknowledge
val mem : retroknowledge -> field -> bool
val remove : retroknowledge -> field -> retroknowledge
val find : retroknowledge -> field -> entry
-(* the following function manipulate the reactive information of values
+(** the following function manipulate the reactive information of values
they are only used by the functions of Pre_env, and Environ to implement
the functions register and unregister of Environ *)
val add_vm_compiling_info : retroknowledge-> entry ->
diff --git a/kernel/safe_typing.mli b/kernel/safe_typing.mli
index c378d8ccc..2aad2eb8c 100644
--- a/kernel/safe_typing.mli
+++ b/kernel/safe_typing.mli
@@ -1,22 +1,21 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Term
open Declarations
open Entries
open Mod_subst
-(*i*)
-(*s Safe environments. Since we are now able to type terms, we can
+(** {6 Sect } *)
+(** Safe environments. Since we are now able to type terms, we can
define an abstract type of safe environments, where objects are
typed before being added.
@@ -31,7 +30,7 @@ val env_of_safe_env : safe_environment -> Environ.env
val empty_environment : safe_environment
val is_empty : safe_environment -> bool
-(* Adding and removing local declarations (Local or Variables) *)
+(** Adding and removing local declarations (Local or Variables) *)
val push_named_assum :
identifier * types -> safe_environment ->
Univ.constraints * safe_environment
@@ -39,7 +38,7 @@ val push_named_def :
identifier * constr * types option -> safe_environment ->
Univ.constraints * safe_environment
-(* Adding global axioms or definitions *)
+(** Adding global axioms or definitions *)
type global_declaration =
| ConstantEntry of constant_entry
| GlobalRecipe of Cooking.recipe
@@ -48,30 +47,30 @@ val add_constant :
dir_path -> label -> global_declaration -> safe_environment ->
constant * safe_environment
-(* Adding an inductive type *)
+(** Adding an inductive type *)
val add_mind :
dir_path -> label -> mutual_inductive_entry -> safe_environment ->
mutual_inductive * safe_environment
-(* Adding a module *)
+(** Adding a module *)
val add_module :
label -> module_entry -> bool -> safe_environment
-> module_path * delta_resolver * safe_environment
-(* Adding a module type *)
+(** Adding a module type *)
val add_modtype :
label -> module_struct_entry -> bool -> safe_environment
-> module_path * safe_environment
-(* Adding universe constraints *)
+(** Adding universe constraints *)
val add_constraints :
Univ.constraints -> safe_environment -> safe_environment
-(* Settin the strongly constructive or classical logical engagement *)
+(** Settin the strongly constructive or classical logical engagement *)
val set_engagement : engagement -> safe_environment -> safe_environment
-(*s Interactive module functions *)
+(** {6 Interactive module functions } *)
val start_module :
label -> safe_environment -> module_path * safe_environment
@@ -96,9 +95,10 @@ val pack_module : safe_environment -> module_body
val current_modpath : safe_environment -> module_path
val delta_of_senv : safe_environment -> delta_resolver*delta_resolver
-(* Loading and saving compilation units *)
-(* exporting and importing modules *)
+(** Loading and saving compilation units *)
+
+(** exporting and importing modules *)
type compiled_library
val start_library : dir_path -> safe_environment
@@ -110,18 +110,18 @@ val export : safe_environment -> dir_path
val import : compiled_library -> Digest.t -> safe_environment
-> module_path * safe_environment
-(* Remove the body of opaque constants *)
+(** Remove the body of opaque constants *)
val lighten_library : compiled_library -> compiled_library
-(*s Typing judgments *)
+(** {6 Typing judgments } *)
type judgment
val j_val : judgment -> constr
val j_type : judgment -> constr
-(* Safe typing of a term returning a typing judgment and universe
+(** Safe typing of a term returning a typing judgment and universe
constraints to be added to the environment for the judgment to
hold. It is guaranteed that the constraints are satisfiable
*)
diff --git a/kernel/sign.mli b/kernel/sign.mli
index b3e7ace55..5cadb125f 100644
--- a/kernel/sign.mli
+++ b/kernel/sign.mli
@@ -1,19 +1,17 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Term
-(*i*)
-(*s Signatures of ordered named declarations *)
+(** {6 Signatures of ordered named declarations } *)
type named_context = named_declaration list
type section_context = named_context
@@ -24,39 +22,42 @@ val vars_of_named_context : named_context -> identifier list
val lookup_named : identifier -> named_context -> named_declaration
-(* number of declarations *)
+(** number of declarations *)
val named_context_length : named_context -> int
-(*s Recurrence on [named_context]: older declarations processed first *)
+(** {6 Recurrence on [named_context]: older declarations processed first } *)
val fold_named_context :
(named_declaration -> 'a -> 'a) -> named_context -> init:'a -> 'a
-(* newer declarations first *)
+
+(** newer declarations first *)
val fold_named_context_reverse :
('a -> named_declaration -> 'a) -> init:'a -> named_context -> 'a
-(*s Section-related auxiliary functions *)
+(** {6 Section-related auxiliary functions } *)
val instance_from_named_context : named_context -> constr array
-(*s Signatures of ordered optionally named variables, intended to be
+(** {6 Sect } *)
+(** Signatures of ordered optionally named variables, intended to be
accessed by de Bruijn indices *)
val push_named_to_rel_context : named_context -> rel_context -> rel_context
-(*s Recurrence on [rel_context]: older declarations processed first *)
+(** {6 Recurrence on [rel_context]: older declarations processed first } *)
val fold_rel_context :
(rel_declaration -> 'a -> 'a) -> rel_context -> init:'a -> 'a
-(* newer declarations first *)
+
+(** newer declarations first *)
val fold_rel_context_reverse :
('a -> rel_declaration -> 'a) -> init:'a -> rel_context -> 'a
-(*s Map function of [rel_context] *)
+(** {6 Map function of [rel_context] } *)
val map_rel_context : (constr -> constr) -> rel_context -> rel_context
-(*s Map function of [named_context] *)
+(** {6 Map function of [named_context] } *)
val map_named_context : (constr -> constr) -> named_context -> named_context
-(*s Map function of [rel_context] *)
+(** {6 Map function of [rel_context] } *)
val iter_rel_context : (constr -> unit) -> rel_context -> unit
-(*s Map function of [named_context] *)
+(** {6 Map function of [named_context] } *)
val iter_named_context : (constr -> unit) -> named_context -> unit
diff --git a/kernel/subtyping.mli b/kernel/subtyping.mli
index c0b1ee5d3..d68d908a0 100644
--- a/kernel/subtyping.mli
+++ b/kernel/subtyping.mli
@@ -1,18 +1,16 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Univ
open Declarations
open Environ
-(*i*)
val check_subtypes : env -> module_type_body -> module_type_body -> constraints
diff --git a/kernel/term.mli b/kernel/term.mli
index ff71c3594..830e7e5ed 100644
--- a/kernel/term.mli
+++ b/kernel/term.mli
@@ -1,164 +1,172 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
-(*i*)
-(*s The sorts of CCI. *)
+(** {6 The sorts of CCI. } *)
type contents = Pos | Null
type sorts =
- | Prop of contents (* Prop and Set *)
- | Type of Univ.universe (* Type *)
+ | Prop of contents (** Prop and Set *)
+ | Type of Univ.universe (** Type *)
val set_sort : sorts
val prop_sort : sorts
val type1_sort : sorts
-(*s The sorts family of CCI. *)
+(** {6 The sorts family of CCI. } *)
type sorts_family = InProp | InSet | InType
val family_of_sort : sorts -> sorts_family
-(*s Useful types *)
+(** {6 Useful types } *)
-(*s Existential variables *)
+(** {6 Existential variables } *)
type existential_key = int
-(*s Existential variables *)
+(** {6 Existential variables } *)
type metavariable = int
-(*s Case annotation *)
-type case_style = LetStyle | IfStyle | LetPatternStyle | MatchStyle | RegularStyle
+(** {6 Case annotation } *)
+type case_style = LetStyle | IfStyle | LetPatternStyle | MatchStyle | RegularStyle (** infer printing form from number of constructor *)
type case_printing =
- { ind_nargs : int; (* length of the arity of the inductive type *)
+ { ind_nargs : int; (** length of the arity of the inductive type *)
style : case_style }
-(* the integer is the number of real args, needed for reduction *)
+
+(** the integer is the number of real args, needed for reduction *)
type case_info =
- { ci_ind : inductive;
- ci_npar : int;
- ci_cstr_ndecls : int array; (* number of pattern vars of each constructor *)
- ci_pp_info : case_printing (* not interpreted by the kernel *)
+ { ci_ind : inductive;
+ ci_npar : int;
+ ci_cstr_ndecls : int array; (** number of real args of each constructor *)
+ ci_pp_info : case_printing (** not interpreted by the kernel *)
}
-(*s*******************************************************************)
-(* The type of constructions *)
+(** {6 The type of constructions } *)
type constr
-(* [eq_constr a b] is true if [a] equals [b] modulo alpha, casts,
+(** [eq_constr a b] is true if [a] equals [b] modulo alpha, casts,
and application grouping *)
val eq_constr : constr -> constr -> bool
-(* [types] is the same as [constr] but is intended to be used for
+(** [types] is the same as [constr] but is intended to be used for
documentation to indicate that such or such function specifically works
- with {\em types} (i.e. terms of type a sort).
+ with {e types} (i.e. terms of type a sort).
(Rem:plurial form since [type] is a reserved ML keyword) *)
type types = constr
-(*s Functions for dealing with constr terms.
+(** {6 Sect } *)
+(** Functions for dealing with constr terms.
The following functions are intended to simplify and to uniform the
manipulation of terms. Some of these functions may be overlapped with
previous ones. *)
-(*s Term constructors. *)
+(** {6 Term constructors. } *)
-(* Constructs a DeBrujin index (DB indices begin at 1) *)
+(** Constructs a DeBrujin index (DB indices begin at 1) *)
val mkRel : int -> constr
-(* Constructs a Variable *)
+(** Constructs a Variable *)
val mkVar : identifier -> constr
-(* Constructs an patvar named "?n" *)
+(** Constructs an patvar named "?n" *)
val mkMeta : metavariable -> constr
-(* Constructs an existential variable *)
+(** Constructs an existential variable *)
type existential = existential_key * constr array
val mkEvar : existential -> constr
-(* Construct a sort *)
+(** Construct a sort *)
val mkSort : sorts -> types
val mkProp : types
val mkSet : types
val mkType : Univ.universe -> types
-(* This defines the strategy to use for verifiying a Cast *)
+(** This defines the strategy to use for verifiying a Cast *)
type cast_kind = VMcast | DEFAULTcast
-(* Constructs the term [t1::t2], i.e. the term $t_1$ casted with the
- type $t_2$ (that means t2 is declared as the type of t1). *)
+(** Constructs the term [t1::t2], i.e. the term {% $ %}t_1{% $ %} casted with the
+ type {% $ %}t_2{% $ %} (that means t2 is declared as the type of t1). *)
val mkCast : constr * cast_kind * constr -> constr
-(* Constructs the product [(x:t1)t2] *)
+(** Constructs the product [(x:t1)t2] *)
val mkProd : name * types * types -> types
val mkNamedProd : identifier -> types -> types -> types
-(* non-dependant product $t_1 \rightarrow t_2$, an alias for
- [(_:t1)t2]. Beware $t_2$ is NOT lifted.
+
+(** non-dependant product {% $ %}t_1 \rightarrow t_2{% $ %}, an alias for
+ [(_:t1)t2]. Beware {% $ %}t_2{% $ %} is NOT lifted.
Eg: A |- A->A is built by [(mkArrow (mkRel 0) (mkRel 1))] *)
val mkArrow : types -> types -> constr
-(* Constructs the abstraction $[x:t_1]t_2$ *)
+(** Constructs the abstraction {% $ %}[x:t_1]t_2{% $ %} *)
val mkLambda : name * types * constr -> constr
val mkNamedLambda : identifier -> types -> constr -> constr
-(* Constructs the product [let x = t1 : t2 in t3] *)
+(** Constructs the product [let x = t1 : t2 in t3] *)
val mkLetIn : name * constr * types * constr -> constr
val mkNamedLetIn : identifier -> constr -> types -> constr -> constr
-(* [mkApp (f,[| t_1; ...; t_n |]] constructs the application
- $(f~t_1~\dots~t_n)$. *)
+(** [mkApp (f,[| t_1; ...; t_n |]] constructs the application
+ {% $ %}(f~t_1~\dots~t_n){% $ %}. *)
val mkApp : constr * constr array -> constr
-(* Constructs a constant *)
-(* The array of terms correspond to the variables introduced in the section *)
+(** Constructs a constant
+ The array of terms correspond to the variables introduced in the section *)
val mkConst : constant -> constr
-(* Inductive types *)
+(** Inductive types *)
-(* Constructs the ith (co)inductive type of the block named kn *)
-(* The array of terms correspond to the variables introduced in the section *)
+(** Constructs the ith (co)inductive type of the block named kn
+ The array of terms correspond to the variables introduced in the section *)
val mkInd : inductive -> constr
-(* Constructs the jth constructor of the ith (co)inductive type of the
+(** Constructs the jth constructor of the ith (co)inductive type of the
block named kn. The array of terms correspond to the variables
introduced in the section *)
val mkConstruct : constructor -> constr
-(* Constructs the term <p>Case c of c1 | c2 .. | cn end *)
+(** Construct the term <p>Case c of c1 | c2 .. | cn end
+
+ [mkCase ci p c ac] stand for match [c] return [p] with [ac] presented as
+ describe in [ci].
+
+ [p] stucture is lambda inductive_args, I inductive_args -> "return"
+
+ [ac]{^ ith} element is ith constructor case presented as
+ {e lambda construct_args (without params). case_term } *)
val mkCase : case_info * constr * constr * constr array -> constr
-(* If [recindxs = [|i1,...in|]]
+(** If [recindxs = [|i1,...in|]]
[funnames = [|f1,.....fn|]]
[typarray = [|t1,...tn|]]
[bodies = [|b1,.....bn|]]
- then [ mkFix ((recindxs,i), funnames, typarray, bodies) ]
- constructs the $i$th function of the block (counting from 0)
+ then [mkFix ((recindxs,i), funnames, typarray, bodies) ]
+ constructs the {% $ %}i{% $ %}th function of the block (counting from 0)
[Fixpoint f1 [ctx1] = b1
with f2 [ctx2] = b2
...
with fn [ctxn] = bn.]
- \noindent where the length of the $j$th context is $ij$.
+ \noindent where the length of the {% $ %}j{% $ %}th context is {% $ %}ij{% $ %}.
*)
type rec_declaration = name array * types array * constr array
type fixpoint = (int array * int) * rec_declaration
val mkFix : fixpoint -> constr
-(* If [funnames = [|f1,.....fn|]]
+(** If [funnames = [|f1,.....fn|]]
[typarray = [|t1,...tn|]]
[bodies = [b1,.....bn]] \par\noindent
then [mkCoFix (i, (funnames, typarray, bodies))]
@@ -173,9 +181,9 @@ type cofixpoint = int * rec_declaration
val mkCoFix : cofixpoint -> constr
-(*s Concrete type for making pattern-matching. *)
+(** {6 Concrete type for making pattern-matching. } *)
-(* [constr array] is an instance matching definitional [named_context] in
+(** [constr array] is an instance matching definitional [named_context] in
the same order (i.e. last argument first) *)
type 'constr pexistential = existential_key * 'constr array
type ('constr, 'types) prec_declaration =
@@ -203,14 +211,14 @@ type ('constr, 'types) kind_of_term =
| Fix of ('constr, 'types) pfixpoint
| CoFix of ('constr, 'types) pcofixpoint
-(* User view of [constr]. For [App], it is ensured there is at
+(** User view of [constr]. For [App], it is ensured there is at
least one argument and the function is not itself an applicative
term *)
val kind_of_term : constr -> (constr, types) kind_of_term
val kind_of_term2 : constr -> ((constr,types) kind_of_term,constr) kind_of_term
-(* Experimental *)
+(** Experimental *)
type ('constr, 'types) kind_of_type =
| SortType of sorts
| CastType of 'types * 'types
@@ -220,7 +228,7 @@ type ('constr, 'types) kind_of_type =
val kind_of_type : types -> (constr, types) kind_of_type
-(*s Simple term case analysis. *)
+(** {6 Simple term case analysis. } *)
val isRel : constr -> bool
val isVar : constr -> bool
@@ -247,75 +255,77 @@ val is_Type : constr -> bool
val iskind : constr -> bool
val is_small : sorts -> bool
-(*s Term destructors.
+(** {6 Sect } *)
+(** Term destructors.
Destructor operations are partial functions and
raise [invalid_arg "dest*"] if the term has not the expected form. *)
-(* Destructs a DeBrujin index *)
+(** Destructs a DeBrujin index *)
val destRel : constr -> int
-(* Destructs an existential variable *)
+(** Destructs an existential variable *)
val destMeta : constr -> metavariable
-(* Destructs a variable *)
+(** Destructs a variable *)
val destVar : constr -> identifier
-(* Destructs a sort. [is_Prop] recognizes the sort \textsf{Prop}, whether
- [isprop] recognizes both \textsf{Prop} and \textsf{Set}. *)
+(** Destructs a sort. [is_Prop] recognizes the sort {% \textsf{%}Prop{% }%}, whether
+ [isprop] recognizes both {% \textsf{%}Prop{% }%} and {% \textsf{%}Set{% }%}. *)
val destSort : constr -> sorts
-(* Destructs a casted term *)
+(** Destructs a casted term *)
val destCast : constr -> constr * cast_kind * constr
-(* Destructs the product $(x:t_1)t_2$ *)
+(** Destructs the product {% $ %}(x:t_1)t_2{% $ %} *)
val destProd : types -> name * types * types
-(* Destructs the abstraction $[x:t_1]t_2$ *)
+(** Destructs the abstraction {% $ %}[x:t_1]t_2{% $ %} *)
val destLambda : constr -> name * types * constr
-(* Destructs the let $[x:=b:t_1]t_2$ *)
+(** Destructs the let {% $ %}[x:=b:t_1]t_2{% $ %} *)
val destLetIn : constr -> name * constr * types * constr
-(* Destructs an application *)
+(** Destructs an application *)
val destApp : constr -> constr * constr array
-(* Obsolete synonym of destApp *)
+(** Obsolete synonym of destApp *)
val destApplication : constr -> constr * constr array
-(* Decompose any term as an applicative term; the list of args can be empty *)
+(** Decompose any term as an applicative term; the list of args can be empty *)
val decompose_app : constr -> constr * constr list
-(* Destructs a constant *)
+(** Destructs a constant *)
val destConst : constr -> constant
-(* Destructs an existential variable *)
+(** Destructs an existential variable *)
val destEvar : constr -> existential
-(* Destructs a (co)inductive type *)
+(** Destructs a (co)inductive type *)
val destInd : constr -> inductive
-(* Destructs a constructor *)
+(** Destructs a constructor *)
val destConstruct : constr -> constructor
-(* Destructs a term <p>Case c of lc1 | lc2 .. | lcn end *)
+(** Destructs a term <p>Case c of lc1 | lc2 .. | lcn end *)
val destCase : constr -> case_info * constr * constr * constr array
-(* Destructs the $i$th function of the block
- $\mathit{Fixpoint} ~ f_1 ~ [ctx_1] = b_1
- \mathit{with} ~ f_2 ~ [ctx_2] = b_2
+(** Destructs the {% $ %}i{% $ %}th function of the block
+ {% $ %}{% \mathit{%}Fixpoint{% }%} ~ f_1 ~ [ctx_1] = b_1
+ {% \mathit{%}with{% }%} ~ f_2 ~ [ctx_2] = b_2
\dots
- \mathit{with} ~ f_n ~ [ctx_n] = b_n$,
- where the lenght of the $j$th context is $ij$.
+ {% \mathit{%}with{% }%} ~ f_n ~ [ctx_n] = b_n{% $ %},
+ where the lenght of the {% $ %}j{% $ %}th context is {% $ %}ij{% $ %}.
*)
val destFix : constr -> fixpoint
val destCoFix : constr -> cofixpoint
-(*s A {\em declaration} has the form (name,body,type). It is either an
- {\em assumption} if [body=None] or a {\em definition} if
- [body=Some actualbody]. It is referred by {\em name} if [na] is an
- identifier or by {\em relative index} if [na] is not an identifier
+(** {6 Sect } *)
+(** A {e declaration} has the form (name,body,type). It is either an
+ {e assumption} if [body=None] or a {e definition} if
+ [body=Some actualbody]. It is referred by {e name} if [na] is an
+ identifier or by {e relative index} if [na] is not an identifier
(in the latter case, [na] is of type [name] but just for printing
purpose *)
@@ -332,9 +342,9 @@ val fold_named_declaration :
val fold_rel_declaration :
(constr -> 'a -> 'a) -> rel_declaration -> 'a -> 'a
-(*s Contexts of declarations referred to by de Bruijn indices *)
+(** {6 Contexts of declarations referred to by de Bruijn indices } *)
-(* In [rel_context], more recent declaration is on top *)
+(** In [rel_context], more recent declaration is on top *)
type rel_context = rel_declaration list
val empty_rel_context : rel_context
@@ -344,185 +354,186 @@ val lookup_rel : int -> rel_context -> rel_declaration
val rel_context_length : rel_context -> int
val rel_context_nhyps : rel_context -> int
-(* Constructs either [(x:t)c] or [[x=b:t]c] *)
+(** Constructs either [(x:t)c] or [[x=b:t]c] *)
val mkProd_or_LetIn : rel_declaration -> types -> types
val mkNamedProd_or_LetIn : named_declaration -> types -> types
val mkNamedProd_wo_LetIn : named_declaration -> types -> types
-(* Constructs either [[x:t]c] or [[x=b:t]c] *)
+(** Constructs either [[x:t]c] or [[x=b:t]c] *)
val mkLambda_or_LetIn : rel_declaration -> constr -> constr
val mkNamedLambda_or_LetIn : named_declaration -> constr -> constr
-(*s Other term constructors. *)
+(** {6 Other term constructors. } *)
val abs_implicit : constr -> constr
val lambda_implicit : constr -> constr
val lambda_implicit_lift : int -> constr -> constr
-(* [applist (f,args)] and co work as [mkApp] *)
+(** [applist (f,args)] and co work as [mkApp] *)
val applist : constr * constr list -> constr
val applistc : constr -> constr list -> constr
val appvect : constr * constr array -> constr
val appvectc : constr -> constr array -> constr
-(* [prodn n l b] = $(x_1:T_1)..(x_n:T_n)b$
- where $l = [(x_n,T_n);\dots;(x_1,T_1);Gamma]$ *)
+(** [prodn n l b] = {% $ %}(x_1:T_1)..(x_n:T_n)b{% $ %}
+ where {% $ %}l = [(x_n,T_n);\dots;(x_1,T_1);Gamma]{% $ %} *)
val prodn : int -> (name * constr) list -> constr -> constr
-(* [compose_prod l b] = $(x_1:T_1)..(x_n:T_n)b$
- where $l = [(x_n,T_n);\dots;(x_1,T_1)]$.
+(** [compose_prod l b] = {% $ %}(x_1:T_1)..(x_n:T_n)b{% $ %}
+ where {% $ %}l = [(x_n,T_n);\dots;(x_1,T_1)]{% $ %}.
Inverse of [decompose_prod]. *)
val compose_prod : (name * constr) list -> constr -> constr
-(* [lamn n l b] = $[x_1:T_1]..[x_n:T_n]b$
- where $l = [(x_n,T_n);\dots;(x_1,T_1);Gamma]$ *)
+(** [lamn n l b] = {% $ %}[x_1:T_1]..[x_n:T_n]b{% $ %}
+ where {% $ %}l = [(x_n,T_n);\dots;(x_1,T_1);Gamma]{% $ %} *)
val lamn : int -> (name * constr) list -> constr -> constr
-(* [compose_lam l b] = $[x_1:T_1]..[x_n:T_n]b$
- where $l = [(x_n,T_n);\dots;(x_1,T_1)]$.
+(** [compose_lam l b] = {% $ %}[x_1:T_1]..[x_n:T_n]b{% $ %}
+ where {% $ %}l = [(x_n,T_n);\dots;(x_1,T_1)]{% $ %}.
Inverse of [it_destLam] *)
val compose_lam : (name * constr) list -> constr -> constr
-(* [to_lambda n l]
- = $[x_1:T_1]...[x_n:T_n]T$
- where $l = (x_1:T_1)...(x_n:T_n)T$ *)
+(** [to_lambda n l]
+ = {% $ %}[x_1:T_1]...[x_n:T_n]T{% $ %}
+ where {% $ %}l = (x_1:T_1)...(x_n:T_n)T{% $ %} *)
val to_lambda : int -> constr -> constr
-(* [to_prod n l]
- = $(x_1:T_1)...(x_n:T_n)T$
- where $l = [x_1:T_1]...[x_n:T_n]T$ *)
+(** [to_prod n l]
+ = {% $ %}(x_1:T_1)...(x_n:T_n)T{% $ %}
+ where {% $ %}l = [x_1:T_1]...[x_n:T_n]T{% $ %} *)
val to_prod : int -> constr -> constr
-(* pseudo-reduction rule *)
+(** pseudo-reduction rule *)
-(* [prod_appvect] $(x1:B1;...;xn:Bn)B a1...an \rightarrow B[a1...an]$ *)
+(** [prod_appvect] {% $ %}(x1:B1;...;xn:Bn)B a1...an \rightarrow B[a1...an]{% $ %} *)
val prod_appvect : constr -> constr array -> constr
val prod_applist : constr -> constr list -> constr
val it_mkLambda_or_LetIn : constr -> rel_context -> constr
val it_mkProd_or_LetIn : types -> rel_context -> types
-(*s Other term destructors. *)
+(** {6 Other term destructors. } *)
-(* Transforms a product term $(x_1:T_1)..(x_n:T_n)T$ into the pair
- $([(x_n,T_n);...;(x_1,T_1)],T)$, where $T$ is not a product.
+(** Transforms a product term {% $ %}(x_1:T_1)..(x_n:T_n)T{% $ %} into the pair
+ {% $ %}([(x_n,T_n);...;(x_1,T_1)],T){% $ %}, where {% $ %}T{% $ %} is not a product.
It includes also local definitions *)
val decompose_prod : constr -> (name*constr) list * constr
-(* Transforms a lambda term $[x_1:T_1]..[x_n:T_n]T$ into the pair
- $([(x_n,T_n);...;(x_1,T_1)],T)$, where $T$ is not a lambda. *)
+(** Transforms a lambda term {% $ %}[x_1:T_1]..[x_n:T_n]T{% $ %} into the pair
+ {% $ %}([(x_n,T_n);...;(x_1,T_1)],T){% $ %}, where {% $ %}T{% $ %} is not a lambda. *)
val decompose_lam : constr -> (name*constr) list * constr
-(* Given a positive integer n, transforms a product term
- $(x_1:T_1)..(x_n:T_n)T$
- into the pair $([(xn,Tn);...;(x1,T1)],T)$. *)
+(** Given a positive integer n, transforms a product term
+ {% $ %}(x_1:T_1)..(x_n:T_n)T{% $ %}
+ into the pair {% $ %}([(xn,Tn);...;(x1,T1)],T){% $ %}. *)
val decompose_prod_n : int -> constr -> (name * constr) list * constr
-(* Given a positive integer $n$, transforms a lambda term
- $[x_1:T_1]..[x_n:T_n]T$ into the pair $([(x_n,T_n);...;(x_1,T_1)],T)$ *)
+(** Given a positive integer {% $ %}n{% $ %}, transforms a lambda term
+ {% $ %}[x_1:T_1]..[x_n:T_n]T{% $ %} into the pair {% $ %}([(x_n,T_n);...;(x_1,T_1)],T){% $ %} *)
val decompose_lam_n : int -> constr -> (name * constr) list * constr
-(* Extract the premisses and the conclusion of a term of the form
+(** Extract the premisses and the conclusion of a term of the form
"(xi:Ti) ... (xj:=cj:Tj) ..., T" where T is not a product nor a let *)
val decompose_prod_assum : types -> rel_context * types
-(* Idem with lambda's *)
+(** Idem with lambda's *)
val decompose_lam_assum : constr -> rel_context * constr
-(* Idem but extract the first [n] premisses *)
+(** Idem but extract the first [n] premisses *)
val decompose_prod_n_assum : int -> types -> rel_context * types
val decompose_lam_n_assum : int -> constr -> rel_context * constr
-(* [nb_lam] $[x_1:T_1]...[x_n:T_n]c$ where $c$ is not an abstraction
- gives $n$ (casts are ignored) *)
+(** [nb_lam] {% $ %}[x_1:T_1]...[x_n:T_n]c{% $ %} where {% $ %}c{% $ %} is not an abstraction
+ gives {% $ %}n{% $ %} (casts are ignored) *)
val nb_lam : constr -> int
-(* Similar to [nb_lam], but gives the number of products instead *)
+(** Similar to [nb_lam], but gives the number of products instead *)
val nb_prod : constr -> int
-(* Returns the premisses/parameters of a type/term (let-in included) *)
+(** Returns the premisses/parameters of a type/term (let-in included) *)
val prod_assum : types -> rel_context
val lam_assum : constr -> rel_context
-(* Returns the first n-th premisses/parameters of a type/term (let included)*)
+(** Returns the first n-th premisses/parameters of a type/term (let included)*)
val prod_n_assum : int -> types -> rel_context
val lam_n_assum : int -> constr -> rel_context
-(* Remove the premisses/parameters of a type/term *)
+(** Remove the premisses/parameters of a type/term *)
val strip_prod : types -> types
val strip_lam : constr -> constr
-(* Remove the first n-th premisses/parameters of a type/term *)
+(** Remove the first n-th premisses/parameters of a type/term *)
val strip_prod_n : int -> types -> types
val strip_lam_n : int -> constr -> constr
-(* Remove the premisses/parameters of a type/term (including let-in) *)
+(** Remove the premisses/parameters of a type/term (including let-in) *)
val strip_prod_assum : types -> types
val strip_lam_assum : constr -> constr
-(* flattens application lists *)
+(** flattens application lists *)
val collapse_appl : constr -> constr
-(* Removes recursively the casts around a term i.e.
- [strip_outer_cast] (Cast (Cast ... (Cast c, t) ... ))] is [c]. *)
+(** Removes recursively the casts around a term i.e.
+ [strip_outer_cast (Cast (Cast ... (Cast c, t) ... ))] is [c]. *)
val strip_outer_cast : constr -> constr
-(* Apply a function letting Casted types in place *)
+(** Apply a function letting Casted types in place *)
val under_casts : (constr -> constr) -> constr -> constr
-(* Apply a function under components of Cast if any *)
+(** Apply a function under components of Cast if any *)
val under_outer_cast : (constr -> constr) -> constr -> constr
-(*s An "arity" is a term of the form [[x1:T1]...[xn:Tn]s] with [s] a sort.
+(** {6 Sect } *)
+(** An "arity" is a term of the form [[x1:T1]...[xn:Tn]s] with [s] a sort.
Such a term can canonically be seen as the pair of a context of types
and of a sort *)
type arity = rel_context * sorts
-(* Build an "arity" from its canonical form *)
+(** Build an "arity" from its canonical form *)
val mkArity : arity -> types
-(* Destructs an "arity" into its canonical form *)
+(** Destructs an "arity" into its canonical form *)
val destArity : types -> arity
-(* Tells if a term has the form of an arity *)
+(** Tells if a term has the form of an arity *)
val isArity : types -> bool
-(*s Occur checks *)
+(** {6 Occur checks } *)
-(* [closedn n M] is true iff [M] is a (deBruijn) closed term under n binders *)
+(** [closedn n M] is true iff [M] is a (deBruijn) closed term under n binders *)
val closedn : int -> constr -> bool
-(* [closed0 M] is true iff [M] is a (deBruijn) closed term *)
+(** [closed0 M] is true iff [M] is a (deBruijn) closed term *)
val closed0 : constr -> bool
-(* [noccurn n M] returns true iff [Rel n] does NOT occur in term [M] *)
+(** [noccurn n M] returns true iff [Rel n] does NOT occur in term [M] *)
val noccurn : int -> constr -> bool
-(* [noccur_between n m M] returns true iff [Rel p] does NOT occur in term [M]
+(** [noccur_between n m M] returns true iff [Rel p] does NOT occur in term [M]
for n <= p < n+m *)
val noccur_between : int -> int -> constr -> bool
-(* Checking function for terms containing existential- or
+(** Checking function for terms containing existential- or
meta-variables. The function [noccur_with_meta] does not consider
meta-variables applied to some terms (intented to be its local
context) (for existential variables, it is necessarily the case) *)
val noccur_with_meta : int -> int -> constr -> bool
-(*s Relocation and substitution *)
+(** {6 Relocation and substitution } *)
-(* [exliftn el c] lifts [c] with lifting [el] *)
+(** [exliftn el c] lifts [c] with lifting [el] *)
val exliftn : Esubst.lift -> constr -> constr
-(* [liftn n k c] lifts by [n] indexes above or equal to [k] in [c] *)
+(** [liftn n k c] lifts by [n] indexes above or equal to [k] in [c] *)
val liftn : int -> int -> constr -> constr
-(* [lift n c] lifts by [n] the positive indexes in [c] *)
+(** [lift n c] lifts by [n] the positive indexes in [c] *)
val lift : int -> constr -> constr
-(* [substnl [a1;...;an] k c] substitutes in parallel [a1],...,[an]
+(** [substnl [a1;...;an] k c] substitutes in parallel [a1],...,[an]
for respectively [Rel(k+1)],...,[Rel(k+n)] in [c]; it relocates
accordingly indexes in [a1],...,[an] *)
val substnl : constr list -> int -> constr -> constr
@@ -539,29 +550,30 @@ val substl_named_decl : constr list -> named_declaration -> named_declaration
val replace_vars : (identifier * constr) list -> constr -> constr
val subst_var : identifier -> constr -> constr
-(* [subst_vars [id1;...;idn] t] substitute [VAR idj] by [Rel j] in [t]
+(** [subst_vars [id1;...;idn] t] substitute [VAR idj] by [Rel j] in [t]
if two names are identical, the one of least indice is kept *)
val subst_vars : identifier list -> constr -> constr
-(* [substn_vars n [id1;...;idn] t] substitute [VAR idj] by [Rel j+n-1] in [t]
+
+(** [substn_vars n [id1;...;idn] t] substitute [VAR idj] by [Rel j+n-1] in [t]
if two names are identical, the one of least indice is kept *)
val substn_vars : int -> identifier list -> constr -> constr
-(*s Functionals working on the immediate subterm of a construction *)
+(** {6 Functionals working on the immediate subterm of a construction } *)
-(* [fold_constr f acc c] folds [f] on the immediate subterms of [c]
+(** [fold_constr f acc c] folds [f] on the immediate subterms of [c]
starting from [acc] and proceeding from left to right according to
the usual representation of the constructions; it is not recursive *)
val fold_constr : ('a -> constr -> 'a) -> 'a -> constr -> 'a
-(* [map_constr f c] maps [f] on the immediate subterms of [c]; it is
+(** [map_constr f c] maps [f] on the immediate subterms of [c]; it is
not recursive and the order with which subterms are processed is
not specified *)
val map_constr : (constr -> constr) -> constr -> constr
-(* [map_constr_with_binders g f n c] maps [f n] on the immediate
+(** [map_constr_with_binders g f n c] maps [f n] on the immediate
subterms of [c]; it carries an extra data [n] (typically a lift
index) which is processed by [g] (which typically add 1 to [n]) at
each binder traversal; it is not recursive and the order with which
@@ -570,13 +582,13 @@ val map_constr : (constr -> constr) -> constr -> constr
val map_constr_with_binders :
('a -> 'a) -> ('a -> constr -> constr) -> 'a -> constr -> constr
-(* [iter_constr f c] iters [f] on the immediate subterms of [c]; it is
+(** [iter_constr f c] iters [f] on the immediate subterms of [c]; it is
not recursive and the order with which subterms are processed is
not specified *)
val iter_constr : (constr -> unit) -> constr -> unit
-(* [iter_constr_with_binders g f n c] iters [f n] on the immediate
+(** [iter_constr_with_binders g f n c] iters [f n] on the immediate
subterms of [c]; it carries an extra data [n] (typically a lift
index) which is processed by [g] (which typically add 1 to [n]) at
each binder traversal; it is not recursive and the order with which
@@ -585,7 +597,7 @@ val iter_constr : (constr -> unit) -> constr -> unit
val iter_constr_with_binders :
('a -> 'a) -> ('a -> constr -> unit) -> 'a -> constr -> unit
-(* [compare_constr f c1 c2] compare [c1] and [c2] using [f] to compare
+(** [compare_constr f c1 c2] compare [c1] and [c2] using [f] to compare
the immediate subterms of [c1] of [c2] if needed; Cast's, binders
name and Cases annotations are not taken into account *)
diff --git a/kernel/term_typing.mli b/kernel/term_typing.mli
index 69b13e3b8..d1fc71eb5 100644
--- a/kernel/term_typing.mli
+++ b/kernel/term_typing.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Term
open Univ
@@ -17,7 +16,6 @@ open Inductive
open Environ
open Entries
open Typeops
-(*i*)
val translate_local_def : env -> constr * types option ->
constr * types * Univ.constraints
diff --git a/kernel/type_errors.mli b/kernel/type_errors.mli
index 9c7b6561c..ed2ec1302 100644
--- a/kernel/type_errors.mli
+++ b/kernel/type_errors.mli
@@ -1,30 +1,28 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Term
open Environ
-(*i*)
-(* Type errors. \label{typeerrors} *)
+(** Type errors. {% \label{%}typeerrors{% }%} *)
(*i Rem: NotEnoughAbstractionInFixBody should only occur with "/i" Fix
notation i*)
type guard_error =
- (* Fixpoints *)
+ (** Fixpoints *)
| NotEnoughAbstractionInFixBody
| RecursionNotOnInductiveType of constr
| RecursionOnIllegalTerm of int * constr * int list * int list
| NotEnoughArgumentsForFixCall of int
- (* CoFixpoints *)
+ (** CoFixpoints *)
| CodomainNotInductiveType of constr
| NestedRecursiveOccurrences
| UnguardedRecursiveCall of constr
diff --git a/kernel/typeops.mli b/kernel/typeops.mli
index b0f15e75d..a89aae4d2 100644
--- a/kernel/typeops.mli
+++ b/kernel/typeops.mli
@@ -1,23 +1,21 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Univ
open Term
open Environ
open Entries
open Declarations
-(*i*)
-(*s Typing functions (not yet tagged as safe) *)
+(** {6 Typing functions (not yet tagged as safe) } *)
val infer : env -> constr -> unsafe_judgment * constraints
val infer_v : env -> constr array -> unsafe_judgment array * constraints
@@ -27,56 +25,56 @@ val infer_local_decls :
env -> (identifier * local_entry) list
-> env * rel_context * constraints
-(*s Basic operations of the typing machine. *)
+(** {6 Basic operations of the typing machine. } *)
-(* If [j] is the judgement $c:t$, then [assumption_of_judgement env j]
- returns the type $c$, checking that $t$ is a sort. *)
+(** If [j] is the judgement {% $ %}c:t{% $ %}, then [assumption_of_judgement env j]
+ returns the type {% $ %}c{% $ %}, checking that {% $ %}t{% $ %} is a sort. *)
val assumption_of_judgment : env -> unsafe_judgment -> types
val type_judgment : env -> unsafe_judgment -> unsafe_type_judgment
-(*s Type of sorts. *)
+(** {6 Type of sorts. } *)
val judge_of_prop_contents : contents -> unsafe_judgment
val judge_of_type : universe -> unsafe_judgment
-(*s Type of a bound variable. *)
+(** {6 Type of a bound variable. } *)
val judge_of_relative : env -> int -> unsafe_judgment
-(*s Type of variables *)
+(** {6 Type of variables } *)
val judge_of_variable : env -> variable -> unsafe_judgment
-(*s type of a constant *)
+(** {6 type of a constant } *)
val judge_of_constant : env -> constant -> unsafe_judgment
val judge_of_constant_knowing_parameters :
env -> constant -> unsafe_judgment array -> unsafe_judgment
-(*s Type of application. *)
+(** {6 Type of application. } *)
val judge_of_apply :
env -> unsafe_judgment -> unsafe_judgment array
-> unsafe_judgment * constraints
-(*s Type of an abstraction. *)
+(** {6 Type of an abstraction. } *)
val judge_of_abstraction :
env -> name -> unsafe_type_judgment -> unsafe_judgment
-> unsafe_judgment
-(*s Type of a product. *)
+(** {6 Type of a product. } *)
val judge_of_product :
env -> name -> unsafe_type_judgment -> unsafe_type_judgment
-> unsafe_judgment
-(* s Type of a let in. *)
+(** s Type of a let in. *)
val judge_of_letin :
env -> name -> unsafe_judgment -> unsafe_type_judgment -> unsafe_judgment
-> unsafe_judgment
-(*s Type of a cast. *)
+(** {6 Type of a cast. } *)
val judge_of_cast :
env -> unsafe_judgment -> cast_kind -> unsafe_type_judgment ->
unsafe_judgment * constraints
-(*s Inductive types. *)
+(** {6 Inductive types. } *)
val judge_of_inductive : env -> inductive -> unsafe_judgment
@@ -85,16 +83,16 @@ val judge_of_inductive_knowing_parameters :
val judge_of_constructor : env -> constructor -> unsafe_judgment
-(*s Type of Cases. *)
+(** {6 Type of Cases. } *)
val judge_of_case : env -> case_info
-> unsafe_judgment -> unsafe_judgment -> unsafe_judgment array
-> unsafe_judgment * constraints
-(* Typecheck general fixpoint (not checking guard conditions) *)
+(** Typecheck general fixpoint (not checking guard conditions) *)
val type_fixpoint : env -> name array -> types array
-> unsafe_judgment array -> constraints
-(* Kernel safe typing but applicable to partial proofs *)
+(** Kernel safe typing but applicable to partial proofs *)
val typing : env -> constr -> unsafe_judgment
val type_of_constant : env -> constant -> types
@@ -104,7 +102,7 @@ val type_of_constant_type : env -> constant_type -> types
val type_of_constant_knowing_parameters :
env -> constant_type -> constr array -> types
-(* Make a type polymorphic if an arity *)
+(** Make a type polymorphic if an arity *)
val make_polymorphic_if_constant_for_ind : env -> unsafe_judgment ->
constant_type
diff --git a/kernel/univ.mli b/kernel/univ.mli
index 2bfcc2aa8..1d85386c5 100644
--- a/kernel/univ.mli
+++ b/kernel/univ.mli
@@ -1,23 +1,23 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(* Universes. *)
+(** Universes. *)
type universe
-(* The universes hierarchy: Type 0- = Prop <= Type 0 = Set <= Type 1 <= ... *)
-(* Typing of universes: Type 0-, Type 0 : Type 1; Type i : Type (i+1) if i>0 *)
+(** The universes hierarchy: Type 0- = Prop <= Type 0 = Set <= Type 1 <= ...
+ Typing of universes: Type 0-, Type 0 : Type 1; Type i : Type (i+1) if i>0 *)
-val type0m_univ : universe (* image of Prop in the universes hierarchy *)
-val type0_univ : universe (* image of Set in the universes hierarchy *)
-val type1_univ : universe (* the universe of the type of Prop/Set *)
+val type0m_univ : universe (** image of Prop in the universes hierarchy *)
+val type0_univ : universe (** image of Set in the universes hierarchy *)
+val type1_univ : universe (** the universe of the type of Prop/Set *)
val make_univ : Names.dir_path * int -> universe
@@ -25,13 +25,13 @@ val is_type0_univ : universe -> bool
val is_type0m_univ : universe -> bool
val is_univ_variable : universe -> bool
-(* The type of a universe *)
+(** The type of a universe *)
val super : universe -> universe
-(* The max of 2 universes *)
+(** The max of 2 universes *)
val sup : universe -> universe -> universe
-(*s Graphs of universes. *)
+(** {6 Graphs of universes. } *)
type universes
@@ -39,10 +39,10 @@ type check_function = universes -> universe -> universe -> bool
val check_geq : check_function
val check_eq : check_function
-(* The empty graph of universes *)
+(** The empty graph of universes *)
val initial_universes : universes
-(*s Constraints. *)
+(** {6 Constraints. } *)
module Constraint : Set.S
@@ -53,7 +53,8 @@ type constraint_function = universe -> universe -> constraints -> constraints
val enforce_geq : constraint_function
val enforce_eq : constraint_function
-(*s Merge of constraints in a universes graph.
+(** {6 Sect } *)
+(** Merge of constraints in a universes graph.
The function [merge_constraints] merges a set of constraints in a given
universes graph. It raises the exception [UniverseInconsistency] if the
constraints are not satisfiable. *)
@@ -64,7 +65,7 @@ exception UniverseInconsistency of order_request * universe * universe
val merge_constraints : constraints -> universes -> universes
-(*s Support for sort-polymorphic inductive types *)
+(** {6 Support for sort-polymorphic inductive types } *)
val fresh_local_univ : unit -> universe
@@ -78,13 +79,13 @@ val subst_large_constraints :
val no_upper_constraints : universe -> constraints -> bool
-(*s Pretty-printing of universes. *)
+(** {6 Pretty-printing of universes. } *)
val pr_uni : universe -> Pp.std_ppcmds
val pr_universes : universes -> Pp.std_ppcmds
val pr_constraints : constraints -> Pp.std_ppcmds
-(*s Dumping to a file *)
+(** {6 Dumping to a file } *)
val dump_universes : out_channel -> universes -> unit
diff --git a/kernel/vconv.mli b/kernel/vconv.mli
index 551615aa5..6776821ed 100644
--- a/kernel/vconv.mli
+++ b/kernel/vconv.mli
@@ -1,20 +1,18 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
-(*i*)
open Names
open Term
open Environ
open Reduction
-(*i*)
-(***********************************************************************)
-(*s conversion functions *)
+(**********************************************************************
+ s conversion functions *)
val use_vm : unit -> bool
val set_use_vm : bool -> unit
val vconv : conv_pb -> types conversion_function
diff --git a/kernel/vm.mli b/kernel/vm.mli
index 5ecc8d99c..ff76e7cd5 100644
--- a/kernel/vm.mli
+++ b/kernel/vm.mli
@@ -8,10 +8,11 @@ val set_drawinstr : unit -> unit
val transp_values : unit -> bool
val set_transp_values : bool -> unit
-(* le code machine *)
+
+(** le code machine *)
type tcode
-(* Les valeurs ***********)
+(** Les valeurs ***********)
type vprod
type vfun
@@ -26,11 +27,11 @@ type atom =
| Aiddef of id_key * values
| Aind of inductive
-(* Les zippers *)
+(** Les zippers *)
type zipper =
| Zapp of arguments
- | Zfix of vfix*arguments (* Peut-etre vide *)
+ | Zfix of vfix*arguments (** Peut-etre vide *)
| Zswitch of vswitch
type stack = zipper list
@@ -64,42 +65,42 @@ external val_of_annot_switch : annot_switch -> values = "%identity"
(** Destructors *)
val whd_val : values -> whd
-(* Arguments *)
+(** Arguments *)
val nargs : arguments -> int
val arg : arguments -> int -> values
-(* Product *)
+(** Product *)
val dom : vprod -> values
val codom : vprod -> vfun
-(* Function *)
+(** Function *)
val body_of_vfun : int -> vfun -> values
val decompose_vfun2 : int -> vfun -> vfun -> int * values * values
-(* Fix *)
+(** Fix *)
val current_fix : vfix -> int
val check_fix : vfix -> vfix -> bool
val rec_args : vfix -> int array
val reduce_fix : int -> vfix -> vfun array * values array
- (* bodies , types *)
+ (** bodies , types *)
-(* CoFix *)
+(** CoFix *)
val current_cofix : vcofix -> int
val check_cofix : vcofix -> vcofix -> bool
val reduce_cofix : int -> vcofix -> values array * values array
- (* bodies , types *)
-(* Block *)
+ (** bodies , types
+ Block *)
val btag : vblock -> int
val bsize : vblock -> int
val bfield : vblock -> int -> values
-(* Switch *)
+(** Switch *)
val check_switch : vswitch -> vswitch -> bool
val case_info : vswitch -> case_info
val type_of_switch : vswitch -> values
val branch_of_switch : int -> vswitch -> (int * values) array
-(* Evaluation *)
+(** Evaluation *)
val whd_stack : values -> stack -> whd
val force_whd : values -> stack -> whd
diff --git a/lib/bigint.mli b/lib/bigint.mli
index 69b035c45..06f542227 100644
--- a/lib/bigint.mli
+++ b/lib/bigint.mli
@@ -1,18 +1,16 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Pp
-(*i*)
-(* Arbitrary large integer numbers *)
+(** Arbitrary large integer numbers *)
type bigint
@@ -23,7 +21,7 @@ val zero : bigint
val one : bigint
val two : bigint
-val div2_with_rest : bigint -> bigint * bool (* true=odd; false=even *)
+val div2_with_rest : bigint -> bigint * bool (** true=odd; false=even *)
val add_1 : bigint -> bigint
val sub_1 : bigint -> bigint
val mult_2 : bigint -> bigint
diff --git a/lib/dnet.mli b/lib/dnet.mli
index 61998d630..8b50fae23 100644
--- a/lib/dnet.mli
+++ b/lib/dnet.mli
@@ -1,14 +1,14 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
-(* $Id:$ *)
+(** {% $ %}Id:{% $ %} *)
-(* Generic discrimination net implementation over recursive
+(** Generic discrimination net implementation over recursive
types. This module implements a association data structure similar
to tries but working on any types (not just lists). It is a term
indexing datastructure, a generalization of the discrimination nets
@@ -43,27 +43,27 @@
*)
-(* datatype you want to build a dnet on *)
+(** datatype you want to build a dnet on *)
module type Datatype =
sig
- (* parametric datatype. ['a] is morally the recursive argument *)
+ (** parametric datatype. ['a] is morally the recursive argument *)
type 'a t
- (* non-recursive mapping of subterms *)
+ (** non-recursive mapping of subterms *)
val map : ('a -> 'b) -> 'a t -> 'b t
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
- (* non-recursive folding of subterms *)
+ (** non-recursive folding of subterms *)
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val fold2 : ('a -> 'b -> 'c -> 'a) -> 'a -> 'b t -> 'c t -> 'a
- (* comparison of constructors *)
+ (** comparison of constructors *)
val compare : unit t -> unit t -> int
- (* for each constructor, is it not-parametric on 'a? *)
+ (** for each constructor, is it not-parametric on 'a? *)
val terminal : 'a t -> bool
- (* [choose f w] applies f on ONE of the subterms of w *)
+ (** [choose f w] applies f on ONE of the subterms of w *)
val choose : ('a -> 'b) -> 'a t -> 'b
end
@@ -71,19 +71,19 @@ module type S =
sig
type t
- (* provided identifier type *)
+ (** provided identifier type *)
type ident
- (* provided metavariable type *)
+ (** provided metavariable type *)
type meta
- (* provided parametrized datastructure *)
+ (** provided parametrized datastructure *)
type 'a structure
- (* returned sets of solutions *)
+ (** returned sets of solutions *)
module Idset : Set.S with type elt=ident
- (* a pattern is a term where each node can be a unification
+ (** a pattern is a term where each node can be a unification
variable *)
type 'a pattern =
| Term of 'a
@@ -93,13 +93,13 @@ sig
val empty : t
- (* [add t w i] adds a new association (w,i) in t. *)
+ (** [add t w i] adds a new association (w,i) in t. *)
val add : t -> term_pattern -> ident -> t
- (* [find_all t] returns all identifiers contained in t. *)
+ (** [find_all t] returns all identifiers contained in t. *)
val find_all : t -> Idset.t
- (* [fold_pattern f acc p dn] folds f on each meta of p, passing the
+ (** [fold_pattern f acc p dn] folds f on each meta of p, passing the
meta and the sub-dnet under it. The result includes:
- Some set if identifiers were gathered on the leafs of the term
- None if the pattern contains no leaf (only Metas at the leafs).
@@ -107,15 +107,15 @@ sig
val fold_pattern :
('a -> (Idset.t * meta * t) -> 'a) -> 'a -> term_pattern -> t -> Idset.t option * 'a
- (* [find_match p t] returns identifiers of all terms matching p in
+ (** [find_match p t] returns identifiers of all terms matching p in
t. *)
val find_match : term_pattern -> t -> Idset.t
- (* set operations on dnets *)
+ (** set operations on dnets *)
val inter : t -> t -> t
val union : t -> t -> t
- (* apply a function on each identifier and node of terms in a dnet *)
+ (** apply a function on each identifier and node of terms in a dnet *)
val map : (ident -> ident) -> (unit structure -> unit structure) -> t -> t
end
diff --git a/lib/dyn.mli b/lib/dyn.mli
index 1149612f1..befc8de7e 100644
--- a/lib/dyn.mli
+++ b/lib/dyn.mli
@@ -1,14 +1,14 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(* Dynamics. Use with extreme care. Not for kids. *)
+(** Dynamics. Use with extreme care. Not for kids. *)
type t
diff --git a/lib/envars.mli b/lib/envars.mli
index 62d0cb61d..8e4ccb4d5 100644
--- a/lib/envars.mli
+++ b/lib/envars.mli
@@ -1,10 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
+
+(** This file gathers environment variables needed by Coq to run (such
+ as coqlib) *)
val coqlib : unit -> string
val coqbin : unit -> string
diff --git a/lib/explore.mli b/lib/explore.mli
index e29f27955..34a472b72 100644
--- a/lib/explore.mli
+++ b/lib/explore.mli
@@ -1,16 +1,17 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*s Search strategies. *)
+(** {6 Search strategies. } *)
-(*s A search problem implements the following signature [SearchProblem].
+(** {6 Sect } *)
+(** A search problem implements the following signature [SearchProblem].
[state] is the type of states of the search tree.
[branching] is the branching function; if [branching s] returns an
empty list, then search from [s] is aborted; successors of [s] are
@@ -32,7 +33,8 @@ module type SearchProblem = sig
end
-(*s Functor [Make] returns some search functions given a search problem.
+(** {6 Sect } *)
+(** Functor [Make] returns some search functions given a search problem.
Search functions raise [Not_found] if no success is found.
States are always visited in the order they appear in the
output of [branching] (whatever the search method is).
diff --git a/lib/flags.mli b/lib/flags.mli
index 50ba923b7..404cc2d85 100644
--- a/lib/flags.mli
+++ b/lib/flags.mli
@@ -1,14 +1,14 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(* Global options of the system. *)
+(** Global options of the system. *)
val boot : bool ref
@@ -55,40 +55,40 @@ val if_warn : ('a -> unit) -> 'a -> unit
val hash_cons_proofs : bool ref
-(* Temporary activate an option (to activate option [o] on [f x y z],
+(** Temporary activate an option (to activate option [o] on [f x y z],
use [with_option o (f x y) z]) *)
val with_option : bool ref -> ('a -> 'b) -> 'a -> 'b
-(* Temporary deactivate an option *)
+(** Temporary deactivate an option *)
val without_option : bool ref -> ('a -> 'b) -> 'a -> 'b
-(* If [None], no limit *)
+(** If [None], no limit *)
val set_print_hyps_limit : int option -> unit
val print_hyps_limit : unit -> int option
val add_unsafe : string -> unit
val is_unsafe : string -> bool
-(* Options for the virtual machine *)
+(** Options for the virtual machine *)
val set_boxed_definitions : bool -> unit
val boxed_definitions : unit -> bool
-(* Options for external tools *)
+(** Options for external tools *)
-(* Returns string format for default browser to use from Coq or CoqIDE *)
+(** Returns string format for default browser to use from Coq or CoqIDE *)
val browser_cmd_fmt : string
val is_standard_doc_url : string -> bool
-(* Substitute %s in the first chain by the second chain *)
+(** Substitute %s in the first chain by the second chain *)
val subst_command_placeholder : string -> string -> string
-(* Options for specifying where coq librairies reside *)
+(** Options for specifying where coq librairies reside *)
val coqlib_spec : bool ref
val coqlib : string ref
-(* Options for specifying where OCaml binaries reside *)
+(** Options for specifying where OCaml binaries reside *)
val camlbin_spec : bool ref
val camlbin : string ref
val camlp4bin_spec : bool ref
diff --git a/lib/fmap.mli b/lib/fmap.mli
index c323b0558..2c8dedd7e 100644
--- a/lib/fmap.mli
+++ b/lib/fmap.mli
@@ -14,7 +14,7 @@ val iter : (key -> 'a -> unit) -> 'a t -> unit
val map : ('a -> 'b) -> 'a t -> 'b t
val fold : (key -> 'a -> 'c -> 'c) -> 'a t -> 'c -> 'c
-(* Additions with respect to ocaml standard library. *)
+(** Additions with respect to ocaml standard library. *)
val dom : 'a t -> key list
val rng : 'a t -> 'a list
diff --git a/lib/gmap.mli b/lib/gmap.mli
index ac1a9922f..7c86120c6 100644
--- a/lib/gmap.mli
+++ b/lib/gmap.mli
@@ -1,14 +1,14 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(* Maps using the generic comparison function of ocaml. Same interface as
+(** Maps using the generic comparison function of ocaml. Same interface as
the module [Map] from the ocaml standard library. *)
type ('a,'b) t
@@ -23,7 +23,7 @@ val iter : ('a -> 'b -> unit) -> ('a,'b) t -> unit
val map : ('b -> 'c) -> ('a,'b) t -> ('a,'c) t
val fold : ('a -> 'b -> 'c -> 'c) -> ('a,'b) t -> 'c -> 'c
-(* Additions with respect to ocaml standard library. *)
+(** Additions with respect to ocaml standard library. *)
val dom : ('a,'b) t -> 'a list
val rng : ('a,'b) t -> 'b list
diff --git a/lib/gmapl.mli b/lib/gmapl.mli
index 5a5c9a2a4..349774073 100644
--- a/lib/gmapl.mli
+++ b/lib/gmapl.mli
@@ -1,14 +1,14 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(* Maps from ['a] to lists of ['b]. *)
+(** Maps from ['a] to lists of ['b]. *)
type ('a,'b) t
diff --git a/lib/gset.mli b/lib/gset.mli
index 78fc61e14..0b80176d5 100644
--- a/lib/gset.mli
+++ b/lib/gset.mli
@@ -1,14 +1,14 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(* Sets using the generic comparison function of ocaml. Same interface as
+(** Sets using the generic comparison function of ocaml. Same interface as
the module [Set] from the ocaml standard library. *)
type 'a t
diff --git a/lib/hashcons.mli b/lib/hashcons.mli
index 243368d00..ca66730b2 100644
--- a/lib/hashcons.mli
+++ b/lib/hashcons.mli
@@ -1,14 +1,14 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(* Generic hash-consing. *)
+(** Generic hash-consing. *)
module type Comp =
sig
@@ -37,7 +37,7 @@ val recursive2_hcons :
(unit -> ('t1 -> 't1) * ('t2 -> 't2) * 'u2 -> 't2 -> 't2) ->
'u1 -> 'u2 -> ('t1 -> 't1) * ('t2 -> 't2)
-(* Declaring and reinitializing global hash-consing functions *)
+(** Declaring and reinitializing global hash-consing functions *)
val init : unit -> unit
val register_hcons : ('u -> 't -> 't) -> ('u -> 't -> 't)
diff --git a/lib/heap.mli b/lib/heap.mli
index 777e356de..a8c70d37d 100644
--- a/lib/heap.mli
+++ b/lib/heap.mli
@@ -1,14 +1,14 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(* Heaps *)
+(** Heaps *)
module type Ordered = sig
type t
@@ -17,29 +17,29 @@ end
module type S =sig
- (* Type of functional heaps *)
+ (** Type of functional heaps *)
type t
- (* Type of elements *)
+ (** Type of elements *)
type elt
- (* The empty heap *)
+ (** The empty heap *)
val empty : t
- (* [add x h] returns a new heap containing the elements of [h], plus [x];
- complexity $O(log(n))$ *)
+ (** [add x h] returns a new heap containing the elements of [h], plus [x];
+ complexity {% $ %}O(log(n)){% $ %} *)
val add : elt -> t -> t
- (* [maximum h] returns the maximum element of [h]; raises [EmptyHeap]
- when [h] is empty; complexity $O(1)$ *)
+ (** [maximum h] returns the maximum element of [h]; raises [EmptyHeap]
+ when [h] is empty; complexity {% $ %}O(1){% $ %} *)
val maximum : t -> elt
- (* [remove h] returns a new heap containing the elements of [h], except
+ (** [remove h] returns a new heap containing the elements of [h], except
the maximum of [h]; raises [EmptyHeap] when [h] is empty;
- complexity $O(log(n))$ *)
+ complexity {% $ %}O(log(n)){% $ %} *)
val remove : t -> t
- (* usual iterators and combinators; elements are presented in
+ (** usual iterators and combinators; elements are presented in
arbitrary order *)
val iter : (elt -> unit) -> t -> unit
@@ -49,6 +49,6 @@ end
exception EmptyHeap
-(*S Functional implementation. *)
+(** {6 Functional implementation. } *)
module Functional(X: Ordered) : S with type elt=X.t
diff --git a/lib/option.mli b/lib/option.mli
index ef2e311a6..3711a2efd 100644
--- a/lib/option.mli
+++ b/lib/option.mli
@@ -1,12 +1,12 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
-
-(* $Id$ *)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
+
+(** {% $ %}Id: option.mli 12603 2009-12-21 11:16:27Z herbelin {% $ %} *)
(** Module implementing basic combinators for OCaml option type.
It tries follow closely the style of OCaml standard library.
diff --git a/lib/pp.mli b/lib/pp.mli
index 66d9bfa67..6ddfa6fc9 100644
--- a/lib/pp.mli
+++ b/lib/pp.mli
@@ -1,30 +1,28 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Pp_control
-(*i*)
-(* Modify pretty printing functions behavior for emacs ouput (special
+(** Modify pretty printing functions behavior for emacs ouput (special
chars inserted at some places). This function should called once in
module [Options], that's all. *)
val make_pp_emacs:unit -> unit
val make_pp_nonemacs:unit -> unit
-(* Pretty-printers. *)
+(** Pretty-printers. *)
type ppcmd
type std_ppcmds = ppcmd Stream.t
-(*s Formatting commands. *)
+(** {6 Formatting commands. } *)
val str : string -> std_ppcmds
val stras : int * string -> std_ppcmds
@@ -40,11 +38,11 @@ val ismt : std_ppcmds -> bool
val comment : int -> std_ppcmds
val comments : ((int * int) * string) list ref
-(*s Concatenation. *)
+(** {6 Concatenation. } *)
val (++) : std_ppcmds -> std_ppcmds -> std_ppcmds
-(*s Derived commands. *)
+(** {6 Derived commands. } *)
val spc : unit -> std_ppcmds
val cut : unit -> std_ppcmds
@@ -59,7 +57,7 @@ val strbrk : string -> std_ppcmds
val xmlescape : ppcmd -> ppcmd
-(*s Boxing commands. *)
+(** {6 Boxing commands. } *)
val h : int -> std_ppcmds -> std_ppcmds
val v : int -> std_ppcmds -> std_ppcmds
@@ -67,7 +65,7 @@ val hv : int -> std_ppcmds -> std_ppcmds
val hov : int -> std_ppcmds -> std_ppcmds
val t : std_ppcmds -> std_ppcmds
-(*s Opening and closing of boxes. *)
+(** {6 Opening and closing of boxes. } *)
val hb : int -> std_ppcmds
val vb : int -> std_ppcmds
@@ -77,7 +75,7 @@ val tb : unit -> std_ppcmds
val close : unit -> std_ppcmds
val tclose : unit -> std_ppcmds
-(*s Pretty-printing functions \emph{without flush}. *)
+(** {6 Pretty-printing functions {% \emph{%}without flush{% }%}. } *)
val pp_with : Format.formatter -> std_ppcmds -> unit
val ppnl_with : Format.formatter -> std_ppcmds -> unit
@@ -87,28 +85,29 @@ val pp_flush_with : Format.formatter -> unit -> unit
val set_warning_function : (Format.formatter -> std_ppcmds -> unit) -> unit
-(*s Pretty-printing functions \emph{with flush}. *)
+(** {6 Pretty-printing functions {% \emph{%}with flush{% }%}. } *)
val msg_with : Format.formatter -> std_ppcmds -> unit
val msgnl_with : Format.formatter -> std_ppcmds -> unit
-(*s The following functions are instances of the previous ones on
+(** {6 Sect } *)
+(** The following functions are instances of the previous ones on
[std_ft] and [err_ft]. *)
-(*s Pretty-printing functions \emph{without flush} on [stdout] and [stderr]. *)
+(** {6 Pretty-printing functions {% \emph{%}without flush{% }%} on [stdout] and [stderr]. } *)
val pp : std_ppcmds -> unit
val ppnl : std_ppcmds -> unit
val pperr : std_ppcmds -> unit
val pperrnl : std_ppcmds -> unit
-val message : string -> unit (* = pPNL *)
+val message : string -> unit (** = pPNL *)
val warning : string -> unit
val warn : std_ppcmds -> unit
val pp_flush : unit -> unit
val flush_all: unit -> unit
-(*s Pretty-printing functions \emph{with flush} on [stdout] and [stderr]. *)
+(** {6 Pretty-printing functions {% \emph{%}with flush{% }%} on [stdout] and [stderr]. } *)
val msg : std_ppcmds -> unit
val msgnl : std_ppcmds -> unit
diff --git a/lib/pp_control.mli b/lib/pp_control.mli
index 5c481b89a..83ee7a0f3 100644
--- a/lib/pp_control.mli
+++ b/lib/pp_control.mli
@@ -1,14 +1,14 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(* Parameters of pretty-printing. *)
+(** Parameters of pretty-printing. *)
type pp_global_params = {
margin : int;
@@ -23,7 +23,7 @@ val set_dflt_gp : Format.formatter -> unit
val get_gp : Format.formatter -> pp_global_params
-(*s Output functions of pretty-printing. *)
+(** {6 Output functions of pretty-printing. } *)
type 'a pp_formatter_params = {
fp_output : out_channel;
@@ -40,7 +40,7 @@ val std_ft : Format.formatter ref
val err_ft : Format.formatter ref
val deep_ft : Format.formatter ref
-(*s For parametrization through vernacular. *)
+(** {6 For parametrization through vernacular. } *)
val set_depth_boxes : int option -> unit
val get_depth_boxes : unit -> int option
diff --git a/lib/predicate.mli b/lib/predicate.mli
index 41d5399b9..862479ec4 100644
--- a/lib/predicate.mli
+++ b/lib/predicate.mli
@@ -1,9 +1,9 @@
(*i $Id$ i*)
-(* Module [Pred]: sets over infinite ordered types with complement. *)
+(** Module [Pred]: sets over infinite ordered types with complement. *)
-(* This module implements the set data structure, given a total ordering
+(** This module implements the set data structure, given a total ordering
function over the set elements. All operations over sets
are purely applicative (no side-effects).
The implementation uses the Set library. *)
@@ -13,7 +13,7 @@ module type OrderedType =
type t
val compare: t -> t -> int
end
- (* The input signature of the functor [Pred.Make].
+ (** The input signature of the functor [Pred.Make].
[t] is the type of the set elements.
[compare] is a total ordering function over the set elements.
This is a two-argument function [f] such that
@@ -26,44 +26,44 @@ module type OrderedType =
module type S =
sig
type elt
- (* The type of the set elements. *)
+ (** The type of the set elements. *)
type t
- (* The type of sets. *)
+ (** The type of sets. *)
val empty: t
- (* The empty set. *)
+ (** The empty set. *)
val full: t
- (* The whole type. *)
+ (** The whole type. *)
val is_empty: t -> bool
- (* Test whether a set is empty or not. *)
+ (** Test whether a set is empty or not. *)
val is_full: t -> bool
- (* Test whether a set contains the whole type or not. *)
+ (** Test whether a set contains the whole type or not. *)
val mem: elt -> t -> bool
- (* [mem x s] tests whether [x] belongs to the set [s]. *)
+ (** [mem x s] tests whether [x] belongs to the set [s]. *)
val singleton: elt -> t
- (* [singleton x] returns the one-element set containing only [x]. *)
+ (** [singleton x] returns the one-element set containing only [x]. *)
val add: elt -> t -> t
- (* [add x s] returns a set containing all elements of [s],
+ (** [add x s] returns a set containing all elements of [s],
plus [x]. If [x] was already in [s], [s] is returned unchanged. *)
val remove: elt -> t -> t
- (* [remove x s] returns a set containing all elements of [s],
+ (** [remove x s] returns a set containing all elements of [s],
except [x]. If [x] was not in [s], [s] is returned unchanged. *)
val union: t -> t -> t
val inter: t -> t -> t
val diff: t -> t -> t
val complement: t -> t
- (* Union, intersection, difference and set complement. *)
+ (** Union, intersection, difference and set complement. *)
val equal: t -> t -> bool
- (* [equal s1 s2] tests whether the sets [s1] and [s2] are
+ (** [equal s1 s2] tests whether the sets [s1] and [s2] are
equal, that is, contain equal elements. *)
val subset: t -> t -> bool
- (* [subset s1 s2] tests whether the set [s1] is a subset of
+ (** [subset s1 s2] tests whether the set [s1] is a subset of
the set [s2]. *)
val elements: t -> bool * elt list
- (* Gives a finite representation of the predicate: if the
+ (** Gives a finite representation of the predicate: if the
boolean is false, then the predicate is given in extension.
if it is true, then the complement is given *)
end
module Make(Ord: OrderedType): (S with type elt = Ord.t)
- (* Functor building an implementation of the set structure
+ (** Functor building an implementation of the set structure
given a totally ordered type. *)
diff --git a/lib/profile.mli b/lib/profile.mli
index 3647756f7..3d64b79c1 100644
--- a/lib/profile.mli
+++ b/lib/profile.mli
@@ -1,20 +1,20 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*s This program is a small time and allocation profiler for Objective Caml *)
+(** {6 This program is a small time and allocation profiler for Objective Caml } *)
(*i It requires the UNIX library *)
-(* Adapted from Christophe Raffalli *)
+(** Adapted from Christophe Raffalli *)
-(* To use it, link it with the program you want to profile (do not forget
+(** To use it, link it with the program you want to profile (do not forget
"-cclib -lunix -custom unix.cma" among the link options).
To trace a function "f" you first need to get a key for it by using :
@@ -107,23 +107,23 @@ val profile7 :
-> 'a -> 'b -> 'c -> 'd -> 'e -> 'f -> 'g -> 'h
-(* Some utilities to compute the logical and physical sizes and depth
+(** Some utilities to compute the logical and physical sizes and depth
of ML objects *)
-(* Print logical size (in words) and depth of its argument *)
-(* This function does not disturb the heap *)
+(** Print logical size (in words) and depth of its argument
+ This function does not disturb the heap *)
val print_logical_stats : 'a -> unit
-(* Print physical size, logical size (in words) and depth of its argument *)
-(* This function allocates itself a lot (the same order of magnitude
+(** Print physical size, logical size (in words) and depth of its argument
+ This function allocates itself a lot (the same order of magnitude
as the physical size of its argument) *)
val print_stats : 'a -> unit
-(* Return logical size (first for strings, then for not strings),
- (in words) and depth of its argument *)
-(* This function allocates itself a lot *)
+(** Return logical size (first for strings, then for not strings),
+ (in words) and depth of its argument
+ This function allocates itself a lot *)
val obj_stats : 'a -> int * int * int
-(* Return physical size of its argument (string part and rest) *)
-(* This function allocates itself a lot *)
+(** Return physical size of its argument (string part and rest)
+ This function allocates itself a lot *)
val obj_shared_size : 'a -> int * int
diff --git a/lib/rtree.mli b/lib/rtree.mli
index de5a9aa38..6dd66d104 100644
--- a/lib/rtree.mli
+++ b/lib/rtree.mli
@@ -1,24 +1,24 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(* Type of regular tree with nodes labelled by values of type 'a *)
-(* The implementation uses de Bruijn indices, so binding capture
+(** Type of regular tree with nodes labelled by values of type 'a
+ The implementation uses de Bruijn indices, so binding capture
is avoided by the lift operator (see example below) *)
type 'a t
-(* Building trees *)
+(** Building trees *)
-(* build a node given a label and the vector of sons *)
+(** build a node given a label and the vector of sons *)
val mk_node : 'a -> 'a t array -> 'a t
-(* Build mutually recursive trees:
+(** Build mutually recursive trees:
X_1 = f_1(X_1,..,X_n) ... X_n = f_n(X_1,..,X_n)
is obtained by the following pseudo-code
let vx = mk_rec_calls n in
@@ -32,27 +32,29 @@ val mk_node : 'a -> 'a t array -> 'a t
Another example: nested recursive trees rec Y = b(rec X = a(X,Y),Y,Y)
let [|vy|] = mk_rec_calls 1 in
let [|vx|] = mk_rec_calls 1 in
- let [|x|] = mk_rec[|mk_node a [|vx;lift 1 vy|]
- let [|y|] = mk_rec[|mk_node b [|x;vy;vy|]|]
+ let [|x|] = mk_rec[|mk_node a vx;lift 1 vy|]
+ let [|y|] = mk_rec[|mk_node b x;vy;vy|]
(note the lift to avoid
*)
val mk_rec_calls : int -> 'a t array
val mk_rec : 'a t array -> 'a t array
-(* [lift k t] increases of [k] the free parameters of [t]. Needed
+(** [lift k t] increases of [k] the free parameters of [t]. Needed
to avoid captures when a tree appears under [mk_rec] *)
val lift : int -> 'a t -> 'a t
val is_node : 'a t -> bool
-(* Destructors (recursive calls are expanded) *)
+
+(** Destructors (recursive calls are expanded) *)
val dest_node : 'a t -> 'a * 'a t array
-(* dest_param is not needed for closed trees (i.e. with no free variable) *)
+
+(** dest_param is not needed for closed trees (i.e. with no free variable) *)
val dest_param : 'a t -> int * int
-(* Tells if a tree has an infinite branch *)
+(** Tells if a tree has an infinite branch *)
val is_infinite : 'a t -> bool
-(* [compare_rtree f t1 t2] compares t1 t2 (top-down).
+(** [compare_rtree f t1 t2] compares t1 t2 (top-down).
f is called on each node: if the result is negative then the
traversal ends on false, it is is positive then deeper nodes are
not examined, and the traversal continues on respective siblings,
@@ -66,14 +68,15 @@ val compare_rtree : ('a t -> 'b t -> int) -> 'a t -> 'b t -> bool
val eq_rtree : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
-(* Iterators *)
+(** Iterators *)
val map : ('a -> 'b) -> 'a t -> 'b t
-(* [(smartmap f t) == t] if [(f a) ==a ] for all nodes *)
+
+(** [(smartmap f t) == t] if [(f a) ==a ] for all nodes *)
val smartmap : ('a -> 'a) -> 'a t -> 'a t
val fold : (bool -> 'a t -> ('a t -> 'b) -> 'b) -> 'a t -> 'b
val fold2 :
(bool -> 'a t -> 'b -> ('a t -> 'b -> 'c) -> 'c) -> 'a t -> 'b -> 'c
-(* A rather simple minded pretty-printer *)
+(** A rather simple minded pretty-printer *)
val pp_tree : ('a -> Pp.std_ppcmds) -> 'a t -> Pp.std_ppcmds
diff --git a/lib/segmenttree.mli b/lib/segmenttree.mli
index 4aea13e9a..3258537b9 100644
--- a/lib/segmenttree.mli
+++ b/lib/segmenttree.mli
@@ -7,7 +7,7 @@
(** A mapping from a union of disjoint segments to some values of type ['a]. *)
type 'a t
-(** [make [(i1, j1), v1; (i2, j2), v2; ...] creates a mapping that
+(** [make [(i1, j1), v1; (i2, j2), v2; ...]] creates a mapping that
associates to every integer [x] the value [v1] if [i1 <= x <= j1],
[v2] if [i2 <= x <= j2], and so one.
Precondition: the segments must be sorted. *)
diff --git a/lib/system.mli b/lib/system.mli
index cc55f4d66..8eb375804 100644
--- a/lib/system.mli
+++ b/lib/system.mli
@@ -1,14 +1,15 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*s Files and load paths. Load path entries remember the original root
+(** {6 Sect } *)
+(** Files and load paths. Load path entries remember the original root
given by the user. For efficiency, we keep the full path (field
[directory]), the root path and the path relative to the root. *)
@@ -39,7 +40,8 @@ val exists_dir : string -> bool
val find_file_in_path :
?warn:bool -> load_path -> string -> physical_path * string
-(*s Generic input and output functions, parameterized by a magic number
+(** {6 Sect } *)
+(** Generic input and output functions, parameterized by a magic number
and a suffix. The intern functions raise the exception [Bad_magic_number]
when the check fails, with the full file name. *)
@@ -54,11 +56,12 @@ val raw_extern_intern : int -> string ->
val extern_intern : ?warn:bool -> int -> string ->
(string -> 'a -> unit) * (load_path -> string -> 'a)
-(*s Sending/receiving once with external executable *)
+(** {6 Sending/receiving once with external executable } *)
val connect : (out_channel -> unit) -> (in_channel -> 'a) -> string -> 'a
-(*s [run_command converter f com] launches command [com], and returns
+(** {6 Sect } *)
+(** [run_command converter f com] launches command [com], and returns
the contents of stdout and stderr that have been processed with
[converter]; the processed contents of stdout and stderr is also
passed to [f] *)
@@ -68,11 +71,11 @@ val run_command : (string -> string) -> (string -> unit) -> string ->
val search_exe_in_path : string -> string option
-(*s Time stamps. *)
+(** {6 Time stamps.} *)
type time
val process_time : unit -> float * float
val get_time : unit -> time
-val time_difference : time -> time -> float (* in seconds *)
+val time_difference : time -> time -> float (** in seconds *)
val fmt_time_difference : time -> time -> Pp.std_ppcmds
diff --git a/lib/tlm.mli b/lib/tlm.mli
index 54eb17599..05ecee871 100644
--- a/lib/tlm.mli
+++ b/lib/tlm.mli
@@ -1,28 +1,28 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(* Tries. This module implements a data structure [('a,'b) t] mapping lists
+(** Tries. This module implements a data structure [('a,'b) t] mapping lists
of values of type ['a] to sets (as lists) of values of type ['b]. *)
type ('a,'b) t
val empty : ('a,'b) t
-(* Work on labels, not on paths. *)
+(** Work on labels, not on paths. *)
val map : ('a,'b) t -> 'a -> ('a,'b) t
val xtract : ('a,'b) t -> 'b list
val dom : ('a,'b) t -> 'a list
val in_dom : ('a,'b) t -> 'a -> bool
-(* Work on paths, not on labels. *)
+(** Work on paths, not on labels. *)
val add : ('a,'b) t -> 'a list * 'b -> ('a,'b) t
val rmv : ('a,'b) t -> ('a list * 'b) -> ('a,'b) t
diff --git a/lib/tries.mli b/lib/tries.mli
index 342c81ecd..8e8376772 100644
--- a/lib/tries.mli
+++ b/lib/tries.mli
@@ -12,7 +12,7 @@ sig
val empty : t
- (* Work on labels, not on paths. *)
+ (** Work on labels, not on paths. *)
val map : t -> Y.t -> t
@@ -22,7 +22,7 @@ sig
val in_dom : t -> Y.t -> bool
- (* Work on paths, not on labels. *)
+ (** Work on paths, not on labels. *)
val add : t -> Y.t list * X.t -> t
diff --git a/lib/util.mli b/lib/util.mli
index 810e6f0c7..ecf6b0a16 100644
--- a/lib/util.mli
+++ b/lib/util.mli
@@ -1,21 +1,20 @@
-(***********************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * INRIA-Rocquencourt & LRI-CNRS-Orsay *)
-(* \VV/ *************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(***********************************************************************)
+(**********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * INRIA-Rocquencourt & LRI-CNRS-Orsay
+ \VV/ ************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ **********************************************************************)
(*i $Id$ i*)
-(*i*)
open Pp
-(*i*)
-(* This module contains numerous utility functions on strings, lists,
+(** This module contains numerous utility functions on strings, lists,
arrays, etc. *)
-(*s Errors. [Anomaly] is used for system errors and [UserError] for the
+(** {6 Sect } *)
+(** Errors. [Anomaly] is used for system errors and [UserError] for the
user's ones. *)
exception Anomaly of string * std_ppcmds
@@ -31,7 +30,7 @@ val alreadydeclared : std_ppcmds -> 'a
exception AnomalyOnError of string * exn
-(* [todo] is for running of an incomplete code its implementation is
+(** [todo] is for running of an incomplete code its implementation is
"do nothing" (or print a message), but this function should not be
used in a released code *)
@@ -53,37 +52,37 @@ val join_loc : loc -> loc -> loc
val located_fold_left : ('a -> 'b -> 'a) -> 'a -> 'b located -> 'a
val located_iter2 : ('a -> 'b -> unit) -> 'a located -> 'b located -> unit
-(* Like [Exc_located], but specifies the outermost file read, the
+(** Like [Exc_located], but specifies the outermost file read, the
input buffer associated to the location of the error (or the module name
if boolean is true), and the error itself. *)
exception Error_in_file of string * (bool * string * loc) * exn
-(* Mapping under pairs *)
+(** Mapping under pairs *)
val on_fst : ('a -> 'b) -> 'a * 'c -> 'b * 'c
val on_snd : ('a -> 'b) -> 'c * 'a -> 'c * 'b
-(* Mapping under triple *)
+(** Mapping under triple *)
val on_pi1 : ('a -> 'b) -> 'a * 'c * 'd -> 'b * 'c * 'd
val on_pi2 : ('a -> 'b) -> 'c * 'a * 'd -> 'c * 'b * 'd
val on_pi3 : ('a -> 'b) -> 'c * 'd * 'a -> 'c * 'd * 'b
-(*s Projections from triplets *)
+(** {6 Projections from triplets } *)
val pi1 : 'a * 'b * 'c -> 'a
val pi2 : 'a * 'b * 'c -> 'b
val pi3 : 'a * 'b * 'c -> 'c
-(*s Chars. *)
+(** {6 Chars. } *)
val is_letter : char -> bool
val is_digit : char -> bool
val is_ident_tail : char -> bool
val is_blank : char -> bool
-(*s Strings. *)
+(** {6 Strings. } *)
val explode : string -> string list
val implode : string list -> string
@@ -109,7 +108,7 @@ val check_ident : string -> unit
val check_ident_soft : string -> unit
val lowercase_first_char_utf8 : string -> string
-(*s Lists. *)
+(** {6 Lists. } *)
val list_compare : ('a -> 'a -> int) -> 'a list -> 'a list -> int
val list_add_set : 'a -> 'a list -> 'a list
@@ -119,7 +118,8 @@ val list_union : 'a list -> 'a list -> 'a list
val list_unionq : 'a list -> 'a list -> 'a list
val list_subtract : 'a list -> 'a list -> 'a list
val list_subtractq : 'a list -> 'a list -> 'a list
-(* [list_tabulate f n] builds [[f 0; ...; f (n-1)]] *)
+
+(** [list_tabulate f n] builds [[f 0; ...; f (n-1)]] *)
val list_tabulate : (int -> 'a) -> int -> 'a list
val list_make : int -> 'a -> 'a list
val list_assign : 'a list -> int -> 'a -> 'a list
@@ -127,7 +127,8 @@ val list_distinct : 'a list -> bool
val list_duplicates : 'a list -> 'a list
val list_filter2 : ('a -> 'b -> bool) -> 'a list * 'b list -> 'a list * 'b list
val list_map_filter : ('a -> 'b option) -> 'a list -> 'b list
-(* [list_smartmap f [a1...an] = List.map f [a1...an]] but if for all i
+
+(** [list_smartmap f [a1...an] = List.map f [a1...an]] but if for all i
[ f ai == ai], then [list_smartmap f l==l] *)
val list_smartmap : ('a -> 'a) -> 'a list -> 'a list
val list_map_left : ('a -> 'b) -> 'a list -> 'b list
@@ -140,11 +141,14 @@ val list_map4 :
('a -> 'b -> 'c -> 'd -> 'e) -> 'a list -> 'b list -> 'c list -> 'd list -> 'e list
val list_filter_i :
(int -> 'a -> bool) -> 'a list -> 'a list
-(* [list_index] returns the 1st index of an element in a list (counting from 1) *)
+
+(** [list_index] returns the 1st index of an element in a list (counting from 1) *)
val list_index : 'a -> 'a list -> int
-(* [list_unique_index x l] returns [Not_found] if [x] doesn't occur exactly once *)
+
+(** [list_unique_index x l] returns [Not_found] if [x] doesn't occur exactly once *)
val list_unique_index : 'a -> 'a list -> int
-(* [list_index0] behaves as [list_index] except that it starts counting at 0 *)
+
+(** [list_index0] behaves as [list_index] except that it starts counting at 0 *)
val list_index0 : 'a -> 'a list -> int
val list_iter3 : ('a -> 'b -> 'c -> unit) -> 'a list -> 'b list -> 'c list -> unit
val list_iter_i : (int -> 'a -> unit) -> 'a list -> unit
@@ -163,7 +167,8 @@ val list_sep_last : 'a list -> 'a * 'a list
val list_try_find_i : (int -> 'a -> 'b) -> int -> 'a list -> 'b
val list_try_find : ('a -> 'b) -> 'a list -> 'b
val list_uniquize : 'a list -> 'a list
-(* merges two sorted lists and preserves the uniqueness property: *)
+
+(** merges two sorted lists and preserves the uniqueness property: *)
val list_merge_uniq : ('a -> 'a -> int) -> 'a list -> 'a list -> 'a list
val list_subset : 'a list -> 'a list -> bool
val list_chop : int -> 'a list -> 'a list * 'a list
@@ -178,30 +183,38 @@ val list_skipn : int -> 'a list -> 'a list
val list_skipn_at_least : int -> 'a list -> 'a list
val list_addn : int -> 'a -> 'a list -> 'a list
val list_prefix_of : 'a list -> 'a list -> bool
-(* [list_drop_prefix p l] returns [t] if [l=p++t] else return [l] *)
+
+(** [list_drop_prefix p l] returns [t] if [l=p++t] else return [l] *)
val list_drop_prefix : 'a list -> 'a list -> 'a list
val list_drop_last : 'a list -> 'a list
-(* [map_append f [x1; ...; xn]] returns [(f x1)@(f x2)@...@(f xn)] *)
+
+(** [map_append f [x1; ...; xn]] returns [(f x1)@(f x2)@...@(f xn)] *)
val list_map_append : ('a -> 'b list) -> 'a list -> 'b list
val list_join_map : ('a -> 'b list) -> 'a list -> 'b list
-(* raises [Invalid_argument] if the two lists don't have the same length *)
+
+(** raises [Invalid_argument] if the two lists don't have the same length *)
val list_map_append2 : ('a -> 'b -> 'c list) -> 'a list -> 'b list -> 'c list
val list_share_tails : 'a list -> 'a list -> 'a list * 'a list * 'a list
-(* [list_fold_map f e_0 [l_1...l_n] = e_n,[k_1...k_n]]
+
+(** [list_fold_map f e_0 [l_1...l_n] = e_n,[k_1...k_n]]
where [(e_i,k_i)=f e_{i-1} l_i] *)
val list_fold_map : ('a -> 'b -> 'a * 'c) -> 'a -> 'b list -> 'a * 'c list
val list_fold_map' : ('b -> 'a -> 'c * 'a) -> 'b list -> 'a -> 'c list * 'a
val list_map_assoc : ('a -> 'b) -> ('c * 'a) list -> ('c * 'b) list
-(* A generic cartesian product: for any operator (**),
+
+(** A generic cartesian product: for any operator (**),
[list_cartesian (**) [x1;x2] [y1;y2] = [x1**y1; x1**y2; x2**y1; x2**y1]],
and so on if there are more elements in the lists. *)
val list_cartesian : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list
-(* [list_cartesians] is an n-ary cartesian product: it iterates
+
+(** [list_cartesians] is an n-ary cartesian product: it iterates
[list_cartesian] over a list of lists. *)
val list_cartesians : ('a -> 'b -> 'b) -> 'b -> 'a list list -> 'b list
-(* list_combinations [[a;b];[c;d]] returns [[a;c];[a;d];[b;c];[b;d]] *)
+
+(** list_combinations [[a;b];[c;d]] returns [[a;c];[a;d];[b;c];[b;d]] *)
val list_combinations : 'a list list -> 'a list list
-(* Keep only those products that do not return None *)
+
+(** Keep only those products that do not return None *)
val list_cartesian_filter :
('a -> 'b -> 'c option) -> 'a list -> 'b list -> 'c list
val list_cartesians_filter :
@@ -209,7 +222,7 @@ val list_cartesians_filter :
val list_union_map : ('a -> 'b -> 'b) -> 'a list -> 'b -> 'b
-(*s Arrays. *)
+(** {6 Arrays. } *)
val array_compare : ('a -> 'a -> int) -> 'a array -> 'a array -> int
val array_exists : ('a -> bool) -> 'a array -> bool
@@ -258,11 +271,11 @@ val array_distinct : 'a array -> bool
val array_union_map : ('a -> 'b -> 'b) -> 'a array -> 'b -> 'b
val array_rev_to_list : 'a array -> 'a list
-(*s Matrices *)
+(** {6 Matrices } *)
val matrix_transpose : 'a list list -> 'a list list
-(*s Functions. *)
+(** {6 Functions. } *)
val identity : 'a -> 'a
val compose : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b
@@ -271,7 +284,7 @@ val iterate : ('a -> 'a) -> int -> 'a -> 'a
val repeat : int -> ('a -> unit) -> 'a -> unit
val iterate_for : int -> int -> (int -> 'a -> 'a) -> 'a -> 'a
-(*s Misc. *)
+(** {6 Misc. } *)
type ('a,'b) union = Inl of 'a | Inr of 'b
@@ -286,12 +299,12 @@ val intmap_inv : 'a Intmap.t -> 'a -> int list
val interval : int -> int -> int list
-(* In [map_succeed f l] an element [a] is removed if [f a] raises *)
-(* [Failure _] otherwise behaves as [List.map f l] *)
+(** In [map_succeed f l] an element [a] is removed if [f a] raises
+ [Failure _] otherwise behaves as [List.map f l] *)
val map_succeed : ('a -> 'b) -> 'a list -> 'b list
-(*s Pretty-printing. *)
+(** {6 Pretty-printing. } *)
val pr_spc : unit -> std_ppcmds
val pr_fnl : unit -> std_ppcmds
@@ -306,7 +319,8 @@ val pr_opt_no_spc : ('a -> std_ppcmds) -> 'a option -> std_ppcmds
val nth : int -> std_ppcmds
val prlist : ('a -> std_ppcmds) -> 'a list -> std_ppcmds
-(* unlike all other functions below, [prlist] works lazily.
+
+(** unlike all other functions below, [prlist] works lazily.
if a strict behavior is needed, use [prlist_strict] instead. *)
val prlist_strict : ('a -> std_ppcmds) -> 'a list -> std_ppcmds
val prlist_with_sep :
@@ -321,34 +335,36 @@ val pr_located : ('a -> std_ppcmds) -> 'a located -> std_ppcmds
val pr_sequence : ('a -> std_ppcmds) -> 'a list -> std_ppcmds
val surround : std_ppcmds -> std_ppcmds
-(*s Memoization. *)
+(** {6 Memoization. } *)
-(* General comments on memoization:
+(** General comments on memoization:
- cache is created whenever the function is supplied (because of
ML's polymorphic value restriction).
- cache is never flushed (unless the memoized fun is GC'd)
- *)
-(* One cell memory: memorizes only the last call *)
+
+ One cell memory: memorizes only the last call *)
val memo1_1 : ('a -> 'b) -> ('a -> 'b)
val memo1_2 : ('a -> 'b -> 'c) -> ('a -> 'b -> 'c)
-(* with custom equality (used to deal with various arities) *)
+
+(** with custom equality (used to deal with various arities) *)
val memo1_eq : ('a -> 'a -> bool) -> ('a -> 'b) -> ('a -> 'b)
-(* Memorizes the last [n] distinct calls. Efficient only for small [n]. *)
+(** Memorizes the last [n] distinct calls. Efficient only for small [n]. *)
val memon_eq : ('a -> 'a -> bool) -> int -> ('a -> 'b) -> ('a -> 'b)
-(*s Size of an ocaml value (in words, bytes and kilobytes). *)
+(** {6 Size of an ocaml value (in words, bytes and kilobytes). } *)
val size_w : 'a -> int
val size_b : 'a -> int
val size_kb : 'a -> int
-(*s Total size of the allocated ocaml heap. *)
+(** {6 Total size of the allocated ocaml heap. } *)
val heap_size : unit -> int
val heap_size_kb : unit -> int
-(*s Coq interruption: set the following boolean reference to interrupt Coq
+(** {6 Sect } *)
+(** Coq interruption: set the following boolean reference to interrupt Coq
(it eventually raises [Break], simulating a Ctrl-C) *)
val interrupt : bool ref
diff --git a/library/decl_kinds.mli b/library/decl_kinds.mli
index 0ebab9ca0..abc201eb1 100644
--- a/library/decl_kinds.mli
+++ b/library/decl_kinds.mli
@@ -1,17 +1,17 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
-(* $Id$ *)
+(** {% $ %}Id: decl_kinds.mli 12337 2009-09-17 15:58:14Z glondu {% $ %} *)
open Util
open Libnames
-(* Informal mathematical status of declarations *)
+(** Informal mathematical status of declarations *)
type locality =
| Local
@@ -44,7 +44,7 @@ type definition_object_kind =
type assumption_object_kind = Definitional | Logical | Conjectural
-(* [assumption_kind]
+(** [assumption_kind]
| Local | Global
------------------------------------
@@ -56,7 +56,7 @@ type assumption_kind = locality * assumption_object_kind
type definition_kind = locality * boxed_flag * definition_object_kind
-(* Kinds used in proofs *)
+(** Kinds used in proofs *)
type goal_object_kind =
| DefinitionBody of definition_object_kind
@@ -64,31 +64,31 @@ type goal_object_kind =
type goal_kind = locality * goal_object_kind
-(* Kinds used in library *)
+(** Kinds used in library *)
type logical_kind =
| IsAssumption of assumption_object_kind
| IsDefinition of definition_object_kind
| IsProof of theorem_kind
-(* Utils *)
+(** Utils *)
val logical_kind_of_goal_kind : goal_object_kind -> logical_kind
val string_of_theorem_kind : theorem_kind -> string
val string_of_definition_kind :
locality * boxed_flag * definition_object_kind -> string
-(* About locality *)
+(** About locality *)
val strength_of_global : global_reference -> locality
val string_of_strength : locality -> string
-(* About recursive power of type declarations *)
+(** About recursive power of type declarations *)
type recursivity_kind =
- | Finite (* = inductive *)
- | CoFinite (* = coinductive *)
- | BiFinite (* = non-recursive, like in "Record" definitions *)
+ | Finite (** = inductive *)
+ | CoFinite (** = coinductive *)
+ | BiFinite (** = non-recursive, like in "Record" definitions *)
-(* helper, converts to "finiteness flag" booleans *)
+(** helper, converts to "finiteness flag" booleans *)
val recursivity_flag_of_kind : recursivity_kind -> bool
diff --git a/library/declare.mli b/library/declare.mli
index 09526f341..1b4564d9c 100644
--- a/library/declare.mli
+++ b/library/declare.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Libnames
open Term
@@ -19,9 +18,8 @@ open Indtypes
open Safe_typing
open Nametab
open Decl_kinds
-(*i*)
-(* This module provides the official functions to declare new variables,
+(** This module provides the official functions to declare new variables,
parameters, constants and inductive types. Using the following functions
will add the entries in the global environment (module [Global]), will
register the declarations in the library (module [Lib]) --- so that the
@@ -30,22 +28,22 @@ open Decl_kinds
open Nametab
-(* Declaration of local constructions (Variable/Hypothesis/Local) *)
+(** Declaration of local constructions (Variable/Hypothesis/Local) *)
type section_variable_entry =
- | SectionLocalDef of constr * types option * bool (* opacity *)
- | SectionLocalAssum of types * bool (* Implicit status *)
+ | SectionLocalDef of constr * types option * bool (** opacity *)
+ | SectionLocalAssum of types * bool (** Implicit status *)
type variable_declaration = dir_path * section_variable_entry * logical_kind
val declare_variable : variable -> variable_declaration -> object_name
-(* Declaration of global constructions *)
-(* i.e. Definition/Theorem/Axiom/Parameter/... *)
+(** Declaration of global constructions
+ i.e. Definition/Theorem/Axiom/Parameter/... *)
type constant_declaration = constant_entry * logical_kind
-(* [declare_constant id cd] declares a global declaration
+(** [declare_constant id cd] declares a global declaration
(constant/parameter) with name [id] in the current section; it returns
the full path of the declaration *)
val declare_constant :
@@ -54,25 +52,25 @@ val declare_constant :
val declare_internal_constant :
identifier -> constant_declaration -> constant
-(* [declare_mind me] declares a block of inductive types with
+(** [declare_mind me] declares a block of inductive types with
their constructors in the current section; it returns the path of
the whole block (boolean must be true iff it is a record) *)
val declare_mind : bool -> mutual_inductive_entry -> object_name
-(* Hooks for XML output *)
+(** Hooks for XML output *)
val set_xml_declare_variable : (object_name -> unit) -> unit
val set_xml_declare_constant : (bool * constant -> unit) -> unit
val set_xml_declare_inductive : (bool * object_name -> unit) -> unit
-(* Hook for the cache function of constants and inductives *)
+(** Hook for the cache function of constants and inductives *)
val add_cache_hook : (full_path -> unit) -> unit
-(* Declaration messages *)
+(** Declaration messages *)
val definition_message : identifier -> unit
val assumption_message : identifier -> unit
val fixpoint_message : int array option -> identifier list -> unit
val cofixpoint_message : identifier list -> unit
-val recursive_message : bool (* true = fixpoint *) ->
+val recursive_message : bool (** true = fixpoint *) ->
int array option -> identifier list -> unit
diff --git a/library/declaremods.mli b/library/declaremods.mli
index e58f96744..17fd44024 100644
--- a/library/declaremods.mli
+++ b/library/declaremods.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Util
open Names
open Entries
@@ -16,15 +15,16 @@ open Environ
open Libnames
open Libobject
open Lib
- (*i*)
+ (**/**)
-(*s This modules provides official functions to declare modules and
+(** {6 Sect } *)
+(** This modules provides official functions to declare modules and
module types *)
-(*s Modules *)
+(** {6 Modules } *)
-(* [declare_module interp_modtype interp_modexpr id fargs typ expr]
+(** [declare_module interp_modtype interp_modexpr id fargs typ expr]
declares module [id], with type constructed by [interp_modtype]
from functor arguments [fargs] and [typ] and with module body
constructed by [interp_modtype] from functor arguments [fargs] and
@@ -53,7 +53,7 @@ val end_module : unit -> module_path
-(*s Module types *)
+(** {6 Module types } *)
val declare_modtype : (env -> 'modast -> module_struct_entry) ->
(env -> 'modast -> module_struct_entry * bool) ->
@@ -67,13 +67,14 @@ val start_modtype : (env -> 'modast -> module_struct_entry) ->
val end_modtype : unit -> module_path
-(*s Objects of a module. They come in two lists: the substitutive ones
+(** {6 Sect } *)
+(** Objects of a module. They come in two lists: the substitutive ones
and the other *)
val module_objects : module_path -> library_segment
-(*s Libraries i.e. modules on disk *)
+(** {6 Libraries i.e. modules on disk } *)
type library_name = dir_path
@@ -88,27 +89,28 @@ val start_library : library_name -> unit
val end_library :
library_name -> Safe_typing.compiled_library * library_objects
-(* set a function to be executed at end_library *)
+(** set a function to be executed at end_library *)
val set_end_library_hook : (unit -> unit) -> unit
-(* [really_import_module mp] opens the module [mp] (in a Caml sense).
+(** [really_import_module mp] opens the module [mp] (in a Caml sense).
It modifies Nametab and performs the [open_object] function for
every object of the module. *)
val really_import_module : module_path -> unit
-(* [import_module export mp] is a synchronous version of
+(** [import_module export mp] is a synchronous version of
[really_import_module]. If [export] is [true], the module is also
opened every time the module containing it is. *)
val import_module : bool -> module_path -> unit
-(* Include *)
+(** Include *)
val declare_include : (env -> 'struct_expr -> module_struct_entry * bool) ->
('struct_expr * bool) list -> unit
-(*s [iter_all_segments] iterate over all segments, the modules'
+(** {6 Sect } *)
+(** [iter_all_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). *)
@@ -120,7 +122,7 @@ val debug_print_modtab : unit -> Pp.std_ppcmds
(*i val debug_print_modtypetab : unit -> Pp.std_ppcmds i*)
-(* For translator *)
+(** For translator *)
val process_module_bindings : module_ident list ->
(mod_bound_id * (module_struct_entry * bool)) list -> unit
diff --git a/library/decls.mli b/library/decls.mli
index 29fa13ae5..091ec7d99 100644
--- a/library/decls.mli
+++ b/library/decls.mli
@@ -1,10 +1,10 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
@@ -20,7 +20,7 @@ open Decl_kinds
(** Registration and access to the table of variable *)
type variable_data =
- dir_path * bool (* opacity *) * Univ.constraints * logical_kind
+ dir_path * bool (** opacity *) * Univ.constraints * logical_kind
val add_variable_data : variable -> variable_data -> unit
val variable_path : variable -> dir_path
diff --git a/library/dischargedhypsmap.mli b/library/dischargedhypsmap.mli
index f9d0f9b4f..bc9541cf4 100644
--- a/library/dischargedhypsmap.mli
+++ b/library/dischargedhypsmap.mli
@@ -1,24 +1,23 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Libnames
open Term
open Environ
open Nametab
-(*i*)
type discharged_hyps = full_path list
-(*s Discharged hypothesis. Here we store the discharged hypothesis of each *)
-(* constant or inductive type declaration. *)
+(** {6 Sect } *)
+(** Discharged hypothesis. Here we store the discharged hypothesis of each
+ constant or inductive type declaration. *)
val set_discharged_hyps : full_path -> discharged_hyps -> unit
val get_discharged_hyps : full_path -> discharged_hyps
diff --git a/library/global.mli b/library/global.mli
index a8d76c4f4..17ad57138 100644
--- a/library/global.mli
+++ b/library/global.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Univ
open Term
@@ -17,9 +16,9 @@ open Entries
open Indtypes
open Mod_subst
open Safe_typing
- (*i*)
+ (**/**)
-(* This module defines the global environment of Coq. The functions
+(** This module defines the global environment of Coq. The functions
below are exactly the same as the ones in [Safe_typing], operating on
that global environment. [add_*] functions perform name verification,
i.e. check that the name given as argument match those provided by
@@ -38,11 +37,12 @@ val named_context : unit -> Sign.named_context
val env_is_empty : unit -> bool
-(*s Extending env with variables and local definitions *)
+(** {6 Extending env with variables and local definitions } *)
val push_named_assum : (identifier * types) -> Univ.constraints
val push_named_def : (identifier * constr * types option) -> Univ.constraints
-(*s Adding constants, inductives, modules and module types. All these
+(** {6 Sect } *)
+(** Adding constants, inductives, modules and module types. All these
functions verify that given names match those generated by kernel *)
val add_constant :
@@ -61,11 +61,11 @@ val add_constraints : constraints -> unit
val set_engagement : engagement -> unit
-(*s Interactive modules and module types *)
-(* Both [start_*] functions take the [dir_path] argument to create a
+(** {6 Interactive modules and module types }
+ Both [start_*] functions take the [dir_path] argument to create a
[mod_self_id]. This should be the name of the compilation unit. *)
-(* [start_*] functions return the [module_path] valid for components
+(** [start_*] functions return the [module_path] valid for components
of the started module / module type *)
val start_module : identifier -> module_path
@@ -81,7 +81,7 @@ val end_modtype : Summary.frozen -> identifier -> module_path
val pack_module : unit -> module_body
-(* Queries *)
+(** Queries *)
val lookup_named : variable -> named_declaration
val lookup_constant : constant -> constant_body
val lookup_inductive : inductive -> mutual_inductive_body * one_inductive_body
@@ -91,17 +91,18 @@ val lookup_modtype : module_path -> module_type_body
val constant_of_delta : constant -> constant
val mind_of_delta : mutual_inductive -> mutual_inductive
-(* Compiled modules *)
+(** Compiled modules *)
val start_library : dir_path -> module_path
val export : dir_path -> module_path * compiled_library
val import : compiled_library -> Digest.t -> module_path
-(*s Function to get an environment from the constants part of the global
+(** {6 Sect } *)
+(** Function to get an environment from the constants part of the global
* environment and a given context. *)
val type_of_global : Libnames.global_reference -> types
val env_of_context : Environ.named_context_val -> Environ.env
-(* spiwack: register/unregister function for retroknowledge *)
+(** spiwack: register/unregister function for retroknowledge *)
val register : Retroknowledge.field -> constr -> constr -> unit
diff --git a/library/goptions.mli b/library/goptions.mli
index 511986a57..a8ed8a045 100644
--- a/library/goptions.mli
+++ b/library/goptions.mli
@@ -1,16 +1,16 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(* This module manages customization parameters at the vernacular level *)
+(** This module manages customization parameters at the vernacular level *)
-(* Two kinds of things are managed : tables and options value
+(** Two kinds of things are managed : tables and options value
- Tables are created by applying the [MakeTable] functor.
- Variables storing options value are created by applying one of the
[declare_int_option], [declare_bool_option], ... functions.
@@ -40,12 +40,11 @@
Set Tata Tutu Titi.
Unset Tata Tutu Titi.
- Print Table Tata Tutu Titi. (* synonym: Test Table Tata Tutu Titi. *)
+ Print Table Tata Tutu Titi. (** synonym: Test Table Tata Tutu Titi. *)
The created table/option may be declared synchronous or not
(synchronous = consistent with the resetting commands) *)
-(*i*)
open Pp
open Util
open Names
@@ -53,18 +52,17 @@ open Libnames
open Term
open Nametab
open Mod_subst
-(*i*)
-(*s Things common to tables and options. *)
+(** {6 Things common to tables and options. } *)
-(* The type of table/option keys *)
+(** The type of table/option keys *)
type option_name = string list
val error_undeclared_key : option_name -> 'a
-(*s Tables. *)
+(** {6 Tables. } *)
-(* The functor [MakeStringTable] declares a table containing objects
+(** The functor [MakeStringTable] declares a table containing objects
of type [string]; the function [member_message] say what to print
when invoking the "Test Toto Titi foo." command; at the end [title]
is the table name printed when invoking the "Print Toto Titi."
@@ -85,7 +83,7 @@ sig
val elements : unit -> string list
end
-(* The functor [MakeRefTable] declares a new table of objects of type
+(** The functor [MakeRefTable] declares a new table of objects of type
[A.t] practically denoted by [reference]; the encoding function
[encode : reference -> A.t] is typically a globalization function,
possibly with some restriction checks; the function
@@ -113,9 +111,9 @@ module MakeRefTable :
end
-(*s Options. *)
+(** {6 Options. } *)
-(* These types and function are for declaring a new option of name [key]
+(** These types and function are for declaring a new option of name [key]
and access functions [read] and [write]; the parameter [name] is the option name
used when printing the option value (command "Print Toto Titi." *)
@@ -127,7 +125,7 @@ type 'a option_sig = {
optwrite : 'a -> unit
}
-(* When an option is declared synchronous ([optsync] is [true]), the output is
+(** When an option is declared synchronous ([optsync] is [true]), the output is
a synchronous write function. Otherwise it is [optwrite] *)
type 'a write_function = 'a -> unit
@@ -137,7 +135,7 @@ val declare_bool_option : bool option_sig -> bool write_function
val declare_string_option: string option_sig -> string write_function
-(*s Special functions supposed to be used only in vernacentries.ml *)
+(** {6 Special functions supposed to be used only in vernacentries.ml } *)
val get_string_table :
option_name ->
@@ -153,7 +151,7 @@ val get_ref_table :
mem : reference -> unit;
print : unit >
-(* The first argument is a locality flag. [Some true] = "Local", [Some false]="Global". *)
+(** The first argument is a locality flag. [Some true] = "Local", [Some false]="Global". *)
val set_int_option_value_gen : bool option -> option_name -> int option -> unit
val set_bool_option_value_gen : bool option -> option_name -> bool -> unit
val set_string_option_value_gen : bool option -> option_name -> string -> unit
diff --git a/library/heads.mli b/library/heads.mli
index 203da612f..bddee835f 100644
--- a/library/heads.mli
+++ b/library/heads.mli
@@ -1,12 +1,12 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
-(* $Id$ *)
+(** {% $ %}Id: heads.mli 10841 2008-04-24 07:19:57Z herbelin {% $ %} *)
open Names
open Term
@@ -17,12 +17,12 @@ open Environ
provides the function to compute the head symbols and a table to
store the heads *)
-(* [declared_head] computes and registers the head symbol of a
+(** [declared_head] computes and registers the head symbol of a
possibly evaluable constant or variable *)
val declare_head : evaluable_global_reference -> unit
-(* [is_rigid] tells if some term is known to ultimately reduce to a term
+(** [is_rigid] tells if some term is known to ultimately reduce to a term
with a rigid head symbol *)
val is_rigid : env -> constr -> bool
diff --git a/library/impargs.mli b/library/impargs.mli
index e8191e863..dc66e5493 100644
--- a/library/impargs.mli
+++ b/library/impargs.mli
@@ -1,22 +1,21 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Libnames
open Term
open Environ
open Nametab
-(*i*)
-(*s Implicit arguments. Here we store the implicit arguments. Notice that we
+(** {6 Sect } *)
+(** Implicit arguments. Here we store the implicit arguments. Notice that we
are outside the kernel, which knows nothing about implicit arguments. *)
val make_implicit_args : bool -> unit
@@ -36,7 +35,8 @@ val is_maximal_implicit_args : unit -> bool
type implicits_flags
val with_implicits : implicits_flags -> ('a -> 'b) -> 'a -> 'b
-(*s An [implicits_list] is a list of positions telling which arguments
+(** {6 Sect } *)
+(** An [implicits_list] is a list of positions telling which arguments
of a reference can be automatically infered *)
@@ -61,11 +61,11 @@ val force_inference_of : implicit_status -> bool
val positions_of_implicits : implicits_list -> int list
-(* Computation of the positions of arguments automatically inferable
+(** Computation of the positions of arguments automatically inferable
for an object of the given type in the given env *)
val compute_implicits : env -> types -> implicits_list
-(* A [manual_explicitation] is a tuple of a positional or named explicitation with
+(** A [manual_explicitation] is a tuple of a positional or named explicitation with
maximal insertion, force inference and force usage flags. Forcing usage makes
the argument implicit even if the automatic inference considers it not inferable. *)
type manual_explicitation = Topconstr.explicitation * (bool * bool * bool)
@@ -73,7 +73,7 @@ type manual_explicitation = Topconstr.explicitation * (bool * bool * bool)
val compute_implicits_with_manual : env -> types -> bool ->
manual_explicitation list -> implicits_list
-(*s Computation of implicits (done using the global environment). *)
+(** {6 Computation of implicits (done using the global environment). } *)
val declare_var_implicits : variable -> unit
val declare_constant_implicits : constant -> unit
@@ -81,7 +81,7 @@ val declare_mib_implicits : mutual_inductive -> unit
val declare_implicits : bool -> global_reference -> unit
-(* [declare_manual_implicits local ref enriching l]
+(** [declare_manual_implicits local ref enriching l]
Manual declaration of which arguments are expected implicit.
If not set, we decide if it should enrich by automatically inferd
implicits depending on the current state.
@@ -90,7 +90,7 @@ val declare_implicits : bool -> global_reference -> unit
val declare_manual_implicits : bool -> global_reference -> ?enriching:bool ->
manual_explicitation list -> unit
-(* If the list is empty, do nothing, otherwise declare the implicits. *)
+(** If the list is empty, do nothing, otherwise declare the implicits. *)
val maybe_declare_manual_implicits : bool -> global_reference -> ?enriching:bool ->
manual_explicitation list -> unit
diff --git a/library/lib.mli b/library/lib.mli
index 13c9baf65..e8b905f26 100644
--- a/library/lib.mli
+++ b/library/lib.mli
@@ -1,15 +1,16 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*s This module provides a general mechanism to keep a trace of all operations
+(** {6 Sect } *)
+(** This module provides a general mechanism to keep a trace of all operations
and to backtrack (undo) those operations. It provides also the section
mechanism (at a low level; discharge is not known at this step). *)
@@ -28,14 +29,14 @@ and library_segment = (Libnames.object_name * node) list
type lib_objects = (Names.identifier * Libobject.obj) list
-(*s Object iteratation functions. *)
+(** {6 Object iteratation functions. } *)
val open_objects : int -> Libnames.object_prefix -> lib_objects -> unit
val load_objects : int -> Libnames.object_prefix -> lib_objects -> unit
val subst_objects : Mod_subst.substitution -> lib_objects -> lib_objects
(*val load_and_subst_objects : int -> Libnames.object_prefix -> Mod_subst.substitution -> lib_objects -> lib_objects*)
-(* [classify_segment seg] verifies that there are no OpenedThings,
+(** [classify_segment seg] verifies that there are no OpenedThings,
clears ClosedSections and FrozenStates and divides Leafs according
to their answers to the [classify_object] function in three groups:
[Substitute], [Keep], [Anticipate] respectively. The order of each
@@ -43,41 +44,45 @@ val subst_objects : Mod_subst.substitution -> lib_objects -> lib_objects
val classify_segment :
library_segment -> lib_objects * lib_objects * Libobject.obj list
-(* [segment_of_objects prefix objs] forms a list of Leafs *)
+(** [segment_of_objects prefix objs] forms a list of Leafs *)
val segment_of_objects :
Libnames.object_prefix -> lib_objects -> library_segment
-(*s Adding operations (which call the [cache] method, and getting the
+(** {6 Sect } *)
+(** Adding operations (which call the [cache] method, and getting the
current list of operations (most recent ones coming first). *)
val add_leaf : Names.identifier -> Libobject.obj -> Libnames.object_name
val add_anonymous_leaf : Libobject.obj -> unit
-(* this operation adds all objects with the same name and calls [load_object]
+(** this operation adds all objects with the same name and calls [load_object]
for each of them *)
val add_leaves : Names.identifier -> Libobject.obj list -> Libnames.object_name
val add_frozen_state : unit -> unit
-(* Adds a "dummy" entry in lib_stk with a unique new label number. *)
+(** Adds a "dummy" entry in lib_stk with a unique new label number. *)
val mark_end_of_command : unit -> unit
-(* Returns the current label number *)
+
+(** Returns the current label number *)
val current_command_label : unit -> int
-(* [reset_label n ] resets [lib_stk] to the label n registered by
+
+(** [reset_label n ] resets [lib_stk] to the label n registered by
[mark_end_of_command()]. That is it forgets the label and anything
registered after it. *)
val reset_label : int -> unit
-(*s The function [contents_after] returns the current library segment,
+(** {6 Sect } *)
+(** The function [contents_after] returns the current library segment,
starting from a given section path. If not given, the entire segment
is returned. *)
val contents_after : Libnames.object_name option -> library_segment
-(*s Functions relative to current path *)
+(** {6 Functions relative to current path } *)
-(* User-side names *)
+(** User-side names *)
val cwd : unit -> Names.dir_path
val cwd_except_section : unit -> Names.dir_path
val current_dirpath : bool -> Names.dir_path (* false = except sections *)
@@ -85,24 +90,24 @@ val make_path : Names.identifier -> Libnames.full_path
val make_path_except_section : Names.identifier -> Libnames.full_path
val path_of_include : unit -> Libnames.full_path
-(* Kernel-side names *)
+(** Kernel-side names *)
val current_prefix : unit -> Names.module_path * Names.dir_path
val make_kn : Names.identifier -> Names.kernel_name
val make_con : Names.identifier -> Names.constant
-(* Are we inside an opened section *)
+(** Are we inside an opened section *)
val sections_are_opened : unit -> bool
val sections_depth : unit -> int
-(* Are we inside an opened module type *)
+(** Are we inside an opened module type *)
val is_modtype : unit -> bool
val is_module : unit -> bool
val current_mod_id : unit -> Names.module_ident
-(* Returns the opening node of a given name *)
+(** Returns the opening node of a given name *)
val find_opening_node : Names.identifier -> node
-(*s Modules and module types *)
+(** {6 Modules and module types } *)
val start_module :
bool option -> Names.module_ident -> Names.module_path -> Summary.frozen -> Libnames.object_prefix
@@ -113,30 +118,31 @@ val start_modtype :
Names.module_ident -> Names.module_path -> Summary.frozen -> Libnames.object_prefix
val end_modtype : unit
-> Libnames.object_name * Libnames.object_prefix * Summary.frozen * library_segment
-(* [Lib.add_frozen_state] must be called after each of the above functions *)
-(*s Compilation units *)
+(** [Lib.add_frozen_state] must be called after each of the above functions *)
+
+(** {6 Compilation units } *)
val start_compilation : Names.dir_path -> Names.module_path -> unit
val end_compilation : Names.dir_path -> Libnames.object_prefix * library_segment
-(* The function [library_dp] returns the [dir_path] of the current
+(** The function [library_dp] returns the [dir_path] of the current
compiling library (or [default_library]) *)
val library_dp : unit -> Names.dir_path
-(* Extract the library part of a name even if in a section *)
+(** Extract the library part of a name even if in a section *)
val dp_of_mp : Names.module_path -> Names.dir_path
val split_mp : Names.module_path -> Names.dir_path * Names.dir_path
val split_modpath : Names.module_path -> Names.dir_path * Names.identifier list
val library_part : Libnames.global_reference -> Names.dir_path
val remove_section_part : Libnames.global_reference -> Names.dir_path
-(*s Sections *)
+(** {6 Sections } *)
val open_section : Names.identifier -> unit
val close_section : unit -> unit
-(*s Backtracking (undo). *)
+(** {6 Backtracking (undo). } *)
val reset_to : Libnames.object_name -> unit
val reset_name : Names.identifier Util.located -> unit
@@ -146,11 +152,11 @@ val reset_to_state : Libnames.object_name -> unit
val has_top_frozen_state : unit -> Libnames.object_name option
-(* [back n] resets to the place corresponding to the $n$-th call of
+(** [back n] resets to the place corresponding to the {% $ %}n{% $ %}-th call of
[mark_end_of_command] (counting backwards) *)
val back : int -> unit
-(*s We can get and set the state of the operations (used in [States]). *)
+(** {6 We can get and set the state of the operations (used in [States]). } *)
type frozen
@@ -163,13 +169,13 @@ val declare_initial_state : unit -> unit
val reset_initial : unit -> unit
-(* XML output hooks *)
+(** XML output hooks *)
val set_xml_open_section : (Names.identifier -> unit) -> unit
val set_xml_close_section : (Names.identifier -> unit) -> unit
type binding_kind = Explicit | Implicit
-(*s Section management for discharge *)
+(** {6 Section management for discharge } *)
type variable_info = Names.identifier * binding_kind * Term.constr option * Term.types
type variable_context = variable_info list
@@ -189,7 +195,7 @@ val add_section_kn : Names.mutual_inductive -> Sign.named_context -> unit
val replacement_context : unit ->
(Names.identifier array Names.Cmap.t * Names.identifier array Names.Mindmap.t)
-(*s Discharge: decrease the section level if in the current section *)
+(** {6 Discharge: decrease the section level if in the current section } *)
val discharge_kn : Names.mutual_inductive -> Names.mutual_inductive
val discharge_con : Names.constant -> Names.constant
diff --git a/library/libnames.mli b/library/libnames.mli
index 9ee7d0ab5..9da6a0d5c 100644
--- a/library/libnames.mli
+++ b/library/libnames.mli
@@ -1,22 +1,20 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Pp
open Util
open Names
open Term
open Mod_subst
-(*i*)
-(*s Global reference is a kernel side type for all references together *)
+(** {6 Global reference is a kernel side type for all references together } *)
type global_reference =
| VarRef of variable
| ConstRef of constant
@@ -40,14 +38,14 @@ val destConstructRef : global_reference -> constructor
val subst_constructor : substitution -> constructor -> constructor * constr
val subst_global : substitution -> global_reference -> global_reference * constr
-(* Turn a global reference into a construction *)
+(** Turn a global reference into a construction *)
val constr_of_global : global_reference -> constr
-(* Turn a construction denoting a global reference into a global reference;
+(** Turn a construction denoting a global reference into a global reference;
raise [Not_found] if not a global reference *)
val global_of_constr : constr -> global_reference
-(* Obsolete synonyms for constr_of_global and global_of_constr *)
+(** Obsolete synonyms for constr_of_global and global_of_constr *)
val constr_of_reference : global_reference -> constr
val reference_of_constr : constr -> global_reference
@@ -60,7 +58,7 @@ end
module Refset : Set.S with type elt = global_reference
module Refmap : Map.S with type key = global_reference
-(*s Extended global references *)
+(** {6 Extended global references } *)
type syndef_name = kernel_name
@@ -68,19 +66,19 @@ type extended_global_reference =
| TrueGlobal of global_reference
| SynDef of syndef_name
-(*s Dirpaths *)
+(** {6 Dirpaths } *)
val pr_dirpath : dir_path -> Pp.std_ppcmds
val dirpath_of_string : string -> dir_path
val string_of_dirpath : dir_path -> string
-(* Pop the suffix of a [dir_path] *)
+(** Pop the suffix of a [dir_path] *)
val pop_dirpath : dir_path -> dir_path
-(* Pop the suffix n times *)
+(** Pop the suffix n times *)
val pop_dirpath_n : int -> dir_path -> dir_path
-(* Give the immediate prefix and basename of a [dir_path] *)
+(** Give the immediate prefix and basename of a [dir_path] *)
val split_dirpath : dir_path -> dir_path * identifier
val add_dirpath_suffix : dir_path -> module_ident -> dir_path
@@ -95,18 +93,18 @@ val is_dirpath_prefix_of : dir_path -> dir_path -> bool
module Dirset : Set.S with type elt = dir_path
module Dirmap : Map.S with type key = dir_path
-(*s Full paths are {\em absolute} paths of declarations *)
+(** {6 Full paths are {e absolute} paths of declarations } *)
type full_path
-(* Constructors of [full_path] *)
+(** Constructors of [full_path] *)
val make_path : dir_path -> identifier -> full_path
-(* Destructors of [full_path] *)
+(** Destructors of [full_path] *)
val repr_path : full_path -> dir_path * identifier
val dirpath : full_path -> dir_path
val basename : full_path -> identifier
-(* Parsing and printing of section path as ["coq_root.module.id"] *)
+(** Parsing and printing of section path as ["coq_root.module.id"] *)
val path_of_string : string -> full_path
val string_of_path : full_path -> string
val pr_path : full_path -> std_ppcmds
@@ -116,7 +114,7 @@ module Spmap : Map.S with type key = full_path
val restrict_path : int -> full_path -> full_path
-(*s Temporary function to brutally form kernel names from section paths *)
+(** {6 Temporary function to brutally form kernel names from section paths } *)
val encode_mind : dir_path -> identifier -> mutual_inductive
val decode_mind : mutual_inductive -> dir_path * identifier
@@ -124,7 +122,8 @@ val encode_con : dir_path -> identifier -> constant
val decode_con : constant -> dir_path * identifier
-(*s A [qualid] is a partially qualified ident; it includes fully
+(** {6 Sect } *)
+(** A [qualid] is a partially qualified ident; it includes fully
qualified names (= absolute names) and all intermediate partial
qualifications of absolute names, including single identifiers.
The [qualid] are used to access the name table. *)
@@ -138,14 +137,14 @@ val pr_qualid : qualid -> std_ppcmds
val string_of_qualid : qualid -> string
val qualid_of_string : string -> qualid
-(* Turns an absolute name, a dirpath, or an identifier into a
+(** Turns an absolute name, a dirpath, or an identifier into a
qualified name denoting the same name *)
val qualid_of_path : full_path -> qualid
val qualid_of_dirpath : dir_path -> qualid
val qualid_of_ident : identifier -> qualid
-(* Both names are passed to objects: a "semantic" [kernel_name], which
+(** Both names are passed to objects: a "semantic" [kernel_name], which
can be substituted and a "syntactic" [full_path] which can be printed
*)
@@ -155,16 +154,17 @@ type object_prefix = dir_path * (module_path * dir_path)
val make_oname : object_prefix -> identifier -> object_name
-(* to this type are mapped [dir_path]'s in the nametab *)
+(** to this type are mapped [dir_path]'s in the nametab *)
type global_dir_reference =
| DirOpenModule of object_prefix
| DirOpenModtype of object_prefix
| DirOpenSection of object_prefix
| DirModule of object_prefix
| DirClosedSection of dir_path
- (* this won't last long I hope! *)
+ (** this won't last long I hope! *)
-(*s A [reference] is the user-level notion of name. It denotes either a
+(** {6 Sect } *)
+(** A [reference] is the user-level notion of name. It denotes either a
global name (referred either by a qualified name or by a single
name) or a variable *)
@@ -177,13 +177,13 @@ val string_of_reference : reference -> string
val pr_reference : reference -> std_ppcmds
val loc_of_reference : reference -> loc
-(*s Popping one level of section in global names *)
+(** {6 Popping one level of section in global names } *)
val pop_con : constant -> constant
val pop_kn : mutual_inductive-> mutual_inductive
val pop_global_reference : global_reference -> global_reference
-(* Deprecated synonyms *)
+(** Deprecated synonyms *)
-val make_short_qualid : identifier -> qualid (* = qualid_of_ident *)
-val qualid_of_sp : full_path -> qualid (* = qualid_of_path *)
+val make_short_qualid : identifier -> qualid (** = qualid_of_ident *)
+val qualid_of_sp : full_path -> qualid (** = qualid_of_path *)
diff --git a/library/libobject.mli b/library/libobject.mli
index 9c0abafde..8b21971aa 100644
--- a/library/libobject.mli
+++ b/library/libobject.mli
@@ -1,20 +1,18 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Libnames
open Mod_subst
-(*i*)
-(* [Libobject] declares persistent objects, given with methods:
+(** [Libobject] declares persistent objects, given with methods:
* a caching function specifying how to add the object in the current
scope;
@@ -74,7 +72,7 @@ type 'a object_declaration = {
discharge_function : object_name * 'a -> 'a option;
rebuild_function : 'a -> 'a }
-(* The default object is a "Keep" object with empty methods.
+(** The default object is a "Keep" object with empty methods.
Object creators are advised to use the construction
[{(default_object "MY_OBJECT") with
cache_function = ...
@@ -85,10 +83,11 @@ type 'a object_declaration = {
val default_object : string -> 'a object_declaration
-(* the identity substitution function *)
+(** the identity substitution function *)
val ident_subst_function : substitution * 'a -> 'a
-(*s Given an object declaration, the function [declare_object]
+(** {6 Sect } *)
+(** Given an object declaration, the function [declare_object]
will hand back two functions, the "injection" and "projection"
functions for dynamically typed library-objects. *)
diff --git a/library/library.mli b/library/library.mli
index c6bd8fe0b..05b213350 100644
--- a/library/library.mli
+++ b/library/library.mli
@@ -1,21 +1,20 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Util
open Names
open Libnames
open Libobject
-(*i*)
-(*s This module provides functions to load, open and save
+(** {6 Sect } *)
+(** This module provides functions to load, open and save
libraries. Libraries correspond to the subclass of modules that
coincide with a file on disk (the ".vo" files). Libraries on the
disk comes with checksums (obtained with the [Digest] module), which
@@ -23,43 +22,46 @@ open Libobject
written at various dates.
*)
-(*s Require = load in the environment + open (if the optional boolean
+(** {6 Sect } *)
+(** Require = load in the environment + open (if the optional boolean
is not [None]); mark also for export if the boolean is [Some true] *)
val require_library : qualid located list -> bool option -> unit
val require_library_from_dirpath : (dir_path * string) list -> bool option -> unit
val require_library_from_file :
identifier option -> System.physical_path -> bool option -> unit
-(*s Open a module (or a library); if the boolean is true then it's also
+(** {6 Sect } *)
+(** Open a module (or a library); if the boolean is true then it's also
an export otherwise just a simple import *)
val import_module : bool -> qualid located -> unit
-(*s Start the compilation of a library *)
+(** {6 Start the compilation of a library } *)
val start_library : string -> dir_path * string
-(*s End the compilation of a library and save it to a ".vo" file *)
+(** {6 End the compilation of a library and save it to a ".vo" file } *)
val save_library_to : dir_path -> string -> unit
-(*s Interrogate the status of libraries *)
+(** {6 Interrogate the status of libraries } *)
- (* - Tell if a library is loaded or opened *)
+ (** - Tell if a library is loaded or opened *)
val library_is_loaded : dir_path -> bool
val library_is_opened : dir_path -> bool
- (* - Tell which libraries are loaded or imported *)
+ (** - Tell which libraries are loaded or imported *)
val loaded_libraries : unit -> dir_path list
val opened_libraries : unit -> dir_path list
- (* - Return the full filename of a loaded library. *)
+ (** - Return the full filename of a loaded library. *)
val library_full_filename : dir_path -> string
- (* - Overwrite the filename of all libraries (used when restoring a state) *)
+ (** - Overwrite the filename of all libraries (used when restoring a state) *)
val overwrite_library_filenames : string -> unit
-(*s Hook for the xml exportation of libraries *)
+(** {6 Hook for the xml exportation of libraries } *)
val set_xml_require : (dir_path -> unit) -> unit
-(*s Global load paths: a load path is a physical path in the file
+(** {6 Sect } *)
+(** Global load paths: a load path is a physical path in the file
system; to each load path is associated a Coq [dir_path] (the "logical"
path of the physical path) *)
@@ -70,7 +72,7 @@ val remove_load_path : System.physical_path -> unit
val find_logical_path : System.physical_path -> dir_path
val is_in_load_paths : System.physical_path -> bool
-(*s Locate a library in the load paths *)
+(** {6 Locate a library in the load paths } *)
exception LibUnmappedDir
exception LibNotFound
type library_location = LibLoaded | LibInPath
@@ -79,5 +81,5 @@ val locate_qualified_library :
bool -> qualid -> library_location * dir_path * System.physical_path
val try_locate_qualified_library : qualid located -> dir_path * string
-(*s Statistics: display the memory use of a library. *)
+(** {6 Statistics: display the memory use of a library. } *)
val mem : dir_path -> Pp.std_ppcmds
diff --git a/library/nameops.mli b/library/nameops.mli
index f69bf3ff0..414ee94ad 100644
--- a/library/nameops.mli
+++ b/library/nameops.mli
@@ -1,24 +1,24 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
open Names
-(* Identifiers and names *)
+(** Identifiers and names *)
val pr_id : identifier -> Pp.std_ppcmds
val pr_name : name -> Pp.std_ppcmds
val make_ident : string -> int option -> identifier
val repr_ident : identifier -> string * int option
-val atompart_of_id : identifier -> string (* remove trailing digits *)
-val root_of_id : identifier -> identifier (* remove trailing digits, $'$ and $\_$ *)
+val atompart_of_id : identifier -> string (** remove trailing digits *)
+val root_of_id : identifier -> identifier (** remove trailing digits, {% $ %}'{% $ %} and {% $ %}\_{% $ %} *)
val add_suffix : identifier -> string -> identifier
val add_prefix : string -> identifier -> identifier
@@ -38,17 +38,17 @@ val name_fold_map : ('a -> identifier -> 'a * identifier) -> 'a -> name -> 'a *
val pr_lab : label -> Pp.std_ppcmds
-(* some preset paths *)
+(** some preset paths *)
val default_library : dir_path
-(* This is the root of the standard library of Coq *)
+(** This is the root of the standard library of Coq *)
val coq_root : module_ident
-(* This is the default root prefix for developments which doesn't
+(** This is the default root prefix for developments which doesn't
mention a root *)
val default_root_prefix : dir_path
-(* Metavariables *)
+(** Metavariables *)
val pr_meta : Term.metavariable -> Pp.std_ppcmds
val string_of_meta : Term.metavariable -> string
diff --git a/library/nametab.mli b/library/nametab.mli
index 98a482896..749d00343 100755
--- a/library/nametab.mli
+++ b/library/nametab.mli
@@ -1,21 +1,20 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Util
open Pp
open Names
open Libnames
-(*i*)
-(*s This module contains the tables for globalization, which
+(** {6 Sect } *)
+(** This module contains the tables for globalization, which
associates internal object references to qualified names (qualid).
There are three classes of names:
@@ -32,8 +31,8 @@ open Libnames
and [qualid]
*)
-(* Most functions in this module fall into one of the following categories:
- \begin{itemize}
+(** Most functions in this module fall into one of the following categories:
+ {% \begin{%}itemize{% }%}
\item [push : visibility -> full_user_name -> object_reference -> unit]
Registers the [object_reference] to be referred to by the
@@ -58,29 +57,29 @@ open Libnames
The [user_name] can be for example the shortest non ambiguous [qualid] or
the [full_user_name] or [identifier]. Such a function can also have a
local context argument.
- \end{itemize}
+ {% \end{%}itemize{% }%}
*)
exception GlobalizationError of qualid
exception GlobalizationConstantError of qualid
-(* Raises a globalization error *)
+(** Raises a globalization error *)
val error_global_not_found_loc : loc -> qualid -> 'a
val error_global_not_found : qualid -> 'a
val error_global_constant_not_found_loc : loc -> qualid -> 'a
-(*s Register visibility of things *)
+(** {6 Register visibility of things } *)
-(* The visibility can be registered either
- \begin{itemize}
+(** The visibility can be registered either
+ {% \begin{%}itemize{% }%}
\item for all suffixes not shorter then a given int -- when the
object is loaded inside a module -- or
\item for a precise suffix, when the module containing (the module
containing ...) the object is opened (imported)
- \end{itemize}
+ {% \end{%}itemize{% }%}
*)
type visibility = Until of int | Exactly of int
@@ -94,9 +93,9 @@ type ltac_constant = kernel_name
val push_tactic : visibility -> full_path -> ltac_constant -> unit
-(*s The following functions perform globalization of qualified names *)
+(** {6 The following functions perform globalization of qualified names } *)
-(* These functions globalize a (partially) qualified name or fail with
+(** These functions globalize a (partially) qualified name or fail with
[Not_found] *)
val locate : qualid -> global_reference
@@ -109,59 +108,60 @@ val locate_module : qualid -> module_path
val locate_section : qualid -> dir_path
val locate_tactic : qualid -> ltac_constant
-(* These functions globalize user-level references into global
+(** These functions globalize user-level references into global
references, like [locate] and co, but raise a nice error message
in case of failure *)
val global : reference -> global_reference
val global_inductive : reference -> inductive
-(* These functions locate all global references with a given suffix;
+(** These functions locate all global references with a given suffix;
if [qualid] is valid as such, it comes first in the list *)
val locate_all : qualid -> global_reference list
val locate_extended_all : qualid -> extended_global_reference list
-(* Mapping a full path to a global reference *)
+(** Mapping a full path to a global reference *)
val global_of_path : full_path -> global_reference
val extended_global_of_path : full_path -> extended_global_reference
-(*s These functions tell if the given absolute name is already taken *)
+(** {6 These functions tell if the given absolute name is already taken } *)
val exists_cci : full_path -> bool
val exists_modtype : full_path -> bool
val exists_dir : dir_path -> bool
-val exists_section : dir_path -> bool (* deprecated synonym of [exists_dir] *)
-val exists_module : dir_path -> bool (* deprecated synonym of [exists_dir] *)
+val exists_section : dir_path -> bool (** deprecated synonym of [exists_dir] *)
+val exists_module : dir_path -> bool (** deprecated synonym of [exists_dir] *)
-(*s These functions locate qualids into full user names *)
+(** {6 These functions locate qualids into full user names } *)
val full_name_cci : qualid -> full_path
val full_name_modtype : qualid -> full_path
val full_name_module : qualid -> dir_path
-(*s Reverse lookup -- finding user names corresponding to the given
+(** {6 Sect } *)
+(** Reverse lookup -- finding user names corresponding to the given
internal name *)
-(* Returns the full path bound to a global reference or syntactic
+(** Returns the full path bound to a global reference or syntactic
definition, and the (full) dirpath associated to a module path *)
val path_of_syndef : syndef_name -> full_path
val path_of_global : global_reference -> full_path
val dirpath_of_module : module_path -> dir_path
-(* Returns in particular the dirpath or the basename of the full path
+(** Returns in particular the dirpath or the basename of the full path
associated to global reference *)
val dirpath_of_global : global_reference -> dir_path
val basename_of_global : global_reference -> identifier
-(* Printing of global references using names as short as possible *)
+(** Printing of global references using names as short as possible *)
val pr_global_env : Idset.t -> global_reference -> std_ppcmds
-(* The [shortest_qualid] functions given an object with [user_name]
+(** The [shortest_qualid] functions given an object with [user_name]
Coq.A.B.x, try to find the shortest among x, B.x, A.B.x and
Coq.A.B.x that denotes the same object. *)
@@ -171,7 +171,7 @@ val shortest_qualid_of_modtype : module_path -> qualid
val shortest_qualid_of_module : module_path -> qualid
val shortest_qualid_of_tactic : ltac_constant -> qualid
-(* Deprecated synonyms *)
+(** Deprecated synonyms *)
val extended_locate : qualid -> extended_global_reference (*= locate_extended *)
-val absolute_reference : full_path -> global_reference (* = global_of_path *)
+val absolute_reference : full_path -> global_reference (** = global_of_path *)
diff --git a/library/states.mli b/library/states.mli
index 782e41ca7..fb11756e5 100644
--- a/library/states.mli
+++ b/library/states.mli
@@ -1,14 +1,15 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*s States of the system. In that module, we provide functions to get
+(** {6 Sect } *)
+(** States of the system. In that module, we provide functions to get
and set the state of the whole system. Internally, it is done by
freezing the states of both [Lib] and [Summary]. We provide functions
to write and restore state to and from a given file. *)
@@ -20,13 +21,15 @@ type state
val freeze : unit -> state
val unfreeze : state -> unit
-(*s Rollback. [with_heavy_rollback f x] applies [f] to [x] and restores the
+(** {6 Sect } *)
+(** Rollback. [with_heavy_rollback f x] applies [f] to [x] and restores the
state of the whole system as it was before the evaluation if an exception
is raised. *)
val with_heavy_rollback : ('a -> 'b) -> 'a -> 'b
-(*s [with_state_protection f x] applies [f] to [x] and restores the
+(** {6 Sect } *)
+(** [with_state_protection f x] applies [f] to [x] and restores the
state of the whole system as it was before the evaluation of f *)
val with_state_protection : ('a -> 'b) -> 'a -> 'b
diff --git a/library/summary.mli b/library/summary.mli
index e6e17ef8c..58272aadb 100644
--- a/library/summary.mli
+++ b/library/summary.mli
@@ -1,14 +1,14 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(* This module registers the declaration of global tables, which will be kept
+(** This module registers the declaration of global tables, which will be kept
in synchronization during the various backtracks of the system. *)
type 'a summary_declaration = {
diff --git a/parsing/egrammar.mli b/parsing/egrammar.mli
index a45ea9549..50132fd38 100644
--- a/parsing/egrammar.mli
+++ b/parsing/egrammar.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Util
open Names
open Topconstr
@@ -19,14 +18,13 @@ open Ppextend
open Rawterm
open Genarg
open Mod_subst
-(*i*)
(** Mapping of grammar productions to camlp4 actions
Used for Coq-level Notation and Tactic Notation,
and for ML-level tactic and vernac extensions
*)
-(* For constr notations *)
+(** For constr notations *)
type grammar_constr_prod_item =
| GramConstrTerminal of Token.pattern
@@ -38,14 +36,14 @@ type grammar_constr_prod_item =
type notation_grammar =
int * Gramext.g_assoc option * notation * grammar_constr_prod_item list list
-(* For tactic and vernac notations *)
+(** For tactic and vernac notations *)
type grammar_prod_item =
| GramTerminal of string
| GramNonTerminal of loc * argument_type *
Gram.te prod_entry_key * identifier option
-(* Adding notations *)
+(** Adding notations *)
type all_grammar_command =
| Notation of (precedence * tolerability list) * notation_grammar
diff --git a/parsing/extend.mli b/parsing/extend.mli
index 7643120f3..6bf8165eb 100644
--- a/parsing/extend.mli
+++ b/parsing/extend.mli
@@ -1,21 +1,21 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
open Util
-(**********************************************************************)
-(* General entry keys *)
+(*********************************************************************
+ General entry keys *)
-(* This intermediate abstract representation of entries can *)
-(* both be reified into mlexpr for the ML extensions and *)
-(* dynamically interpreted as entries for the Coq level extensions *)
+(** This intermediate abstract representation of entries can
+ both be reified into mlexpr for the ML extensions and
+ dynamically interpreted as entries for the Coq level extensions *)
type 'a prod_entry_key =
| Alist1 of 'a prod_entry_key
@@ -30,8 +30,8 @@ type 'a prod_entry_key =
| Agram of 'a Gramext.g_entry
| Aentry of string * string
-(**********************************************************************)
-(* Entry keys for constr notations *)
+(*********************************************************************
+ Entry keys for constr notations *)
type side = Left | Right
diff --git a/parsing/extrawit.mli b/parsing/extrawit.mli
index 9eff5dc13..f15c388b6 100644
--- a/parsing/extrawit.mli
+++ b/parsing/extrawit.mli
@@ -1,10 +1,10 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
@@ -12,9 +12,9 @@ open Util
open Genarg
open Tacexpr
-(* This file defines extra argument types *)
+(** This file defines extra argument types *)
-(* Tactics as arguments *)
+(** Tactics as arguments *)
val tactic_main_level : int
diff --git a/parsing/g_intsyntax.mli b/parsing/g_intsyntax.mli
index c74ae5788..40e16b83c 100644
--- a/parsing/g_intsyntax.mli
+++ b/parsing/g_intsyntax.mli
@@ -1,13 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $$ i*)
-(* digit based syntax for int31 and bigint *)
+(** digit based syntax for int31 and bigint *)
diff --git a/parsing/g_natsyntax.mli b/parsing/g_natsyntax.mli
index bf3921bf1..20f5c1bfd 100644
--- a/parsing/g_natsyntax.mli
+++ b/parsing/g_natsyntax.mli
@@ -1,14 +1,14 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(* Nice syntax for naturals. *)
+(** Nice syntax for naturals. *)
open Notation
diff --git a/parsing/g_zsyntax.mli b/parsing/g_zsyntax.mli
index b7e6e994e..c4f39f80b 100644
--- a/parsing/g_zsyntax.mli
+++ b/parsing/g_zsyntax.mli
@@ -1,11 +1,11 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(* Nice syntax for integers. *)
+(** Nice syntax for integers. *)
diff --git a/parsing/lexer.mli b/parsing/lexer.mli
index 1b40d7f17..aabac79fb 100644
--- a/parsing/lexer.mli
+++ b/parsing/lexer.mli
@@ -1,10 +1,10 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
@@ -26,7 +26,7 @@ val is_keyword : string -> bool
val location_function : int -> loc
-(* for coqdoc *)
+(** for coqdoc *)
type location_table
val location_table : unit -> location_table
val restore_location_table : location_table -> unit
@@ -47,6 +47,6 @@ val set_xml_output_comment : (string -> unit) -> unit
val terminal : string -> string * string
-(* The lexer of Coq *)
+(** The lexer of Coq *)
val lexer : Compat.lexer
diff --git a/parsing/pcoq.mli b/parsing/pcoq.mli
index 7ed05ed5c..f9e65acac 100644
--- a/parsing/pcoq.mli
+++ b/parsing/pcoq.mli
@@ -1,10 +1,10 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
@@ -18,13 +18,13 @@ open Topconstr
open Tacexpr
open Libnames
-(**********************************************************************)
-(* The parser of Coq *)
+(*********************************************************************
+ The parser of Coq *)
module Gram : Grammar.S with type te = Compat.token
-(**********************************************************************)
-(* The parser of Coq is built from three kinds of rule declarations:
+(*********************************************************************
+ The parser of Coq is built from three kinds of rule declarations:
- dynamic rules declared at the evaluation of Coq files (using
e.g. Notation, Infix, or Tactic Notation)
- static rules explicitly defined in files g_*.ml4
@@ -32,7 +32,7 @@ module Gram : Grammar.S with type te = Compat.token
VERNAC EXTEND (see e.g. file extratactics.ml4)
*)
-(* Dynamic extension of rules
+(** Dynamic extension of rules
For constr notations, dynamic addition of new rules is done in
several steps:
@@ -98,54 +98,54 @@ module Gram : Grammar.S with type te = Compat.token
*)
-(* The superclass of all grammar entries *)
+(** The superclass of all grammar entries *)
type grammar_object
type camlp4_rule =
Compat.token Gramext.g_symbol list * Gramext.g_action
type camlp4_entry_rules =
- (* first two parameters are name and assoc iff a level is created *)
+ (** first two parameters are name and assoc iff a level is created *)
string option * Gramext.g_assoc option * camlp4_rule list
-(* Add one extension at some camlp4 position of some camlp4 entry *)
+(** Add one extension at some camlp4 position of some camlp4 entry *)
val grammar_extend :
grammar_object Gram.Entry.e -> Gramext.position option ->
- (* for reinitialization if ever needed: *) Gramext.g_assoc option ->
+ (** for reinitialization if ever needed: *) Gramext.g_assoc option ->
camlp4_entry_rules list -> unit
-(* Remove the last n extensions *)
+(** Remove the last n extensions *)
val remove_grammars : int -> unit
-(* The type of typed grammar objects *)
+(** The type of typed grammar objects *)
type typed_entry
-(* The possible types for extensible grammars *)
+(** The possible types for extensible grammars *)
type entry_type = argument_type
val type_of_typed_entry : typed_entry -> entry_type
val object_of_typed_entry : typed_entry -> grammar_object Gram.Entry.e
val weaken_entry : 'a Gram.Entry.e -> grammar_object Gram.Entry.e
-(* Temporary activate camlp4 verbosity *)
+(** Temporary activate camlp4 verbosity *)
val camlp4_verbosity : bool -> ('a -> unit) -> 'a -> unit
-(* Parse a string *)
+(** Parse a string *)
val parse_string : 'a Gram.Entry.e -> string -> 'a
val eoi_entry : 'a Gram.Entry.e -> 'a Gram.Entry.e
val map_entry : ('a -> 'b) -> 'a Gram.Entry.e -> 'b Gram.Entry.e
-(**********************************************************************)
-(* Table of Coq statically defined grammar entries *)
+(*********************************************************************
+ Table of Coq statically defined grammar entries *)
type gram_universe
-(* There are four predefined universes: "prim", "constr", "tactic", "vernac" *)
+(** There are four predefined universes: "prim", "constr", "tactic", "vernac" *)
val get_univ : string -> gram_universe
@@ -249,40 +249,40 @@ module Vernac_ :
val vernac_eoi : vernac_expr Gram.Entry.e
end
-(* The main entry: reads an optional vernac command *)
+(** The main entry: reads an optional vernac command *)
val main_entry : (loc * vernac_expr) option Gram.Entry.e
-(**********************************************************************)
-(* Mapping formal entries into concrete ones *)
+(*********************************************************************
+ Mapping formal entries into concrete ones *)
-(* Binding constr entry keys to entries and symbols *)
+(** Binding constr entry keys to entries and symbols *)
-val interp_constr_entry_key : bool (* true for cases_pattern *) ->
+val interp_constr_entry_key : bool (** true for cases_pattern *) ->
constr_entry_key -> grammar_object Gram.Entry.e * int option
val symbol_of_constr_prod_entry_key : Gramext.g_assoc option ->
constr_entry_key -> bool -> constr_prod_entry_key ->
Compat.token Gramext.g_symbol
-(* Binding general entry keys to symbols *)
+(** Binding general entry keys to symbols *)
val symbol_of_prod_entry_key :
Gram.te prod_entry_key -> Gram.te Gramext.g_symbol
-(**********************************************************************)
-(* Interpret entry names of the form "ne_constr_list" as entry keys *)
+(*********************************************************************
+ Interpret entry names of the form "ne_constr_list" as entry keys *)
-val interp_entry_name : bool (* true to fail on unknown entry *) ->
+val interp_entry_name : bool (** true to fail on unknown entry *) ->
int option -> string -> string -> entry_type * Gram.te prod_entry_key
-(**********************************************************************)
-(* Registering/resetting the level of a constr entry *)
+(*********************************************************************
+ Registering/resetting the level of a constr entry *)
val find_position :
- bool (* true if for creation in pattern entry; false if in constr entry *) ->
+ bool (** true if for creation in pattern entry; false if in constr entry *) ->
Gramext.g_assoc option -> int option ->
Gramext.position option * Gramext.g_assoc option * string option *
- (* for reinitialization: *) Gramext.g_assoc option
+ (** for reinitialization: *) Gramext.g_assoc option
val synchronize_level_positions : unit -> unit
diff --git a/parsing/ppconstr.mli b/parsing/ppconstr.mli
index 1aa173e24..f1bb49312 100644
--- a/parsing/ppconstr.mli
+++ b/parsing/ppconstr.mli
@@ -1,11 +1,11 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
@@ -80,7 +80,7 @@ type term_pr = {
val set_term_pr : term_pr -> unit
val default_term_pr : term_pr
-(* The modular constr printer.
+(** The modular constr printer.
[modular_constr_pr pr s p t] prints the head of the term [t] and calls
[pr] on its subterms.
[s] is typically {!Pp.mt} and [p] is [lsimple] for "constr" printers and [ltop]
diff --git a/parsing/pptactic.mli b/parsing/pptactic.mli
index 446dc9f9d..a6eacd53a 100644
--- a/parsing/pptactic.mli
+++ b/parsing/pptactic.mli
@@ -1,10 +1,10 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
@@ -43,7 +43,7 @@ type 'a extra_genarg_printer =
(tolerability -> glob_tactic_expr -> std_ppcmds) ->
'a -> std_ppcmds
- (* if the boolean is false then the extension applies only to old syntax *)
+ (** if the boolean is false then the extension applies only to old syntax *)
val declare_extra_genarg_pprule :
('c raw_abstract_argument_type * 'c raw_extra_genarg_printer) ->
('a glob_abstract_argument_type * 'a glob_extra_genarg_printer) ->
@@ -51,7 +51,7 @@ val declare_extra_genarg_pprule :
type grammar_terminals = string option list
- (* if the boolean is false then the extension applies only to old syntax *)
+ (** if the boolean is false then the extension applies only to old syntax *)
val declare_extra_tactic_pprule :
string * argument_type list * (int * grammar_terminals) -> unit
diff --git a/parsing/ppvernac.mli b/parsing/ppvernac.mli
index c24744f30..6c2916f41 100644
--- a/parsing/ppvernac.mli
+++ b/parsing/ppvernac.mli
@@ -1,10 +1,10 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
diff --git a/parsing/prettyp.mli b/parsing/prettyp.mli
index ba1977e89..04aad9ab4 100644
--- a/parsing/prettyp.mli
+++ b/parsing/prettyp.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Pp
open Util
open Names
@@ -19,9 +18,8 @@ open Reductionops
open Libnames
open Nametab
open Genarg
-(*i*)
-(* A Pretty-Printer for the Calculus of Inductive Constructions. *)
+(** A Pretty-Printer for the Calculus of Inductive Constructions. *)
val assumptions_for_print : name list -> Termops.names_context
@@ -38,7 +36,8 @@ val print_judgment : env -> unsafe_judgment -> std_ppcmds
val print_safe_judgment : env -> Safe_typing.judgment -> std_ppcmds
val print_eval :
reduction_function -> env -> Evd.evar_map -> Topconstr.constr_expr -> unsafe_judgment -> std_ppcmds
-(* This function is exported for the graphical user-interface pcoq *)
+
+(** This function is exported for the graphical user-interface pcoq *)
val build_inductive : mutual_inductive -> int ->
global_reference * rel_context * types * identifier array * types array
val print_name : reference or_by_notation -> std_ppcmds
@@ -52,21 +51,21 @@ val print_extraction : unit -> std_ppcmds
val print_extracted_vars : unit -> std_ppcmds
i*)
-(* Pretty-printing functions for classes and coercions *)
+(** Pretty-printing functions for classes and coercions *)
val print_graph : unit -> std_ppcmds
val print_classes : unit -> std_ppcmds
val print_coercions : unit -> std_ppcmds
val print_path_between : Classops.cl_typ -> Classops.cl_typ -> std_ppcmds
val print_canonical_projections : unit -> std_ppcmds
-(* Pretty-printing functions for type classes and instances *)
+(** Pretty-printing functions for type classes and instances *)
val print_typeclasses : unit -> std_ppcmds
val print_instances : global_reference -> std_ppcmds
val print_all_instances : unit -> std_ppcmds
val inspect : int -> std_ppcmds
-(* Locate *)
+(** Locate *)
val print_located_qualid : reference -> std_ppcmds
type object_pr = {
diff --git a/parsing/printer.mli b/parsing/printer.mli
index 2c1586abf..6289fa66a 100644
--- a/parsing/printer.mli
+++ b/parsing/printer.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Pp
open Names
open Libnames
@@ -23,11 +22,10 @@ open Evd
open Proof_type
open Rawterm
open Tacexpr
-(*i*)
-(* These are the entry points for printing terms, context, tac, ... *)
+(** These are the entry points for printing terms, context, tac, ... *)
-(* Terms *)
+(** Terms *)
val pr_lconstr_env : env -> constr -> std_ppcmds
val pr_lconstr_env_at_top : env -> constr -> std_ppcmds
@@ -68,7 +66,7 @@ val pr_cases_pattern : cases_pattern -> std_ppcmds
val pr_sort : sorts -> std_ppcmds
-(* Printing global references using names as short as possible *)
+(** Printing global references using names as short as possible *)
val pr_global_env : Idset.t -> global_reference -> std_ppcmds
val pr_global : global_reference -> std_ppcmds
@@ -79,7 +77,7 @@ val pr_constructor : env -> constructor -> std_ppcmds
val pr_inductive : env -> inductive -> std_ppcmds
val pr_evaluable_reference : evaluable_global_reference -> std_ppcmds
-(* Contexts *)
+(** Contexts *)
val pr_ne_context_of : std_ppcmds -> env -> std_ppcmds
@@ -92,14 +90,14 @@ val pr_rel_context : env -> rel_context -> std_ppcmds
val pr_rel_context_of : env -> std_ppcmds
val pr_context_of : env -> std_ppcmds
-(* Predicates *)
+(** Predicates *)
val pr_predicate : ('a -> std_ppcmds) -> (bool * 'a list) -> std_ppcmds
val pr_cpred : Cpred.t -> std_ppcmds
val pr_idpred : Idpred.t -> std_ppcmds
val pr_transparent_state : transparent_state -> std_ppcmds
-(* Proofs *)
+(** Proofs *)
val pr_goal : goal sigma -> std_ppcmds
val pr_subgoals : string option -> evar_map -> goal list -> std_ppcmds
@@ -111,19 +109,19 @@ val pr_evars_int : int -> (evar * evar_info) list -> std_ppcmds
val pr_prim_rule : prim_rule -> std_ppcmds
-(* Emacs/proof general support *)
-(* (emacs_str s alts) outputs
+(** Emacs/proof general support
+ (emacs_str s alts) outputs
- s if emacs mode & unicode allowed,
- alts if emacs mode and & unicode not allowed
- nothing otherwise *)
val emacs_str : string -> string -> string
-(* Backwards compatibility *)
+(** Backwards compatibility *)
-val prterm : constr -> std_ppcmds (* = pr_lconstr *)
+val prterm : constr -> std_ppcmds (** = pr_lconstr *)
-(* spiwack: printer function for sets of Environ.assumption.
+(** spiwack: printer function for sets of Environ.assumption.
It is used primarily by the Print Assumption command. *)
val pr_assumptionset : env -> Term.types Environ.ContextObjectMap.t ->std_ppcmds
diff --git a/parsing/printmod.mli b/parsing/printmod.mli
index a3a16e8ec..b7926543d 100644
--- a/parsing/printmod.mli
+++ b/parsing/printmod.mli
@@ -1,15 +1,15 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
open Pp
open Names
-(* false iff the module is an element of an open module type *)
+(** false iff the module is an element of an open module type *)
val printable_body : dir_path -> bool
val print_module : bool -> module_path -> std_ppcmds
diff --git a/parsing/q_util.mli b/parsing/q_util.mli
index 7c0fec9a2..4fe853702 100644
--- a/parsing/q_util.mli
+++ b/parsing/q_util.mli
@@ -1,10 +1,10 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
diff --git a/parsing/tactic_printer.mli b/parsing/tactic_printer.mli
index 96cbeb9a8..836c4712b 100644
--- a/parsing/tactic_printer.mli
+++ b/parsing/tactic_printer.mli
@@ -1,22 +1,20 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Pp
open Sign
open Evd
open Tacexpr
open Proof_type
-(*i*)
-(* These are the entry points for tactics, proof trees, ... *)
+(** These are the entry points for tactics, proof trees, ... *)
val print_proof : evar_map -> named_context -> proof_tree -> std_ppcmds
val pr_rule : rule -> std_ppcmds
diff --git a/pretyping/cases.mli b/pretyping/cases.mli
index 669240312..188959f6a 100644
--- a/pretyping/cases.mli
+++ b/pretyping/cases.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Util
open Names
open Term
@@ -17,7 +16,6 @@ open Environ
open Inductiveops
open Rawterm
open Evarutil
-(*i*)
type pattern_matching_error =
| BadPattern of constructor * constr
@@ -47,7 +45,7 @@ val error_wrong_predicate_arity_loc : loc -> env -> constr -> constr -> constr -
val error_needs_inversion : env -> constr -> types -> 'a
val set_impossible_default_clause : constr * types -> unit
-(*s Compilation of pattern-matching. *)
+(** {6 Compilation of pattern-matching. } *)
type alias_constr =
| DepAlias
diff --git a/pretyping/cbv.mli b/pretyping/cbv.mli
index de66d22bc..75017d5b4 100644
--- a/pretyping/cbv.mli
+++ b/pretyping/cbv.mli
@@ -1,32 +1,30 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Term
open Environ
open Closure
open Esubst
-(*i*)
-(************************************************************************)
-(*s Call-by-value reduction *)
+(***********************************************************************
+ s Call-by-value reduction *)
-(* Entry point for cbv normalization of a constr *)
+(** Entry point for cbv normalization of a constr *)
type cbv_infos
val create_cbv_infos : RedFlags.reds -> env -> Evd.evar_map -> cbv_infos
val cbv_norm : cbv_infos -> constr -> constr
-(************************************************************************)
-(*i This is for cbv debug *)
+(***********************************************************************
+ i This is for cbv debug *)
type cbv_value =
| VAL of int * constr
| STACK of int * cbv_value * cbv_stack
@@ -46,7 +44,7 @@ val shift_value : int -> cbv_value -> cbv_value
val stack_app : cbv_value array -> cbv_stack -> cbv_stack
val strip_appl : cbv_value -> cbv_stack -> cbv_value * cbv_stack
-(* recursive functions... *)
+(** recursive functions... *)
val cbv_stack_term : cbv_infos ->
cbv_stack -> cbv_value subs -> constr -> cbv_value
val cbv_norm_term : cbv_infos -> cbv_value subs -> constr -> constr
@@ -54,4 +52,5 @@ val norm_head : cbv_infos ->
cbv_value subs -> constr -> cbv_stack -> cbv_value * cbv_stack
val apply_stack : cbv_infos -> constr -> cbv_stack -> constr
val cbv_norm_value : cbv_infos -> cbv_value -> constr
-(* End of cbv debug section i*)
+
+(** End of cbv debug section i*)
diff --git a/pretyping/classops.mli b/pretyping/classops.mli
index 63d5b0a4e..1830df3fb 100644
--- a/pretyping/classops.mli
+++ b/pretyping/classops.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Decl_kinds
open Term
@@ -16,9 +15,8 @@ open Evd
open Environ
open Nametab
open Mod_subst
-(*i*)
-(*s This is the type of class kinds *)
+(** {6 This is the type of class kinds } *)
type cl_typ =
| CL_SORT
| CL_FUN
@@ -28,53 +26,53 @@ type cl_typ =
val subst_cl_typ : substitution -> cl_typ -> cl_typ
-(* This is the type of infos for declared classes *)
+(** This is the type of infos for declared classes *)
type cl_info_typ = {
cl_param : int }
-(* This is the type of coercion kinds *)
+(** This is the type of coercion kinds *)
type coe_typ = Libnames.global_reference
-(* This is the type of infos for declared coercions *)
+(** This is the type of infos for declared coercions *)
type coe_info_typ
-(* [cl_index] is the type of class keys *)
+(** [cl_index] is the type of class keys *)
type cl_index
-(* [coe_index] is the type of coercion keys *)
+(** [coe_index] is the type of coercion keys *)
type coe_index
-(* This is the type of paths from a class to another *)
+(** This is the type of paths from a class to another *)
type inheritance_path = coe_index list
-(*s Access to classes infos *)
+(** {6 Access to classes infos } *)
val class_info : cl_typ -> (cl_index * cl_info_typ)
val class_exists : cl_typ -> bool
val class_info_from_index : cl_index -> cl_typ * cl_info_typ
-(* [find_class_type env sigma c] returns the head reference of [c] and its
+(** [find_class_type env sigma c] returns the head reference of [c] and its
arguments *)
val find_class_type : env -> evar_map -> types -> cl_typ * constr list
-(* raises [Not_found] if not convertible to a class *)
+(** raises [Not_found] if not convertible to a class *)
val class_of : env -> evar_map -> types -> types * cl_index
-(* raises [Not_found] if not mapped to a class *)
+(** raises [Not_found] if not mapped to a class *)
val inductive_class_of : inductive -> cl_index
val class_args_of : env -> evar_map -> types -> constr list
-(*s [declare_coercion] adds a coercion in the graph of coercion paths *)
+(** {6 [declare_coercion] adds a coercion in the graph of coercion paths } *)
val declare_coercion :
coe_typ -> locality -> isid:bool ->
src:cl_typ -> target:cl_typ -> params:int -> unit
-(*s Access to coercions infos *)
+(** {6 Access to coercions infos } *)
val coercion_exists : coe_typ -> bool
val coercion_value : coe_index -> (unsafe_judgment * bool)
-(*s Lookup functions for coercion paths *)
+(** {6 Lookup functions for coercion paths } *)
val lookup_path_between_class : cl_index * cl_index -> inheritance_path
val lookup_path_between : env -> evar_map -> types * types ->
@@ -90,9 +88,9 @@ val lookup_pattern_path_between :
open Pp
val install_path_printer :
((cl_index * cl_index) * inheritance_path -> std_ppcmds) -> unit
-(*i*)
+(**/**)
-(*s This is for printing purpose *)
+(** {6 This is for printing purpose } *)
val string_of_class : cl_typ -> string
val pr_class : cl_typ -> std_ppcmds
val pr_cl_index : cl_index -> std_ppcmds
@@ -101,6 +99,6 @@ val inheritance_graph : unit -> ((cl_index * cl_index) * inheritance_path) list
val classes : unit -> cl_typ list
val coercions : unit -> coe_index list
-(* [hide_coercion] returns the number of params to skip if the coercion must
+(** [hide_coercion] returns the number of params to skip if the coercion must
be hidden, [None] otherwise; it raises [Not_found] if not a coercion *)
val hide_coercion : coe_typ -> int option
diff --git a/pretyping/coercion.mli b/pretyping/coercion.mli
index 565cf0c40..3ac83fc19 100644
--- a/pretyping/coercion.mli
+++ b/pretyping/coercion.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Util
open Evd
open Names
@@ -17,34 +16,33 @@ open Sign
open Environ
open Evarutil
open Rawterm
-(*i*)
module type S = sig
- (*s Coercions. *)
+ (** {6 Coercions. } *)
- (* [inh_app_fun env isevars j] coerces [j] to a function; i.e. it
+ (** [inh_app_fun env isevars j] coerces [j] to a function; i.e. it
inserts a coercion into [j], if needed, in such a way it gets as
type a product; it returns [j] if no coercion is applicable *)
val inh_app_fun :
env -> evar_map -> unsafe_judgment -> evar_map * unsafe_judgment
- (* [inh_coerce_to_sort env isevars j] coerces [j] to a type; i.e. it
+ (** [inh_coerce_to_sort env isevars j] coerces [j] to a type; i.e. it
inserts a coercion into [j], if needed, in such a way it gets as
type a sort; it fails if no coercion is applicable *)
val inh_coerce_to_sort : loc ->
env -> evar_map -> unsafe_judgment -> evar_map * unsafe_type_judgment
- (* [inh_coerce_to_base env isevars j] coerces [j] to its base type; i.e. it
+ (** [inh_coerce_to_base env isevars j] coerces [j] to its base type; i.e. it
inserts a coercion into [j], if needed, in such a way it gets as
type its base type (the notion depends on the coercion system) *)
val inh_coerce_to_base : loc ->
env -> evar_map -> unsafe_judgment -> evar_map * unsafe_judgment
- (* [inh_coerce_to_prod env isevars t] coerces [t] to a product type *)
+ (** [inh_coerce_to_prod env isevars t] coerces [t] to a product type *)
val inh_coerce_to_prod : loc ->
env -> evar_map -> type_constraint_type -> evar_map * type_constraint_type
- (* [inh_conv_coerce_to loc env isevars j t] coerces [j] to an object of type
+ (** [inh_conv_coerce_to loc env isevars j t] coerces [j] to an object of type
[t]; i.e. it inserts a coercion into [j], if needed, in such a way [t] and
[j.uj_type] are convertible; it fails if no coercion is applicable *)
val inh_conv_coerce_to : loc ->
@@ -53,13 +51,13 @@ module type S = sig
val inh_conv_coerce_rigid_to : loc ->
env -> evar_map -> unsafe_judgment -> type_constraint_type -> evar_map * unsafe_judgment
- (* [inh_conv_coerces_to loc env isevars t t'] checks if an object of type [t]
+ (** [inh_conv_coerces_to loc env isevars t t'] checks if an object of type [t]
is coercible to an object of type [t'] adding evar constraints if needed;
it fails if no coercion exists *)
val inh_conv_coerces_to : loc ->
env -> evar_map -> types -> type_constraint_type -> evar_map
- (* [inh_pattern_coerce_to loc env isevars pat ind1 ind2] coerces the Cases
+ (** [inh_pattern_coerce_to loc env isevars pat ind1 ind2] coerces the Cases
pattern [pat] typed in [ind1] into a pattern typed in [ind2];
raises [Not_found] if no coercion found *)
val inh_pattern_coerce_to :
diff --git a/pretyping/detyping.mli b/pretyping/detyping.mli
index d7fb01aec..7b14c4fd2 100644
--- a/pretyping/detyping.mli
+++ b/pretyping/detyping.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Util
open Names
open Term
@@ -17,16 +16,15 @@ open Environ
open Rawterm
open Termops
open Mod_subst
-(*i*)
val subst_cases_pattern : substitution -> cases_pattern -> cases_pattern
val subst_rawconstr : substitution -> rawconstr -> rawconstr
-(* [detype isgoal avoid ctx c] turns a closed [c], into a rawconstr *)
-(* de Bruijn indexes are turned to bound names, avoiding names in [avoid] *)
-(* [isgoal] tells if naming must avoid global-level synonyms as intro does *)
-(* [ctx] gives the names of the free variables *)
+(** [detype isgoal avoid ctx c] turns a closed [c], into a rawconstr
+ de Bruijn indexes are turned to bound names, avoiding names in [avoid]
+ [isgoal] tells if naming must avoid global-level synonyms as intro does
+ [ctx] gives the names of the free variables *)
val detype : bool -> identifier list -> names_context -> constr -> rawconstr
@@ -43,7 +41,7 @@ val detype_sort : sorts -> rawsort
val detype_rel_context : constr option -> identifier list -> names_context ->
rel_context -> rawdecl list
-(* look for the index of a named var or a nondep var as it is renamed *)
+(** look for the index of a named var or a nondep var as it is renamed *)
val lookup_name_as_displayed : env -> constr -> identifier -> int option
val lookup_index_as_renamed : env -> constr -> int -> int option
@@ -51,7 +49,7 @@ val set_detype_anonymous : (loc -> int -> rawconstr) -> unit
val force_wildcard : unit -> bool
val synthetize_type : unit -> bool
-(* Utilities to transform kernel cases to simple pattern-matching problem *)
+(** Utilities to transform kernel cases to simple pattern-matching problem *)
val it_destRLambda_or_LetIn_names : int -> rawconstr -> name list * rawconstr
val simple_cases_matrix_of_branches :
diff --git a/pretyping/evarconv.mli b/pretyping/evarconv.mli
index 28b960bb9..2e52fb12b 100644
--- a/pretyping/evarconv.mli
+++ b/pretyping/evarconv.mli
@@ -1,26 +1,24 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Term
open Sign
open Environ
open Reductionops
open Evd
-(*i*)
-(* returns exception Reduction.NotConvertible if not unifiable *)
+(** returns exception Reduction.NotConvertible if not unifiable *)
val the_conv_x : env -> constr -> constr -> evar_map -> evar_map
val the_conv_x_leq : env -> constr -> constr -> evar_map -> evar_map
-(* The same function resolving evars by side-effect and
+(** The same function resolving evars by side-effect and
catching the exception *)
val e_conv : env -> evar_map ref -> constr -> constr -> bool
val e_cumul : env -> evar_map ref -> constr -> constr -> bool
@@ -32,7 +30,7 @@ val evar_eqappr_x :
env -> evar_map ->
conv_pb -> constr * constr list -> constr * constr list ->
evar_map * bool
-(*i*)
+(**/**)
val consider_remaining_unif_problems : env -> evar_map -> evar_map
diff --git a/pretyping/evarutil.mli b/pretyping/evarutil.mli
index 39f8dd05a..3f66dc97e 100644
--- a/pretyping/evarutil.mli
+++ b/pretyping/evarutil.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Util
open Names
open Rawterm
@@ -17,29 +16,29 @@ open Sign
open Evd
open Environ
open Reductionops
-(*i*)
-(*s This modules provides useful functions for unification modulo evars *)
+(** {6 This modules provides useful functions for unification modulo evars } *)
-(***********************************************************)
-(* Metas *)
+(**********************************************************
+ Metas *)
-(* [new_meta] is a generator of unique meta variables *)
+(** [new_meta] is a generator of unique meta variables *)
val new_meta : unit -> metavariable
val mk_new_meta : unit -> constr
-(* [new_untyped_evar] is a generator of unique evar keys *)
+(** [new_untyped_evar] is a generator of unique evar keys *)
val new_untyped_evar : unit -> existential_key
-(***********************************************************)
-(* Creating a fresh evar given their type and context *)
+(**********************************************************
+ Creating a fresh evar given their type and context *)
val new_evar :
evar_map -> env -> ?src:loc * hole_kind -> ?filter:bool list -> types -> evar_map * constr
-(* the same with side-effects *)
+
+(** the same with side-effects *)
val e_new_evar :
evar_map ref -> env -> ?src:loc * hole_kind -> ?filter:bool list -> types -> constr
-(* Create a fresh evar in a context different from its definition context:
+(** Create a fresh evar in a context different from its definition context:
[new_evar_instance sign evd ty inst] creates a new evar of context
[sign] and type [ty], [inst] is a mapping of the evar context to
the context where the evar should occur. This means that the terms
@@ -50,30 +49,30 @@ val new_evar_instance :
val make_pure_subst : evar_info -> constr array -> (identifier * constr) list
-(***********************************************************)
-(* Instantiate evars *)
+(**********************************************************
+ Instantiate evars *)
-(* [evar_define choose env ev c] try to instantiate [ev] with [c] (typed in [env]),
+(** [evar_define choose env ev c] try to instantiate [ev] with [c] (typed in [env]),
possibly solving related unification problems, possibly leaving open
some problems that cannot be solved in a unique way (except if choose is
true); fails if the instance is not valid for the given [ev] *)
val evar_define : ?choose:bool -> env -> existential -> constr -> evar_map -> evar_map
-(***********************************************************)
-(* Evars/Metas switching... *)
+(**********************************************************
+ Evars/Metas switching... *)
-(* [evars_to_metas] generates new metavariables for each non dependent
+(** [evars_to_metas] generates new metavariables for each non dependent
existential and performs the replacement in the given constr; it also
returns the evar_map extended with dependent evars *)
val evars_to_metas : evar_map -> open_constr -> (evar_map * constr)
val non_instantiated : evar_map -> (evar * evar_info) list
-(***********************************************************)
-(* Unification utils *)
+(**********************************************************
+ Unification utils *)
exception NoHeadEvar
-val head_evar : constr -> existential_key (* may raise NoHeadEvar *)
+val head_evar : constr -> existential_key (** may raise NoHeadEvar *)
val is_ground_term : evar_map -> constr -> bool
val is_ground_env : evar_map -> env -> bool
@@ -86,7 +85,7 @@ val solve_simple_eqn :
-> ?choose:bool -> env -> evar_map -> bool option * existential * constr ->
evar_map * bool
-(* [check_evars env initial_sigma extended_sigma c] fails if some
+(** [check_evars env initial_sigma extended_sigma c] fails if some
new unresolved evar remains in [c] *)
val check_evars : env -> evar_map -> evar_map -> constr -> unit
@@ -105,8 +104,8 @@ val evars_of_term : constr -> Intset.t
val evars_of_named_context : named_context -> Intset.t
val evars_of_evar_info : evar_info -> Intset.t
-(***********************************************************)
-(* Value/Type constraints *)
+(**********************************************************
+ Value/Type constraints *)
val judge_of_new_Type : unit -> unsafe_judgment
@@ -136,8 +135,8 @@ val lift_tycon : int -> type_constraint -> type_constraint
(***********************************************************)
-(* [whd_ise] raise [Uninstantiated_evar] if an evar remains uninstantiated; *)
-(* *[whd_evar]* and *[nf_evar]* leave uninstantiated evar as is *)
+(** [whd_ise] raise [Uninstantiated_evar] if an evar remains uninstantiated;
+ *[whd_evar]* and *[nf_evar]* leave uninstantiated evar as is *)
val nf_evar : evar_map -> constr -> constr
val j_nf_evar : evar_map -> unsafe_judgment -> unsafe_judgment
@@ -155,7 +154,7 @@ val nf_named_context_evar : evar_map -> named_context -> named_context
val nf_rel_context_evar : evar_map -> rel_context -> rel_context
val nf_env_evar : evar_map -> env -> env
-(* Same for evar defs *)
+(** Same for evar defs *)
val nf_isevar : evar_map -> constr -> constr
val j_nf_isevar : evar_map -> unsafe_judgment -> unsafe_judgment
val jl_nf_isevar :
@@ -167,25 +166,25 @@ val tj_nf_isevar :
val nf_evar_map : evar_map -> evar_map
-(* Replacing all evars *)
+(** Replacing all evars *)
exception Uninstantiated_evar of existential_key
val whd_ise : evar_map -> constr -> constr
val whd_castappevar : evar_map -> constr -> constr
-(* Replace the vars and rels that are aliases to other vars and rels by *)
-(* their representative that is most ancient in the context *)
+(** Replace the vars and rels that are aliases to other vars and rels by
+ their representative that is most ancient in the context *)
val expand_vars_in_term : env -> constr -> constr
-(*********************************************************************)
-(* debug pretty-printer: *)
+(********************************************************************
+ debug pretty-printer: *)
val pr_tycon_type : env -> type_constraint_type -> Pp.std_ppcmds
val pr_tycon : env -> type_constraint -> Pp.std_ppcmds
-(*********************************************************************)
-(* Removing hyps in evars'context; *)
-(* raise OccurHypInSimpleClause if the removal breaks dependencies *)
+(********************************************************************
+ Removing hyps in evars'context;
+ raise OccurHypInSimpleClause if the removal breaks dependencies *)
type clear_dependency_error =
| OccurHypInSimpleClause of identifier option
diff --git a/pretyping/evd.mli b/pretyping/evd.mli
index f895ead42..2601d44f7 100644
--- a/pretyping/evd.mli
+++ b/pretyping/evd.mli
@@ -1,15 +1,14 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Util
open Names
open Term
@@ -18,10 +17,9 @@ open Environ
open Libnames
open Mod_subst
open Termops
-(*i*)
-(*********************************************************************)
-(* Meta map *)
+(********************************************************************
+ Meta map *)
module Metamap : Map.S with type key = metavariable
@@ -37,7 +35,7 @@ val metavars_of : constr -> Metaset.t
val mk_freelisted : constr -> constr freelisted
val map_fl : ('a -> 'b) -> 'a freelisted -> 'b freelisted
-(* Status of an instance found by unification wrt to the meta it solves:
+(** Status of an instance found by unification wrt to the meta it solves:
- a supertype of the meta (e.g. the solution to ?X <= T is a supertype of ?X)
- a subtype of the meta (e.g. the solution to T <= ?X is a supertype of ?X)
- a term that can be eta-expanded n times while still being a solution
@@ -47,7 +45,7 @@ val map_fl : ('a -> 'b) -> 'a freelisted -> 'b freelisted
type instance_constraint =
IsSuperType | IsSubType | ConvUpToEta of int | UserGiven
-(* Status of the unification of the type of an instance against the type of
+(** Status of the unification of the type of an instance against the type of
the meta it instantiates:
- CoerceToType means that the unification of types has not been done
and that a coercion can still be inserted: the meta should not be
@@ -63,11 +61,11 @@ type instance_constraint =
type instance_typing_status =
CoerceToType | TypeNotProcessed | TypeProcessed
-(* Status of an instance together with the status of its type unification *)
+(** Status of an instance together with the status of its type unification *)
type instance_status = instance_constraint * instance_typing_status
-(* Clausal environments *)
+(** Clausal environments *)
type clbinding =
| Cltyp of name * constr freelisted
@@ -76,17 +74,17 @@ type clbinding =
val map_clb : (constr -> constr) -> clbinding -> clbinding
-(*********************************************************************)
-(*** Kinds of existential variables ***)
+(********************************************************************
+ ** Kinds of existential variables ***)
-(* Should the obligation be defined (opaque or transparent (default)) or
+(** Should the obligation be defined (opaque or transparent (default)) or
defined transparent and expanded in the term? *)
type obligation_definition_status = Define of bool | Expand
-(* Evars *)
+(** Evars *)
type hole_kind =
- | ImplicitArg of global_reference * (int * identifier option) * bool (* Force inference *)
+ | ImplicitArg of global_reference * (int * identifier option) * bool (** Force inference *)
| BinderType of name
| QuestionMark of obligation_definition_status
| CasesType
@@ -96,10 +94,10 @@ type hole_kind =
| ImpossibleCase
| MatchingVar of bool * identifier
-(*********************************************************************)
-(*** Existential variables and unification states ***)
+(********************************************************************
+ ** Existential variables and unification states ***)
-(* A unification state (of type [evar_map]) is primarily a finite mapping
+(** A unification state (of type [evar_map]) is primarily a finite mapping
from existential variables to records containing the type of the evar
([evar_concl]), the context under which it was introduced ([evar_hyps])
and its definition ([evar_body]). [evar_extra] is used to add any other
@@ -107,7 +105,7 @@ type hole_kind =
It also contains conversion constraints, debugging information and
information about meta variables. *)
-(* Information about existential variables. *)
+(** Information about existential variables. *)
type evar = existential_key
val string_of_existential : evar -> string
@@ -140,9 +138,9 @@ val evar_env : evar_info -> env
(*** Unification state ***)
type evar_map
-(* Unification state and existential variables *)
+(** Unification state and existential variables *)
-(* Assuming that the second map extends the first one, this says if
+(** Assuming that the second map extends the first one, this says if
some existing evar has been refined *)
val progress_evar_map : evar_map -> evar_map -> bool
@@ -166,7 +164,8 @@ val is_evar : evar_map -> evar -> bool
val is_defined : evar_map -> evar -> bool
-(*s [existential_value sigma ev] raises [NotInstantiatedEvar] if [ev] has
+(** {6 Sect } *)
+(** [existential_value sigma ev] raises [NotInstantiatedEvar] if [ev] has
no body and [Not_found] if it does not exist in [sigma] *)
exception NotInstantiatedEvar
@@ -174,14 +173,14 @@ val existential_value : evar_map -> existential -> constr
val existential_type : evar_map -> existential -> types
val existential_opt_value : evar_map -> existential -> constr option
-(* Assume empty universe constraints in [evar_map] and [conv_pbs] *)
+(** Assume empty universe constraints in [evar_map] and [conv_pbs] *)
val subst_evar_defs_light : substitution -> evar_map -> evar_map
-(* spiwack: this function seems to somewhat break the abstraction. *)
+(** spiwack: this function seems to somewhat break the abstraction. *)
val evars_reset_evd : evar_map -> evar_map -> evar_map
-(* spiwack: [is_undefined_evar] should be considered a candidate
+(** spiwack: [is_undefined_evar] should be considered a candidate
for moving to evarutils *)
val is_undefined_evar : evar_map -> constr -> bool
val undefined_evars : evar_map -> evar_map
@@ -199,11 +198,11 @@ val evar_declare :
?filter:bool list -> evar_map -> evar_map
val evar_source : existential_key -> evar_map -> loc * hole_kind
-(* spiwack: this function seems to somewhat break the abstraction. *)
-(* [evar_merge evd ev1] extends the evars of [evd] with [evd1] *)
+(** spiwack: this function seems to somewhat break the abstraction.
+ [evar_merge evd ev1] extends the evars of [evd] with [evd1] *)
val evar_merge : evar_map -> evar_map -> evar_map
-(* Unification constraints *)
+(** Unification constraints *)
type conv_pb = Reduction.conv_pb
type evar_constraint = conv_pb * env * constr * constr
val add_conv_pb : evar_constraint -> evar_map -> evar_map
@@ -215,11 +214,12 @@ val extract_changed_conv_pbs : evar_map ->
val extract_all_conv_pbs : evar_map -> evar_map * evar_constraint list
-(* Metas *)
+(** Metas *)
val find_meta : evar_map -> metavariable -> clbinding
val meta_list : evar_map -> (metavariable * clbinding) list
val meta_defined : evar_map -> metavariable -> bool
-(* [meta_fvalue] raises [Not_found] if meta not in map or [Anomaly] if
+
+(** [meta_fvalue] raises [Not_found] if meta not in map or [Anomaly] if
meta has no value *)
val meta_value : evar_map -> metavariable -> constr
val meta_fvalue : evar_map -> metavariable -> constr freelisted * instance_status
@@ -233,7 +233,7 @@ val meta_declare :
val meta_assign : metavariable -> constr * instance_status -> evar_map -> evar_map
val meta_reassign : metavariable -> constr * instance_status -> evar_map -> evar_map
-(* [meta_merge evd1 evd2] returns [evd2] extended with the metas of [evd1] *)
+(** [meta_merge evd1 evd2] returns [evd2] extended with the metas of [evd1] *)
val meta_merge : evar_map -> evar_map -> evar_map
val undefined_metas : evar_map -> metavariable list
@@ -245,8 +245,8 @@ type metabinding = metavariable * constr * instance_status
val retract_coercible_metas : evar_map -> metabinding list * evar_map
val subst_defined_metas : metabinding list -> constr -> constr option
-(**********************************************************)
-(* Sort variables *)
+(*********************************************************
+ Sort variables *)
val new_sort_variable : evar_map -> sorts * evar_map
val is_sort_variable : evar_map -> sorts -> bool
@@ -254,12 +254,12 @@ val whd_sort_variable : evar_map -> constr -> constr
val set_leq_sort_variable : evar_map -> sorts -> sorts -> evar_map
val define_sort_variable : evar_map -> sorts -> sorts -> evar_map
-(*********************************************************************)
-(* constr with holes *)
+(********************************************************************
+ constr with holes *)
type open_constr = evar_map * constr
-(*********************************************************************)
-(* The type constructor ['a sigma] adds an evar map to an object of
+(********************************************************************
+ The type constructor ['a sigma] adds an evar map to an object of
type ['a] *)
type 'a sigma = {
it : 'a ;
@@ -268,13 +268,13 @@ type 'a sigma = {
val sig_it : 'a sigma -> 'a
val sig_sig : 'a sigma -> evar_map
-(**********************************************************)
-(* Failure explanation *)
+(*********************************************************
+ Failure explanation *)
type unsolvability_explanation = SeveralInstancesFound of int
-(*********************************************************************)
-(* debug pretty-printer: *)
+(********************************************************************
+ debug pretty-printer: *)
val pr_evar_info : evar_info -> Pp.std_ppcmds
val pr_evar_map : evar_map -> Pp.std_ppcmds
@@ -282,8 +282,8 @@ val pr_sort_constraints : evar_map -> Pp.std_ppcmds
val pr_metaset : Metaset.t -> Pp.std_ppcmds
-(*** /!\Deprecated /!\ ***)
-(* create an [evar_map] with empty meta map: *)
+(*** /!\Deprecated /!\ **
+ create an [evar_map] with empty meta map: *)
val create_evar_defs : evar_map -> evar_map
val create_goal_evar_defs : evar_map -> evar_map
val is_defined_evar : evar_map -> existential -> bool
diff --git a/pretyping/indrec.mli b/pretyping/indrec.mli
index 91d559e17..304b986a1 100644
--- a/pretyping/indrec.mli
+++ b/pretyping/indrec.mli
@@ -1,23 +1,21 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Term
open Declarations
open Inductiveops
open Environ
open Evd
-(*i*)
-(* Errors related to recursors building *)
+(** Errors related to recursors building *)
type recursion_scheme_error =
| NotAllowedCaseAnalysis of (*isrec:*) bool * sorts * inductive
@@ -29,35 +27,35 @@ exception RecursionSchemeError of recursion_scheme_error
type dep_flag = bool
-(* Build a case analysis elimination scheme in some sort family *)
+(** Build a case analysis elimination scheme in some sort family *)
val build_case_analysis_scheme : env -> evar_map -> inductive ->
dep_flag -> sorts_family -> constr
-(* Build a dependent case elimination predicate unless type is in Prop *)
+(** Build a dependent case elimination predicate unless type is in Prop *)
val build_case_analysis_scheme_default : env -> evar_map -> inductive ->
sorts_family -> constr
-(* Builds a recursive induction scheme (Peano-induction style) in the same
+(** Builds a recursive induction scheme (Peano-induction style) in the same
sort family as the inductive family; it is dependent if not in Prop *)
val build_induction_scheme : env -> evar_map -> inductive ->
dep_flag -> sorts_family -> constr
-(* Builds mutual (recursive) induction schemes *)
+(** Builds mutual (recursive) induction schemes *)
val build_mutual_induction_scheme :
env -> evar_map -> (inductive * dep_flag * sorts_family) list -> constr list
(** Scheme combinators *)
-(* [modify_sort_scheme s n c] modifies the quantification sort of
+(** [modify_sort_scheme s n c] modifies the quantification sort of
scheme c whose predicate is abstracted at position [n] of [c] *)
val modify_sort_scheme : sorts -> int -> constr -> constr
-(* [weaken_sort_scheme s n c t] derives by subtyping from [c:t]
+(** [weaken_sort_scheme s n c t] derives by subtyping from [c:t]
whose conclusion is quantified on [Type] at position [n] of [t] a
scheme quantified on sort [s] *)
diff --git a/pretyping/inductiveops.mli b/pretyping/inductiveops.mli
index a9a51d9ac..6255a83d4 100644
--- a/pretyping/inductiveops.mli
+++ b/pretyping/inductiveops.mli
@@ -1,10 +1,10 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
@@ -15,19 +15,19 @@ open Environ
open Evd
open Sign
-(* The following three functions are similar to the ones defined in
+(** The following three functions are similar to the ones defined in
Inductive, but they expect an env *)
val type_of_inductive : env -> inductive -> types
-(* Return type as quoted by the user *)
+(** Return type as quoted by the user *)
val type_of_constructor : env -> constructor -> types
val type_of_constructors : env -> inductive -> types array
-(* Return constructor types in normal form *)
+(** Return constructor types in normal form *)
val arities_of_constructors : env -> inductive -> types array
-(* An inductive type with its parameters *)
+(** An inductive type with its parameters *)
type inductive_family
val make_ind_family : inductive * constr list -> inductive_family
val dest_ind_family : inductive_family -> inductive * constr list
@@ -37,7 +37,7 @@ val lift_inductive_family : int -> inductive_family -> inductive_family
val substnl_ind_family :
constr list -> int -> inductive_family -> inductive_family
-(* An inductive type with its parameters and real arguments *)
+(** An inductive type with its parameters and real arguments *)
type inductive_type = IndType of inductive_family * constr list
val make_ind_type : inductive_family * constr list -> inductive_type
val dest_ind_type : inductive_type -> inductive_family * constr list
@@ -53,14 +53,15 @@ val mis_is_recursive :
val mis_nf_constructor_type :
inductive * mutual_inductive_body * one_inductive_body -> int -> constr
-(* Extract information from an inductive name *)
+(** Extract information from an inductive name *)
+(** Arity of constructors excluding parameters and local defs *)
val mis_constr_nargs : inductive -> int array
val mis_constr_nargs_env : env -> inductive -> int array
val nconstructors : inductive -> int
-(* Return the lengths of parameters signature and real arguments signature *)
+(** Return the lengths of parameters signature and real arguments signature *)
val inductive_nargs : env -> inductive -> int * int
val mis_constructor_nargs_env : env -> constructor -> int
@@ -71,7 +72,7 @@ val get_full_arity_sign : env -> inductive -> rel_context
val allowed_sorts : env -> inductive -> sorts_family list
-(* Extract information from an inductive family *)
+(** Extract information from an inductive family *)
type constructor_summary = {
cs_cstr : constructor;
@@ -92,7 +93,7 @@ val make_arity_signature : env -> bool -> inductive_family -> rel_context
val make_arity : env -> bool -> inductive_family -> sorts -> types
val build_branch_type : env -> bool -> constr -> constructor_summary -> types
-(* Raise [Not_found] if not given an valid inductive type *)
+(** Raise [Not_found] if not given an valid inductive type *)
val extract_mrectype : constr -> inductive * constr list
val find_mrectype : env -> evar_map -> constr -> inductive * constr list
val find_rectype : env -> evar_map -> constr -> inductive_type
@@ -101,13 +102,15 @@ val find_coinductive : env -> evar_map -> constr -> inductive * constr list
(********************)
-(* Builds the case predicate arity (dependent or not) *)
+(** Builds the case predicate arity (dependent or not) *)
val arity_of_case_predicate :
env -> inductive_family -> bool -> sorts -> types
val type_case_branches_with_names :
env -> inductive * constr list -> constr -> constr ->
types array * types
+
+(** Annotation for cases *)
val make_case_info : env -> inductive -> case_style -> case_info
(*i Compatibility
diff --git a/pretyping/matching.mli b/pretyping/matching.mli
index 98d16b112..263ded381 100644
--- a/pretyping/matching.mli
+++ b/pretyping/matching.mli
@@ -1,22 +1,20 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Term
open Environ
open Pattern
open Termops
-(*i*)
-(*s This modules implements pattern-matching on terms *)
+(** {6 This modules implements pattern-matching on terms } *)
exception PatternMatchingFailure
@@ -24,56 +22,56 @@ val special_meta : metavariable
type bound_ident_map = (identifier * identifier) list
-(* [matches pat c] matches [c] against [pat] and returns the resulting
+(** [matches pat c] matches [c] against [pat] and returns the resulting
assignment of metavariables; it raises [PatternMatchingFailure] if
not matchable; bindings are given in increasing order based on the
numbers given in the pattern *)
val matches : constr_pattern -> constr -> patvar_map
-(* [extended_matches pat c] also returns the names of bound variables
+(** [extended_matches pat c] also returns the names of bound variables
in [c] that matches the bound variables in [pat]; if several bound
variables or metavariables have the same name, the metavariable,
or else the rightmost bound variable, takes precedence *)
val extended_matches :
constr_pattern -> constr -> bound_ident_map * patvar_map
-(* [is_matching pat c] just tells if [c] matches against [pat] *)
+(** [is_matching pat c] just tells if [c] matches against [pat] *)
val is_matching : constr_pattern -> constr -> bool
-(* [matches_conv env sigma] matches up to conversion in environment
+(** [matches_conv env sigma] matches up to conversion in environment
[(env,sigma)] when constants in pattern are concerned; it raises
[PatternMatchingFailure] if not matchable; bindings are given in
increasing order based on the numbers given in the pattern *)
val matches_conv :env -> Evd.evar_map -> constr_pattern -> constr -> patvar_map
-(* The type of subterm matching results: a substitution + a context
+(** The type of subterm matching results: a substitution + a context
(whose hole is denoted with [special_meta]) + a continuation that
either returns the next matching subterm or raise PatternMatchingFailure *)
type subterm_matching_result =
(bound_ident_map * patvar_map) * constr * (unit -> subterm_matching_result)
-(* [match_subterm n pat c] returns the substitution and the context
+(** [match_subterm n pat c] returns the substitution and the context
corresponding to the first **closed** subterm of [c] matching [pat], and
a continuation that looks for the next matching subterm.
It raises PatternMatchingFailure if no subterm matches the pattern *)
val match_subterm : constr_pattern -> constr -> subterm_matching_result
-(* [match_appsubterm pat c] returns the substitution and the context
+(** [match_appsubterm pat c] returns the substitution and the context
corresponding to the first **closed** subterm of [c] matching [pat],
considering application contexts as well. It also returns a
continuation that looks for the next matching subterm.
It raises PatternMatchingFailure if no subterm matches the pattern *)
val match_appsubterm : constr_pattern -> constr -> subterm_matching_result
-(* [match_subterm_gen] calls either [match_subterm] or [match_appsubterm] *)
-val match_subterm_gen : bool (* true = with app context *) ->
+(** [match_subterm_gen] calls either [match_subterm] or [match_appsubterm] *)
+val match_subterm_gen : bool (** true = with app context *) ->
constr_pattern -> constr -> subterm_matching_result
-(* [is_matching_appsubterm pat c] tells if a subterm of [c] matches
+(** [is_matching_appsubterm pat c] tells if a subterm of [c] matches
against [pat] taking partial subterms into consideration *)
val is_matching_appsubterm : ?closed:bool -> constr_pattern -> constr -> bool
-(* [is_matching_conv env sigma pat c] tells if [c] matches against [pat]
+(** [is_matching_conv env sigma pat c] tells if [c] matches against [pat]
up to conversion for constants in patterns *)
val is_matching_conv :
env -> Evd.evar_map -> constr_pattern -> constr -> bool
diff --git a/pretyping/namegen.mli b/pretyping/namegen.mli
index 096c09b51..e3ab7d03e 100644
--- a/pretyping/namegen.mli
+++ b/pretyping/namegen.mli
@@ -1,19 +1,19 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
-(* $Id$ *)
+(** {% $ %}Id: namegen.mli 12549 2009-12-01 12:05:57Z herbelin {% $ %} *)
open Names
open Term
open Environ
-(**********************************************************************)
-(* Generating "intuitive" names from their type *)
+(*********************************************************************
+ Generating "intuitive" names from their type *)
val lowercase_first_char : identifier -> string
val sort_hdchar : sorts -> string
@@ -24,7 +24,7 @@ val named_hd : env -> types -> name -> name
val mkProd_name : env -> name * types * types -> types
val mkLambda_name : env -> name * types * constr -> constr
-(* Deprecated synonyms of [mkProd_name] and [mkLambda_name] *)
+(** Deprecated synonyms of [mkProd_name] and [mkLambda_name] *)
val prod_name : env -> name * types * types -> types
val lambda_name : env -> name * types * constr -> constr
@@ -38,32 +38,32 @@ val mkLambda_or_LetIn_name : env -> constr -> rel_declaration -> constr
val it_mkProd_or_LetIn_name : env -> types -> rel_context -> types
val it_mkLambda_or_LetIn_name : env -> constr -> rel_context -> constr
-(**********************************************************************)
-(* Fresh names *)
+(*********************************************************************
+ Fresh names *)
-(* Avoid clashing with a name of the given list *)
+(** Avoid clashing with a name of the given list *)
val next_ident_away : identifier -> identifier list -> identifier
-(* Avoid clashing with a name already used in current module *)
+(** Avoid clashing with a name already used in current module *)
val next_ident_away_in_goal : identifier -> identifier list -> identifier
-(* Avoid clashing with a name already used in current module *)
-(* but tolerate overwriting section variables, as in goals *)
+(** Avoid clashing with a name already used in current module
+ but tolerate overwriting section variables, as in goals *)
val next_global_ident_away : identifier -> identifier list -> identifier
-(* Avoid clashing with a constructor name already used in current module *)
+(** Avoid clashing with a constructor name already used in current module *)
val next_name_away_in_cases_pattern : name -> identifier list -> identifier
-val next_name_away : name -> identifier list -> identifier (* default is "H" *)
+val next_name_away : name -> identifier list -> identifier (** default is "H" *)
val next_name_away_with_default : string -> name -> identifier list ->
identifier
-(**********************************************************************)
-(* Making name distinct for displaying *)
+(*********************************************************************
+ Making name distinct for displaying *)
type renaming_flags =
- | RenamingForCasesPattern (* avoid only global constructors *)
- | RenamingForGoal (* avoid all globals (as in intro) *)
+ | RenamingForCasesPattern (** avoid only global constructors *)
+ | RenamingForGoal (** avoid all globals (as in intro) *)
| RenamingElsewhereFor of constr
val make_all_name_different : env -> env
diff --git a/pretyping/pattern.mli b/pretyping/pattern.mli
index e7460377b..33105c312 100644
--- a/pretyping/pattern.mli
+++ b/pretyping/pattern.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Pp
open Names
open Sign
@@ -18,14 +17,13 @@ open Libnames
open Nametab
open Rawterm
open Mod_subst
-(*i*)
-(* Pattern variables *)
+(** Pattern variables *)
type patvar_map = (patvar * constr) list
val pr_patvar : patvar -> std_ppcmds
-(* Patterns *)
+(** Patterns *)
type constr_pattern =
| PRef of global_reference
@@ -51,24 +49,24 @@ val subst_pattern : substitution -> constr_pattern -> constr_pattern
exception BoundPattern
-(* [head_pattern_bound t] extracts the head variable/constant of the
+(** [head_pattern_bound t] extracts the head variable/constant of the
type [t] or raises [BoundPattern] (even if a sort); it raises an anomaly
if [t] is an abstraction *)
val head_pattern_bound : constr_pattern -> global_reference
-(* [head_of_constr_reference c] assumes [r] denotes a reference and
+(** [head_of_constr_reference c] assumes [r] denotes a reference and
returns its label; raises an anomaly otherwise *)
val head_of_constr_reference : Term.constr -> global_reference
-(* [pattern_of_constr c] translates a term [c] with metavariables into
+(** [pattern_of_constr c] translates a term [c] with metavariables into
a pattern; currently, no destructor (Cases, Fix, Cofix) and no
existential variable are allowed in [c] *)
val pattern_of_constr : Evd.evar_map -> constr -> named_context * constr_pattern
-(* [pattern_of_rawconstr l c] translates a term [c] with metavariables into
+(** [pattern_of_rawconstr l c] translates a term [c] with metavariables into
a pattern; variables bound in [l] are replaced by the pattern to which they
are bound *)
diff --git a/pretyping/pretype_errors.mli b/pretyping/pretype_errors.mli
index ca48f7021..9b6216a12 100644
--- a/pretyping/pretype_errors.mli
+++ b/pretyping/pretype_errors.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Pp
open Util
open Names
@@ -17,14 +16,13 @@ open Sign
open Environ
open Rawterm
open Inductiveops
-(*i*)
-(*s The type of errors raised by the pretyper *)
+(** {6 The type of errors raised by the pretyper } *)
type pretype_error =
- (* Old Case *)
+ (** Old Case *)
| CantFindCaseType of constr
- (* Unification *)
+ (** Unification *)
| OccurCheck of existential_key * constr
| NotClean of existential_key * constr * Evd.hole_kind
| UnsolvableImplicit of Evd.evar_info * Evd.hole_kind *
@@ -35,7 +33,7 @@ type pretype_error =
| CannotGeneralize of constr
| NoOccurrenceFound of constr * identifier option
| CannotFindWellTypedAbstraction of constr * constr list
- (* Pretyping *)
+ (** Pretyping *)
| VarNotFound of identifier
| UnexpectedType of constr * constr
| NotProduct of constr
@@ -44,7 +42,7 @@ exception PretypeError of env * pretype_error
val precatchable_exception : exn -> bool
-(* Presenting terms without solved evars *)
+(** Presenting terms without solved evars *)
val nf_evar : Evd.evar_map -> constr -> constr
val j_nf_evar : Evd.evar_map -> unsafe_judgment -> unsafe_judgment
val jl_nf_evar :
@@ -55,7 +53,7 @@ val tj_nf_evar :
Evd.evar_map -> unsafe_type_judgment -> unsafe_type_judgment
-(* Raising errors *)
+(** Raising errors *)
val error_actual_type_loc :
loc -> env -> Evd.evar_map -> unsafe_judgment -> constr -> 'b
@@ -87,7 +85,7 @@ val error_not_a_type_loc :
val error_cannot_coerce : env -> Evd.evar_map -> constr * constr -> 'b
-(*s Implicit arguments synthesis errors *)
+(** {6 Implicit arguments synthesis errors } *)
val error_occur_check : env -> Evd.evar_map -> existential_key -> constr -> 'b
@@ -105,12 +103,12 @@ val error_cannot_unify_local : env -> Evd.evar_map -> constr * constr * constr -
val error_cannot_find_well_typed_abstraction : env -> Evd.evar_map ->
constr -> constr list -> 'b
-(*s Ml Case errors *)
+(** {6 Ml Case errors } *)
val error_cant_find_case_type_loc :
loc -> env -> Evd.evar_map -> constr -> 'b
-(*s Pretyping errors *)
+(** {6 Pretyping errors } *)
val error_unexpected_type_loc :
loc -> env -> Evd.evar_map -> constr -> constr -> 'b
@@ -118,6 +116,6 @@ val error_unexpected_type_loc :
val error_not_product_loc :
loc -> env -> Evd.evar_map -> constr -> 'b
-(*s Error in conversion from AST to rawterms *)
+(** {6 Error in conversion from AST to rawterms } *)
val error_var_not_found_loc : loc -> identifier -> 'b
diff --git a/pretyping/pretyping.mli b/pretyping/pretyping.mli
index 75bd7874e..f5601d6d6 100644
--- a/pretyping/pretyping.mli
+++ b/pretyping/pretyping.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Sign
open Term
@@ -16,9 +15,8 @@ open Environ
open Evd
open Rawterm
open Evarutil
-(*i*)
-(* An auxiliary function for searching for fixpoint guard indexes *)
+(** An auxiliary function for searching for fixpoint guard indexes *)
val search_guard :
Util.loc -> env -> int list list -> rec_declaration -> int array
@@ -33,10 +31,10 @@ sig
module Cases : Cases.S
- (* Allow references to syntaxically inexistent variables (i.e., if applied on an inductive) *)
+ (** Allow references to syntaxically inexistent variables (i.e., if applied on an inductive) *)
val allow_anonymous_refs : bool ref
- (* Generic call to the interpreter from rawconstr to open_constr, leaving
+ (** Generic call to the interpreter from rawconstr to open_constr, leaving
unresolved holes as evars and returning the typing contexts of
these evars. Work as [understand_gen] for the rest. *)
@@ -46,9 +44,9 @@ sig
val understand_tcc_evars : ?fail_evar:bool -> ?resolve_classes:bool ->
evar_map ref -> env -> typing_constraint -> rawconstr -> constr
- (* More general entry point with evars from ltac *)
+ (** More general entry point with evars from ltac *)
- (* Generic call to the interpreter from rawconstr to constr, failing
+ (** Generic call to the interpreter from rawconstr to constr, failing
unresolved holes in the rawterm cannot be instantiated.
In [understand_ltac expand_evars sigma env ltac_env constraint c],
@@ -63,29 +61,29 @@ sig
bool -> evar_map -> env -> var_map * unbound_ltac_var_map ->
typing_constraint -> rawconstr -> evar_map * constr
- (* Standard call to get a constr from a rawconstr, resolving implicit args *)
+ (** Standard call to get a constr from a rawconstr, resolving implicit args *)
val understand : evar_map -> env -> ?expected_type:Term.types ->
rawconstr -> constr
- (* Idem but the rawconstr is intended to be a type *)
+ (** Idem but the rawconstr is intended to be a type *)
val understand_type : evar_map -> env -> rawconstr -> constr
- (* A generalization of the two previous case *)
+ (** A generalization of the two previous case *)
val understand_gen : typing_constraint -> evar_map -> env ->
rawconstr -> constr
- (* Idem but returns the judgment of the understood term *)
+ (** Idem but returns the judgment of the understood term *)
val understand_judgment : evar_map -> env -> rawconstr -> unsafe_judgment
- (* Idem but do not fail on unresolved evars *)
+ (** Idem but do not fail on unresolved evars *)
val understand_judgment_tcc : evar_map ref -> env -> rawconstr -> unsafe_judgment
- (*i*)
- (* Internal of Pretyping...
+ (**/**)
+ (** Internal of Pretyping...
*)
val pretype :
type_constraint -> env -> evar_map ref ->
@@ -102,14 +100,14 @@ sig
var_map * (identifier * identifier option) list ->
typing_constraint -> rawconstr -> constr
- (*i*)
+ (**/**)
end
module Pretyping_F (C : Coercion.S) : S
module Default : S
-(* To embed constr in rawconstr *)
+(** To embed constr in rawconstr *)
val constr_in : constr -> Dyn.t
val constr_out : Dyn.t -> constr
diff --git a/pretyping/recordops.mli b/pretyping/recordops.mli
index 74a0d7d8e..954890d89 100755
--- a/pretyping/recordops.mli
+++ b/pretyping/recordops.mli
@@ -1,23 +1,22 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Nametab
open Term
open Libnames
open Libobject
open Library
-(*i*)
-(*s A structure S is a non recursive inductive type with a single
+(** {6 Sect } *)
+(** A structure S is a non recursive inductive type with a single
constructor (the name of which defaults to Build_S) *)
type struc_typ = {
@@ -29,34 +28,35 @@ type struc_typ = {
val declare_structure :
inductive * constructor * (name * bool) list * constant option list -> unit
-(* [lookup_structure isp] returns the struc_typ associated to the
+(** [lookup_structure isp] returns the struc_typ associated to the
inductive path [isp] if it corresponds to a structure, otherwise
it fails with [Not_found] *)
val lookup_structure : inductive -> struc_typ
-(* [lookup_projections isp] returns the projections associated to the
+(** [lookup_projections isp] returns the projections associated to the
inductive path [isp] if it corresponds to a structure, otherwise
it fails with [Not_found] *)
val lookup_projections : inductive -> constant option list
-(* raise [Not_found] if not a projection *)
+(** raise [Not_found] if not a projection *)
val find_projection_nparams : global_reference -> int
-(* raise [Not_found] if not a projection *)
+(** raise [Not_found] if not a projection *)
val find_projection : global_reference -> struc_typ
-(* we keep an index (dnet) of record's arguments + fields
+(** we keep an index (dnet) of record's arguments + fields
(=methods). Here is how to declare them: *)
val declare_method :
global_reference -> Evd.evar -> Evd.evar_map -> unit
- (* and here is how to search for methods matched by a given term: *)
+ (** and here is how to search for methods matched by a given term: *)
val methods_matching : constr ->
((global_reference*Evd.evar*Evd.evar_map) *
(constr*existential_key)*Termops.subst) list
-(*s A canonical structure declares "canonical" conversion hints between *)
-(* the effective components of a structure and the projections of the *)
-(* structure *)
+(** {6 Sect } *)
+(** A canonical structure declares "canonical" conversion hints between
+ the effective components of a structure and the projections of the
+ structure *)
type cs_pattern =
Const_cs of global_reference
@@ -66,11 +66,11 @@ type cs_pattern =
type obj_typ = {
o_DEF : constr;
- o_INJ : int; (* position of trivial argument *)
- o_TABS : constr list; (* ordered *)
- o_TPARAMS : constr list; (* ordered *)
+ o_INJ : int; (** position of trivial argument *)
+ o_TABS : constr list; (** ordered *)
+ o_TPARAMS : constr list; (** ordered *)
o_NPARAMS : int;
- o_TCOMPS : constr list } (* ordered *)
+ o_TCOMPS : constr list } (** ordered *)
val cs_pattern_of_constr : constr -> cs_pattern * int * constr list
diff --git a/pretyping/reductionops.mli b/pretyping/reductionops.mli
index 0b9e69d95..84bd20135 100644
--- a/pretyping/reductionops.mli
+++ b/pretyping/reductionops.mli
@@ -1,28 +1,26 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Term
open Univ
open Evd
open Environ
open Closure
-(*i*)
-(* Reduction Functions. *)
+(** Reduction Functions. *)
exception Elimconst
-(************************************************************************)
-(*s A [stack] is a context of arguments, arguments are pushed by
+(***********************************************************************
+ s A [stack] is a context of arguments, arguments are pushed by
[append_stack] one array at a time but popped with [decomp_stack]
one by one *)
@@ -67,13 +65,13 @@ type contextual_state_reduction_function =
type state_reduction_function = contextual_state_reduction_function
type local_state_reduction_function = evar_map -> state -> state
-(* Removes cast and put into applicative form *)
+(** Removes cast and put into applicative form *)
val whd_stack : local_stack_reduction_function
-(* For compatibility: alias for whd\_stack *)
+(** For compatibility: alias for whd\_stack *)
val whd_castapp_stack : local_stack_reduction_function
-(*s Reduction Function Operators *)
+(** {6 Reduction Function Operators } *)
val strong : reduction_function -> reduction_function
val local_strong : local_reduction_function -> local_reduction_function
@@ -84,17 +82,19 @@ val stack_reduction_of_reduction :
i*)
val stacklam : (state -> 'a) -> constr list -> constr -> constr stack -> 'a
-(*s Generic Optimized Reduction Function using Closures *)
+(** {6 Generic Optimized Reduction Function using Closures } *)
val clos_norm_flags : Closure.RedFlags.reds -> reduction_function
-(* Same as [(strong whd_beta[delta][iota])], but much faster on big terms *)
+
+(** Same as [(strong whd_beta[delta][iota])], but much faster on big terms *)
val nf_beta : local_reduction_function
val nf_betaiota : local_reduction_function
val nf_betadeltaiota : reduction_function
val nf_evar : evar_map -> constr -> constr
val nf_betaiota_preserving_vm_cast : reduction_function
-(* Lazy strategy, weak head reduction *)
+
+(** Lazy strategy, weak head reduction *)
val whd_evar : evar_map -> constr -> constr
val whd_beta : local_reduction_function
val whd_betaiota : local_reduction_function
@@ -120,7 +120,7 @@ val whd_betadeltaiota_nolet_state : contextual_state_reduction_function
val whd_betaetalet_state : local_state_reduction_function
val whd_betalet_state : local_state_reduction_function
-(*s Head normal forms *)
+(** {6 Head normal forms } *)
val whd_delta_stack : stack_reduction_function
val whd_delta_state : state_reduction_function
@@ -138,7 +138,7 @@ val whd_betadeltaiotaeta : reduction_function
val whd_eta : constr -> constr
val whd_zeta : constr -> constr
-(* Various reduction functions *)
+(** Various reduction functions *)
val safe_evar_value : evar_map -> existential -> constr option
@@ -163,11 +163,11 @@ val decomp_sort : env -> evar_map -> types -> sorts
val is_sort : env -> evar_map -> types -> bool
type 'a miota_args = {
- mP : constr; (* the result type *)
- mconstr : constr; (* the constructor *)
- mci : case_info; (* special info to re-build pattern *)
- mcargs : 'a list; (* the constructor's arguments *)
- mlf : 'a array } (* the branch code vector *)
+ mP : constr; (** the result type *)
+ mconstr : constr; (** the constructor *)
+ mci : case_info; (** special info to re-build pattern *)
+ mcargs : 'a list; (** the constructor's arguments *)
+ mlf : 'a array } (** the branch code vector *)
val reducible_mind_case : constr -> bool
val reduce_mind_case : constr miota_args -> constr
@@ -177,7 +177,7 @@ val is_arity : env -> evar_map -> constr -> bool
val whd_programs : reduction_function
-(* [reduce_fix redfun fix stk] contracts [fix stk] if it is actually
+(** [reduce_fix redfun fix stk] contracts [fix stk] if it is actually
reducible; the structural argument is reduced by [redfun] *)
type fix_reduction_result = NotReducible | Reduced of state
@@ -186,10 +186,10 @@ val fix_recarg : fixpoint -> constr stack -> (int * constr) option
val reduce_fix : local_state_reduction_function -> evar_map -> fixpoint
-> constr stack -> fix_reduction_result
-(*s Querying the kernel conversion oracle: opaque/transparent constants *)
+(** {6 Querying the kernel conversion oracle: opaque/transparent constants } *)
val is_transparent : 'a tableKey -> bool
-(*s Conversion Functions (uses closures, lazy strategy) *)
+(** {6 Conversion Functions (uses closures, lazy strategy) } *)
type conversion_test = constraints -> constraints
@@ -206,18 +206,18 @@ val is_trans_conv : transparent_state -> env -> evar_map -> constr -> constr ->
val is_trans_conv_leq : transparent_state -> env -> evar_map -> constr -> constr -> bool
val is_trans_fconv : conv_pb -> transparent_state -> env -> evar_map -> constr -> constr -> bool
-(*s Special-Purpose Reduction Functions *)
+(** {6 Special-Purpose Reduction Functions } *)
val whd_meta : (metavariable * constr) list -> constr -> constr
val plain_instance : (metavariable * constr) list -> constr -> constr
val instance :evar_map -> (metavariable * constr) list -> constr -> constr
val head_unfold_under_prod : transparent_state -> reduction_function
-(*s Heuristic for Conversion with Evar *)
+(** {6 Heuristic for Conversion with Evar } *)
val whd_betaiota_deltazeta_for_iota_state : state_reduction_function
-(*s Meta-related reduction functions *)
+(** {6 Meta-related reduction functions } *)
val meta_instance : evar_map -> constr freelisted -> constr
val nf_meta : evar_map -> constr -> constr
val meta_reducible_instance : evar_map -> constr freelisted -> constr
diff --git a/pretyping/retyping.mli b/pretyping/retyping.mli
index 8576d5baa..3c68f850b 100644
--- a/pretyping/retyping.mli
+++ b/pretyping/retyping.mli
@@ -1,21 +1,19 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Term
open Evd
open Environ
-(*i*)
-(* This family of functions assumes its constr argument is known to be
+(** This family of functions assumes its constr argument is known to be
well-typable. It does not type-check, just recompute the type
without any costly verifications. On non well-typable terms, it
either produces a wrong result or raise an anomaly. Use with care.
@@ -25,10 +23,10 @@ val get_type_of : ?refresh:bool -> env -> evar_map -> constr -> types
val get_sort_of : env -> evar_map -> types -> sorts
val get_sort_family_of : env -> evar_map -> types -> sorts_family
-(* Makes an assumption from a constr *)
+(** Makes an assumption from a constr *)
val get_assumption_of : env -> evar_map -> constr -> types
-(* Makes an unsafe judgment from a constr *)
+(** Makes an unsafe judgment from a constr *)
val get_judgment_of : env -> evar_map -> constr -> unsafe_judgment
val type_of_global_reference_knowing_parameters : env -> evar_map -> constr ->
diff --git a/pretyping/tacred.mli b/pretyping/tacred.mli
index 2bba87a75..84cff15b6 100644
--- a/pretyping/tacred.mli
+++ b/pretyping/tacred.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Term
open Environ
@@ -18,16 +17,15 @@ open Closure
open Rawterm
open Termops
open Pattern
-(*i*)
type reduction_tactic_error =
InvalidAbstraction of env * constr * (env * Type_errors.type_error)
exception ReductionTacticError of reduction_tactic_error
-(*s Reduction functions associated to tactics. \label{tacred} *)
+(** {6 Reduction functions associated to tactics. {% \label{%}tacred{% }%} } *)
-(* Evaluable global reference *)
+(** Evaluable global reference *)
val is_evaluable : Environ.env -> evaluable_global_reference -> bool
@@ -41,51 +39,52 @@ val global_of_evaluable_reference :
exception Redelimination
-(* Red (raise user error if nothing reducible) *)
+(** Red (raise user error if nothing reducible) *)
val red_product : reduction_function
-(* Red (raise Redelimination if nothing reducible) *)
+(** Red (raise Redelimination if nothing reducible) *)
val try_red_product : reduction_function
-(* Simpl *)
+(** Simpl *)
val simpl : reduction_function
-(* Simpl only at the head *)
+(** Simpl only at the head *)
val whd_simpl : reduction_function
-(* Hnf: like whd_simpl but force delta-reduction of constants that do
+(** Hnf: like whd_simpl but force delta-reduction of constants that do
not immediately hide a non reducible fix or cofix *)
val hnf_constr : reduction_function
-(* Unfold *)
+(** Unfold *)
val unfoldn :
(occurrences * evaluable_global_reference) list -> reduction_function
-(* Fold *)
+(** Fold *)
val fold_commands : constr list -> reduction_function
-(* Pattern *)
+(** Pattern *)
val pattern_occs : (occurrences * constr) list -> reduction_function
-(* Rem: Lazy strategies are defined in Reduction *)
-(* Call by value strategy (uses Closures) *)
+(** Rem: Lazy strategies are defined in Reduction *)
+
+(** Call by value strategy (uses Closures) *)
val cbv_norm_flags : Closure.RedFlags.reds -> reduction_function
val cbv_beta : local_reduction_function
val cbv_betaiota : local_reduction_function
val cbv_betadeltaiota : reduction_function
- val compute : reduction_function (* = [cbv_betadeltaiota] *)
+ val compute : reduction_function (** = [cbv_betadeltaiota] *)
-(* [reduce_to_atomic_ind env sigma t] puts [t] in the form [t'=(I args)]
+(** [reduce_to_atomic_ind env sigma t] puts [t] in the form [t'=(I args)]
with [I] an inductive definition;
returns [I] and [t'] or fails with a user error *)
val reduce_to_atomic_ind : env -> evar_map -> types -> inductive * types
-(* [reduce_to_quantified_ind env sigma t] puts [t] in the form
+(** [reduce_to_quantified_ind env sigma t] puts [t] in the form
[t'=(x1:A1)..(xn:An)(I args)] with [I] an inductive definition;
returns [I] and [t'] or fails with a user error *)
val reduce_to_quantified_ind : env -> evar_map -> types -> inductive * types
-(* [reduce_to_quantified_ref env sigma ref t] try to put [t] in the form
+(** [reduce_to_quantified_ref env sigma ref t] try to put [t] in the form
[t'=(x1:A1)..(xn:An)(ref args)] and fails with user error if not possible *)
val reduce_to_quantified_ref :
env -> evar_map -> Libnames.global_reference -> types -> types
diff --git a/pretyping/term_dnet.mli b/pretyping/term_dnet.mli
index 0e7fdb82a..7623fcd68 100644
--- a/pretyping/term_dnet.mli
+++ b/pretyping/term_dnet.mli
@@ -1,21 +1,19 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
-(* $Id:$ *)
+(** {% $ %}Id:{% $ %} *)
-(*i*)
open Term
open Sign
open Libnames
open Mod_subst
-(*i*)
-(* Dnets on constr terms.
+(** Dnets on constr terms.
An instantiation of Dnet on (an approximation of) constr. It
associates a term (possibly with Evar) with an
@@ -33,25 +31,25 @@ open Mod_subst
See lib/dnet.mli for more details.
*)
-(* Identifiers to store (right hand side of the association) *)
+(** Identifiers to store (right hand side of the association) *)
module type IDENT = sig
type t
val compare : t -> t -> int
- (* how to substitute them for storage *)
+ (** how to substitute them for storage *)
val subst : substitution -> t -> t
- (* how to recover the term from the identifier *)
+ (** how to recover the term from the identifier *)
val constr_of : t -> constr
end
-(* Options : *)
+(** Options : *)
module type OPT = sig
- (* pre-treatment to terms before adding or searching *)
+ (** pre-treatment to terms before adding or searching *)
val reduce : constr -> constr
- (* direction of post-filtering w.r.t sort subtyping :
+ (** direction of post-filtering w.r.t sort subtyping :
- true means query <= terms in the structure
- false means terms <= query
*)
@@ -63,17 +61,17 @@ sig
type t
type ident
- (* results of filtering : identifier, a context (term with Evar
+ (** results of filtering : identifier, a context (term with Evar
hole) and the substitution in that context*)
type result = ident * (constr*existential_key) * Termops.subst
val empty : t
- (* [add c i dn] adds the binding [(c,i)] to [dn]. [c] can be a
+ (** [add c i dn] adds the binding [(c,i)] to [dn]. [c] can be a
closed term or a pattern (with untyped Evars). No Metas accepted *)
val add : constr -> ident -> t -> t
- (* merge of dnets. Faster than re-adding all terms *)
+ (** merge of dnets. Faster than re-adding all terms *)
val union : t -> t -> t
val subst : substitution -> t -> t
@@ -82,25 +80,25 @@ sig
* High-level primitives describing specific search problems
*)
- (* [search_pattern dn c] returns all terms/patterns in dn
+ (** [search_pattern dn c] returns all terms/patterns in dn
matching/matched by c *)
val search_pattern : t -> constr -> result list
- (* [search_concl dn c] returns all matches under products and
+ (** [search_concl dn c] returns all matches under products and
letins, i.e. it finds subterms whose conclusion matches c. The
complexity depends only on c ! *)
val search_concl : t -> constr -> result list
- (* [search_head_concl dn c] matches under products and applications
+ (** [search_head_concl dn c] matches under products and applications
heads. Finds terms of the form [forall H_1...H_n, C t_1...t_n]
where C matches c *)
val search_head_concl : t -> constr -> result list
- (* [search_eq_concl dn eq c] searches terms of the form [forall
+ (** [search_eq_concl dn eq c] searches terms of the form [forall
H1...Hn, eq _ X1 X2] where either X1 or X2 matches c *)
val search_eq_concl : t -> constr -> constr -> result list
- (* [find_all dn] returns all idents contained in dn *)
+ (** [find_all dn] returns all idents contained in dn *)
val find_all : t -> ident list
val map : (ident -> ident) -> t -> t
diff --git a/pretyping/termops.mli b/pretyping/termops.mli
index 59f7750d3..57b5bd581 100644
--- a/pretyping/termops.mli
+++ b/pretyping/termops.mli
@@ -1,10 +1,10 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
@@ -15,7 +15,7 @@ open Term
open Sign
open Environ
-(* Universes *)
+(** Universes *)
val new_univ : unit -> Univ.universe
val new_sort_in_family : sorts_family -> sorts
val new_Type : unit -> types
@@ -23,10 +23,11 @@ val new_Type_sort : unit -> sorts
val refresh_universes : types -> types
val refresh_universes_strict : types -> types
-(* printers *)
+(** printers *)
val print_sort : sorts -> std_ppcmds
val pr_sort_family : sorts_family -> std_ppcmds
-(* debug printer: do not use to display terms to the casual user... *)
+
+(** debug printer: do not use to display terms to the casual user... *)
val set_print_constr : (env -> constr -> std_ppcmds) -> unit
val print_constr : constr -> std_ppcmds
val print_constr_env : env -> constr -> std_ppcmds
@@ -35,19 +36,19 @@ val pr_rel_decl : env -> rel_declaration -> std_ppcmds
val print_rel_context : env -> std_ppcmds
val print_env : env -> std_ppcmds
-(* about contexts *)
+(** about contexts *)
val push_rel_assum : name * types -> env -> env
val push_rels_assum : (name * types) list -> env -> env
val push_named_rec_types : name array * types array * 'a -> env -> env
val lookup_rel_id : identifier -> rel_context -> int * constr option * types
-(* builds argument lists matching a block of binders or a context *)
+(** builds argument lists matching a block of binders or a context *)
val rel_vect : int -> int -> constr array
val rel_list : int -> int -> constr list
val extended_rel_list : int -> rel_context -> constr list
val extended_rel_vect : int -> rel_context -> constr array
-(* iterators/destructors on terms *)
+(** iterators/destructors on terms *)
val mkProd_or_LetIn : rel_declaration -> types -> types
val mkProd_wo_LetIn : rel_declaration -> types -> types
val it_mkProd : init:types -> (name * types) list -> types
@@ -62,8 +63,8 @@ val it_mkNamedLambda_or_LetIn : init:constr -> named_context -> constr
val it_named_context_quantifier :
(named_declaration -> 'a -> 'a) -> init:'a -> named_context -> 'a
-(**********************************************************************)
-(* Generic iterators on constr *)
+(*********************************************************************
+ Generic iterators on constr *)
val map_constr_with_named_binders :
(name -> 'a -> 'a) ->
@@ -76,7 +77,7 @@ val map_constr_with_full_binders :
(rel_declaration -> 'a -> 'a) ->
('a -> constr -> constr) -> 'a -> constr -> constr
-(* [fold_constr_with_binders g f n acc c] folds [f n] on the immediate
+(** [fold_constr_with_binders g f n acc c] folds [f n] on the immediate
subterms of [c] starting from [acc] and proceeding from left to
right according to the usual representation of the constructions as
[fold_constr] but it carries an extra data [n] (typically a lift
@@ -94,7 +95,7 @@ val iter_constr_with_full_binders :
val strip_head_cast : constr -> constr
-(* occur checks *)
+(** occur checks *)
exception Occur
val occur_meta : types -> bool
val occur_existential : types -> bool
@@ -109,56 +110,57 @@ val free_rels : constr -> Intset.t
val dependent : constr -> constr -> bool
val dependent_no_evar : constr -> constr -> bool
val collect_metas : constr -> int list
-val occur_term : constr -> constr -> bool (* Synonymous
- of dependent *)
-(* Substitution of metavariables *)
+val occur_term : constr -> constr -> bool (** Synonymous
+ of dependent
+ Substitution of metavariables *)
type meta_value_map = (metavariable * constr) list
val subst_meta : meta_value_map -> constr -> constr
-(* Type assignment for metavariables *)
+(** Type assignment for metavariables *)
type meta_type_map = (metavariable * types) list
-(* [pop c] lifts by -1 the positive indexes in [c] *)
+(** [pop c] lifts by -1 the positive indexes in [c] *)
val pop : constr -> constr
-(*s Substitution of an arbitrary large term. Uses equality modulo
+(** {6 Sect } *)
+(** Substitution of an arbitrary large term. Uses equality modulo
reduction of let *)
-(* [subst_term_gen eq d c] replaces [Rel 1] by [d] in [c] using [eq]
+(** [subst_term_gen eq d c] replaces [Rel 1] by [d] in [c] using [eq]
as equality *)
val subst_term_gen :
(constr -> constr -> bool) -> constr -> constr -> constr
-(* [replace_term_gen eq d e c] replaces [d] by [e] in [c] using [eq]
+(** [replace_term_gen eq d e c] replaces [d] by [e] in [c] using [eq]
as equality *)
val replace_term_gen :
(constr -> constr -> bool) ->
constr -> constr -> constr -> constr
-(* [subst_term d c] replaces [Rel 1] by [d] in [c] *)
+(** [subst_term d c] replaces [Rel 1] by [d] in [c] *)
val subst_term : constr -> constr -> constr
-(* [replace_term d e c] replaces [d] by [e] in [c] *)
+(** [replace_term d e c] replaces [d] by [e] in [c] *)
val replace_term : constr -> constr -> constr -> constr
-(* In occurrences sets, false = everywhere except and true = nowhere except *)
+(** In occurrences sets, false = everywhere except and true = nowhere except *)
type occurrences = bool * int list
val all_occurrences : occurrences
val no_occurrences_in_set : occurrences
-(* [subst_term_occ_gen occl n c d] replaces occurrences of [c] at
+(** [subst_term_occ_gen occl n c d] replaces occurrences of [c] at
positions [occl], counting from [n], by [Rel 1] in [d] *)
val subst_term_occ_gen :
occurrences -> int -> constr -> types -> int * types
-(* [subst_term_occ occl c d] replaces occurrences of [c] at
+(** [subst_term_occ occl c d] replaces occurrences of [c] at
positions [occl] by [Rel 1] in [d] (see also Note OCC) *)
val subst_term_occ : occurrences -> constr -> constr -> constr
-(* [subst_term_occ_decl occl c decl] replaces occurrences of [c] at
+(** [subst_term_occ_decl occl c decl] replaces occurrences of [c] at
positions [occl] by [Rel 1] in [decl] *)
-type hyp_location_flag = (* To distinguish body and type of local defs *)
+type hyp_location_flag = (** To distinguish body and type of local defs *)
| InHyp
| InHypTypeOnly
| InHypValueOnly
@@ -169,7 +171,7 @@ val subst_term_occ_decl :
val error_invalid_occurrence : int list -> 'a
-(* Alternative term equalities *)
+(** Alternative term equalities *)
val base_sort_cmp : Reduction.conv_pb -> sorts -> sorts -> bool
val compare_constr_univ : (Reduction.conv_pb -> constr -> constr -> bool) ->
Reduction.conv_pb -> constr -> constr -> bool
@@ -181,7 +183,7 @@ val eta_eq_constr : constr -> constr -> bool
exception CannotFilter
-(* Lightweight first-order filtering procedure. Unification
+(** Lightweight first-order filtering procedure. Unification
variables ar represented by (untyped) Evars.
[filtering c1 c2] returns the substitution n'th evar ->
(context,term), or raises [CannotFilter].
@@ -193,10 +195,10 @@ val filtering : rel_context -> Reduction.conv_pb -> constr -> constr -> subst
val decompose_prod_letin : constr -> int * rel_context * constr
val align_prod_letin : constr -> constr -> rel_context * constr
-(* Get the last arg of a constr intended to be an application *)
+(** Get the last arg of a constr intended to be an application *)
val last_arg : constr -> constr
-(* name contexts *)
+(** name contexts *)
type names_context = name list
val add_name : name -> names_context -> names_context
val lookup_name_of_rel : int -> names_context -> name
@@ -209,16 +211,16 @@ val names_of_rel_context : env -> names_context
val context_chop : int -> rel_context -> (rel_context*rel_context)
-(* Set of local names *)
+(** Set of local names *)
val vars_of_env: env -> Idset.t
val add_vname : Idset.t -> name -> Idset.t
-(* other signature iterators *)
+(** other signature iterators *)
val process_rel_context : (rel_declaration -> env -> env) -> env -> env
val assums_of_rel_context : rel_context -> (name * constr) list
val lift_rel_context : int -> rel_context -> rel_context
val substl_rel_context : constr list -> rel_context -> rel_context
-val smash_rel_context : rel_context -> rel_context (* expand lets in context *)
+val smash_rel_context : rel_context -> rel_context (** expand lets in context *)
val adjust_subst_to_rel_context : rel_context -> constr list -> constr list
val map_rel_context_in_env :
(env -> constr -> constr) -> env -> rel_context -> rel_context
@@ -232,18 +234,18 @@ val mem_named_context : identifier -> named_context -> bool
val global_vars : env -> constr -> identifier list
val global_vars_set_of_decl : env -> named_declaration -> Idset.t
-(* Gives an ordered list of hypotheses, closed by dependencies,
+(** Gives an ordered list of hypotheses, closed by dependencies,
containing a given set *)
val dependency_closure : env -> named_context -> Idset.t -> identifier list
-(* Test if an identifier is the basename of a global reference *)
+(** Test if an identifier is the basename of a global reference *)
val is_section_variable : identifier -> bool
val isGlobalRef : constr -> bool
val has_polymorphic_type : constant -> bool
-(* Combinators on judgments *)
+(** Combinators on judgments *)
val on_judgment : (types -> types) -> unsafe_judgment -> unsafe_judgment
val on_judgment_value : (types -> types) -> unsafe_judgment -> unsafe_judgment
diff --git a/pretyping/typeclasses.mli b/pretyping/typeclasses.mli
index e53be5c0b..c816f2e9c 100644
--- a/pretyping/typeclasses.mli
+++ b/pretyping/typeclasses.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Libnames
open Decl_kinds
@@ -20,23 +19,22 @@ open Nametab
open Mod_subst
open Topconstr
open Util
-(*i*)
-(* This module defines type-classes *)
+(** This module defines type-classes *)
type typeclass = {
- (* The class implementation: a record parameterized by the context with defs in it or a definition if
+ (** The class implementation: a record parameterized by the context with defs in it or a definition if
the class is a singleton. This acts as the class' global identifier. *)
cl_impl : global_reference;
- (* Context in which the definitions are typed. Includes both typeclass parameters and superclasses.
+ (** Context in which the definitions are typed. Includes both typeclass parameters and superclasses.
The boolean indicates if the typeclass argument is a direct superclass and the global reference
gives a direct link to the class itself. *)
cl_context : (global_reference * bool) option list * rel_context;
- (* Context of definitions and properties on defs, will not be shared *)
+ (** Context of definitions and properties on defs, will not be shared *)
cl_props : rel_context;
- (* The methods implementations of the typeclass as projections. Some may be undefinable due to
+ (** The methods implementations of the typeclass as projections. Some may be undefinable due to
sorting restrictions. *)
cl_projs : (identifier * constant option) list;
}
@@ -56,13 +54,13 @@ val add_inductive_class : inductive -> unit
val new_instance : typeclass -> int option -> bool -> global_reference -> instance
val add_instance : instance -> unit
-val class_info : global_reference -> typeclass (* raises a UserError if not a class *)
+val class_info : global_reference -> typeclass (** raises a UserError if not a class *)
-(* These raise a UserError if not a class. *)
+(** These raise a UserError if not a class. *)
val dest_class_app : env -> constr -> typeclass * constr list
-(* Just return None if not a class *)
+(** Just return None if not a class *)
val class_of_constr : constr -> typeclass option
val instance_impl : instance -> global_reference
@@ -72,7 +70,7 @@ val is_instance : global_reference -> bool
val is_implicit_arg : hole_kind -> bool
-(* Returns the term and type for the given instance of the parameters and fields
+(** Returns the term and type for the given instance of the parameters and fields
of the type class. *)
val instance_constructor : typeclass -> constr list -> constr * types
diff --git a/pretyping/typeclasses_errors.mli b/pretyping/typeclasses_errors.mli
index 7fd04e225..24a19a0e3 100644
--- a/pretyping/typeclasses_errors.mli
+++ b/pretyping/typeclasses_errors.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Decl_kinds
open Term
@@ -20,16 +19,15 @@ open Mod_subst
open Topconstr
open Util
open Libnames
-(*i*)
type contexts = Parameters | Properties
type typeclass_error =
| NotAClass of constr
- | UnboundMethod of global_reference * identifier located (* Class name, method *)
+ | UnboundMethod of global_reference * identifier located (** Class name, method *)
| NoInstance of identifier located * constr list
| UnsatisfiableConstraints of evar_map * (existential_key * hole_kind) option
- | MismatchedContextInstance of contexts * constr_expr list * rel_context (* found, expected *)
+ | MismatchedContextInstance of contexts * constr_expr list * rel_context (** found, expected *)
exception TypeClassError of env * typeclass_error
diff --git a/pretyping/typing.mli b/pretyping/typing.mli
index e3b3e9482..c20fd9453 100644
--- a/pretyping/typing.mli
+++ b/pretyping/typing.mli
@@ -1,31 +1,31 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Term
open Environ
open Evd
-(*i*)
-(* This module provides the typing machine with existential variables
+(** This module provides the typing machine with existential variables
(but without universes). *)
-(* Typecheck a term and return its type *)
+(** Typecheck a term and return its type *)
val type_of : env -> evar_map -> constr -> types
-(* Typecheck a type and return its sort *)
+
+(** Typecheck a type and return its sort *)
val sort_of : env -> evar_map -> types -> sorts
-(* Typecheck a term has a given type (assuming the type is OK) *)
+
+(** Typecheck a term has a given type (assuming the type is OK) *)
val check : env -> evar_map -> constr -> types -> unit
-(* Returns the instantiated type of a metavariable *)
+(** Returns the instantiated type of a metavariable *)
val meta_type : evar_map -> metavariable -> types
-(* Solve existential variables using typing *)
+(** Solve existential variables using typing *)
val solve_evars : env -> evar_map -> constr -> constr
diff --git a/pretyping/unification.mli b/pretyping/unification.mli
index cc62a9bb8..13042180a 100644
--- a/pretyping/unification.mli
+++ b/pretyping/unification.mli
@@ -1,18 +1,16 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Term
open Environ
open Evd
-(*i*)
type unify_flags = {
modulo_conv_on_closed_terms : Names.transparent_state option;
@@ -25,11 +23,11 @@ type unify_flags = {
val default_unify_flags : unify_flags
val default_no_delta_unify_flags : unify_flags
-(* The "unique" unification fonction *)
+(** The "unique" unification fonction *)
val w_unify :
bool -> env -> conv_pb -> ?flags:unify_flags -> constr -> constr -> evar_map -> evar_map
-(* [w_unify_to_subterm env (c,t) m] performs unification of [c] with a
+(** [w_unify_to_subterm env (c,t) m] performs unification of [c] with a
subterm of [t]. Constraints are added to [m] and the matched
subterm of [t] is also returned. *)
val w_unify_to_subterm :
@@ -40,15 +38,15 @@ val w_unify_to_subterm_all :
val w_unify_meta_types : env -> ?flags:unify_flags -> evar_map -> evar_map
-(* [w_coerce_to_type env evd c ctyp typ] tries to coerce [c] of type
+(** [w_coerce_to_type env evd c ctyp typ] tries to coerce [c] of type
[ctyp] so that its gets type [typ]; [typ] may contain metavariables *)
val w_coerce_to_type : env -> evar_map -> constr -> types -> types ->
evar_map * constr
(*i This should be in another module i*)
-(* [abstract_list_all env evd t c l] *)
-(* abstracts the terms in l over c to get a term of type t *)
-(* (exported for inv.ml) *)
+(** [abstract_list_all env evd t c l]
+ abstracts the terms in l over c to get a term of type t
+ (exported for inv.ml) *)
val abstract_list_all :
env -> evar_map -> constr -> constr -> constr list -> constr
diff --git a/pretyping/vnorm.mli b/pretyping/vnorm.mli
index 2ea94bfb0..da9e7cf1e 100644
--- a/pretyping/vnorm.mli
+++ b/pretyping/vnorm.mli
@@ -1,18 +1,16 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
-(*i*)
open Names
open Term
open Environ
open Reduction
-(*i*)
-(*s Reduction functions *)
+(** {6 Reduction functions } *)
val cbv_vm : env -> constr -> types -> constr
diff --git a/proofs/clenv.mli b/proofs/clenv.mli
index 2533fc537..a97b85ed9 100644
--- a/proofs/clenv.mli
+++ b/proofs/clenv.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Util
open Names
open Term
@@ -19,35 +18,32 @@ open Evarutil
open Mod_subst
open Rawterm
open Unification
-(*i*)
-(***************************************************************)
-(* The Type of Constructions clausale environments. *)
+(** {6 The Type of Constructions clausale environments.} *)
-(* [env] is the typing context
- * [evd] is the mapping from metavar and evar numbers to their types
- * and values.
- * [templval] is the template which we are trying to fill out.
- * [templtyp] is its type.
- *)
type clausenv = {
- env : env;
- evd : evar_map;
- templval : constr freelisted;
- templtyp : constr freelisted }
-
-(* Substitution is not applied on templenv (because [subst_clenv] is
+ env : env; (** the typing context *)
+ evd : evar_map; (** the mapping from metavar and evar numbers to their
+ types and values *)
+ templval : constr freelisted; (** the template which we are trying to fill
+ out *)
+ templtyp : constr freelisted (** its type *)}
+
+(** Substitution is not applied on templenv (because [subst_clenv] is
applied only on hints which typing env is overwritten by the
goal env) *)
val subst_clenv : substitution -> clausenv -> clausenv
-(* subject of clenv (instantiated) *)
+(** subject of clenv (instantiated) *)
val clenv_value : clausenv -> constr
-(* type of clenv (instantiated) *)
+
+(** type of clenv (instantiated) *)
val clenv_type : clausenv -> types
-(* substitute resolved metas *)
+
+(** substitute resolved metas *)
val clenv_nf_meta : clausenv -> constr -> constr
-(* type of a meta in clenv context *)
+
+(** type of a meta in clenv context *)
val clenv_meta_type : clausenv -> metavariable -> types
val mk_clenv_from : Goal.goal sigma -> constr * types -> clausenv
@@ -56,25 +52,23 @@ val mk_clenv_from_n :
val mk_clenv_type_of : Goal.goal sigma -> constr -> clausenv
val mk_clenv_from_env : env -> evar_map -> int option -> constr * types -> clausenv
-(***************************************************************)
-(* linking of clenvs *)
+(** {6 linking of clenvs } *)
val connect_clenv : Goal.goal sigma -> clausenv -> clausenv
val clenv_fchain :
?allow_K:bool -> ?flags:unify_flags -> metavariable -> clausenv -> clausenv -> clausenv
-(***************************************************************)
-(* Unification with clenvs *)
+(** {6 Unification with clenvs } *)
-(* Unifies two terms in a clenv. The boolean is [allow_K] (see [Unification]) *)
+(** Unifies two terms in a clenv. The boolean is [allow_K] (see [Unification]) *)
val clenv_unify :
bool -> ?flags:unify_flags -> conv_pb -> constr -> constr -> clausenv -> clausenv
-(* unifies the concl of the goal with the type of the clenv *)
+(** unifies the concl of the goal with the type of the clenv *)
val clenv_unique_resolver :
bool -> ?flags:unify_flags -> clausenv -> Goal.goal sigma -> clausenv
-(* same as above ([allow_K=false]) but replaces remaining metas
+(** same as above ([allow_K=false]) but replaces remaining metas
with fresh evars if [evars_flag] is [true] *)
val evar_clenv_unique_resolver :
bool -> ?flags:unify_flags -> clausenv -> Goal.goal sigma -> clausenv
@@ -83,12 +77,11 @@ val clenv_dependent : bool -> clausenv -> metavariable list
val clenv_pose_metas_as_evars : clausenv -> metavariable list -> clausenv
-(***************************************************************)
-(* Bindings *)
+(** {6 Bindings } *)
type arg_bindings = constr explicit_bindings
-(* bindings where the key is the position in the template of the
+(** bindings where the key is the position in the template of the
clenv (dependent or not). Positions can be negative meaning to
start from the rightmost argument of the template. *)
val clenv_independent : clausenv -> metavariable list
@@ -96,23 +89,23 @@ val clenv_missing : clausenv -> metavariable list
val clenv_constrain_last_binding : constr -> clausenv -> clausenv
-(* defines metas corresponding to the name of the bindings *)
+(** defines metas corresponding to the name of the bindings *)
val clenv_match_args : arg_bindings -> clausenv -> clausenv
val clenv_unify_meta_types : ?flags:unify_flags -> clausenv -> clausenv
-(* start with a clenv to refine with a given term with bindings *)
+(** start with a clenv to refine with a given term with bindings *)
-(* the arity of the lemma is fixed *)
-(* the optional int tells how many prods of the lemma have to be used *)
-(* use all of them if None *)
+(** the arity of the lemma is fixed
+ the optional int tells how many prods of the lemma have to be used
+ use all of them if None *)
val make_clenv_binding_apply :
Goal.goal sigma -> int option -> constr * constr -> constr bindings ->
clausenv
val make_clenv_binding :
Goal.goal sigma -> constr * constr -> constr bindings -> clausenv
-(* [clenv_environments sigma n t] returns [sigma',lmeta,ccl] where
+(** [clenv_environments sigma n t] returns [sigma',lmeta,ccl] where
[lmetas] is a list of metas to be applied to a proof of [t] so that
it produces the unification pattern [ccl]; [sigma'] is [sigma]
extended with [lmetas]; if [n] is defined, it limits the size of
@@ -124,20 +117,19 @@ val make_clenv_binding :
val clenv_environments :
evar_map -> int option -> types -> evar_map * constr list * types
-(* [clenv_environments_evars env sigma n t] does the same but returns
+(** [clenv_environments_evars env sigma n t] does the same but returns
a list of Evar's defined in [env] and extends [sigma] accordingly *)
val clenv_environments_evars :
env -> evar_map -> int option -> types -> evar_map * constr list * types
-(* [clenv_conv_leq env sigma t c n] looks for c1...cn s.t. [t <= c c1...cn] *)
+(** [clenv_conv_leq env sigma t c n] looks for c1...cn s.t. [t <= c c1...cn] *)
val clenv_conv_leq :
env -> evar_map -> types -> constr -> int -> constr list
-(* if the clause is a product, add an extra meta for this product *)
+(** if the clause is a product, add an extra meta for this product *)
exception NotExtensibleClause
val clenv_push_prod : clausenv -> clausenv
-(***************************************************************)
-(* Pretty-print *)
+(** {6 Pretty-print } *)
val pr_clenv : clausenv -> Pp.std_ppcmds
diff --git a/proofs/clenvtac.mli b/proofs/clenvtac.mli
index 96fb262a1..02bf86641 100644
--- a/proofs/clenvtac.mli
+++ b/proofs/clenvtac.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Util
open Names
open Term
@@ -18,9 +17,8 @@ open Clenv
open Proof_type
open Tacexpr
open Unification
-(*i*)
-(* Tactics *)
+(** Tactics *)
val unify : ?flags:unify_flags -> constr -> tactic
val clenv_refine : evars_flag -> ?with_classes:bool -> clausenv -> tactic
val res_pf : clausenv -> ?with_evars:evars_flag -> ?allow_K:bool -> ?flags:unify_flags -> tactic
@@ -29,5 +27,5 @@ val elim_res_pf_THEN_i : clausenv -> (clausenv -> tactic array) -> tactic
val clenv_pose_dependent_evars : evars_flag -> clausenv -> clausenv
val clenv_value_cast_meta : clausenv -> constr
-(* Compatibility, use res_pf ?with_evars:true instead *)
+(** Compatibility, use res_pf ?with_evars:true instead *)
val e_res_pf : clausenv -> tactic
diff --git a/proofs/evar_refiner.mli b/proofs/evar_refiner.mli
index 28c79d11e..ff986f3e6 100644
--- a/proofs/evar_refiner.mli
+++ b/proofs/evar_refiner.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Term
open Environ
@@ -16,9 +15,8 @@ open Evd
open Refiner
open Pretyping
open Rawterm
-(*i*)
-(* Refinement of existential variables. *)
+(** Refinement of existential variables. *)
val w_refine : evar * evar_info ->
(var_map * unbound_ltac_var_map) * rawconstr -> evar_map -> evar_map
@@ -26,4 +24,4 @@ val w_refine : evar * evar_info ->
val instantiate_pf_com :
Evd.evar -> Topconstr.constr_expr -> Evd.evar_map -> Evd.evar_map
-(* the instantiate tactic was moved to [tactics/evar_tactics.ml] *)
+(** the instantiate tactic was moved to [tactics/evar_tactics.ml] *)
diff --git a/proofs/logic.mli b/proofs/logic.mli
index 560e57736..eec3de730 100644
--- a/proofs/logic.mli
+++ b/proofs/logic.mli
@@ -1,28 +1,26 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Term
open Sign
open Evd
open Environ
open Proof_type
-(*i*)
-(* This suppresses check done in [prim_refiner] for the tactic given in
+(** This suppresses check done in [prim_refiner] for the tactic given in
argument; works by side-effect *)
val with_check : tactic -> tactic
-(* [without_check] respectively means:\\
+(** [without_check] respectively means:\\
[Intro]: no check that the name does not exist\\
[Intro_after]: no check that the name does not exist and that variables in
its type does not escape their scope\\
@@ -32,7 +30,7 @@ val with_check : tactic -> tactic
no check that the name exist and that its type is convertible\\
*)
-(* The primitive refiner. *)
+(** The primitive refiner. *)
val prim_refiner : prim_rule -> evar_map -> goal -> goal list * evar_map
@@ -41,7 +39,7 @@ type proof_variable
val proof_variable_index : identifier -> proof_variable list -> int
-(*s Refiner errors. *)
+(** {6 Refiner errors. } *)
type refiner_error =
diff --git a/proofs/pfedit.mli b/proofs/pfedit.mli
index 9e24061d3..47b741f5d 100644
--- a/proofs/pfedit.mli
+++ b/proofs/pfedit.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Util
open Pp
open Names
@@ -18,60 +17,62 @@ open Environ
open Decl_kinds
open Tacmach
open Tacexpr
-(*i*)
-
-(*s Several proofs can be opened simultaneously but at most one is
+(** Several proofs can be opened simultaneously but at most one is
focused at some time. The following functions work by side-effect
on current set of open proofs. In this module, ``proofs'' means an
open proof (something started by vernacular command [Goal], [Lemma]
or [Theorem]), and ``goal'' means a subgoal of the current focused
proof *)
-(*s [refining ()] tells if there is some proof in progress, even if a not
+(** {6 Sect } *)
+(** [refining ()] tells if there is some proof in progress, even if a not
focused one *)
val refining : unit -> bool
-(* [check_no_pending_proofs ()] fails if there is still some proof in
+(** [check_no_pending_proofs ()] fails if there is still some proof in
progress *)
val check_no_pending_proofs : unit -> unit
-(*s [delete_proof name] deletes proof of name [name] or fails if no proof
+(** {6 Sect } *)
+(** [delete_proof name] deletes proof of name [name] or fails if no proof
has this name *)
val delete_proof : identifier located -> unit
-(* [delete_current_proof ()] deletes current focused proof or fails if
+(** [delete_current_proof ()] deletes current focused proof or fails if
no proof is focused *)
val delete_current_proof : unit -> unit
-(* [delete_all_proofs ()] deletes all open proofs if any *)
+(** [delete_all_proofs ()] deletes all open proofs if any *)
val delete_all_proofs : unit -> unit
-(*s [undo n] undoes the effect of the last [n] tactics applied to the
+(** {6 Sect } *)
+(** [undo n] undoes the effect of the last [n] tactics applied to the
current proof; it fails if no proof is focused or if the ``undo''
stack is exhausted *)
val undo : int -> unit
-(* [undo_todepth n] resets the proof to its nth step (does [undo (d-n)] where d
+(** [undo_todepth n] resets the proof to its nth step (does [undo (d-n)] where d
is the depth of the undo stack). *)
val undo_todepth : int -> unit
-(* Returns the depth of the current focused proof stack, this is used
+(** Returns the depth of the current focused proof stack, this is used
to put informations in coq prompt (in emacs mode). *)
val current_proof_depth: unit -> int
-(* [set_undo (Some n)] used to set the size of the ``undo'' stack.
+(** [set_undo (Some n)] used to set the size of the ``undo'' stack.
These function now do nothing and will disapear. *)
val set_undo : int option -> unit
val get_undo : unit -> int option
-(*s [start_proof s str env t hook tac] starts a proof of name [s] and
+(** {6 Sect } *)
+(** [start_proof s str env t hook tac] starts a proof of name [s] and
conclusion [t]; [hook] is optionally a function to be applied at
proof end (e.g. to declare the built constructions as a coercion
or a setoid morphism); init_tac is possibly a tactic to
@@ -85,27 +86,29 @@ val start_proof :
?init_tac:tactic -> ?compute_guard:lemma_possible_guards ->
declaration_hook -> unit
-(* [restart_proof ()] restarts the current focused proof from the beginning
+(** [restart_proof ()] restarts the current focused proof from the beginning
or fails if no proof is focused *)
val restart_proof : unit -> unit
-(*s [resume_last_proof ()] focus on the last unfocused proof or fails
+(** {6 Sect } *)
+(** [resume_last_proof ()] focus on the last unfocused proof or fails
if there is no suspended proofs *)
val resume_last_proof : unit -> unit
-(* [resume_proof name] focuses on the proof of name [name] or
+(** [resume_proof name] focuses on the proof of name [name] or
raises [UserError] if no proof has name [name] *)
val resume_proof : identifier located -> unit
-(* [suspend_proof ()] unfocuses the current focused proof or
+(** [suspend_proof ()] unfocuses the current focused proof or
failed with [UserError] if no proof is currently focused *)
val suspend_proof : unit -> unit
-(*s [cook_proof opacity] turns the current proof (assumed completed) into
+(** {6 Sect } *)
+(** [cook_proof opacity] turns the current proof (assumed completed) into
a constant with its name, kind and possible hook (see [start_proof]);
it fails if there is no current proof of if it is not completed;
it also tells if the guardness condition has to be inferred. *)
@@ -115,63 +118,67 @@ val cook_proof : (Proof.proof -> unit) ->
(Entries.definition_entry * lemma_possible_guards * goal_kind *
declaration_hook)
-(* To export completed proofs to xml *)
+(** To export completed proofs to xml *)
val set_xml_cook_proof : (goal_kind * Proof.proof -> unit) -> unit
-(*s [get_Proof.proof ()] returns the current focused pending proof or
+(** {6 Sect } *)
+(** [get_Proof.proof ()] returns the current focused pending proof or
raises [UserError "no focused proof"] *)
val get_pftreestate : unit -> Proof.proof
-(* [get_goal_context n] returns the context of the [n]th subgoal of
+(** [get_goal_context n] returns the context of the [n]th subgoal of
the current focused proof or raises a [UserError] if there is no
focused proof or if there is no more subgoals *)
val get_goal_context : int -> Evd.evar_map * env
-(* [get_current_goal_context ()] works as [get_goal_context 1] *)
+(** [get_current_goal_context ()] works as [get_goal_context 1] *)
val get_current_goal_context : unit -> Evd.evar_map * env
-(* [current_proof_statement] *)
+(** [current_proof_statement] *)
val current_proof_statement :
unit -> identifier * goal_kind * types * declaration_hook
-(*s [get_current_proof_name ()] return the name of the current focused
+(** {6 Sect } *)
+(** [get_current_proof_name ()] return the name of the current focused
proof or failed if no proof is focused *)
val get_current_proof_name : unit -> identifier
-(* [get_all_proof_names ()] returns the list of all pending proof names *)
+(** [get_all_proof_names ()] returns the list of all pending proof names *)
val get_all_proof_names : unit -> identifier list
-(*s [set_end_tac tac] applies tactic [tac] to all subgoal generate
+(** {6 Sect } *)
+(** [set_end_tac tac] applies tactic [tac] to all subgoal generate
by [solve_nth] *)
val set_end_tac : tactic -> unit
-(*s [solve_nth n tac] applies tactic [tac] to the [n]th subgoal of the
+(** {6 Sect } *)
+(** [solve_nth n tac] applies tactic [tac] to the [n]th subgoal of the
current focused proof or raises a UserError if no proof is focused or
if there is no [n]th subgoal *)
val solve_nth : ?with_end_tac:bool -> int -> tactic -> unit
-(* [by tac] applies tactic [tac] to the 1st subgoal of the current
+(** [by tac] applies tactic [tac] to the 1st subgoal of the current
focused proof or raises a UserError if there is no focused proof or
if there is no more subgoals *)
val by : tactic -> unit
-(* [instantiate_nth_evar_com n c] instantiate the [n]th undefined
+(** [instantiate_nth_evar_com n c] instantiate the [n]th undefined
existential variable of the current focused proof by [c] or raises a
UserError if no proof is focused or if there is no such [n]th
existential variable *)
val instantiate_nth_evar_com : int -> Topconstr.constr_expr -> unit
-(* [build_by_tactic typ tac] returns a term of type [typ] by calling [tac] *)
+(** [build_by_tactic typ tac] returns a term of type [typ] by calling [tac] *)
val build_constant_by_tactic : named_context_val -> types -> tactic ->
Entries.definition_entry
diff --git a/proofs/proof_type.mli b/proofs/proof_type.mli
index 9692f19bc..7d8875302 100644
--- a/proofs/proof_type.mli
+++ b/proofs/proof_type.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Environ
open Evd
open Names
@@ -20,9 +19,8 @@ open Rawterm
open Genarg
open Nametab
open Pattern
-(*i*)
-(* This module defines the structure of proof tree and the tactic type. So, it
+(** This module defines the structure of proof tree and the tactic type. So, it
is used by [Proof_tree] and [Refiner] *)
type goal = Goal.goal
@@ -44,35 +42,33 @@ type prim_rule =
| Rename of identifier * identifier
| Change_evars
-(* The type [goal sigma] is the type of subgoal. It has the following form
-\begin{verbatim}
- it = { evar_concl = [the conclusion of the subgoal]
+(** The type [goal sigma] is the type of subgoal. It has the following form
+{v it = \{ evar_concl = [the conclusion of the subgoal]
evar_hyps = [the hypotheses of the subgoal]
evar_body = Evar_Empty;
- evar_info = { pgm : [The Realizer pgm if any]
- lc : [Set of evar num occurring in subgoal] }}
- sigma = { stamp = [an int chardacterizing the ed field, for quick compare]
+ evar_info = \{ pgm : [The Realizer pgm if any]
+ lc : [Set of evar num occurring in subgoal] \}\}
+ sigma = \{ stamp = [an int chardacterizing the ed field, for quick compare]
ed : [A set of existential variables depending in the subgoal]
number of first evar,
- it = { evar_concl = [the type of first evar]
+ it = \{ evar_concl = [the type of first evar]
evar_hyps = [the context of the evar]
evar_body = [the body of the Evar if any]
- evar_info = { pgm : [Useless ??]
+ evar_info = \{ pgm : [Useless ??]
lc : [Set of evars occurring
- in the type of evar] } };
+ in the type of evar] \} \};
...
number of last evar,
- it = { evar_concl = [the type of evar]
+ it = \{ evar_concl = [the type of evar]
evar_hyps = [the context of the evar]
evar_body = [the body of the Evar if any]
- evar_info = { pgm : [Useless ??]
+ evar_info = \{ pgm : [Useless ??]
lc : [Set of evars occurring
- in the type of evar] } } }
- }
-\end{verbatim}
+ in the type of evar] \} \} \} v}
*)
-(*s Proof trees.
+(** {6 Sect } *)
+(** Proof trees.
[ref] = [None] if the goal has still to be proved,
and [Some (r,l)] if the rule [r] was applied to the goal
and gave [l] as subproofs to be completed.
@@ -90,7 +86,7 @@ and rule =
| Daimon
and compound_rule=
- (* the boolean of Tactic tells if the default tactic is used *)
+ (** the boolean of Tactic tells if the default tactic is used *)
| Tactic of tactic_expr * bool
and tactic_expr =
diff --git a/proofs/redexpr.mli b/proofs/redexpr.mli
index 03d97ce35..199130b5f 100644
--- a/proofs/redexpr.mli
+++ b/proofs/redexpr.mli
@@ -1,10 +1,10 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
@@ -22,23 +22,24 @@ type red_expr =
val out_with_occurrences : 'a with_occurrences -> occurrences * 'a
val reduction_of_red_expr : red_expr -> reduction_function * cast_kind
-(* [true] if we should use the vm to verify the reduction *)
-(* Adding a custom reduction (function to be use at the ML level)
+(** [true] if we should use the vm to verify the reduction *)
+
+(** Adding a custom reduction (function to be use at the ML level)
NB: the effect is permanent. *)
val declare_reduction : string -> reduction_function -> unit
-(* Adding a custom reduction (function to be called a vernac command).
+(** Adding a custom reduction (function to be called a vernac command).
The boolean flag is the locality. *)
val declare_red_expr : bool -> string -> red_expr -> unit
-(* Opaque and Transparent commands. *)
+(** Opaque and Transparent commands. *)
-(* Sets the expansion strategy of a constant. When the boolean is
+(** Sets the expansion strategy of a constant. When the boolean is
true, the effect is non-synchronous (i.e. it does not survive
section and module closure). *)
val set_strategy :
bool -> (Conv_oracle.level * evaluable_global_reference list) list -> unit
-(* call by value normalisation function using the virtual machine *)
+(** call by value normalisation function using the virtual machine *)
val cbv_vm : reduction_function
diff --git a/proofs/refiner.mli b/proofs/refiner.mli
index 77f2e48a7..958560044 100644
--- a/proofs/refiner.mli
+++ b/proofs/refiner.mli
@@ -1,23 +1,21 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Term
open Sign
open Evd
open Proof_type
open Tacexpr
open Logic
-(*i*)
-(* The refiner (handles primitive rules and high-level tactics). *)
+(** The refiner (handles primitive rules and high-level tactics). *)
val sig_it : 'a sigma -> 'a
val project : 'a sigma -> evar_map
@@ -30,9 +28,9 @@ val repackage : evar_map ref -> 'a -> 'a sigma
val apply_sig_tac :
evar_map ref -> (goal sigma -> goal list sigma) -> goal -> goal list
-(*s Hiding the implementation of tactics. *)
+(** {6 Hiding the implementation of tactics. } *)
-(* [abstract_tactic tac] hides the (partial) proof produced by [tac] under
+(** [abstract_tactic tac] hides the (partial) proof produced by [tac] under
a single proof node. The boolean tells if the default tactic is used. *)
(* spiwack: currently here for compatibility, abstract_operation
is a second projection *)
@@ -44,83 +42,83 @@ val abstract_extended_tactic :
val refiner : rule -> tactic
-(*s Tacticals. *)
+(** {6 Tacticals. } *)
-(* [tclNORMEVAR] forces propagation of evar constraints *)
+(** [tclNORMEVAR] forces propagation of evar constraints *)
val tclNORMEVAR : tactic
-(* [tclIDTAC] is the identity tactic without message printing*)
+(** [tclIDTAC] is the identity tactic without message printing*)
val tclIDTAC : tactic
val tclIDTAC_MESSAGE : Pp.std_ppcmds -> tactic
-(* [tclEVARS sigma] changes the current evar map *)
+(** [tclEVARS sigma] changes the current evar map *)
val tclEVARS : evar_map -> tactic
-(* [tclTHEN tac1 tac2 gls] applies the tactic [tac1] to [gls] and applies
+(** [tclTHEN tac1 tac2 gls] applies the tactic [tac1] to [gls] and applies
[tac2] to every resulting subgoals *)
val tclTHEN : tactic -> tactic -> tactic
-(* [tclTHENLIST [t1;..;tn]] applies [t1] THEN [t2] ... THEN [tn]. More
+(** [tclTHENLIST [t1;..;tn]] applies [t1] THEN [t2] ... THEN [tn]. More
convenient than [tclTHEN] when [n] is large *)
val tclTHENLIST : tactic list -> tactic
-(* [tclMAP f [x1..xn]] builds [(f x1);(f x2);...(f xn)] *)
+(** [tclMAP f [x1..xn]] builds [(f x1);(f x2);...(f xn)] *)
val tclMAP : ('a -> tactic) -> 'a list -> tactic
-(* [tclTHEN_i tac1 tac2 gls] applies the tactic [tac1] to [gls] and applies
- [(tac2 i)] to the [i]$^{th}$ resulting subgoal (starting from 1) *)
+(** [tclTHEN_i tac1 tac2 gls] applies the tactic [tac1] to [gls] and applies
+ [(tac2 i)] to the [i]{^ th} resulting subgoal (starting from 1) *)
val tclTHEN_i : tactic -> (int -> tactic) -> tactic
-(* [tclTHENLAST tac1 tac2 gls] applies the tactic [tac1] to [gls] and [tac2]
+(** [tclTHENLAST tac1 tac2 gls] applies the tactic [tac1] to [gls] and [tac2]
to the last resulting subgoal (previously called [tclTHENL]) *)
val tclTHENLAST : tactic -> tactic -> tactic
-(* [tclTHENFIRST tac1 tac2 gls] applies the tactic [tac1] to [gls] and [tac2]
+(** [tclTHENFIRST tac1 tac2 gls] applies the tactic [tac1] to [gls] and [tac2]
to the first resulting subgoal *)
val tclTHENFIRST : tactic -> tactic -> tactic
-(* [tclTHENS tac1 [|t1 ; ... ; tn|] gls] applies the tactic [tac1] to
+(** [tclTHENS tac1 [|t1 ; ... ; tn|] gls] applies the tactic [tac1] to
[gls] and applies [t1],..., [tn] to the [n] resulting subgoals. Raises
an error if the number of resulting subgoals is not [n] *)
val tclTHENSV : tactic -> tactic array -> tactic
-(* Same with a list of tactics *)
+(** Same with a list of tactics *)
val tclTHENS : tactic -> tactic list -> tactic
-(* [tclTHENST] is renamed [tclTHENSFIRSTn]
+(** [tclTHENST] is renamed [tclTHENSFIRSTn]
val tclTHENST : tactic -> tactic array -> tactic -> tactic
*)
-(* [tclTHENS3PARTS tac1 [|t1 ; ... ; tn|] tac2 [|t'1 ; ... ; t'm|] gls]
+(** [tclTHENS3PARTS tac1 [|t1 ; ... ; tn|] tac2 [|t'1 ; ... ; t'm|] gls]
applies the tactic [tac1] to [gls] then, applies [t1], ..., [tn] to
the first [n] resulting subgoals, [t'1], ..., [t'm] to the last [m]
subgoals and [tac2] to the rest of the subgoals in the middle. Raises an
error if the number of resulting subgoals is strictly less than [n+m] *)
val tclTHENS3PARTS : tactic -> tactic array -> tactic -> tactic array -> tactic
-(* [tclTHENSLASTn tac1 [t1 ; ... ; tn] tac2 gls] applies [t1],...,[tn] on the
+(** [tclTHENSLASTn tac1 [t1 ; ... ; tn] tac2 gls] applies [t1],...,[tn] on the
last [n] resulting subgoals and [tac2] on the remaining first subgoals *)
val tclTHENSLASTn : tactic -> tactic -> tactic array -> tactic
-(* [tclTHENSFIRSTn tac1 [t1 ; ... ; tn] tac2 gls] first applies [tac1], then
+(** [tclTHENSFIRSTn tac1 [t1 ; ... ; tn] tac2 gls] first applies [tac1], then
applies [t1],...,[tn] on the first [n] resulting subgoals and
[tac2] for the remaining last subgoals (previously called tclTHENST) *)
val tclTHENSFIRSTn : tactic -> tactic array -> tactic -> tactic
-(* [tclTHENLASTn tac1 [t1 ; ... ; tn] gls] first applies [tac1] then,
+(** [tclTHENLASTn tac1 [t1 ; ... ; tn] gls] first applies [tac1] then,
applies [t1],...,[tn] on the last [n] resulting subgoals and leaves
unchanged the other subgoals *)
val tclTHENLASTn : tactic -> tactic array -> tactic
-(* [tclTHENFIRSTn tac1 [t1 ; ... ; tn] gls] first applies [tac1] then,
+(** [tclTHENFIRSTn tac1 [t1 ; ... ; tn] gls] first applies [tac1] then,
applies [t1],...,[tn] on the first [n] resulting subgoals and leaves
unchanged the other subgoals (previously called [tclTHENSI]) *)
val tclTHENFIRSTn : tactic -> tactic array -> tactic
-(* A special exception for levels for the Fail tactic *)
+(** A special exception for levels for the Fail tactic *)
exception FailError of int * Pp.std_ppcmds Lazy.t
-(* Takes an exception and either raise it at the next
+(** Takes an exception and either raise it at the next
level or do nothing. *)
val catch_failerror : exn -> unit
@@ -142,20 +140,20 @@ val tclPROGRESS : tactic -> tactic
val tclNOTSAMEGOAL : tactic -> tactic
val tclINFO : tactic -> tactic
-(* [tclIFTHENELSE tac1 tac2 tac3 gls] first applies [tac1] to [gls] then,
+(** [tclIFTHENELSE tac1 tac2 tac3 gls] first applies [tac1] to [gls] then,
if it succeeds, applies [tac2] to the resulting subgoals,
and if not applies [tac3] to the initial goal [gls] *)
val tclIFTHENELSE : tactic -> tactic -> tactic -> tactic
val tclIFTHENSELSE : tactic -> tactic list -> tactic ->tactic
val tclIFTHENSVELSE : tactic -> tactic array -> tactic ->tactic
-(* [tclIFTHENTRYELSEMUST tac1 tac2 gls] applies [tac1] then [tac2]. If [tac1]
+(** [tclIFTHENTRYELSEMUST tac1 tac2 gls] applies [tac1] then [tac2]. If [tac1]
has been successful, then [tac2] may fail. Otherwise, [tac2] must succeed.
Equivalent to [(tac1;try tac2)||tac2] *)
val tclIFTHENTRYELSEMUST : tactic -> tactic -> tactic
-(*s Tactics handling a list of goals. *)
+(** {6 Tactics handling a list of goals. } *)
type tactic_list = goal list sigma -> goal list sigma
@@ -167,10 +165,8 @@ val then_tactic_list : tactic_list -> tactic_list -> tactic_list
val tactic_list_tactic : tactic_list -> tactic
val goal_goal_list : 'a sigma -> 'a list sigma
-(* [tclWITHHOLES solve_holes tac (sigma,c)] applies [tac] to [c] which
+(** [tclWITHHOLES solve_holes tac (sigma,c)] applies [tac] to [c] which
may have unresolved holes; if [solve_holes] these holes must be
resolved after application of the tactic; [sigma] must be an
extension of the sigma of the goal *)
val tclWITHHOLES : bool -> ('a -> tactic) -> evar_map -> 'a -> tactic
-
-(*s Pretty-printers. *)
diff --git a/proofs/tacmach.mli b/proofs/tacmach.mli
index f4bb1d922..cf704d101 100644
--- a/proofs/tacmach.mli
+++ b/proofs/tacmach.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Term
open Sign
@@ -21,9 +20,8 @@ open Redexpr
open Tacexpr
open Rawterm
open Pattern
-(*i*)
-(* Operations for handling terms under a local typing context. *)
+(** Operations for handling terms under a local typing context. *)
type 'a sigma = 'a Evd.sigma;;
type tactic = Proof_type.tactic;;
@@ -89,7 +87,7 @@ val pf_matches : goal sigma -> constr_pattern -> constr -> patvar_map
val pf_is_matching : goal sigma -> constr_pattern -> constr -> bool
-(*s The most primitive tactics. *)
+(** {6 The most primitive tactics. } *)
val refiner : rule -> tactic
val introduction_no_check : identifier -> tactic
@@ -108,7 +106,7 @@ val mutual_fix :
identifier -> int -> (identifier * int * constr) list -> int -> tactic
val mutual_cofix : identifier -> (identifier * constr) list -> int -> tactic
-(*s The most primitive tactics with consistency and type checking *)
+(** {6 The most primitive tactics with consistency and type checking } *)
val introduction : identifier -> tactic
val internal_cut : bool -> identifier -> types -> tactic
@@ -121,7 +119,7 @@ val thin_body : identifier list -> tactic
val move_hyp : bool -> identifier -> identifier move_location -> tactic
val rename_hyp : (identifier*identifier) list -> tactic
-(*s Tactics handling a list of goals. *)
+(** {6 Tactics handling a list of goals. } *)
type validation_list = proof_tree list -> proof_tree list
@@ -135,6 +133,6 @@ val tactic_list_tactic : tactic_list -> tactic
val tclFIRSTLIST : tactic_list list -> tactic_list
val tclIDTAC_list : tactic_list
-(*s Pretty-printing functions (debug only). *)
+(** {6 Pretty-printing functions (debug only). } *)
val pr_gls : goal sigma -> Pp.std_ppcmds
val pr_glls : goal list sigma -> Pp.std_ppcmds
diff --git a/proofs/tactic_debug.mli b/proofs/tactic_debug.mli
index 0a5e6087b..f27540315 100644
--- a/proofs/tactic_debug.mli
+++ b/proofs/tactic_debug.mli
@@ -1,10 +1,10 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
@@ -16,7 +16,7 @@ open Names
open Tacexpr
open Term
-(* This module intends to be a beginning of debugger for tactic expressions.
+(** This module intends to be a beginning of debugger for tactic expressions.
Currently, it is quite simple and we can hope to have, in the future, a more
complete panel of commands dedicated to a proof assistant framework *)
@@ -27,50 +27,50 @@ val set_match_rule_printer :
((Genarg.rawconstr_and_expr * constr_pattern,glob_tactic_expr) match_rule -> Pp.std_ppcmds) ->
unit
-(* Debug information *)
+(** Debug information *)
type debug_info =
| DebugOn of int
| DebugOff
-(* Prints the state and waits *)
+(** Prints the state and waits *)
val debug_prompt :
int -> goal sigma -> glob_tactic_expr -> (debug_info -> 'a) -> 'a
-(* Prints a constr *)
+(** Prints a constr *)
val db_constr : debug_info -> env -> constr -> unit
-(* Prints the pattern rule *)
+(** Prints the pattern rule *)
val db_pattern_rule :
debug_info -> int -> (Genarg.rawconstr_and_expr * constr_pattern,glob_tactic_expr) match_rule -> unit
-(* Prints a matched hypothesis *)
+(** Prints a matched hypothesis *)
val db_matched_hyp :
debug_info -> env -> identifier * constr option * constr -> name -> unit
-(* Prints the matched conclusion *)
+(** Prints the matched conclusion *)
val db_matched_concl : debug_info -> env -> constr -> unit
-(* Prints a success message when the goal has been matched *)
+(** Prints a success message when the goal has been matched *)
val db_mc_pattern_success : debug_info -> unit
-(* Prints a failure message for an hypothesis pattern *)
+(** Prints a failure message for an hypothesis pattern *)
val db_hyp_pattern_failure :
debug_info -> env -> name * constr_pattern match_pattern -> unit
-(* Prints a matching failure message for a rule *)
+(** Prints a matching failure message for a rule *)
val db_matching_failure : debug_info -> unit
-(* Prints an evaluation failure message for a rule *)
+(** Prints an evaluation failure message for a rule *)
val db_eval_failure : debug_info -> Pp.std_ppcmds -> unit
-(* An exception handler *)
+(** An exception handler *)
val explain_logic_error: (exn -> Pp.std_ppcmds) ref
-(* For use in the Ltac debugger: some exception that are usually
+(** For use in the Ltac debugger: some exception that are usually
consider anomalies are acceptable because they are caught later in
the process that is being debugged. One should not require
from users that they report these anomalies. *)
val explain_logic_error_no_anomaly : (exn -> Pp.std_ppcmds) ref
-(* Prints a logic failure message for a rule *)
+(** Prints a logic failure message for a rule *)
val db_logic_failure : debug_info -> exn -> unit
diff --git a/tactics/auto.mli b/tactics/auto.mli
index 072e02989..37fe3d441 100644
--- a/tactics/auto.mli
+++ b/tactics/auto.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Util
open Names
open Term
@@ -22,29 +21,28 @@ open Evd
open Libnames
open Vernacexpr
open Mod_subst
-(*i*)
type auto_tactic =
- | Res_pf of constr * clausenv (* Hint Apply *)
- | ERes_pf of constr * clausenv (* Hint EApply *)
+ | Res_pf of constr * clausenv (** Hint Apply *)
+ | ERes_pf of constr * clausenv (** Hint EApply *)
| Give_exact of constr
- | Res_pf_THEN_trivial_fail of constr * clausenv (* Hint Immediate *)
- | Unfold_nth of evaluable_global_reference (* Hint Unfold *)
- | Extern of Tacexpr.glob_tactic_expr (* Hint Extern *)
+ | Res_pf_THEN_trivial_fail of constr * clausenv (** Hint Immediate *)
+ | Unfold_nth of evaluable_global_reference (** Hint Unfold *)
+ | Extern of Tacexpr.glob_tactic_expr (** Hint Extern *)
open Rawterm
type pri_auto_tactic = {
- pri : int; (* A number between 0 and 4, 4 = lower priority *)
- pat : constr_pattern option; (* A pattern for the concl of the Goal *)
- code : auto_tactic; (* the tactic to apply when the concl matches pat *)
+ pri : int; (** A number between 0 and 4, 4 = lower priority *)
+ pat : constr_pattern option; (** A pattern for the concl of the Goal *)
+ code : auto_tactic; (** the tactic to apply when the concl matches pat *)
}
type stored_data = pri_auto_tactic
type search_entry
-(* The head may not be bound. *)
+(** The head may not be bound. *)
type hint_entry = global_reference option * pri_auto_tactic
@@ -85,7 +83,7 @@ val searchtable_map : hint_db_name -> hint_db
val searchtable_add : (hint_db_name * hint_db) -> unit
-(* [create_hint_db local name st use_dn].
+(** [create_hint_db local name st use_dn].
[st] is a transparency state for unification using this db
[use_dn] switches the use of the discrimination net for all hints
and patterns. *)
@@ -108,13 +106,13 @@ val print_hint_db_by_name : hint_db_name -> unit
val print_hint_db : Hint_db.t -> unit
-(* [make_exact_entry pri (c, ctyp)].
+(** [make_exact_entry pri (c, ctyp)].
[c] is the term given as an exact proof to solve the goal;
[ctyp] is the type of [c]. *)
val make_exact_entry : evar_map -> int option -> constr * constr -> hint_entry
-(* [make_apply_entry (eapply,verbose) pri (c,cty)].
+(** [make_apply_entry (eapply,verbose) pri (c,cty)].
[eapply] is true if this hint will be used only with EApply;
[hnf] should be true if we should expand the head of cty before searching for
products;
@@ -125,7 +123,7 @@ val make_apply_entry :
env -> evar_map -> bool * bool * bool -> int option -> constr * constr
-> hint_entry
-(* A constr which is Hint'ed will be:
+(** A constr which is Hint'ed will be:
(1) used as an Exact, if it does not start with a product
(2) used as an Apply, if its HNF starts with a product, and
has no missing arguments.
@@ -136,7 +134,7 @@ val make_resolves :
env -> evar_map -> bool * bool * bool -> int option -> constr ->
hint_entry list
-(* [make_resolve_hyp hname htyp].
+(** [make_resolve_hyp hname htyp].
used to add an hypothesis to the local hint database;
Never raises a user exception;
If the hyp cannot be used as a Hint, the empty list is returned. *)
@@ -144,7 +142,7 @@ val make_resolves :
val make_resolve_hyp :
env -> evar_map -> named_declaration -> hint_entry list
-(* [make_extern pri pattern tactic_expr] *)
+(** [make_extern pri pattern tactic_expr] *)
val make_extern :
int -> constr_pattern option -> Tacexpr.glob_tactic_expr
@@ -161,7 +159,7 @@ val set_extern_subst_tactic :
(substitution -> Tacexpr.glob_tactic_expr -> Tacexpr.glob_tactic_expr)
-> unit
-(* Create a Hint database from the pairs (name, constr).
+(** Create a Hint database from the pairs (name, constr).
Useful to take the current goal hypotheses as hints;
Boolean tells if lemmas with evars are allowed *)
@@ -173,47 +171,47 @@ val default_search_depth : int ref
val auto_unif_flags : Unification.unify_flags
-(* Try unification with the precompiled clause, then use registered Apply *)
+(** Try unification with the precompiled clause, then use registered Apply *)
val unify_resolve_nodelta : (constr * clausenv) -> tactic
val unify_resolve : Unification.unify_flags -> (constr * clausenv) -> tactic
-(* [ConclPattern concl pat tacast]:
+(** [ConclPattern concl pat tacast]:
if the term concl matches the pattern pat, (in sense of
[Pattern.somatches], then replace [?1] [?2] metavars in tacast by the
right values to build a tactic *)
val conclPattern : constr -> constr_pattern option -> Tacexpr.glob_tactic_expr -> tactic
-(* The Auto tactic *)
+(** The Auto tactic *)
val auto : int -> constr list -> hint_db_name list -> tactic
-(* Auto with more delta. *)
+(** Auto with more delta. *)
val new_auto : int -> constr list -> hint_db_name list -> tactic
-(* auto with default search depth and with the hint database "core" *)
+(** auto with default search depth and with the hint database "core" *)
val default_auto : tactic
-(* auto with all hint databases except the "v62" compatibility database *)
+(** auto with all hint databases except the "v62" compatibility database *)
val full_auto : int -> constr list -> tactic
-(* auto with all hint databases except the "v62" compatibility database
+(** auto with all hint databases except the "v62" compatibility database
and doing delta *)
val new_full_auto : int -> constr list -> tactic
-(* auto with default search depth and with all hint databases
+(** auto with default search depth and with all hint databases
except the "v62" compatibility database *)
val default_full_auto : tactic
-(* The generic form of auto (second arg [None] means all bases) *)
+(** The generic form of auto (second arg [None] means all bases) *)
val gen_auto : int option -> constr list -> hint_db_name list option -> tactic
-(* The hidden version of auto *)
+(** The hidden version of auto *)
val h_auto : int option -> constr list -> hint_db_name list option -> tactic
-(* Trivial *)
+(** Trivial *)
val trivial : constr list -> hint_db_name list -> tactic
val gen_trivial : constr list -> hint_db_name list option -> tactic
val full_trivial : constr list -> tactic
@@ -221,15 +219,16 @@ val h_trivial : constr list -> hint_db_name list option -> tactic
val pr_autotactic : auto_tactic -> Pp.std_ppcmds
-(*s The following is not yet up to date -- Papageno. *)
+(** {6 The following is not yet up to date -- Papageno. } *)
-(* DAuto *)
+(** DAuto *)
val dauto : int option * int option -> constr list -> tactic
val default_search_decomp : int ref
val default_dauto : tactic
val h_dauto : int option * int option -> constr list -> tactic
-(* SuperAuto *)
+
+(** SuperAuto *)
type autoArguments =
| UsingTDB
diff --git a/tactics/autorewrite.mli b/tactics/autorewrite.mli
index cf0d58ccb..a9556891a 100644
--- a/tactics/autorewrite.mli
+++ b/tactics/autorewrite.mli
@@ -1,34 +1,32 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Term
open Tacexpr
open Tacmach
open Equality
-(*i*)
-(* Rewriting rules before tactic interpretation *)
+(** Rewriting rules before tactic interpretation *)
type raw_rew_rule = Util.loc * Term.constr * bool * Tacexpr.raw_tactic_expr
-(* To add rewriting rules to a base *)
+(** To add rewriting rules to a base *)
val add_rew_rules : string -> raw_rew_rule list -> unit
-(* The AutoRewrite tactic.
+(** The AutoRewrite tactic.
The optional conditions tell rewrite how to handle matching and side-condition solving.
Default is Naive: first match in the clause, don't look at the side-conditions to
tell if the rewrite succeeded. *)
val autorewrite : ?conds:conditions -> tactic -> string list -> tactic
val autorewrite_in : ?conds:conditions -> Names.identifier -> tactic -> string list -> tactic
-(* Rewriting rules *)
+(** Rewriting rules *)
type rew_rule = { rew_lemma: constr;
rew_type: types;
rew_pat: constr;
diff --git a/tactics/btermdn.mli b/tactics/btermdn.mli
index ebded23ac..ebb046a05 100644
--- a/tactics/btermdn.mli
+++ b/tactics/btermdn.mli
@@ -1,20 +1,18 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Term
open Pattern
open Names
-(*i*)
-(* Discrimination nets with bounded depth. *)
+(** Discrimination nets with bounded depth. *)
module Make :
functor (Z : Map.OrderedType) ->
sig
diff --git a/tactics/contradiction.mli b/tactics/contradiction.mli
index 9c38362a8..b5fdf5a1b 100644
--- a/tactics/contradiction.mli
+++ b/tactics/contradiction.mli
@@ -1,20 +1,18 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Term
open Proof_type
open Rawterm
open Genarg
-(*i*)
val absurd : constr -> tactic
val contradiction : constr with_bindings option -> tactic
diff --git a/tactics/dhyp.mli b/tactics/dhyp.mli
index 41fd497f7..465a2a377 100644
--- a/tactics/dhyp.mli
+++ b/tactics/dhyp.mli
@@ -1,20 +1,18 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Tacmach
open Tacexpr
-(*i*)
-(* Programmable destruction of hypotheses and conclusions. *)
+(** Programmable destruction of hypotheses and conclusions. *)
val set_extern_interp : (glob_tactic_expr -> tactic) -> unit
diff --git a/tactics/dn.mli b/tactics/dn.mli
index 3cb52a565..662ac19af 100644
--- a/tactics/dn.mli
+++ b/tactics/dn.mli
@@ -17,7 +17,7 @@ sig
val create : unit -> t
- (* [add t f (tree,inf)] adds a structured object [tree] together with
+ (** [add t f (tree,inf)] adds a structured object [tree] together with
the associated information [inf] to the table [t]; the function
[f] is used to translated [tree] into its prefix decomposition: [f]
must decompose any tree into a label characterizing its root node and
@@ -31,7 +31,8 @@ sig
type 'tree lookup_fun = 'tree -> (Y.t * 'tree list) lookup_res
-(* [lookup t f tree] looks for trees (and their associated
+
+(** [lookup t f tree] looks for trees (and their associated
information) in table [t] such that the structured object [tree]
matches against them; [f] is used to translated [tree] into its
prefix decomposition: [f] must decompose any tree into a label
diff --git a/tactics/eauto.mli b/tactics/eauto.mli
index a5d1f0d37..595917bdf 100644
--- a/tactics/eauto.mli
+++ b/tactics/eauto.mli
@@ -1,12 +1,11 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
-
-(*i*)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
+
open Term
open Proof_type
open Tacexpr
@@ -15,7 +14,6 @@ open Topconstr
open Evd
open Environ
open Explore
-(*i*)
val hintbases : hint_db_name list option Pcoq.Gram.Entry.e
val wit_hintbases : hint_db_name list option typed_abstract_argument_type
diff --git a/tactics/elim.mli b/tactics/elim.mli
index 25ae07000..7fbb16ba1 100644
--- a/tactics/elim.mli
+++ b/tactics/elim.mli
@@ -1,23 +1,21 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Term
open Proof_type
open Tacmach
open Genarg
open Tacticals
-(*i*)
-(* Eliminations tactics. *)
+(** Eliminations tactics. *)
val introElimAssumsThen :
(branch_assumptions -> tactic) -> branch_args -> tactic
diff --git a/tactics/elimschemes.mli b/tactics/elimschemes.mli
index fecf3e60d..ef1c4ec3e 100644
--- a/tactics/elimschemes.mli
+++ b/tactics/elimschemes.mli
@@ -1,16 +1,16 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
-(* $Id$ *)
+(** {% $ %}Id: elimschemes.mli 12584 2009-12-13 21:04:34Z herbelin {% $ %} *)
open Ind_tables
-(* Induction/recursion schemes *)
+(** Induction/recursion schemes *)
val rect_scheme_kind_from_prop : individual scheme_kind
val ind_scheme_kind_from_prop : individual scheme_kind
@@ -20,7 +20,7 @@ val ind_dep_scheme_kind_from_type : individual scheme_kind
val rec_dep_scheme_kind_from_type : individual scheme_kind
-(* Case analysis schemes *)
+(** Case analysis schemes *)
val case_scheme_kind_from_type : individual scheme_kind
val case_scheme_kind_from_prop : individual scheme_kind
diff --git a/tactics/eqschemes.mli b/tactics/eqschemes.mli
index a6ffe9e21..bdf3bbe76 100644
--- a/tactics/eqschemes.mli
+++ b/tactics/eqschemes.mli
@@ -1,21 +1,21 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(* This file builds schemes relative to equality inductive types *)
+(** This file builds schemes relative to equality inductive types *)
open Names
open Term
open Environ
open Ind_tables
-(* Builds a left-to-right rewriting scheme for an equality type *)
+(** Builds a left-to-right rewriting scheme for an equality type *)
val rew_l2r_dep_scheme_kind : individual scheme_kind
val rew_l2r_scheme_kind : individual scheme_kind
@@ -32,7 +32,7 @@ val build_l2r_forward_rew_scheme :
val build_r2l_forward_rew_scheme :
bool -> env -> inductive -> sorts_family -> constr
-(* Builds a symmetry scheme for a symmetrical equality type *)
+(** Builds a symmetry scheme for a symmetrical equality type *)
val build_sym_scheme : env -> inductive -> constr
val sym_scheme_kind : individual scheme_kind
@@ -40,7 +40,7 @@ val sym_scheme_kind : individual scheme_kind
val build_sym_involutive_scheme : env -> inductive -> constr
val sym_involutive_scheme_kind : individual scheme_kind
-(* Builds a congruence scheme for an equality type *)
+(** Builds a congruence scheme for an equality type *)
val congr_scheme_kind : individual scheme_kind
val build_congr : env -> constr * constr -> inductive -> constr
diff --git a/tactics/evar_tactics.mli b/tactics/evar_tactics.mli
index 2e30cdfbe..0cf4dbb80 100644
--- a/tactics/evar_tactics.mli
+++ b/tactics/evar_tactics.mli
@@ -1,10 +1,10 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
diff --git a/tactics/extraargs.mli b/tactics/extraargs.mli
index 4492fd842..3421ded92 100644
--- a/tactics/extraargs.mli
+++ b/tactics/extraargs.mli
@@ -1,10 +1,10 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
@@ -51,7 +51,7 @@ val wit_by_arg_tac : glob_tactic_expr option typed_abstract_argument_type
-(* Spiwack: Primitive for retroknowledge registration *)
+(** Spiwack: Primitive for retroknowledge registration *)
val retroknowledge_field : Retroknowledge.field Pcoq.Gram.Entry.e
val rawwit_retroknowledge_field : Retroknowledge.field raw_abstract_argument_type
diff --git a/tactics/extratactics.mli b/tactics/extratactics.mli
index 82006f602..259fe8814 100644
--- a/tactics/extratactics.mli
+++ b/tactics/extratactics.mli
@@ -1,10 +1,10 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
diff --git a/tactics/hiddentac.mli b/tactics/hiddentac.mli
index 36b0830dd..dae0281bd 100644
--- a/tactics/hiddentac.mli
+++ b/tactics/hiddentac.mli
@@ -1,15 +1,14 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Util
open Term
@@ -21,12 +20,11 @@ open Rawterm
open Evd
open Clenv
open Termops
-(*i*)
-(* Tactics for the interpreter. They left a trace in the proof tree
+(** Tactics for the interpreter. They left a trace in the proof tree
when they are called. *)
-(* Basic tactics *)
+(** Basic tactics *)
val h_intro_move : identifier option -> identifier move_location -> tactic
val h_intro : identifier -> tactic
@@ -63,7 +61,7 @@ val h_generalize_dep : constr -> tactic
val h_let_tac : letin_flag -> name -> constr ->
Tacticals.clause -> tactic
-(* Derived basic tactics *)
+(** Derived basic tactics *)
val h_simple_induction : quantified_hypothesis -> tactic
val h_simple_destruct : quantified_hypothesis -> tactic
@@ -84,17 +82,17 @@ val h_induction_destruct : rec_flag -> evars_flag ->
val h_specialize : int option -> constr with_bindings -> tactic
val h_lapply : constr -> tactic
-(* Automation tactic : see Auto *)
+(** Automation tactic : see Auto *)
-(* Context management *)
+(** Context management *)
val h_clear : bool -> identifier list -> tactic
val h_clear_body : identifier list -> tactic
val h_move : bool -> identifier -> identifier move_location -> tactic
val h_rename : (identifier*identifier) list -> tactic
val h_revert : identifier list -> tactic
-(* Constructors *)
+(** Constructors *)
val h_constructor : evars_flag -> int -> constr bindings -> tactic
val h_left : evars_flag -> constr bindings -> tactic
val h_right : evars_flag -> constr bindings -> tactic
@@ -105,12 +103,12 @@ val h_simplest_left : tactic
val h_simplest_right : tactic
-(* Conversion *)
+(** Conversion *)
val h_reduce : Redexpr.red_expr -> Tacticals.clause -> tactic
val h_change :
Pattern.constr_pattern option -> constr -> Tacticals.clause -> tactic
-(* Equivalence relations *)
+(** Equivalence relations *)
val h_reflexivity : tactic
val h_symmetry : Tacticals.clause -> tactic
val h_transitivity : constr option -> tactic
diff --git a/tactics/hipattern.mli b/tactics/hipattern.mli
index 9b04a2cd2..40ad0da9b 100644
--- a/tactics/hipattern.mli
+++ b/tactics/hipattern.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Util
open Names
open Term
@@ -16,9 +15,9 @@ open Sign
open Evd
open Pattern
open Coqlib
-(*i*)
-(*s Given a term with second-order variables in it,
+(** {6 Sect } *)
+(** Given a term with second-order variables in it,
represented by Meta's, and possibly applied using SoApp
terms, this function will perform second-order, binding-preserving,
matching, in the case where the pattern is a pattern in the sense
@@ -37,7 +36,8 @@ open Coqlib
intersection of the free-rels of the term and the current stack be
contained in the arguments of the application *)
-(*s I implemented the following functions which test whether a term [t]
+(** {6 Sect } *)
+(** I implemented the following functions which test whether a term [t]
is an inductive but non-recursive type, a general conjuction, a
general disjunction, or a type with no constructors.
@@ -52,36 +52,36 @@ type testing_function = constr -> bool
val match_with_non_recursive_type : (constr * constr list) matching_function
val is_non_recursive_type : testing_function
-(* Non recursive type with no indices and exactly one argument for each
+(** Non recursive type with no indices and exactly one argument for each
constructor; canonical definition of n-ary disjunction if strict *)
val match_with_disjunction : ?strict:bool -> (constr * constr list) matching_function
val is_disjunction : ?strict:bool -> testing_function
-(* Non recursive tuple (one constructor and no indices) with no inner
+(** Non recursive tuple (one constructor and no indices) with no inner
dependencies; canonical definition of n-ary conjunction if strict *)
val match_with_conjunction : ?strict:bool -> (constr * constr list) matching_function
val is_conjunction : ?strict:bool -> testing_function
-(* Non recursive tuple, possibly with inner dependencies *)
+(** Non recursive tuple, possibly with inner dependencies *)
val match_with_record : (constr * constr list) matching_function
val is_record : testing_function
-(* Like record but supports and tells if recursive (e.g. Acc) *)
+(** Like record but supports and tells if recursive (e.g. Acc) *)
val match_with_tuple : (constr * constr list * bool) matching_function
val is_tuple : testing_function
-(* No constructor, possibly with indices *)
+(** No constructor, possibly with indices *)
val match_with_empty_type : constr matching_function
val is_empty_type : testing_function
-(* type with only one constructor and no arguments, possibly with indices *)
+(** type with only one constructor and no arguments, possibly with indices *)
val match_with_unit_or_eq_type : constr matching_function
val is_unit_or_eq_type : testing_function
-(* type with only one constructor and no arguments, no indices *)
+(** type with only one constructor and no arguments, no indices *)
val is_unit_type : testing_function
-(* type with only one constructor, no arguments and at least one dependency *)
+(** type with only one constructor, no arguments and at least one dependency *)
val is_inductive_equality : inductive -> bool
val match_with_equality_type : (constr * constr list) matching_function
val is_equality_type : testing_function
@@ -95,7 +95,7 @@ val is_forall_term : testing_function
val match_with_imp_term : (constr * constr) matching_function
val is_imp_term : testing_function
-(* I added these functions to test whether a type contains dependent
+(** I added these functions to test whether a type contains dependent
products or not, and if an inductive has constructors with dependent types
(excluding parameters). this is useful to check whether a conjunction is a
real conjunction and not a dependent tuple. (Pierre Corbineau, 13/5/2002) *)
@@ -109,7 +109,7 @@ val is_nodep_ind : testing_function
val match_with_sigma_type : (constr * constr list) matching_function
val is_sigma_type : testing_function
-(* Recongnize inductive relation defined by reflexivity *)
+(** Recongnize inductive relation defined by reflexivity *)
type equation_kind =
| MonomorphicLeibnizEq of constr * constr
@@ -123,37 +123,37 @@ val match_with_equation:
(***** Destructing patterns bound to some theory *)
-(* Match terms [eq A t u], [identity A t u] or [JMeq A t A u] *)
-(* Returns associated lemmas and [A,t,u] or fails PatternMatchingFailure *)
+(** Match terms [eq A t u], [identity A t u] or [JMeq A t A u]
+ Returns associated lemmas and [A,t,u] or fails PatternMatchingFailure *)
val find_eq_data_decompose : Proof_type.goal sigma -> constr ->
coq_eq_data * (types * constr * constr)
-(* Idem but fails with an error message instead of PatternMatchingFailure *)
+(** Idem but fails with an error message instead of PatternMatchingFailure *)
val find_this_eq_data_decompose : Proof_type.goal sigma -> constr ->
coq_eq_data * (types * constr * constr)
-(* A variant that returns more informative structure on the equality found *)
+(** A variant that returns more informative structure on the equality found *)
val find_eq_data : constr -> coq_eq_data * equation_kind
-(* Match a term of the form [(existT A P t p)] *)
-(* Returns associated lemmas and [A,P,t,p] *)
+(** Match a term of the form [(existT A P t p)]
+ Returns associated lemmas and [A,P,t,p] *)
val find_sigma_data_decompose : constr ->
coq_sigma_data * (constr * constr * constr * constr)
-(* Match a term of the form [{x:A|P}], returns [A] and [P] *)
+(** Match a term of the form [{x:A|P}], returns [A] and [P] *)
val match_sigma : constr -> constr * constr
val is_matching_sigma : constr -> bool
-(* Match a decidable equality judgement (e.g [{t=u:>T}+{~t=u}]), returns
+(** Match a decidable equality judgement (e.g [{t=u:>T}+{~t=u}]), returns
[t,u,T] and a boolean telling if equality is on the left side *)
val match_eqdec : constr -> bool * constr * constr * constr * constr
-(* Match an equality up to conversion; returns [(eq,t1,t2)] in normal form *)
+(** Match an equality up to conversion; returns [(eq,t1,t2)] in normal form *)
open Proof_type
open Tacmach
val dest_nf_eq : goal sigma -> constr -> (constr * constr * constr)
-(* Match a negation *)
+(** Match a negation *)
val is_matching_not : constr -> bool
val is_matching_imp_False : constr -> bool
diff --git a/tactics/inv.mli b/tactics/inv.mli
index 8ec0e2db2..a7780206b 100644
--- a/tactics/inv.mli
+++ b/tactics/inv.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Util
open Names
open Term
@@ -16,7 +15,6 @@ open Tacmach
open Genarg
open Tacexpr
open Rawterm
-(*i*)
type inversion_status = Dep of constr option | NoDep
diff --git a/tactics/nbtermdn.mli b/tactics/nbtermdn.mli
index 027ea5734..3f866d5da 100644
--- a/tactics/nbtermdn.mli
+++ b/tactics/nbtermdn.mli
@@ -1,20 +1,18 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Term
open Pattern
open Libnames
-(*i*)
-(* Named, bounded-depth, term-discrimination nets. *)
+(** Named, bounded-depth, term-discrimination nets. *)
module Make :
functor (Y:Map.OrderedType) ->
sig
diff --git a/tactics/refine.mli b/tactics/refine.mli
index 89e531675..c9a4598e5 100644
--- a/tactics/refine.mli
+++ b/tactics/refine.mli
@@ -1,10 +1,10 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
diff --git a/tactics/tacinterp.mli b/tactics/tacinterp.mli
index 71ee29f8c..771d28fba 100644
--- a/tactics/tacinterp.mli
+++ b/tactics/tacinterp.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Pp
open Util
open Names
@@ -21,9 +20,8 @@ open Genarg
open Topconstr
open Mod_subst
open Redexpr
-(*i*)
-(* Values for interpretation *)
+(** Values for interpretation *)
type value =
| VRTactic of (goal list sigma)
| VFun of ltac_trace * (identifier*value) list *
@@ -36,7 +34,7 @@ type value =
| VList of value list
| VRec of (identifier*value) list ref * glob_tactic_expr
-(* Signature for interpretation: val\_interp and interpretation functions *)
+(** Signature for interpretation: val\_interp and interpretation functions *)
and interp_sign =
{ lfun : (identifier * value) list;
avoid_ids : identifier list;
@@ -46,10 +44,10 @@ and interp_sign =
val extract_ltac_vars : interp_sign -> Evd.evar_map -> Environ.env ->
Pretyping.var_map * Pretyping.unbound_ltac_var_map
-(* Transforms an id into a constr if possible *)
+(** Transforms an id into a constr if possible *)
val constr_of_id : Environ.env -> identifier -> constr
-(* To embed several objects in Coqast.t *)
+(** To embed several objects in Coqast.t *)
val tactic_in : (interp_sign -> glob_tactic_expr) -> Dyn.t
val tactic_out : Dyn.t -> (interp_sign -> glob_tactic_expr)
@@ -58,19 +56,19 @@ val globTacticIn : (interp_sign -> glob_tactic_expr) -> raw_tactic_expr
val valueIn : value -> raw_tactic_arg
val constrIn : constr -> constr_expr
-(* Sets the debugger mode *)
+(** Sets the debugger mode *)
val set_debug : debug_info -> unit
-(* Gives the state of debug *)
+(** Gives the state of debug *)
val get_debug : unit -> debug_info
-(* Adds a definition for tactics in the table *)
+(** Adds a definition for tactics in the table *)
val add_tacdef :
Vernacexpr.locality_flag -> bool ->
(Libnames.reference * bool * raw_tactic_expr) list -> unit
val add_primitive_tactic : string -> glob_tactic_expr -> unit
-(* Tactic extensions *)
+(** Tactic extensions *)
val add_tactic :
string -> (typed_generic_argument list -> tactic) -> unit
val overwriting_add_tactic :
@@ -78,7 +76,7 @@ val overwriting_add_tactic :
val lookup_tactic :
string -> (typed_generic_argument list) -> tactic
-(* Adds an interpretation function for extra generic arguments *)
+(** Adds an interpretation function for extra generic arguments *)
type glob_sign = {
ltacvars : identifier list * identifier list;
ltacrecvars : (identifier * Nametab.ltac_constant) list;
@@ -118,17 +116,17 @@ val subst_genarg :
val subst_rawconstr_and_expr :
substitution -> rawconstr_and_expr -> rawconstr_and_expr
-(* Interprets any expression *)
+(** Interprets any expression *)
val val_interp : interp_sign -> goal sigma -> glob_tactic_expr -> value
-(* Interprets an expression that evaluates to a constr *)
+(** Interprets an expression that evaluates to a constr *)
val interp_ltac_constr : interp_sign -> goal sigma -> glob_tactic_expr ->
constr
-(* Interprets redexp arguments *)
+(** Interprets redexp arguments *)
val interp_redexp : Environ.env -> Evd.evar_map -> raw_red_expr -> red_expr
-(* Interprets tactic expressions *)
+(** Interprets tactic expressions *)
val interp_tac_gen : (identifier * value) list -> identifier list ->
debug_info -> raw_tactic_expr -> tactic
@@ -136,7 +134,7 @@ val interp_hyp : interp_sign -> goal sigma -> identifier located -> identifier
val interp_bindings : interp_sign -> Environ.env -> Evd.evar_map -> rawconstr_and_expr Rawterm.bindings -> Evd.evar_map * constr Rawterm.bindings
-(* Initial call for interpretation *)
+(** Initial call for interpretation *)
val glob_tactic : raw_tactic_expr -> glob_tactic_expr
val glob_tactic_env : identifier list -> Environ.env -> raw_tactic_expr -> glob_tactic_expr
@@ -149,21 +147,21 @@ val eval_ltac_constr : goal sigma -> raw_tactic_expr -> constr
val subst_tactic : substitution -> glob_tactic_expr -> glob_tactic_expr
-(* Hides interpretation for pretty-print *)
+(** Hides interpretation for pretty-print *)
val hide_interp : raw_tactic_expr -> tactic option -> tactic
-(* Declare the default tactic to fill implicit arguments *)
+(** Declare the default tactic to fill implicit arguments *)
val declare_implicit_tactic : tactic -> unit
-(* Declare the xml printer *)
+(** Declare the xml printer *)
val declare_xml_printer :
(out_channel -> Environ.env -> Evd.evar_map -> constr -> unit) -> unit
-(* printing *)
+(** printing *)
val print_ltac : Libnames.qualid -> std_ppcmds
-(* Internals that can be useful for syntax extensions. *)
+(** Internals that can be useful for syntax extensions. *)
exception CannotCoerceTo of string
diff --git a/tactics/tacticals.mli b/tactics/tacticals.mli
index 3dd73c92c..c357451a2 100644
--- a/tactics/tacticals.mli
+++ b/tactics/tacticals.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Pp
open Util
open Names
@@ -23,9 +22,8 @@ open Genarg
open Tacexpr
open Termops
open Rawterm
-(*i*)
-(* Tacticals i.e. functions from tactics to tactics. *)
+(** Tacticals i.e. functions from tactics to tactics. *)
val tclNORMEVAR : tactic
val tclIDTAC : tactic
@@ -68,7 +66,7 @@ val tclIFTHENTRYELSEMUST : tactic -> tactic -> tactic
val tclFIRST_PROGRESS_ON : ('a -> tactic) -> 'a list -> tactic
-(*s Tacticals applying to hypotheses *)
+(** {6 Tacticals applying to hypotheses } *)
val onNthHypId : int -> (identifier -> tactic) -> tactic
val onNthHyp : int -> (constr -> tactic) -> tactic
@@ -96,14 +94,14 @@ val ifOnHyp : (identifier * types -> bool) ->
val onHyps : (goal sigma -> named_context) ->
(named_context -> tactic) -> tactic
-(*s Tacticals applying to goal components *)
+(** {6 Tacticals applying to goal components } *)
-(* A [simple_clause] is a set of hypotheses, possibly extended with
+(** A [simple_clause] is a set of hypotheses, possibly extended with
the conclusion (conclusion is represented by None) *)
type simple_clause = identifier option list
-(* A [clause] denotes occurrences and hypotheses in a
+(** A [clause] denotes occurrences and hypotheses in a
goal; in particular, it can abstractly refer to the set of
hypotheses independently of the effective contents of the current goal *)
@@ -126,21 +124,21 @@ val onAllHypsAndConclLR : (identifier option -> tactic) -> tactic
val onClause : (identifier option -> tactic) -> clause -> tactic
val onClauseLR : (identifier option -> tactic) -> clause -> tactic
-(*s An intermediate form of occurrence clause with no mention of occurrences *)
+(** {6 An intermediate form of occurrence clause with no mention of occurrences } *)
-(* A [hyp_location] is an hypothesis together with a position, in
+(** A [hyp_location] is an hypothesis together with a position, in
body if any, in type or in both *)
type hyp_location = identifier * hyp_location_flag
-(* A [goal_location] is either an hypothesis (together with a position, in
+(** A [goal_location] is either an hypothesis (together with a position, in
body if any, in type or in both) or the goal *)
type goal_location = hyp_location option
-(*s A concrete view of occurrence clauses *)
+(** {6 A concrete view of occurrence clauses } *)
-(* [clause_atom] refers either to an hypothesis location (i.e. an
+(** [clause_atom] refers either to an hypothesis location (i.e. an
hypothesis with occurrences and a position, in body if any, in type
or in both) or to some occurrences of the conclusion *)
@@ -148,40 +146,40 @@ type clause_atom =
| OnHyp of identifier * occurrences_expr * hyp_location_flag
| OnConcl of occurrences_expr
-(* A [concrete_clause] is an effective collection of
+(** A [concrete_clause] is an effective collection of
occurrences in the hypotheses and the conclusion *)
type concrete_clause = clause_atom list
-(* This interprets an [clause] in a given [goal] context *)
+(** This interprets an [clause] in a given [goal] context *)
val concrete_clause_of : clause -> goal sigma -> concrete_clause
-(*s Elimination tacticals. *)
+(** {6 Elimination tacticals. } *)
type branch_args = {
- ity : inductive; (* the type we were eliminating on *)
- largs : constr list; (* its arguments *)
- branchnum : int; (* the branch number *)
- pred : constr; (* the predicate we used *)
- nassums : int; (* the number of assumptions to be introduced *)
- branchsign : bool list; (* the signature of the branch.
+ ity : inductive; (** the type we were eliminating on *)
+ largs : constr list; (** its arguments *)
+ branchnum : int; (** the branch number *)
+ pred : constr; (** the predicate we used *)
+ nassums : int; (** the number of assumptions to be introduced *)
+ branchsign : bool list; (** the signature of the branch.
true=recursive argument, false=constant *)
branchnames : intro_pattern_expr located list}
type branch_assumptions = {
- ba : branch_args; (* the branch args *)
- assums : named_context} (* the list of assumptions introduced *)
+ ba : branch_args; (** the branch args *)
+ assums : named_context} (** the list of assumptions introduced *)
-(* [check_disjunctive_pattern_size loc pats n] returns an appropriate *)
-(* error message if |pats| <> n *)
+(** [check_disjunctive_pattern_size loc pats n] returns an appropriate
+ error message if |pats| <> n *)
val check_or_and_pattern_size :
Util.loc -> or_and_intro_pattern_expr -> int -> unit
-(* Tolerate "[]" to mean a disjunctive pattern of any length *)
+(** Tolerate "[]" to mean a disjunctive pattern of any length *)
val fix_empty_or_and_pattern : int -> or_and_intro_pattern_expr ->
or_and_intro_pattern_expr
-(* Useful for [as intro_pattern] modifier *)
+(** Useful for [as intro_pattern] modifier *)
val compute_induction_names :
int -> intro_pattern_expr located option ->
intro_pattern_expr located list array
diff --git a/tactics/tactics.mli b/tactics/tactics.mli
index 0e552bd40..2d7c07402 100644
--- a/tactics/tactics.mli
+++ b/tactics/tactics.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Util
open Names
open Term
@@ -29,11 +28,10 @@ open Nametab
open Rawterm
open Pattern
open Termops
-(*i*)
-(* Main tactics. *)
+(** Main tactics. *)
-(*s General functions. *)
+(** {6 General functions. } *)
val string_of_inductive : constr -> string
val head_constr : constr -> constr * constr list
@@ -42,7 +40,7 @@ val is_quantified_hypothesis : identifier -> goal sigma -> bool
exception Bound
-(*s Primitive tactics. *)
+(** {6 Primitive tactics. } *)
val introduction : identifier -> tactic
val refine : constr -> tactic
@@ -55,7 +53,7 @@ val fix : identifier option -> int -> tactic
val mutual_cofix : identifier -> (identifier * constr) list -> int -> tactic
val cofix : identifier option -> tactic
-(*s Introduction tactics. *)
+(** {6 Introduction tactics. } *)
val fresh_id_in_env : identifier list -> identifier -> env -> identifier
val fresh_id : identifier list -> identifier -> goal sigma -> identifier
@@ -65,7 +63,7 @@ val intro : tactic
val introf : tactic
val intro_move : identifier option -> identifier move_location -> tactic
- (* [intro_avoiding idl] acts as intro but prevents the new identifier
+ (** [intro_avoiding idl] acts as intro but prevents the new identifier
to belong to [idl] *)
val intro_avoiding : identifier list -> tactic
@@ -78,7 +76,7 @@ val intros_replacing : identifier list -> tactic
val intros : tactic
-(* [depth_of_quantified_hypothesis b h g] returns the index of [h] in
+(** [depth_of_quantified_hypothesis b h g] returns the index of [h] in
the conclusion of goal [g], up to head-reduction if [b] is [true] *)
val depth_of_quantified_hypothesis :
bool -> quantified_hypothesis -> goal sigma -> int
@@ -88,7 +86,7 @@ val intros_until : quantified_hypothesis -> tactic
val intros_clearing : bool list -> tactic
-(* Assuming a tactic [tac] depending on an hypothesis identifier,
+(** Assuming a tactic [tac] depending on an hypothesis identifier,
[try_intros_until tac arg] first assumes that arg denotes a
quantified hypothesis (denoted by name or by index) and try to
introduce it in context before to apply [tac], otherwise assume the
@@ -97,21 +95,21 @@ val intros_clearing : bool list -> tactic
val try_intros_until :
(identifier -> tactic) -> quantified_hypothesis -> tactic
-(* Apply a tactic on a quantified hypothesis, an hypothesis in context
+(** Apply a tactic on a quantified hypothesis, an hypothesis in context
or a term with bindings *)
val onInductionArg :
(constr with_bindings -> tactic) ->
constr with_bindings induction_arg -> tactic
-(*s Introduction tactics with eliminations. *)
+(** {6 Introduction tactics with eliminations. } *)
val intro_pattern : identifier move_location -> intro_pattern_expr -> tactic
val intro_patterns : intro_pattern_expr located list -> tactic
val intros_pattern :
identifier move_location -> intro_pattern_expr located list -> tactic
-(*s Exact tactics. *)
+(** {6 Exact tactics. } *)
val assumption : tactic
val exact_no_check : constr -> tactic
@@ -119,7 +117,7 @@ val vm_cast_no_check : constr -> tactic
val exact_check : constr -> tactic
val exact_proof : Topconstr.constr_expr -> tactic
-(*s Reduction tactics. *)
+(** {6 Reduction tactics. } *)
type tactic_reduction = env -> evar_map -> constr -> constr
@@ -156,7 +154,7 @@ val pattern_option :
val reduce : red_expr -> clause -> tactic
val unfold_constr : global_reference -> tactic
-(*s Modification of the local context. *)
+(** {6 Modification of the local context. } *)
val clear : identifier list -> tactic
val clear_body : identifier list -> tactic
@@ -169,7 +167,7 @@ val rename_hyp : (identifier * identifier) list -> tactic
val revert : identifier list -> tactic
-(*s Resolution tactics. *)
+(** {6 Resolution tactics. } *)
val apply_type : constr -> constr list -> tactic
val apply_term : constr -> constr list -> tactic
@@ -193,7 +191,7 @@ val apply_in :
val simple_apply_in : identifier -> constr -> tactic
-(*s Elimination tactics. *)
+(** {6 Elimination tactics. } *)
(*
@@ -219,36 +217,36 @@ val simple_apply_in : identifier -> constr -> tactic
Principles taken from functional induction have the final (f...).
*)
-(* [rel_contexts] and [rel_declaration] actually contain triples, and
+(** [rel_contexts] and [rel_declaration] actually contain triples, and
lists are actually in reverse order to fit [compose_prod]. *)
type elim_scheme = {
elimc: constr with_bindings option;
elimt: types;
indref: global_reference option;
- index: int; (* index of the elimination type in the scheme *)
- params: rel_context; (* (prm1,tprm1);(prm2,tprm2)...(prmp,tprmp) *)
- nparams: int; (* number of parameters *)
- predicates: rel_context; (* (Qq, (Tq_1 -> Tq_2 ->...-> Tq_nq)), (Q1,...) *)
- npredicates: int; (* Number of predicates *)
- branches: rel_context; (* branchr,...,branch1 *)
- nbranches: int; (* Number of branches *)
- args: rel_context; (* (xni, Ti_ni) ... (x1, Ti_1) *)
- nargs: int; (* number of arguments *)
- indarg: rel_declaration option; (* Some (H,I prm1..prmp x1...xni)
+ index: int; (** index of the elimination type in the scheme *)
+ params: rel_context; (** (prm1,tprm1);(prm2,tprm2)...(prmp,tprmp) *)
+ nparams: int; (** number of parameters *)
+ predicates: rel_context; (** (Qq, (Tq_1 -> Tq_2 ->...-> Tq_nq)), (Q1,...) *)
+ npredicates: int; (** Number of predicates *)
+ branches: rel_context; (** branchr,...,branch1 *)
+ nbranches: int; (** Number of branches *)
+ args: rel_context; (** (xni, Ti_ni) ... (x1, Ti_1) *)
+ nargs: int; (** number of arguments *)
+ indarg: rel_declaration option; (** Some (H,I prm1..prmp x1...xni)
if HI is in premisses, None otherwise *)
- concl: types; (* Qi x1...xni HI (f...), HI and (f...)
+ concl: types; (** Qi x1...xni HI (f...), HI and (f...)
are optional and mutually exclusive *)
- indarg_in_concl: bool; (* true if HI appears at the end of conclusion *)
- farg_in_concl: bool; (* true if (f...) appears at the end of conclusion *)
+ indarg_in_concl: bool; (** true if HI appears at the end of conclusion *)
+ farg_in_concl: bool; (** true if (f...) appears at the end of conclusion *)
}
val compute_elim_sig : ?elimc: constr with_bindings -> types -> elim_scheme
val rebuild_elimtype_from_scheme: elim_scheme -> types
-(* elim principle with the index of its inductive arg *)
+(** elim principle with the index of its inductive arg *)
type eliminator = {
- elimindex : int option; (* None = find it automatically *)
+ elimindex : int option; (** None = find it automatically *)
elimbody : constr with_bindings
}
@@ -278,7 +276,7 @@ val new_induct : evars_flag -> constr with_bindings induction_arg list ->
intro_pattern_expr located option * intro_pattern_expr located option ->
clause option -> tactic
-(*s Case analysis tactics. *)
+(** {6 Case analysis tactics. } *)
val general_case_analysis : evars_flag -> constr with_bindings -> tactic
val simplest_case : constr -> tactic
@@ -289,7 +287,7 @@ val new_destruct : evars_flag -> constr with_bindings induction_arg list ->
intro_pattern_expr located option * intro_pattern_expr located option ->
clause option -> tactic
-(*s Generic case analysis / induction tactics. *)
+(** {6 Generic case analysis / induction tactics. } *)
val induction_destruct : rec_flag -> evars_flag ->
(constr with_bindings induction_arg list *
@@ -298,12 +296,12 @@ val induction_destruct : rec_flag -> evars_flag ->
list *
clause option -> tactic
-(*s Eliminations giving the type instead of the proof. *)
+(** {6 Eliminations giving the type instead of the proof. } *)
val case_type : constr -> tactic
val elim_type : constr -> tactic
-(*s Some eliminations which are frequently used. *)
+(** {6 Some eliminations which are frequently used. } *)
val impE : identifier -> tactic
val andE : identifier -> tactic
@@ -313,7 +311,7 @@ val dAnd : clause -> tactic
val dorE : bool -> clause ->tactic
-(*s Introduction tactics. *)
+(** {6 Introduction tactics. } *)
val constructor_tac : evars_flag -> int option -> int ->
constr bindings -> tactic
@@ -332,7 +330,7 @@ val simplest_left : tactic
val simplest_right : tactic
val simplest_split : tactic
-(*s Logical connective tactics. *)
+(** {6 Logical connective tactics. } *)
val register_setoid_reflexivity : tactic -> unit
val reflexivity_red : bool -> tactic
@@ -368,7 +366,7 @@ val pose_proof : name -> constr -> tactic
val generalize : constr list -> tactic
val generalize_gen : ((occurrences * constr) * name) list -> tactic
-val generalize_dep : ?with_let:bool (* Don't lose let bindings *) -> constr -> tactic
+val generalize_dep : ?with_let:bool (** Don't lose let bindings *) -> constr -> tactic
val unify : ?state:Names.transparent_state -> constr -> constr -> tactic
val resolve_classes : tactic
diff --git a/tactics/termdn.mli b/tactics/termdn.mli
index aea49b073..973cc0e5b 100644
--- a/tactics/termdn.mli
+++ b/tactics/termdn.mli
@@ -1,25 +1,23 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Term
open Pattern
open Libnames
open Names
-(*i*)
-(* Discrimination nets of terms. *)
+(** Discrimination nets of terms. *)
-(* This module registers actions (typically tactics) mapped to patterns *)
+(** This module registers actions (typically tactics) mapped to patterns *)
-(* Patterns are stocked linearly as the list of its node in prefix
+(** Patterns are stocked linearly as the list of its node in prefix
order in such a way patterns having the same prefix have this common
prefix shared and the seek for the action associated to the patterns
that a term matches are found in time proportional to the maximal
@@ -38,21 +36,21 @@ sig
val create : unit -> t
- (* [add t (c,a)] adds to table [t] pattern [c] associated to action [act] *)
+ (** [add t (c,a)] adds to table [t] pattern [c] associated to action [act] *)
val add : t -> transparent_state -> (constr_pattern * Z.t) -> t
val rmv : t -> transparent_state -> (constr_pattern * Z.t) -> t
- (* [lookup t c] looks for patterns (with their action) matching term [c] *)
+ (** [lookup t c] looks for patterns (with their action) matching term [c] *)
val lookup : t -> transparent_state -> constr -> (constr_pattern * Z.t) list
val app : ((constr_pattern * Z.t) -> unit) -> t -> unit
- (*i*)
- (* These are for Nbtermdn *)
+ (**/**)
+ (** These are for Nbtermdn *)
type term_label =
| GRLabel of global_reference
@@ -68,5 +66,5 @@ sig
val constr_pat_discr : constr_pattern -> (term_label * constr_pattern list) option
val constr_val_discr : constr -> (term_label * constr list) lookup_res
-(*i*)
+(**/**)
end
diff --git a/toplevel/auto_ind_decl.mli b/toplevel/auto_ind_decl.mli
index 855f023f5..901ddb721 100644
--- a/toplevel/auto_ind_decl.mli
+++ b/toplevel/auto_ind_decl.mli
@@ -1,10 +1,10 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
open Term
open Names
@@ -14,7 +14,12 @@ open Sign
open Proof_type
open Ind_tables
-(* Build boolean equality of a block of mutual inductive types *)
+(** This file is about the automatic generation of schemes about
+ decidable equality,
+ @author Vincent Siles
+ Oct 2007 *)
+
+(** {6 Build boolean equality of a block of mutual inductive types } *)
exception EqNotFound of inductive * inductive
exception EqUnknown of string
@@ -27,7 +32,7 @@ exception NonSingletonProp of inductive
val beq_scheme_kind : mutual scheme_kind
val build_beq_scheme : mutual_inductive -> constr array
-(* Build equivalence between boolean equality and Leibniz equality *)
+(** {6 Build equivalence between boolean equality and Leibniz equality } *)
val lb_scheme_kind : mutual scheme_kind
val make_lb_scheme : mutual_inductive -> constr array
@@ -35,7 +40,7 @@ val make_lb_scheme : mutual_inductive -> constr array
val bl_scheme_kind : mutual scheme_kind
val make_bl_scheme : mutual_inductive -> constr array
-(* Build decidability of equality *)
+(** {6 Build decidability of equality } *)
val eq_dec_scheme_kind : mutual scheme_kind
val make_eq_decidability : mutual_inductive -> constr array
diff --git a/toplevel/autoinstance.mli b/toplevel/autoinstance.mli
index 3866fff39..b6cde8cf6 100644
--- a/toplevel/autoinstance.mli
+++ b/toplevel/autoinstance.mli
@@ -1,38 +1,36 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
-(* $Id:$ *)
+(** {% $ %}Id:{% $ %} *)
-(*i*)
open Term
open Libnames
open Typeclasses
open Names
open Evd
open Sign
-(*i*)
-(*s Automatic detection of (some) record instances *)
+(** {6 Automatic detection of (some) record instances } *)
-(* What to do if we find an instance. Passed are : the reference
+(** What to do if we find an instance. Passed are : the reference
* representing the record/class (definition or constructor) *)
type instance_decl_function = global_reference -> rel_context -> constr list -> unit
-(* [search_declaration gr] Search in the library if the (new)
+(** [search_declaration gr] Search in the library if the (new)
* declaration gr can form an instance of a registered record/class *)
val search_declaration : global_reference -> unit
-(* [search_record declf gr evm] Search the library for instances of
+(** [search_record declf gr evm] Search the library for instances of
the (new) record/class declaration [gr], and register them using
[declf]. [evm] is the signature of the record (to avoid recomputing
it) *)
val search_record : instance_decl_function -> global_reference -> evar_map -> unit
-(* Instance declaration for both scenarios *)
+(** Instance declaration for both scenarios *)
val declare_record_instance : instance_decl_function
val declare_class_instance : instance_decl_function
diff --git a/toplevel/cerrors.mli b/toplevel/cerrors.mli
index 24f37335b..8f26f4495 100644
--- a/toplevel/cerrors.mli
+++ b/toplevel/cerrors.mli
@@ -1,19 +1,17 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Pp
open Util
-(*i*)
-(* Error report. *)
+(** Error report. *)
val print_loc : loc -> std_ppcmds
diff --git a/toplevel/class.mli b/toplevel/class.mli
index 3398e3fab..4ee894cc9 100644
--- a/toplevel/class.mli
+++ b/toplevel/class.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Term
open Classops
@@ -16,31 +15,30 @@ open Declare
open Libnames
open Decl_kinds
open Nametab
-(*i*)
-(* Classes and coercions. *)
+(** Classes and coercions. *)
-(* [try_add_new_coercion_with_target ref s src tg] declares [ref] as a coercion
+(** [try_add_new_coercion_with_target ref s src tg] declares [ref] as a coercion
from [src] to [tg] *)
val try_add_new_coercion_with_target : global_reference -> locality ->
source:cl_typ -> target:cl_typ -> unit
-(* [try_add_new_coercion ref s] declares [ref], assumed to be of type
+(** [try_add_new_coercion ref s] declares [ref], assumed to be of type
[(x1:T1)...(xn:Tn)src->tg], as a coercion from [src] to [tg] *)
val try_add_new_coercion : global_reference -> locality -> unit
-(* [try_add_new_coercion_subclass cst s] expects that [cst] denotes a
+(** [try_add_new_coercion_subclass cst s] expects that [cst] denotes a
transparent constant which unfolds to some class [tg]; it declares
an identity coercion from [cst] to [tg], named something like
["Id_cst_tg"] *)
val try_add_new_coercion_subclass : cl_typ -> locality -> unit
-(* [try_add_new_coercion_with_source ref s src] declares [ref] as a coercion
+(** [try_add_new_coercion_with_source ref s src] declares [ref] as a coercion
from [src] to [tg] where the target is inferred from the type of [ref] *)
val try_add_new_coercion_with_source : global_reference -> locality ->
source:cl_typ -> unit
-(* [try_add_new_identity_coercion id s src tg] enriches the
+(** [try_add_new_identity_coercion id s src tg] enriches the
environment with a new definition of name [id] declared as an
identity coercion from [src] to [tg] *)
val try_add_new_identity_coercion : identifier -> locality ->
diff --git a/toplevel/classes.mli b/toplevel/classes.mli
index b8b104d47..279622843 100644
--- a/toplevel/classes.mli
+++ b/toplevel/classes.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Decl_kinds
open Term
@@ -22,36 +21,35 @@ open Util
open Typeclasses
open Implicit_quantifiers
open Libnames
-(*i*)
-(* Errors *)
+(** Errors *)
val mismatched_params : env -> constr_expr list -> rel_context -> 'a
val mismatched_props : env -> constr_expr list -> rel_context -> 'a
-(* Post-hoc class declaration. *)
+(** Post-hoc class declaration. *)
val declare_class : reference -> unit
-(* Instance declaration *)
+(** Instance declaration *)
val declare_instance : bool -> reference -> unit
val declare_instance_constant :
typeclass ->
- int option -> (* priority *)
- bool -> (* globality *)
- Impargs.manual_explicitation list -> (* implicits *)
+ int option -> (** priority *)
+ bool -> (** globality *)
+ Impargs.manual_explicitation list -> (** implicits *)
?hook:(Libnames.global_reference -> unit) ->
- identifier -> (* name *)
- Term.constr -> (* body *)
- Term.types -> (* type *)
+ identifier -> (** name *)
+ Term.constr -> (** body *)
+ Term.types -> (** type *)
Names.identifier
val new_instance :
- ?abstract:bool -> (* Not abstract by default. *)
- ?global:bool -> (* Not global by default. *)
+ ?abstract:bool -> (** Not abstract by default. *)
+ ?global:bool -> (** Not global by default. *)
local_binder list ->
typeclass_constraint ->
constr_expr ->
@@ -61,20 +59,20 @@ val new_instance :
int option ->
identifier
-(* Setting opacity *)
+(** Setting opacity *)
val set_typeclass_transparency : evaluable_global_reference -> bool -> unit
-(* For generation on names based on classes only *)
+(** For generation on names based on classes only *)
val id_of_class : typeclass -> identifier
-(* Context command *)
+(** Context command *)
val context : ?hook:(Libnames.global_reference -> unit) ->
local_binder list -> unit
-(* Forward ref for refine *)
+(** Forward ref for refine *)
val refine_ref : (open_constr -> Proof_type.tactic) ref
diff --git a/toplevel/command.mli b/toplevel/command.mli
index 48fc5a8eb..904a1a034 100644
--- a/toplevel/command.mli
+++ b/toplevel/command.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Util
open Names
open Term
@@ -21,19 +20,19 @@ open Decl_kinds
open Redexpr
open Constrintern
open Pfedit
-(*i*)
-(*s This file is about the interpretation of raw commands into typed
+(** {6 Sect } *)
+(** This file is about the interpretation of raw commands into typed
ones and top-level declaration of the main Gallina objects *)
-(* Hooks for Pcoq *)
+(** Hooks for Pcoq *)
val set_declare_definition_hook : (definition_entry -> unit) -> unit
val get_declare_definition_hook : unit -> (definition_entry -> unit)
val set_declare_assumptions_hook : (types -> unit) -> unit
-(*************************************************************************)
-(* Definitions/Let *)
+(************************************************************************
+ Definitions/Let *)
val interp_definition :
boxed_flag -> local_binder list -> red_expr option -> constr_expr ->
@@ -42,24 +41,24 @@ val interp_definition :
val declare_definition : identifier -> locality * definition_object_kind ->
definition_entry -> manual_implicits -> declaration_hook -> unit
-(*************************************************************************)
-(* Parameters/Assumptions *)
+(************************************************************************
+ Parameters/Assumptions *)
val interp_assumption :
local_binder list -> constr_expr -> types * manual_implicits
val declare_assumption : coercion_flag -> assumption_kind -> types ->
manual_implicits ->
- bool (* implicit *) -> bool (* inline *) -> variable located -> unit
+ bool (** implicit *) -> bool (* inline *) -> variable located -> unit
val declare_assumptions : variable located list ->
coercion_flag -> assumption_kind -> types -> manual_implicits ->
bool -> bool -> unit
-(*************************************************************************)
-(* Inductive and coinductive types *)
+(************************************************************************
+ Inductive and coinductive types *)
-(* Extracting the semantical components out of the raw syntax of mutual
+(** Extracting the semantical components out of the raw syntax of mutual
inductive declarations *)
type structured_one_inductive_expr = {
@@ -75,30 +74,30 @@ val extract_mutual_inductive_declaration_components :
(one_inductive_expr * decl_notation list) list ->
structured_inductive_expr * (*coercions:*) qualid list * decl_notation list
-(* Typing mutual inductive definitions *)
+(** Typing mutual inductive definitions *)
type one_inductive_impls =
- Impargs.manual_explicitation list (* for inds *)*
- Impargs.manual_explicitation list list (* for constrs *)
+ Impargs.manual_explicitation list (** for inds *)*
+ Impargs.manual_explicitation list list (** for constrs *)
val interp_mutual_inductive :
structured_inductive_expr -> decl_notation list -> bool ->
mutual_inductive_entry * one_inductive_impls list
-(* Registering a mutual inductive definition together with its
+(** Registering a mutual inductive definition together with its
associated schemes *)
val declare_mutual_inductive_with_eliminations :
bool -> mutual_inductive_entry -> one_inductive_impls list ->
mutual_inductive
-(* Entry points for the vernacular commands Inductive and CoInductive *)
+(** Entry points for the vernacular commands Inductive and CoInductive *)
val do_mutual_inductive :
(one_inductive_expr * decl_notation list) list -> bool -> unit
-(*************************************************************************)
-(* Fixpoints and cofixpoints *)
+(************************************************************************
+ Fixpoints and cofixpoints *)
type structured_fixpoint_expr = {
fix_name : identifier;
@@ -107,19 +106,19 @@ type structured_fixpoint_expr = {
fix_type : constr_expr
}
-(* Extracting the semantical components out of the raw syntax of
+(** Extracting the semantical components out of the raw syntax of
(co)fixpoints declarations *)
val extract_fixpoint_components :
(fixpoint_expr * decl_notation list) list ->
structured_fixpoint_expr list * decl_notation list *
- (* possible structural arg: *) lident option list
+ (** possible structural arg: *) lident option list
val extract_cofixpoint_components :
(cofixpoint_expr * decl_notation list) list ->
structured_fixpoint_expr list * decl_notation list
-(* Typing global fixpoints and cofixpoint_expr *)
+(** Typing global fixpoints and cofixpoint_expr *)
type recursive_preentry =
identifier list * constr option list * types list
@@ -132,7 +131,7 @@ val interp_cofixpoint :
structured_fixpoint_expr list -> decl_notation list ->
recursive_preentry * (int * manual_implicits) list
-(* Registering fixpoints and cofixpoints in the environment *)
+(** Registering fixpoints and cofixpoints in the environment *)
val declare_fixpoint :
bool -> recursive_preentry * (int * manual_implicits) list ->
@@ -142,7 +141,7 @@ val declare_cofixpoint :
bool -> recursive_preentry * (int * manual_implicits) list ->
decl_notation list -> unit
-(* Entry points for the vernacular commands Fixpoint and CoFixpoint *)
+(** Entry points for the vernacular commands Fixpoint and CoFixpoint *)
val do_fixpoint :
(fixpoint_expr * decl_notation list) list -> bool -> unit
@@ -150,7 +149,7 @@ val do_fixpoint :
val do_cofixpoint :
(cofixpoint_expr * decl_notation list) list -> bool -> unit
-(* Utils *)
+(** Utils *)
val check_mutuality : Environ.env -> bool -> (identifier * types) list -> unit
diff --git a/toplevel/coqinit.mli b/toplevel/coqinit.mli
index f4c82a41e..925859458 100644
--- a/toplevel/coqinit.mli
+++ b/toplevel/coqinit.mli
@@ -1,14 +1,14 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(* Initialization. *)
+(** Initialization. *)
val set_debug : unit -> unit
diff --git a/toplevel/coqtop.mli b/toplevel/coqtop.mli
index 87f4bdeb5..0c43cc757 100644
--- a/toplevel/coqtop.mli
+++ b/toplevel/coqtop.mli
@@ -1,21 +1,21 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(* The Coq main module. The following function [start] will parse the
+(** The Coq main module. The following function [start] will parse the
command line, print the banner, initialize the load path, load the input
state, load the files given on the command line, load the ressource file,
produce the output state if any, and finally will launch [Toplevel.loop]. *)
val start : unit -> unit
-(* [init_ide] is to be used by the Coq IDE.
+(** [init_ide] is to be used by the Coq IDE.
It does everything [start] does, except launching the toplevel loop.
It returns the list of Coq files given on the command line. *)
diff --git a/toplevel/discharge.mli b/toplevel/discharge.mli
index c6496cd4b..b3636d717 100644
--- a/toplevel/discharge.mli
+++ b/toplevel/discharge.mli
@@ -1,10 +1,10 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
diff --git a/toplevel/himsg.mli b/toplevel/himsg.mli
index 848fec79c..23c10767d 100644
--- a/toplevel/himsg.mli
+++ b/toplevel/himsg.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Pp
open Names
open Indtypes
@@ -19,9 +18,8 @@ open Typeclasses_errors
open Indrec
open Cases
open Logic
-(*i*)
-(* This module provides functions to explain the type errors. *)
+(** This module provides functions to explain the type errors. *)
val explain_type_error : env -> type_error -> std_ppcmds
diff --git a/toplevel/ind_tables.mli b/toplevel/ind_tables.mli
index 57ebbcda1..2abd15ce3 100644
--- a/toplevel/ind_tables.mli
+++ b/toplevel/ind_tables.mli
@@ -1,10 +1,10 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
open Term
open Names
@@ -13,10 +13,10 @@ open Mod_subst
open Sign
open Declarations
-(* This module provides support for registering inductive scheme builders,
+(** This module provides support for registering inductive scheme builders,
declaring schemes and generating schemes on demand *)
-(* A scheme is either a "mutual scheme_kind" or an "individual scheme_kind" *)
+(** A scheme is either a "mutual scheme_kind" or an "individual scheme_kind" *)
type mutual
type individual
@@ -25,7 +25,7 @@ type 'a scheme_kind
type mutual_scheme_object_function = mutual_inductive -> constr array
type individual_scheme_object_function = inductive -> constr
-(* Main functions to register a scheme builder *)
+(** Main functions to register a scheme builder *)
val declare_mutual_scheme_object : string -> ?aux:string ->
mutual_scheme_object_function -> mutual scheme_kind
@@ -37,15 +37,15 @@ val declare_individual_scheme_object : string -> ?aux:string ->
val declare_scheme : 'a scheme_kind -> (inductive * constant) array -> unit
*)
-(* Force generation of a (mutually) scheme with possibly user-level names *)
+(** Force generation of a (mutually) scheme with possibly user-level names *)
-val define_individual_scheme : individual scheme_kind -> bool (* internal *) ->
+val define_individual_scheme : individual scheme_kind -> bool (** internal *) ->
identifier option -> inductive -> constant
-val define_mutual_scheme : mutual scheme_kind -> bool (* internal *) ->
+val define_mutual_scheme : mutual scheme_kind -> bool (** internal *) ->
(int * identifier) list -> mutual_inductive -> constant array
-(* Main function to retrieve a scheme in the cache or to generate it *)
+(** Main function to retrieve a scheme in the cache or to generate it *)
val find_scheme : 'a scheme_kind -> inductive -> constant
val check_scheme : 'a scheme_kind -> inductive -> bool
diff --git a/toplevel/indschemes.mli b/toplevel/indschemes.mli
index 9aa32b7bd..aab60a590 100644
--- a/toplevel/indschemes.mli
+++ b/toplevel/indschemes.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Util
open Names
open Term
@@ -18,39 +17,38 @@ open Rawterm
open Genarg
open Vernacexpr
open Ind_tables
-(*i*)
-(* See also Auto_ind_decl, Indrec, Eqscheme, Ind_tables, ... *)
+(** See also Auto_ind_decl, Indrec, Eqscheme, Ind_tables, ... *)
-(* Build and register the boolean equalities associated to an inductive type *)
+(** Build and register the boolean equalities associated to an inductive type *)
val declare_beq_scheme : mutual_inductive -> unit
val declare_eq_decidability : mutual_inductive -> unit
-(* Build and register a congruence scheme for an equality-like inductive type *)
+(** Build and register a congruence scheme for an equality-like inductive type *)
val declare_congr_scheme : inductive -> unit
-(* Build and register rewriting schemes for an equality-like inductive type *)
+(** Build and register rewriting schemes for an equality-like inductive type *)
val declare_rewriting_schemes : inductive -> unit
-(* Mutual Minimality/Induction scheme *)
+(** Mutual Minimality/Induction scheme *)
val do_mutual_induction_scheme :
(identifier located * bool * inductive * rawsort) list -> unit
-(* Main calls to interpret the Scheme command *)
+(** Main calls to interpret the Scheme command *)
val do_scheme : (identifier located option * scheme) list -> unit
-(* Combine a list of schemes into a conjunction of them *)
+(** Combine a list of schemes into a conjunction of them *)
val build_combined_scheme : env -> constant list -> constr * types
val do_combined_scheme : identifier located -> identifier located list -> unit
-(* Hook called at each inductive type definition *)
+(** Hook called at each inductive type definition *)
val declare_default_schemes : mutual_inductive -> unit
diff --git a/toplevel/lemmas.mli b/toplevel/lemmas.mli
index f4e9f6f58..44502b4e4 100644
--- a/toplevel/lemmas.mli
+++ b/toplevel/lemmas.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.fix_expr *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.fix_expr
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Term
open Decl_kinds
@@ -17,9 +16,8 @@ open Tacexpr
open Vernacexpr
open Proof_type
open Pfedit
-(*i*)
-(* A hook start_proof calls on the type of the definition being started *)
+(** A hook start_proof calls on the type of the definition being started *)
val set_start_hook : (types -> unit) -> unit
val start_proof : identifier -> goal_kind -> types ->
@@ -35,31 +33,32 @@ val start_proof_with_initialization :
(identifier * (types * (int * Impargs.manual_explicitation list))) list ->
declaration_hook -> unit
-(* A hook the next three functions pass to cook_proof *)
+(** A hook the next three functions pass to cook_proof *)
val set_save_hook : (Proof.proof -> unit) -> unit
-(*s [save_named b] saves the current completed proof under the name it
+(** {6 Sect } *)
+(** [save_named b] saves the current completed proof under the name it
was started; boolean [b] tells if the theorem is declared opaque; it
fails if the proof is not completed *)
val save_named : bool -> unit
-(* [save_anonymous b name] behaves as [save_named] but declares the theorem
+(** [save_anonymous b name] behaves as [save_named] but declares the theorem
under the name [name] and respects the strength of the declaration *)
val save_anonymous : bool -> identifier -> unit
-(* [save_anonymous_with_strength s b name] behaves as [save_anonymous] but
+(** [save_anonymous_with_strength s b name] behaves as [save_anonymous] but
declares the theorem under the name [name] and gives it the
strength [strength] *)
val save_anonymous_with_strength : theorem_kind -> bool -> identifier -> unit
-(* [admit ()] aborts the current goal and save it as an assmumption *)
+(** [admit ()] aborts the current goal and save it as an assmumption *)
val admit : unit -> unit
-(* [get_current_context ()] returns the evar context and env of the
+(** [get_current_context ()] returns the evar context and env of the
current open proof if any, otherwise returns the empty evar context
and the current global env *)
diff --git a/toplevel/libtypes.mli b/toplevel/libtypes.mli
index d57ecb948..07d826933 100644
--- a/toplevel/libtypes.mli
+++ b/toplevel/libtypes.mli
@@ -1,31 +1,27 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
-(* $Id:$ *)
+(** {% $ %}Id:{% $ %} *)
-(*i*)
open Term
-(*i*)
-(*
- * Persistent library of all declared object,
- * indexed by their types (uses Dnets)
- *)
+(** Persistent library of all declared object, indexed by their types
+ (uses Dnets) *)
-(* results are the reference of the object, together with a context
+(** results are the reference of the object, together with a context
(constr+evar) and a substitution under this context *)
type result = Libnames.global_reference * (constr*existential_key) * Termops.subst
-(* this is the reduction function used in the indexing process *)
+(** this is the reduction function used in the indexing process *)
val reduce : types -> types
-(* The different types of search available.
- * See term_dnet.mli for more explanations *)
+(** The different types of search available.
+ See term_dnet.mli for more explanations *)
val search_pattern : types -> result list
val search_concl : types -> result list
val search_head_concl : types -> result list
diff --git a/toplevel/metasyntax.mli b/toplevel/metasyntax.mli
index a06806935..63272b7d3 100644
--- a/toplevel/metasyntax.mli
+++ b/toplevel/metasyntax.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Util
open Names
open Libnames
@@ -18,16 +17,15 @@ open Tacexpr
open Vernacexpr
open Notation
open Topconstr
-(*i*)
val add_token_obj : string -> unit
-(* Adding a tactic notation in the environment *)
+(** Adding a tactic notation in the environment *)
val add_tactic_notation :
int * grammar_tactic_prod_item_expr list * raw_tactic_expr -> unit
-(* Adding a (constr) notation in the environment*)
+(** Adding a (constr) notation in the environment*)
val add_infix : locality_flag -> (lstring * syntax_modifier list) ->
constr_expr -> scope_name option -> unit
@@ -35,32 +33,32 @@ val add_infix : locality_flag -> (lstring * syntax_modifier list) ->
val add_notation : locality_flag -> constr_expr ->
(lstring * syntax_modifier list) -> scope_name option -> unit
-(* Declaring delimiter keys and default scopes *)
+(** Declaring delimiter keys and default scopes *)
val add_delimiters : scope_name -> string -> unit
val add_class_scope : scope_name -> Classops.cl_typ -> unit
-(* Add only the interpretation of a notation that already has pa/pp rules *)
+(** Add only the interpretation of a notation that already has pa/pp rules *)
val add_notation_interpretation :
(lstring * constr_expr * scope_name option) -> unit
-(* Add a notation interpretation for supporting the "where" clause *)
+(** Add a notation interpretation for supporting the "where" clause *)
val set_notation_for_interpretation : Constrintern.full_internalization_env ->
(lstring * constr_expr * scope_name option) -> unit
-(* Add only the parsing/printing rule of a notation *)
+(** Add only the parsing/printing rule of a notation *)
val add_syntax_extension :
locality_flag -> (lstring * syntax_modifier list) -> unit
-(* Add a syntactic definition (as in "Notation f := ...") *)
+(** Add a syntactic definition (as in "Notation f := ...") *)
val add_syntactic_definition : identifier -> identifier list * constr_expr ->
bool -> bool -> unit
-(* Print the Camlp4 state of a grammar *)
+(** Print the Camlp4 state of a grammar *)
val print_grammar : string -> unit
diff --git a/toplevel/mltop.mli b/toplevel/mltop.mli
index 4230f0ee4..a03ad6242 100644
--- a/toplevel/mltop.mli
+++ b/toplevel/mltop.mli
@@ -1,14 +1,14 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(* If there is a toplevel under Coq, it is described by the following
+(** If there is a toplevel under Coq, it is described by the following
record. *)
type toplevel = {
load_obj : string -> unit;
@@ -16,44 +16,44 @@ type toplevel = {
add_dir : string -> unit;
ml_loop : unit -> unit }
-(* Sets and initializes a toplevel (if any) *)
+(** Sets and initializes a toplevel (if any) *)
val set_top : toplevel -> unit
-(* Are we in a native version of Coq? *)
+(** Are we in a native version of Coq? *)
val is_native : bool
-(* Removes the toplevel (if any) *)
+(** Removes the toplevel (if any) *)
val remove : unit -> unit
-(* Tests if an Ocaml toplevel runs under Coq *)
+(** Tests if an Ocaml toplevel runs under Coq *)
val is_ocaml_top : unit -> bool
-(* Tests if we can load ML files *)
+(** Tests if we can load ML files *)
val has_dynlink : bool
-(* Starts the Ocaml toplevel loop *)
+(** Starts the Ocaml toplevel loop *)
val ocaml_toploop : unit -> unit
-(* Dynamic loading of .cmo *)
+(** Dynamic loading of .cmo *)
val dir_ml_load : string -> unit
-(* Dynamic interpretation of .ml *)
+(** Dynamic interpretation of .ml *)
val dir_ml_use : string -> unit
-(* Adds a path to the ML paths *)
+(** Adds a path to the ML paths *)
val add_ml_dir : string -> unit
val add_rec_ml_dir : string -> unit
-(* Adds a path to the Coq and ML paths *)
+(** Adds a path to the Coq and ML paths *)
val add_path : unix_path:string -> coq_root:Names.dir_path -> unit
val add_rec_path : unix_path:string -> coq_root:Names.dir_path -> unit
-(* List of modules linked to the toplevel *)
+(** List of modules linked to the toplevel *)
val add_known_module : string -> unit
val module_is_known : string -> bool
val load_object : string -> string -> unit
-(* Summary of Declared ML Modules *)
+(** Summary of Declared ML Modules *)
val get_loaded_modules : unit -> string list
val add_loaded_module : string -> unit
val init_ml_modules : unit -> unit
diff --git a/toplevel/record.mli b/toplevel/record.mli
index b9864f083..d432bff6d 100644
--- a/toplevel/record.mli
+++ b/toplevel/record.mli
@@ -1,14 +1,13 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Term
open Sign
@@ -16,9 +15,8 @@ open Vernacexpr
open Topconstr
open Impargs
open Libnames
-(*i*)
-(* [declare_projections ref name coers params fields] declare projections of
+(** [declare_projections ref name coers params fields] declare projections of
record [ref] (if allowed) using the given [name] as argument, and put them
as coercions accordingly to [coers]; it returns the absolute names of projections *)
@@ -28,16 +26,16 @@ val declare_projections :
(name * bool) list * constant option list
val declare_structure : Decl_kinds.recursivity_kind ->
- bool (*infer?*) -> identifier -> identifier ->
- manual_explicitation list -> rel_context -> (* params *) constr -> (* arity *)
- Impargs.manual_explicitation list list -> rel_context -> (* fields *)
+ bool (**infer?*) -> identifier -> identifier ->
+ manual_explicitation list -> rel_context -> (** params *) constr -> (** arity *)
+ Impargs.manual_explicitation list list -> rel_context -> (** fields *)
?kind:Decl_kinds.definition_object_kind -> ?name:identifier ->
- bool -> (* coercion? *)
- bool list -> (* field coercions *)
+ bool -> (** coercion? *)
+ bool list -> (** field coercions *)
Evd.evar_map ->
inductive
val definition_structure :
- inductive_kind * Decl_kinds.recursivity_kind * bool(*infer?*)* lident with_coercion * local_binder list *
+ inductive_kind * Decl_kinds.recursivity_kind * bool(**infer?*)* lident with_coercion * local_binder list *
(local_decl_expr with_coercion with_notation) list *
identifier * constr_expr option -> global_reference
diff --git a/toplevel/search.mli b/toplevel/search.mli
index cc764fbde..a9d62c6ef 100644
--- a/toplevel/search.mli
+++ b/toplevel/search.mli
@@ -1,10 +1,10 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
@@ -16,7 +16,7 @@ open Pattern
open Libnames
open Nametab
-(*s Search facilities. *)
+(** {6 Search facilities. } *)
type glob_search_about_item =
| GlobSearchSubPattern of constr_pattern
@@ -28,14 +28,14 @@ val search_pattern : constr -> dir_path list * bool -> unit
val search_about :
(bool * glob_search_about_item) list -> dir_path list * bool -> unit
-(* The filtering function that is by standard search facilities.
+(** The filtering function that is by standard search facilities.
It can be passed as argument to the raw search functions.
It is used in pcoq. *)
val filter_by_module_from_list :
dir_path list * bool -> global_reference -> env -> 'a -> bool
-(* raw search functions can be used for various extensions.
+(** raw search functions can be used for various extensions.
They are also used for pcoq. *)
val gen_filtered_search : (global_reference -> env -> constr -> bool) ->
(global_reference -> env -> constr -> unit) -> unit
diff --git a/toplevel/toplevel.mli b/toplevel/toplevel.mli
index 3f2fa83ad..f51c088f0 100644
--- a/toplevel/toplevel.mli
+++ b/toplevel/toplevel.mli
@@ -1,46 +1,44 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Pp
open Pcoq
-(*i*)
-(* The Coq toplevel loop. *)
+(** The Coq toplevel loop. *)
-(* A buffer for the character read from a channel. We store the command
+(** A buffer for the character read from a channel. We store the command
* entered to be able to report errors without pretty-printing. *)
type input_buffer = {
mutable prompt : unit -> string;
- mutable str : string; (* buffer of already read characters *)
- mutable len : int; (* number of chars in the buffer *)
- mutable bols : int list; (* offsets in str of begining of lines *)
- mutable tokens : Pcoq.Gram.parsable; (* stream of tokens *)
- mutable start : int } (* stream count of the first char of the buffer *)
+ mutable str : string; (** buffer of already read characters *)
+ mutable len : int; (** number of chars in the buffer *)
+ mutable bols : int list; (** offsets in str of begining of lines *)
+ mutable tokens : Pcoq.Gram.parsable; (** stream of tokens *)
+ mutable start : int } (** stream count of the first char of the buffer *)
-(* The input buffer of stdin. *)
+(** The input buffer of stdin. *)
val top_buffer : input_buffer
val set_prompt : (unit -> string) -> unit
-(* Toplevel error explanation, dealing with locations, Drop, Ctrl-D
+(** Toplevel error explanation, dealing with locations, Drop, Ctrl-D
May raise only the following exceptions: [Drop] and [End_of_input],
meaning we get out of the Coq loop. *)
val print_toplevel_error : exn -> std_ppcmds
-(* Parse and execute a vernac command. *)
+(** Parse and execute a vernac command. *)
val do_vernac : unit -> unit
-(* Main entry point of Coq: read and execute vernac commands. *)
+(** Main entry point of Coq: read and execute vernac commands. *)
val loop : unit -> unit
diff --git a/toplevel/usage.mli b/toplevel/usage.mli
index fb973e3ba..1dfd4897b 100644
--- a/toplevel/usage.mli
+++ b/toplevel/usage.mli
@@ -1,23 +1,23 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*s Prints the version number on the standard output and exits (with 0). *)
+(** {6 Prints the version number on the standard output and exits (with 0). } *)
val version : unit -> 'a
-(*s Prints the usage on the error output, preceeded by a user-provided message. *)
+(** {6 Prints the usage on the error output, preceeded by a user-provided message. } *)
val print_usage : string -> unit
-(*s Prints the usage on the error output. *)
+(** {6 Prints the usage on the error output. } *)
val print_usage_coqtop : unit -> unit
val print_usage_coqc : unit -> unit
-(*s Prints the configuration information *)
+(** {6 Prints the configuration information } *)
val print_config : unit -> unit
diff --git a/toplevel/vernac.mli b/toplevel/vernac.mli
index 747c02afe..8ae319791 100644
--- a/toplevel/vernac.mli
+++ b/toplevel/vernac.mli
@@ -1,22 +1,22 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(* Parsing of vernacular. *)
+(** Parsing of vernacular. *)
-(* Read a vernac command on the specified input (parse only).
+(** Read a vernac command on the specified input (parse only).
Raises [End_of_file] if EOF (or Ctrl-D) is reached. *)
val parse_sentence : Pcoq.Gram.parsable * in_channel option ->
Util.loc * Vernacexpr.vernac_expr
-(* Reads and executes vernac commands from a stream.
+(** Reads and executes vernac commands from a stream.
The boolean [just_parsing] disables interpretation of commands. *)
exception DuringCommandInterp of Util.loc * exn
@@ -27,16 +27,16 @@ val eval_expr : Util.loc * Vernacexpr.vernac_expr -> unit
val eval_ctrl : Vernacexpr.vernac_expr -> unit
val raw_do_vernac : Pcoq.Gram.parsable -> unit
-(* Set XML hooks *)
+(** Set XML hooks *)
val set_xml_start_library : (unit -> unit) -> unit
val set_xml_end_library : (unit -> unit) -> unit
-(* Load a vernac file, verbosely or not. Errors are annotated with file
+(** Load a vernac file, verbosely or not. Errors are annotated with file
and location *)
val load_vernac : bool -> string -> unit
-(* Compile a vernac file, verbosely or not (f is assumed without .v suffix) *)
+(** Compile a vernac file, verbosely or not (f is assumed without .v suffix) *)
val compile : bool -> string -> unit
diff --git a/toplevel/vernacentries.mli b/toplevel/vernacentries.mli
index 58df8a906..fa9f2b7c2 100644
--- a/toplevel/vernacentries.mli
+++ b/toplevel/vernacentries.mli
@@ -1,34 +1,33 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Names
open Term
open Vernacinterp
open Vernacexpr
open Topconstr
-(*i*)
-(* Vernacular entries *)
+(** Vernacular entries *)
val show_script : unit -> unit
val show_prooftree : unit -> unit
val show_node : unit -> unit
-(* This function can be used by any command that want to observe terms
+(** This function can be used by any command that want to observe terms
in the context of the current goal, as for instance in pcoq *)
val get_current_context_of_args : int option -> Evd.evar_map * Environ.env
(*i
-(* this function is used to analyse the extra arguments in search commands.
+
+(** this function is used to analyse the extra arguments in search commands.
It is used in pcoq. *) (*i anciennement: inside_outside i*)
val interp_search_restriction : search_restriction -> dir_path list * bool
i*)
@@ -47,7 +46,7 @@ type pcoq_hook = {
val set_pcoq_hook : pcoq_hook -> unit
-(* This function makes sure that the function given in argument is preceded
+(** This function makes sure that the function given in argument is preceded
by a command aborting all proofs if necessary.
It is used in pcoq. *)
val abort_refine : ('a -> unit) -> 'a -> unit;;
diff --git a/toplevel/vernacinterp.mli b/toplevel/vernacinterp.mli
index 7adc74930..4c59eadba 100644
--- a/toplevel/vernacinterp.mli
+++ b/toplevel/vernacinterp.mli
@@ -1,18 +1,16 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(*i*)
open Tacexpr
-(*i*)
-(* Interpretation of extended vernac phrases. *)
+(** Interpretation of extended vernac phrases. *)
val disable_drop : exn -> exn
diff --git a/toplevel/whelp.mli b/toplevel/whelp.mli
index 2f1621a7a..4c14c836a 100644
--- a/toplevel/whelp.mli
+++ b/toplevel/whelp.mli
@@ -1,14 +1,14 @@
-(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(************************************************************************)
+(***********************************************************************
+ v * The Coq Proof Assistant / The Coq Development Team
+ <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud
+ \VV/ *************************************************************
+ // * This file is distributed under the terms of the
+ * GNU Lesser General Public License Version 2.1
+ ***********************************************************************)
(*i $Id$ i*)
-(* Coq interface to the Whelp query engine developed at
+(** Coq interface to the Whelp query engine developed at
the University of Bologna *)
open Names