Debian Codegraph @

vernac/synterp.mli

raw symbols SCIP
1 (************************************************************************)
2 (* * The Rocq Prover / The Rocq Development Team *)
3 (* v * Copyright INRIA, CNRS and contributors *)
4 (* <O___,, * (see version control and CREDITS file for authors & dates) *)
5 (* \VV/ **************************************************************)
6 (* // * This file is distributed under the terms of the *)
7 (* * GNU Lesser General Public License Version 2.1 *)
8 (* * (see LICENSE file for the text of the license) *)
9 (************************************************************************)
10
11 (** This module implements the syntactic interpretation phase of vernacular
12 commands. The main entry point is [synterp_control], which transforms a
13 vernacexpr into a [vernac_control_entry]. *)
14
15 open Names
16 open Libnames
17
18 val module_locality : bool Attributes.attribute
19
20 val with_locality : atts:Attributes.vernac_flags -> (local:bool option -> 'a) -> 'a
21
22 val with_module_locality :
23 atts:Attributes.vernac_flags -> (module_local:bool -> 'a) -> 'a
24
25 val with_generic_atts :
26 check:bool -> Attributes.vernac_flags -> (atts:Attributes.vernac_flags -> 'a) -> 'a
27
28 type module_entry = Modintern.module_struct_expr * Names.ModPath.t * Modintern.module_kind * Entries.inline
29
30 type synterp_entry =
31 | EVernacNoop
32 | EVernacNotation of { local : bool; decl : Metasyntax.notation_interpretation_decl }
33 | EVernacBeginSection of Names.lident
34 | EVernacEndSegment of Names.lident
35 | EVernacRequire of
36 Library.library_t list * DirPath.t list * Vernacexpr.export_with_cats option * (qualid * Vernacexpr.import_filter_expr) list
37 | EVernacImport of (Vernacexpr.export_flag * Libobject.open_filter) *
38 (Names.ModPath.t CAst.t * Vernacexpr.import_filter_expr) list
39 | EVernacDeclareMLModule of Mltop.interp_fun
40 | EVernacDeclareModule of Lib.export * lident *
41 Declaremods.module_params_expr *
42 module_entry
43 | EVernacDefineModule of Lib.export * lident *
44 Declaremods.module_params_expr *
45 ((Vernacexpr.export_flag * Libobject.open_filter) * Names.ModPath.t) list *
46 module_entry Declaremods.module_signature *
47 module_entry list
48 | EVernacDeclareModuleType of lident *
49 Declaremods.module_params_expr *
50 ((Vernacexpr.export_flag * Libobject.open_filter) * Names.ModPath.t) list *
51 module_entry list *
52 module_entry list
53 | EVernacInclude of Declaremods.module_expr list
54 | EVernacSetOption of { export : bool; key : Goptions.option_name; value : Vernacexpr.option_setting }
55 | EVernacLoad of Vernacexpr.verbose_flag * (vernac_control_entry * Vernacstate.Synterp.t) list
56 | EVernacExtend of Vernactypes.typed_vernac
57
58 and vernac_entry = synterp_entry Vernacexpr.vernac_expr_gen
59
60 (** [vernac_control_entry] defines elaborated vernacular expressions, after the
61 syntactic interpretation phase and before full interpretation *)
62 and vernac_control_entry =
63 (Vernacstate.Synterp.t VernacControl.control_entry, synterp_entry)
64 Vernacexpr.vernac_control_gen_r CAst.t
65
66 exception UnmappedLibrary of Names.DirPath.t option * Libnames.qualid
67 exception NotFoundLibrary of Names.DirPath.t option * Libnames.qualid
68
69 (** [synterp_require] performs the syntactic interpretation phase of `Require`
70 commands *)
71 val synterp_require :
72 intern:Library.Intern.t ->
73 Libnames.qualid option ->
74 Vernacexpr.export_with_cats option ->
75 (Libnames.qualid * Vernacexpr.import_filter_expr) list ->
76 Library.library_t list * DirPath.t list
77
78 (** [synterp_control] is the main entry point of the syntactic interpretation phase *)
79 val synterp_control :
80 intern:Library.Intern.t ->
81 Vernacexpr.vernac_control ->
82 vernac_control_entry
83
84 (** Default proof mode set by `start_proof` *)
85 val get_default_proof_mode : unit -> Pvernac.proof_mode