From 249649cdca1dc04d0acb4d095b73b4efd22b0102 Mon Sep 17 00:00:00 2001 From: Rodolphe Lepigre Date: Tue, 6 Feb 2024 10:31:45 +0100 Subject: [PATCH] Adapt to coq/coq#18546. --- serlib/plugins/ltac/ser_tacexpr.ml | 29 +++++++++++++++-------------- serlib/ser_evaluable.ml | 24 ++++++++++++++++++++++++ serlib/ser_genredexpr.ml | 5 +++-- serlib/ser_names.ml | 7 ------- serlib/ser_names.mli | 2 -- 5 files changed, 42 insertions(+), 25 deletions(-) create mode 100644 serlib/ser_evaluable.ml diff --git a/serlib/plugins/ltac/ser_tacexpr.ml b/serlib/plugins/ltac/ser_tacexpr.ml index d8c73b59..b0fc5586 100644 --- a/serlib/plugins/ltac/ser_tacexpr.ml +++ b/serlib/plugins/ltac/ser_tacexpr.ml @@ -48,6 +48,7 @@ module Tactypes = Ser_tactypes module Tactics = Ser_tactics module Equality = Ser_equality module Inv = Ser_inv +module Evaluable = Ser_evaluable type direction_flag = [%import: Ltac_plugin.Tacexpr.direction_flag] @@ -508,7 +509,7 @@ let rec glob_tactic_expr_of_sexp tac = Genintern.glob_constr_and_expr_of_sexp Genintern.glob_constr_and_expr_of_sexp Genintern.glob_constr_pattern_and_expr_of_sexp - (Locus.or_var_of_sexp (Genredexpr.and_short_name_of_sexp Names.Evaluable.t_of_sexp)) + (Locus.or_var_of_sexp (Genredexpr.and_short_name_of_sexp Evaluable.t_of_sexp)) (Locus.or_var_of_sexp (Loc.located_of_sexp ltac_constant_of_sexp)) Names.lident_of_sexp glob_tactic_expr_of_sexp @@ -519,7 +520,7 @@ and glob_atomic_tactic_expr_of_sexp tac = Genintern.glob_constr_and_expr_of_sexp Genintern.glob_constr_and_expr_of_sexp Genintern.glob_constr_pattern_and_expr_of_sexp - (Locus.or_var_of_sexp (Genredexpr.and_short_name_of_sexp Names.Evaluable.t_of_sexp)) + (Locus.or_var_of_sexp (Genredexpr.and_short_name_of_sexp Evaluable.t_of_sexp)) (Locus.or_var_of_sexp (Loc.located_of_sexp ltac_constant_of_sexp)) Names.lident_of_sexp glob_tactic_expr_of_sexp @@ -530,7 +531,7 @@ let rec sexp_of_glob_tactic_expr (tac : glob_tactic_expr) = Genintern.sexp_of_glob_constr_and_expr Genintern.sexp_of_glob_constr_and_expr Genintern.sexp_of_glob_constr_pattern_and_expr - (Locus.sexp_of_or_var (Genredexpr.sexp_of_and_short_name Names.Evaluable.sexp_of_t)) + (Locus.sexp_of_or_var (Genredexpr.sexp_of_and_short_name Evaluable.sexp_of_t)) (Locus.sexp_of_or_var (Loc.sexp_of_located sexp_of_ltac_constant)) Names.sexp_of_lident sexp_of_glob_tactic_expr @@ -541,7 +542,7 @@ and sexp_of_glob_atomic_tactic_expr (tac : glob_atomic_tactic_expr) = Genintern.sexp_of_glob_constr_and_expr Genintern.sexp_of_glob_constr_and_expr Genintern.sexp_of_glob_constr_pattern_and_expr - (Locus.sexp_of_or_var (Genredexpr.sexp_of_and_short_name Names.Evaluable.sexp_of_t)) + (Locus.sexp_of_or_var (Genredexpr.sexp_of_and_short_name Evaluable.sexp_of_t)) (Locus.sexp_of_or_var (Loc.sexp_of_located sexp_of_ltac_constant)) Names.sexp_of_lident sexp_of_glob_tactic_expr @@ -554,7 +555,7 @@ let rec glob_tactic_expr_of_yojson tac = Genintern.glob_constr_and_expr_of_yojson Genintern.glob_constr_and_expr_of_yojson Genintern.glob_constr_pattern_and_expr_of_yojson - (Locus.or_var_of_yojson (Genredexpr.and_short_name_of_yojson Names.Evaluable.of_yojson)) + (Locus.or_var_of_yojson (Genredexpr.and_short_name_of_yojson Evaluable.of_yojson)) (Locus.or_var_of_yojson (Loc.located_of_yojson ltac_constant_of_yojson)) Names.lident_of_yojson glob_tactic_expr_of_yojson @@ -565,7 +566,7 @@ and glob_atomic_tactic_expr_of_yojson tac = Genintern.glob_constr_and_expr_of_yojson Genintern.glob_constr_and_expr_of_yojson Genintern.glob_constr_pattern_and_expr_of_yojson - (Locus.or_var_of_yojson (Genredexpr.and_short_name_of_yojson Names.Evaluable.of_yojson)) + (Locus.or_var_of_yojson (Genredexpr.and_short_name_of_yojson Evaluable.of_yojson)) (Locus.or_var_of_yojson (Loc.located_of_yojson ltac_constant_of_yojson)) Names.lident_of_yojson glob_tactic_expr_of_yojson @@ -576,7 +577,7 @@ let rec glob_tactic_expr_to_yojson tac = Genintern.glob_constr_and_expr_to_yojson Genintern.glob_constr_and_expr_to_yojson Genintern.glob_constr_pattern_and_expr_to_yojson - (Locus.or_var_to_yojson (Genredexpr.and_short_name_to_yojson Names.Evaluable.to_yojson)) + (Locus.or_var_to_yojson (Genredexpr.and_short_name_to_yojson Evaluable.to_yojson)) (Locus.or_var_to_yojson (Loc.located_to_yojson ltac_constant_to_yojson)) Names.lident_to_yojson glob_tactic_expr_to_yojson @@ -587,7 +588,7 @@ and glob_atomic_tactic_expr_to_yojson tac = Genintern.glob_constr_and_expr_to_yojson Genintern.glob_constr_and_expr_to_yojson Genintern.glob_constr_pattern_and_expr_to_yojson - (Locus.or_var_to_yojson (Genredexpr.and_short_name_to_yojson Names.Evaluable.to_yojson)) + (Locus.or_var_to_yojson (Genredexpr.and_short_name_to_yojson Evaluable.to_yojson)) (Locus.or_var_to_yojson (Loc.located_to_yojson ltac_constant_to_yojson)) Names.lident_to_yojson glob_tactic_expr_to_yojson @@ -599,7 +600,7 @@ let rec hash_fold_glob_tactic_expr st tac = Genintern.hash_fold_glob_constr_and_expr Genintern.hash_fold_glob_constr_and_expr Genintern.hash_fold_glob_constr_pattern_and_expr - (Locus.hash_fold_or_var (Genredexpr.hash_fold_and_short_name Names.Evaluable.hash_fold_t)) + (Locus.hash_fold_or_var (Genredexpr.hash_fold_and_short_name Evaluable.hash_fold_t)) (Locus.hash_fold_or_var (Loc.hash_fold_located hash_fold_ltac_constant)) Names.hash_fold_lident hash_fold_glob_tactic_expr @@ -610,7 +611,7 @@ and hash_fold_glob_atomic_tactic_expr st tac = Genintern.hash_fold_glob_constr_and_expr Genintern.hash_fold_glob_constr_and_expr Genintern.hash_fold_glob_constr_pattern_and_expr - (Locus.hash_fold_or_var (Genredexpr.hash_fold_and_short_name Names.Evaluable.hash_fold_t)) + (Locus.hash_fold_or_var (Genredexpr.hash_fold_and_short_name Evaluable.hash_fold_t)) (Locus.hash_fold_or_var (Loc.hash_fold_located hash_fold_ltac_constant)) Names.hash_fold_lident hash_fold_glob_tactic_expr @@ -625,7 +626,7 @@ let rec compare_glob_tactic_expr tac = Genintern.compare_glob_constr_and_expr Genintern.compare_glob_constr_and_expr Genintern.compare_glob_constr_pattern_and_expr - (Locus.compare_or_var (Genredexpr.compare_and_short_name Names.Evaluable.compare)) + (Locus.compare_or_var (Genredexpr.compare_and_short_name Evaluable.compare)) (Locus.compare_or_var (Loc.compare_located compare_ltac_constant)) Names.compare_lident compare_glob_tactic_expr @@ -636,7 +637,7 @@ and compare_glob_atomic_tactic_expr tac = Genintern.compare_glob_constr_and_expr Genintern.compare_glob_constr_and_expr Genintern.compare_glob_constr_pattern_and_expr - (Locus.compare_or_var (Genredexpr.compare_and_short_name Names.Evaluable.compare)) + (Locus.compare_or_var (Genredexpr.compare_and_short_name Evaluable.compare)) (Locus.compare_or_var (Loc.compare_located compare_ltac_constant)) Names.compare_lident compare_glob_tactic_expr @@ -797,7 +798,7 @@ let atomic_tactic_expr_of_sexp tac = EConstr.t_of_sexp Genintern.glob_constr_and_expr_of_sexp Pattern.constr_pattern_of_sexp - Names.Evaluable.t_of_sexp + Evaluable.t_of_sexp (Loc.located_of_sexp ltac_constant_of_sexp) Names.Id.t_of_sexp unit_of_sexp @@ -808,7 +809,7 @@ let sexp_of_atomic_tactic_expr tac = EConstr.sexp_of_t Genintern.sexp_of_glob_constr_and_expr Pattern.sexp_of_constr_pattern - Names.Evaluable.sexp_of_t + Evaluable.sexp_of_t (Loc.sexp_of_located sexp_of_ltac_constant) Names.Id.sexp_of_t sexp_of_unit diff --git a/serlib/ser_evaluable.ml b/serlib/ser_evaluable.ml new file mode 100644 index 00000000..f5465896 --- /dev/null +++ b/serlib/ser_evaluable.ml @@ -0,0 +1,24 @@ +(************************************************************************) +(* * The Coq Proof Assistant / The Coq Development Team *) +(* v * INRIA, CNRS and contributors - Copyright 1999-2018 *) +(*