aboutsummaryrefslogtreecommitdiff
path: root/plugins/ssr/ssrparser.ml4
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ssr/ssrparser.ml4')
-rw-r--r--plugins/ssr/ssrparser.ml410
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/ssr/ssrparser.ml4 b/plugins/ssr/ssrparser.ml4
index 5fd3772338..228444b82e 100644
--- a/plugins/ssr/ssrparser.ml4
+++ b/plugins/ssr/ssrparser.ml4
@@ -8,7 +8,6 @@
(* This file is (C) Copyright 2006-2015 Microsoft Corporation and Inria. *)
-open API
open Grammar_API
open Names
open Pp
@@ -346,7 +345,8 @@ let interp_index ist gl idx =
| Some c ->
let rc = Detyping.detype false [] (pf_env gl) (project gl) c in
begin match Notation.uninterp_prim_token rc with
- | _, Constrexpr.Numeral bigi -> int_of_string (Bigint.to_string bigi)
+ | _, Constrexpr.Numeral (s,b) ->
+ let n = int_of_string s in if b then n else -n
| _ -> raise Not_found
end
| None -> raise Not_found
@@ -1465,7 +1465,7 @@ let ssr_id_of_string loc s =
else Feedback.msg_warning (str (
"The name " ^ s ^ " fits the _xxx_ format used for anonymous variables.\n"
^ "Scripts with explicit references to anonymous variables are fragile."))
- end; id_of_string s
+ end; Id.of_string s
let ssr_null_entry = Gram.Entry.of_parser "ssr_null" (fun _ -> ())
@@ -1555,7 +1555,7 @@ END
let ssrautoprop gl =
try
let tacname =
- try Nametab.locate_tactic (qualid_of_ident (id_of_string "ssrautoprop"))
+ try Nametab.locate_tactic (qualid_of_ident (Id.of_string "ssrautoprop"))
with Not_found -> Nametab.locate_tactic (ssrqid "ssrautoprop") in
let tacexpr = Loc.tag @@ Tacexpr.Reference (ArgArg (Loc.tag @@ tacname)) in
Proofview.V82.of_tactic (eval_tactic (Tacexpr.TacArg tacexpr)) gl
@@ -2320,7 +2320,7 @@ let test_idcomma = Gram.Entry.of_parser "test_idcomma" accept_idcomma
GEXTEND Gram
GLOBAL: ssr_idcomma;
ssr_idcomma: [ [ test_idcomma;
- ip = [ id = IDENT -> Some (id_of_string id) | "_" -> None ]; "," ->
+ ip = [ id = IDENT -> Some (Id.of_string id) | "_" -> None ]; "," ->
Some ip
] ];
END