diff options
author | Pierre Letouzey <pierre.letouzey@inria.fr> | 2016-04-26 17:30:30 +0200 |
---|---|---|
committer | Pierre Letouzey <pierre.letouzey@inria.fr> | 2017-06-14 09:44:21 +0200 |
commit | d038839a32978548051573286e22462d68d42ee6 (patch) | |
tree | 14af8ed8354ef5ace1f685b1593529a2394f86d8 /intf | |
parent | 7e63c300a3aa1e3befb29bab9094e8b1939824bb (diff) |
Constrexpr.Numeral stays uninterpreted (string+sign instead of BigInt.t)
This string contains the base-10 representation of the number (big endian)
Note that some inner parsing stuff still uses bigints, see egramcoq.ml
Diffstat (limited to 'intf')
-rw-r--r-- | intf/constrexpr.ml | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/intf/constrexpr.ml b/intf/constrexpr.ml index 614c097b5..593b190a6 100644 --- a/intf/constrexpr.ml +++ b/intf/constrexpr.ml @@ -31,8 +31,16 @@ type abstraction_kind = AbsLambda | AbsPi type proj_flag = int option (** [Some n] = proj of the n-th visible argument *) +(** Representation of integer literals that appear in Coq scripts. + We now use raw strings of digits in base 10 (big-endian), and a separate + sign flag. Note that this representation is not unique, due to possible + multiple leading zeros, and -0 = +0 *) + +type sign = bool +type raw_natural_number = string + type prim_token = - | Numeral of Bigint.bigint (** representation of integer literals that appear in Coq scripts. *) + | Numeral of raw_natural_number * sign | String of string type instance_expr = Misctypes.glob_level list |