aboutsummaryrefslogtreecommitdiff
path: root/plugins/ssr
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2020-03-24 17:10:56 +0100
committerPierre-Marie Pédrot2020-03-24 17:10:56 +0100
commitbc70bb31c579b9482d0189f20806632c62b26a61 (patch)
tree8d7f505224ba9de5b3025d302239a929e1da68b6 /plugins/ssr
parent9f1f56e04fab689ab05339f8cddea4bd2935a554 (diff)
parent5d1c4ae7b8931c7a1dec5f61c2571919319aeb4a (diff)
Merge PR #11703: Making of NumTok an API for numeral
Reviewed-by: SkySkimmer Reviewed-by: ppedrot Reviewed-by: proux01
Diffstat (limited to 'plugins/ssr')
-rw-r--r--plugins/ssr/ssrparser.mlg4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/ssr/ssrparser.mlg b/plugins/ssr/ssrparser.mlg
index 1dca8fd57b..442b40221b 100644
--- a/plugins/ssr/ssrparser.mlg
+++ b/plugins/ssr/ssrparser.mlg
@@ -350,8 +350,8 @@ let interp_index ist gl idx =
| Some c ->
let rc = Detyping.detype Detyping.Now false Id.Set.empty (pf_env gl) (project gl) c in
begin match Notation.uninterp_prim_token rc with
- | _, Constrexpr.Numeral (b,{NumTok.int = s; frac = ""; exp = ""}) ->
- let n = int_of_string s in (match b with SPlus -> n | SMinus -> -n)
+ | _, Constrexpr.Numeral n when NumTok.Signed.is_int n ->
+ int_of_string (NumTok.Signed.to_string n)
| _ -> raise Not_found
end
| None -> raise Not_found