| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
open Names |
| 12 |
open Libnames |
| 13 |
open Constrexpr |
| 14 |
open Glob_term |
| 15 |
open Notation_term |
| 16 |
open Notationextern |
| 17 |
open Globnames |
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
val notation_cat : Libobject.category |
| 22 |
|
| 23 |
val pr_notation : notation -> Pp.t |
| 24 |
|
| 25 |
|
| 26 |
module NotationSet : CSet.ExtS with type elt = notation |
| 27 |
module NotationMap : CMap.ExtS with type key = notation and module Set := NotationSet |
| 28 |
module SpecificNotationSet : CSet.ExtS with type elt = specific_notation |
| 29 |
module SpecificNotationMap : CMap.ExtS with type key = specific_notation and module Set := SpecificNotationSet |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
type delimiters = string |
| 36 |
type scope |
| 37 |
type scopes |
| 38 |
|
| 39 |
val declare_scope : scope_name -> unit |
| 40 |
|
| 41 |
|
| 42 |
val ensure_scope : scope_name -> unit |
| 43 |
|
| 44 |
val current_scopes : unit -> scopes |
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
val scope_is_open_in_scopes : scope_name -> scopes -> bool |
| 49 |
val scope_is_open : scope_name -> bool |
| 50 |
|
| 51 |
|
| 52 |
val open_scope : scope_name -> unit |
| 53 |
val close_scope : scope_name -> unit |
| 54 |
|
| 55 |
|
| 56 |
val normalize_scope : string -> scope_name |
| 57 |
|
| 58 |
|
| 59 |
val empty_scope_stack : scopes |
| 60 |
val push_scope : scope_name -> scopes -> scopes |
| 61 |
|
| 62 |
val find_scope : scope_name -> scope |
| 63 |
|
| 64 |
val scope_delimiters : scope -> delimiters option |
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
val declare_delimiters : scope_name -> delimiters -> unit |
| 69 |
val remove_delimiters : scope_name -> unit |
| 70 |
val find_delimiters_scope : ?loc:Loc.t -> delimiters -> scope_name |
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
type notation_location = (DirPath.t * DirPath.t) * string |
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
type required_module = full_path * string list |
| 88 |
|
| 89 |
type prim_token_infos = { |
| 90 |
pt_local : bool; |
| 91 |
pt_scope : scope_name; |
| 92 |
pt_interp_info : PrimNotations.prim_token_interp_info; |
| 93 |
pt_required : required_module; |
| 94 |
pt_refs : GlobRef.t list; |
| 95 |
pt_in_match : bool |
| 96 |
} |
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
val enable_prim_token_interpretation : prim_token_infos -> unit |
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
val interp_prim_token : ?loc:Loc.t -> prim_token -> subscopes -> |
| 111 |
glob_constr * scope_name option |
| 112 |
|
| 113 |
val interp_prim_token_cases_pattern_expr : ?loc:Loc.t -> (Glob_term.glob_constr -> unit) -> prim_token -> |
| 114 |
subscopes -> glob_constr * scope_name option |
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
val uninterp_prim_token : |
| 120 |
print_float:bool -> 'a glob_constr_g -> subscopes -> prim_token * delimiters option |
| 121 |
val uninterp_prim_token_cases_pattern : |
| 122 |
print_float:bool -> 'a cases_pattern_g -> subscopes -> Name.t * prim_token * delimiters option |
| 123 |
|
| 124 |
val availability_of_prim_token : |
| 125 |
prim_token -> scope_name -> subscopes -> delimiters option option |
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
val warning_overridden_name : string |
| 130 |
|
| 131 |
type entry_coercion_kind = |
| 132 |
| IsEntryCoercion of notation_entry_level * notation_entry_relative_level |
| 133 |
| IsEntryGlobal of CustomName.t * int |
| 134 |
| IsEntryIdent of CustomName.t * int |
| 135 |
|
| 136 |
val declare_notation : notation_with_optional_scope * notation -> |
| 137 |
interpretation -> notation_location -> use:notation_use -> |
| 138 |
entry_coercion_kind option -> |
| 139 |
UserWarn.t option -> unit |
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
val interp_notation : ?loc:Loc.t -> notation -> subscopes -> |
| 144 |
interpretation * (notation_location * scope_name option) |
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
val availability_of_notation : specific_notation -> subscopes -> |
| 150 |
(scope_name option * delimiters option) option |
| 151 |
|
| 152 |
val is_printing_inactive_rule : Notationextern.interp_rule -> interpretation -> bool |
| 153 |
|
| 154 |
type 'a notation_query_pattern_gen = { |
| 155 |
notation_entry_pattern : notation_entry list; |
| 156 |
interp_rule_key_pattern : (notation_key, 'a) Util.union option; |
| 157 |
use_pattern : notation_use; |
| 158 |
scope_pattern : notation_with_optional_scope option; |
| 159 |
interpretation_pattern : interpretation option; |
| 160 |
} |
| 161 |
|
| 162 |
type notation_query_pattern = qualid notation_query_pattern_gen |
| 163 |
|
| 164 |
val toggle_notations : on:bool -> all:bool -> ?verbose:bool -> (glob_constr -> Pp.t) -> notation_query_pattern -> unit |
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
val interpret_notation_string : string -> string |
| 170 |
|
| 171 |
type notation_as_reference_error = |
| 172 |
| AmbiguousNotationAsReference of notation_key |
| 173 |
| NotationNotReference of Environ.env * Evd.evar_map * notation_key * (notation_key * notation_constr) list |
| 174 |
|
| 175 |
exception NotationAsReferenceError of notation_as_reference_error |
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
val interp_notation_as_global_reference : ?loc:Loc.t -> head:bool -> |
| 180 |
(GlobRef.t -> bool) -> notation_key -> delimiters option -> GlobRef.t |
| 181 |
|
| 182 |
|
| 183 |
val interp_notation_as_global_reference_expanded : ?loc:Loc.t -> head:bool -> |
| 184 |
(GlobRef.t -> bool) -> notation_key -> delimiters option -> |
| 185 |
(notation_entry * notation_key) * notation_key * notation_with_optional_scope * interpretation * GlobRef.t |
| 186 |
|
| 187 |
|
| 188 |
val declare_arguments_scope : |
| 189 |
bool -> GlobRef.t -> scope_name list list -> unit |
| 190 |
|
| 191 |
val find_arguments_scope : Environ.env -> GlobRef.t -> scope_name list list |
| 192 |
|
| 193 |
type scope_class |
| 194 |
|
| 195 |
|
| 196 |
val scope_class_compare : scope_class -> scope_class -> int |
| 197 |
|
| 198 |
val subst_scope_class : |
| 199 |
Environ.env -> Mod_subst.substitution -> scope_class -> scope_class option |
| 200 |
|
| 201 |
type add_scope_where = AddScopeTop | AddScopeBottom |
| 202 |
|
| 203 |
val declare_scope_class : bool -> scope_name -> ?where:add_scope_where -> scope_class -> unit |
| 204 |
val declare_ref_arguments_scope : GlobRef.t -> unit |
| 205 |
|
| 206 |
val compute_arguments_scope : Environ.env -> Evd.evar_map -> EConstr.types -> scope_name list list |
| 207 |
val compute_type_scope : Environ.env -> Evd.evar_map -> EConstr.types -> scope_name list |
| 208 |
val compute_glob_type_scope : 'a Glob_term.glob_constr_g -> scope_name list |
| 209 |
|
| 210 |
|
| 211 |
val current_type_scope_names : unit -> scope_name list |
| 212 |
|
| 213 |
val scope_class_of_class : Coercionops.cl_typ -> scope_class |
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
type symbol = |
| 218 |
| Terminal of string |
| 219 |
| NonTerminal of Id.t |
| 220 |
| SProdList of Id.t * symbol list |
| 221 |
| Break of int |
| 222 |
|
| 223 |
val symbol_eq : symbol -> symbol -> bool |
| 224 |
|
| 225 |
|
| 226 |
val make_notation_key : notation_entry -> symbol list -> notation |
| 227 |
val decompose_notation_key : notation -> notation_entry * symbol list |
| 228 |
|
| 229 |
type notation_symbols = { |
| 230 |
recvars : (Id.t * Id.t) list; |
| 231 |
mainvars : Id.t list; |
| 232 |
symbols : symbol list; |
| 233 |
} |
| 234 |
|
| 235 |
val is_prim_token_constant_in_constr : notation_entry * symbol list -> bool |
| 236 |
|
| 237 |
|
| 238 |
|
| 239 |
|
| 240 |
val decompose_raw_notation : string -> notation_symbols |
| 241 |
|
| 242 |
|
| 243 |
val pr_scope_class : scope_class -> Pp.t |
| 244 |
val pr_scope : (glob_constr -> Pp.t) -> scope_name -> Pp.t |
| 245 |
val pr_scopes : (glob_constr -> Pp.t) -> Pp.t |
| 246 |
val locate_notation : (glob_constr -> Pp.t) -> notation_key -> |
| 247 |
scope_name option -> Pp.t |
| 248 |
|
| 249 |
val pr_visibility: (glob_constr -> Pp.t) -> scope_name option -> Pp.t |
| 250 |
|
| 251 |
|
| 252 |
|
| 253 |
val is_coercion : notation_entry_level -> notation_entry_relative_level -> bool |
| 254 |
|
| 255 |
|
| 256 |
|
| 257 |
|
| 258 |
val declare_entry_coercion : specific_notation -> notation_entry_level -> notation_entry_relative_level -> unit |
| 259 |
|
| 260 |
|
| 261 |
type entry_coercion = (notation_with_optional_scope * notation) list |
| 262 |
val availability_of_entry_coercion : ?non_included:bool -> notation_entry_relative_level -> notation_entry_level -> entry_coercion option |
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
val declare_custom_entry_has_global : CustomName.t -> int -> unit |
| 268 |
val declare_custom_entry_has_ident : CustomName.t -> int -> unit |
| 269 |
|
| 270 |
val entry_has_global : notation_entry_relative_level -> bool |
| 271 |
val entry_has_ident : notation_entry_relative_level -> bool |
| 272 |
|
| 273 |
val app_level : int |
| 274 |
|
| 275 |
val prec_less : entry_level -> entry_relative_level -> bool |
| 276 |
val may_capture_cont_after : entry_level option -> entry_relative_level -> bool |
| 277 |
|
| 278 |
|
| 279 |
|
| 280 |
val declare_notation_level : notation -> level -> unit |
| 281 |
val level_of_notation : notation -> level |
| 282 |
|
| 283 |
|
| 284 |
|
| 285 |
|
| 286 |
val with_notation_protection : ('a -> 'b) -> 'a -> 'b |