| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
open Glob_term |
| 12 |
open Names |
| 13 |
|
| 14 |
type rawnum = NumTok.Signed.t |
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
type prim_token_uid = private string |
| 23 |
|
| 24 |
type 'a prim_token_interpreter = ?loc:Loc.t -> 'a -> glob_constr |
| 25 |
type 'a prim_token_uninterpreter = any_glob_constr -> 'a option |
| 26 |
|
| 27 |
type 'a prim_token_interpretation = |
| 28 |
'a prim_token_interpreter * 'a prim_token_uninterpreter |
| 29 |
|
| 30 |
val register_rawnumeral_interpretation : |
| 31 |
?allow_overwrite:bool -> string -> rawnum prim_token_interpretation -> prim_token_uid |
| 32 |
|
| 33 |
val register_bignumeral_interpretation : |
| 34 |
?allow_overwrite:bool -> string -> Z.t prim_token_interpretation -> prim_token_uid |
| 35 |
|
| 36 |
val register_string_interpretation : |
| 37 |
?allow_overwrite:bool -> string -> string prim_token_interpretation -> prim_token_uid |
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
type prim_token_notation_error = |
| 42 |
| UnexpectedTerm of Constr.t |
| 43 |
| UnexpectedNonOptionTerm of Constr.t |
| 44 |
|
| 45 |
exception PrimTokenNotationError of string * Environ.env * Evd.evar_map * prim_token_notation_error |
| 46 |
|
| 47 |
type numnot_option = |
| 48 |
| Nop |
| 49 |
| Warning of NumTok.UnsignedNat.t |
| 50 |
| Abstract of NumTok.UnsignedNat.t |
| 51 |
|
| 52 |
type int_ty = |
| 53 |
{ dec_uint : Names.inductive; |
| 54 |
dec_int : Names.inductive; |
| 55 |
hex_uint : Names.inductive; |
| 56 |
hex_int : Names.inductive; |
| 57 |
uint : Names.inductive; |
| 58 |
int : Names.inductive } |
| 59 |
|
| 60 |
type z_pos_ty = |
| 61 |
{ z_ty : Names.inductive; |
| 62 |
pos_ty : Names.inductive } |
| 63 |
|
| 64 |
type number_ty = |
| 65 |
{ int : int_ty; |
| 66 |
decimal : Names.inductive; |
| 67 |
hexadecimal : Names.inductive; |
| 68 |
number : Names.inductive } |
| 69 |
|
| 70 |
type pos_neg_int63_ty = |
| 71 |
{ pos_neg_int63_ty : Names.inductive } |
| 72 |
|
| 73 |
type target_kind = |
| 74 |
| Int of int_ty |
| 75 |
| UInt of int_ty |
| 76 |
| Z of z_pos_ty |
| 77 |
| Int63 of pos_neg_int63_ty |
| 78 |
| Float64 |
| 79 |
| Number of number_ty |
| 80 |
|
| 81 |
type string_target_kind = |
| 82 |
| ListByte |
| 83 |
| Byte |
| 84 |
| PString |
| 85 |
|
| 86 |
type option_kind = Direct | Option | Error |
| 87 |
type 'target conversion_kind = 'target * option_kind |
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
type to_post_arg = ToPostCopy | ToPostAs of int | ToPostHole of Id.t | ToPostCheck of Constr.t |
| 105 |
type ('target, 'warning) prim_token_notation_obj = |
| 106 |
{ to_kind : 'target conversion_kind; |
| 107 |
to_ty : GlobRef.t; |
| 108 |
to_post : ((GlobRef.t * GlobRef.t * to_post_arg list) list) array; |
| 109 |
of_kind : 'target conversion_kind; |
| 110 |
of_ty : GlobRef.t; |
| 111 |
ty_name : Libnames.qualid; |
| 112 |
warning : 'warning } |
| 113 |
|
| 114 |
type number_notation_obj = (target_kind, numnot_option) prim_token_notation_obj |
| 115 |
type string_notation_obj = (string_target_kind, unit) prim_token_notation_obj |
| 116 |
|
| 117 |
type prim_token_interp_info = |
| 118 |
| Uid of prim_token_uid |
| 119 |
| NumberNotation of number_notation_obj |
| 120 |
| StringNotation of string_notation_obj |
| 121 |
|
| 122 |
val do_interp : ?loc:Loc.t -> prim_token_interp_info -> Constrexpr.prim_token -> Glob_term.glob_constr |
| 123 |
|
| 124 |
val do_uninterp : print_float:bool -> prim_token_interp_info -> _ Glob_term.glob_constr_g -> Constrexpr.prim_token option |
| 125 |
|
| 126 |
val can_interp : prim_token_interp_info -> Constrexpr.prim_token -> bool |
| 127 |
|
| 128 |
|
| 129 |
val int63_of_pos_bigint : Z.t -> Uint63.t |