From d038839a32978548051573286e22462d68d42ee6 Mon Sep 17 00:00:00 2001 From: Pierre Letouzey Date: Tue, 26 Apr 2016 17:30:30 +0200 Subject: 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 --- intf/constrexpr.ml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'intf/constrexpr.ml') 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 -- cgit v1.2.3