Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file ser_tacarg.ml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496(************************************************************************)(* v * The Coq Proof Assistant / The Coq Development Team *)(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2016 *)(* \VV/ **************************************************************)(* // * This file is distributed under the terms of the *)(* * GNU Lesser General Public License Version 2.1 *)(************************************************************************)(************************************************************************)(* Coq serialization API/Plugin *)(* Copyright 2016-2018 MINES ParisTech *)(************************************************************************)(* Status: Very Experimental *)(************************************************************************)openSerlibopenLtac_pluginmoduleCAst=Ser_cAstmoduleConstrexpr=Ser_constrexprmoduleTactypes=Ser_tactypesmoduleGenintern=Ser_geninternmoduleLtac_plugin=structmoduleG_rewrite=G_rewritemoduleRewrite=Ser_rewritemoduleTacexpr=Ser_tacexprend(* Needed for compat with -pack build method used in Coq's make *)openLtac_plugin(* Tacarg *)moduleA1=structtypeh1=Constrexpr.constr_exprTactypes.intro_pattern_exprCAst.t[@@derivingsexp]typeh2=Genintern.glob_constr_and_exprTactypes.intro_pattern_exprCAst.t[@@derivingsexp]typeh3=Ltac_plugin.Tacexpr.intro_pattern[@@derivingsexp]endletser_wit_simple_intropattern=letopenA1inSer_genarg.{raw_ser=sexp_of_h1;raw_des=h1_of_sexp;glb_ser=sexp_of_h2;glb_des=h2_of_sexp;top_ser=sexp_of_h3;top_des=h3_of_sexp}letser_wit_destruction_arg=Ser_genarg.{raw_ser=Ser_tactics.sexp_of_destruction_arg(Ser_tactypes.sexp_of_with_bindingsSer_constrexpr.sexp_of_constr_expr);glb_ser=Ser_tactics.sexp_of_destruction_arg(Ser_tactypes.sexp_of_with_bindingsSer_genintern.sexp_of_glob_constr_and_expr);top_ser=Ser_tactics.(sexp_of_destruction_argSer_tactypes.sexp_of_delayed_open_constr_with_bindings);raw_des=Ser_tactics.destruction_arg_of_sexp(Ser_tactypes.with_bindings_of_sexpSer_constrexpr.constr_expr_of_sexp);glb_des=Ser_tactics.destruction_arg_of_sexp(Ser_tactypes.with_bindings_of_sexpSer_genintern.glob_constr_and_expr_of_sexp);top_des=Ser_tactics.(destruction_arg_of_sexpSer_tactypes.delayed_open_constr_with_bindings_of_sexp);}letser_wit_tactic=Ser_genarg.{raw_ser=Ser_tacexpr.sexp_of_raw_tactic_expr;glb_ser=Ser_tacexpr.sexp_of_glob_tactic_expr;top_ser=Ser_geninterp.Val.sexp_of_t;raw_des=Ser_tacexpr.raw_tactic_expr_of_sexp;glb_des=Ser_tacexpr.glob_tactic_expr_of_sexp;top_des=Ser_geninterp.Val.t_of_sexp;}letser_wit_ltac=Ser_genarg.{raw_ser=Ser_tacexpr.sexp_of_raw_tactic_expr;glb_ser=Ser_tacexpr.sexp_of_glob_tactic_expr;top_ser=Sexplib.Conv.sexp_of_unit;raw_des=Ser_tacexpr.raw_tactic_expr_of_sexp;glb_des=Ser_tacexpr.glob_tactic_expr_of_sexp;top_des=Sexplib.Conv.unit_of_sexp;}letser_wit_quant_hyp=Ser_genarg.mk_uniformSer_tactypes.sexp_of_quantified_hypothesisSer_tactypes.quantified_hypothesis_of_sexpletser_wit_bindings:(Constrexpr.constr_exprTactypes.bindings,Genintern.glob_constr_and_exprTactypes.bindings,EConstr.constrTactypes.bindingsTactypes.delayed_open)Ser_genarg.gen_ser=Ser_genarg.{raw_ser=Ser_tactypes.sexp_of_bindingsSer_constrexpr.sexp_of_constr_expr;glb_ser=Ser_tactypes.sexp_of_bindingsSer_genintern.sexp_of_glob_constr_and_expr;top_ser=Serlib_base.sexp_of_opaque~typ:"wit_bindings/top";raw_des=Ser_tactypes.bindings_of_sexpSer_constrexpr.constr_expr_of_sexp;glb_des=Ser_tactypes.bindings_of_sexpSer_genintern.glob_constr_and_expr_of_sexp;top_des=Serlib_base.opaque_of_sexp~typ:"wit_bindings/top";}letser_wit_constr_with_bindings:(Constrexpr.constr_exprTactypes.with_bindings,Genintern.glob_constr_and_exprTactypes.with_bindings,EConstr.constrTactypes.with_bindingsTactypes.delayed_open)Ser_genarg.gen_ser=Ser_genarg.{raw_ser=Ser_tactypes.sexp_of_with_bindingsSer_constrexpr.sexp_of_constr_expr;glb_ser=Ser_tactypes.sexp_of_with_bindingsSer_genintern.sexp_of_glob_constr_and_expr;top_ser=Serlib_base.sexp_of_opaque~typ:"wit_constr_with_bindings/top";raw_des=Ser_tactypes.with_bindings_of_sexpSer_constrexpr.constr_expr_of_sexp;glb_des=Ser_tactypes.with_bindings_of_sexpSer_genintern.glob_constr_and_expr_of_sexp;top_des=Serlib_base.opaque_of_sexp~typ:"wit_constr_with_bindings/top";}(* G_ltac *)(* Defined in g_ltac but serialized here *)letser_wit_ltac_info=letopenSexplib.ConvinSer_genarg.{raw_ser=sexp_of_int;glb_ser=sexp_of_unit;top_ser=sexp_of_unit;raw_des=int_of_sexp;glb_des=unit_of_sexp;top_des=unit_of_sexp;}letser_wit_production_item=letopenSexplib.ConvinSer_genarg.{raw_ser=Ser_tacentries.(sexp_of_grammar_tactic_prod_item_exprsexp_of_raw_argument);glb_ser=sexp_of_unit;top_ser=sexp_of_unit;raw_des=Ser_tacentries.(grammar_tactic_prod_item_expr_of_sexpraw_argument_of_sexp);glb_des=unit_of_sexp;top_des=unit_of_sexp;}letser_wit_ltac_production_sep=letopenSexplib.ConvinSer_genarg.{raw_ser=sexp_of_string;glb_ser=sexp_of_unit;top_ser=sexp_of_unit;raw_des=string_of_sexp;glb_des=unit_of_sexp;top_des=unit_of_sexp;}letser_wit_ltac_selector=Ser_genarg.{raw_ser=Ser_goal_select.sexp_of_t;glb_ser=Sexplib.Conv.sexp_of_unit;top_ser=Sexplib.Conv.sexp_of_unit;raw_des=Ser_goal_select.t_of_sexp;glb_des=Sexplib.Conv.unit_of_sexp;top_des=Sexplib.Conv.unit_of_sexp;}letser_wit_ltac_tacdef_body=Ser_genarg.{raw_ser=Ser_tacexpr.sexp_of_tacdef_body;glb_ser=Sexplib.Conv.sexp_of_unit;top_ser=Sexplib.Conv.sexp_of_unit;raw_des=Ser_tacexpr.tacdef_body_of_sexp;glb_des=Sexplib.Conv.unit_of_sexp;top_des=Sexplib.Conv.unit_of_sexp;}letser_wit_ltac_tactic_level=Ser_genarg.{raw_ser=Sexplib.Conv.sexp_of_int;glb_ser=Sexplib.Conv.sexp_of_unit;top_ser=Sexplib.Conv.sexp_of_unit;raw_des=Sexplib.Conv.int_of_sexp;glb_des=Sexplib.Conv.unit_of_sexp;top_des=Sexplib.Conv.unit_of_sexp;}letser_wit_ltac_use_default=Ser_genarg.{raw_ser=Sexplib.Conv.sexp_of_bool;glb_ser=Sexplib.Conv.sexp_of_unit;top_ser=Sexplib.Conv.sexp_of_unit;raw_des=Sexplib.Conv.bool_of_sexp;glb_des=Sexplib.Conv.unit_of_sexp;top_des=Sexplib.Conv.unit_of_sexp}(* From G_auto *)letser_wit_auto_using=Ser_genarg.{raw_ser=Sexplib.Conv.sexp_of_listSer_constrexpr.sexp_of_constr_expr;glb_ser=Sexplib.Conv.sexp_of_listSer_genintern.sexp_of_glob_constr_and_expr;top_ser=Sexplib.Conv.sexp_of_listSer_ltac_pretype.sexp_of_closed_glob_constr;raw_des=Sexplib.Conv.list_of_sexpSer_constrexpr.constr_expr_of_sexp;glb_des=Sexplib.Conv.list_of_sexpSer_genintern.glob_constr_and_expr_of_sexp;top_des=Sexplib.Conv.list_of_sexpSer_ltac_pretype.closed_glob_constr_of_sexp;}letser_wit_hintbases=letopenSexplib.ConvinSer_genarg.{raw_ser=sexp_of_option(sexp_of_listsexp_of_string);glb_ser=sexp_of_option(sexp_of_listsexp_of_string);top_ser=sexp_of_option(sexp_of_listSer_hints.sexp_of_hint_db_name);raw_des=option_of_sexp(list_of_sexpstring_of_sexp);glb_des=option_of_sexp(list_of_sexpstring_of_sexp);top_des=option_of_sexp(list_of_sexpSer_hints.hint_db_name_of_sexp);}letser_wit_hintbases_path=Ser_genarg.{raw_ser=Ser_hints.(sexp_of_hints_path_genSer_libnames.sexp_of_qualid);glb_ser=Ser_hints.sexp_of_hints_path;top_ser=Ser_hints.sexp_of_hints_path;raw_des=Ser_hints.(hints_path_gen_of_sexpSer_libnames.qualid_of_sexp);glb_des=Ser_hints.hints_path_of_sexp;top_des=Ser_hints.hints_path_of_sexp;}letser_wit_hintbases_path_atom=Ser_genarg.{raw_ser=Ser_hints.(sexp_of_hints_path_atom_genSer_libnames.sexp_of_qualid);glb_ser=Ser_hints.(sexp_of_hints_path_atom_genSer_names.GlobRef.sexp_of_t);top_ser=Ser_hints.(sexp_of_hints_path_atom_genSer_names.GlobRef.sexp_of_t);raw_des=Ser_hints.(hints_path_atom_gen_of_sexpSer_libnames.qualid_of_sexp);glb_des=Ser_hints.(hints_path_atom_gen_of_sexpSer_names.GlobRef.t_of_sexp);top_des=Ser_hints.(hints_path_atom_gen_of_sexpSer_names.GlobRef.t_of_sexp);}letser_wit_opthints=letopenSexplib.ConvinSer_genarg.{raw_ser=sexp_of_option(sexp_of_listsexp_of_string);glb_ser=sexp_of_option(sexp_of_listsexp_of_string);top_ser=sexp_of_option(sexp_of_listSer_hints.sexp_of_hint_db_name);raw_des=option_of_sexp(list_of_sexpstring_of_sexp);glb_des=option_of_sexp(list_of_sexpstring_of_sexp);top_des=option_of_sexp(list_of_sexpSer_hints.hint_db_name_of_sexp);}(* G_rewrite *)moduleG_rewrite=structopenSexplib.Convletwit_binders=Ltac_plugin.G_rewrite.wit_binderstypebinders_argtype=[%import:Ltac_plugin.G_rewrite.binders_argtype][@@derivingsexp]letser_wit_binders=Ser_genarg.mk_uniformsexp_of_binders_argtypebinders_argtype_of_sexpletwit_glob_constr_with_bindings=Ltac_plugin.G_rewrite.wit_glob_constr_with_bindingsletser_wit_glob_constr_with_bindings=letopenSexplib.Convinlet_sexp_of_interp_sign=Serlib_base.sexp_of_opaque~typ:"interp_sign"inlet_interp_sign_of_sexp=Serlib_base.opaque_of_sexp~typ:"interp_sign"inSer_genarg.{raw_ser=Ser_tactypes.sexp_of_with_bindingsSer_constrexpr.sexp_of_constr_expr;glb_ser=Ser_tactypes.sexp_of_with_bindingsSer_genintern.sexp_of_glob_constr_and_expr;top_ser=sexp_of_pair_sexp_of_interp_signSer_tactypes.(sexp_of_with_bindingsSer_genintern.sexp_of_glob_constr_and_expr);raw_des=Ser_tactypes.with_bindings_of_sexpSer_constrexpr.constr_expr_of_sexp;glb_des=Ser_tactypes.with_bindings_of_sexpSer_genintern.glob_constr_and_expr_of_sexp;top_des=pair_of_sexp_interp_sign_of_sexpSer_tactypes.(with_bindings_of_sexpSer_genintern.glob_constr_and_expr_of_sexp)}letwit_rewstrategy=Ltac_plugin.G_rewrite.wit_rewstrategytyperaw_strategy=[%import:Ltac_plugin.G_rewrite.raw_strategy][@@derivingsexp]typeglob_strategy=[%import:Ltac_plugin.G_rewrite.glob_strategy][@@derivingsexp](* (G_rewrite.raw_strategy, G_rewrite.glob_strategy, Rewrite.strategy) *)letser_wit_rewstrategy=Ser_genarg.{raw_ser=sexp_of_raw_strategy;glb_ser=sexp_of_glob_strategy;top_ser=Ltac_plugin.Rewrite.sexp_of_strategy;raw_des=raw_strategy_of_sexp;glb_des=glob_strategy_of_sexp;top_des=Ltac_plugin.Rewrite.strategy_of_sexp}endletser_wit_debug=letopenSexplib.ConvinSer_genarg.mk_uniformsexp_of_boolbool_of_sexpletser_wit_eauto_search_strategy=letopenSexplib.ConvinSer_genarg.mk_uniform(sexp_of_optionSer_class_tactics.sexp_of_search_strategy)(option_of_sexpSer_class_tactics.search_strategy_of_sexp)letser_wit_withtac=letopenSexplib.ConvinSer_genarg.mk_uniform(sexp_of_optionSer_tacexpr.sexp_of_raw_tactic_expr)(option_of_sexpSer_tacexpr.raw_tactic_expr_of_sexp)(* extraargs *)openSexplib.ConvmoduleNames=Ser_namesmoduleLocus=Ser_locustype'agen_place=[%import:'aLtac_plugin.Extraargs.gen_place][@@derivingsexp]typeloc_place=[%import:Ltac_plugin.Extraargs.loc_place][@@derivingsexp]typeplace=[%import:Ltac_plugin.Extraargs.place][@@derivingsexp]letser_wit_hloc=Ser_genarg.{raw_ser=sexp_of_loc_place;glb_ser=sexp_of_loc_place;top_ser=sexp_of_place;raw_des=loc_place_of_sexp;glb_des=loc_place_of_sexp;top_des=place_of_sexp}letser_wit_lglob=Ser_genarg.{raw_ser=Ser_constrexpr.sexp_of_constr_expr;glb_ser=Ser_genintern.sexp_of_glob_constr_and_expr;top_ser=sexp_of_pairSer_geninterp.sexp_of_interp_signSer_glob_term.sexp_of_glob_constr;raw_des=Ser_constrexpr.constr_expr_of_sexp;glb_des=Ser_genintern.glob_constr_and_expr_of_sexp;top_des=pair_of_sexpSer_geninterp.interp_sign_of_sexpSer_glob_term.glob_constr_of_sexp}letser_wit_orient=letopenSexplib.ConvinSer_genarg.mk_uniformsexp_of_boolbool_of_sexpletser_wit_rename=letopenSexplib.ConvinSer_genarg.mk_uniform(sexp_of_pairSer_names.Id.sexp_of_tSer_names.Id.sexp_of_t)(pair_of_sexpSer_names.Id.t_of_sexpSer_names.Id.t_of_sexp)letser_wit_natural=letopenSexplib.ConvinSer_genarg.mk_uniformsexp_of_intint_of_sexpletser_wit_lconstr:(Constrexpr.constr_expr,Ser_genintern.glob_constr_and_expr,EConstr.t)Ser_genarg.gen_ser=Ser_genarg.{raw_ser=Ser_constrexpr.sexp_of_constr_expr;glb_ser=Ser_genintern.sexp_of_glob_constr_and_expr;top_ser=Ser_eConstr.sexp_of_t;raw_des=Ser_constrexpr.constr_expr_of_sexp;glb_des=Ser_genintern.glob_constr_and_expr_of_sexp;top_des=Ser_eConstr.t_of_sexp;}let_ser_wit_casted_constr:(Constrexpr.constr_expr,Ser_genintern.glob_constr_and_expr,EConstr.t)Ser_genarg.gen_ser=Ser_genarg.{raw_ser=Ser_constrexpr.sexp_of_constr_expr;glb_ser=Ser_genintern.sexp_of_glob_constr_and_expr;top_ser=Ser_eConstr.sexp_of_t;raw_des=Ser_constrexpr.constr_expr_of_sexp;glb_des=Ser_genintern.glob_constr_and_expr_of_sexp;top_des=Ser_eConstr.t_of_sexp;}letser_wit_in_clause:(Names.lidentLocus.clause_expr,Names.lidentLocus.clause_expr,Names.Id.tLocus.clause_expr)Ser_genarg.gen_ser=Ser_genarg.{raw_ser=Ser_locus.sexp_of_clause_exprSer_names.sexp_of_lident;glb_ser=Ser_locus.sexp_of_clause_exprSer_names.sexp_of_lident;top_ser=Ser_locus.sexp_of_clause_exprSer_names.Id.sexp_of_t;raw_des=Ser_locus.clause_expr_of_sexpSer_names.lident_of_sexp;glb_des=Ser_locus.clause_expr_of_sexpSer_names.lident_of_sexp;top_des=Ser_locus.clause_expr_of_sexpSer_names.Id.t_of_sexp;}letser_wit_by_arg_tac:(Tacexpr.raw_tactic_exproption,Tacexpr.glob_tactic_exproption,Tacinterp.valueoption)Ser_genarg.gen_ser=Ser_genarg.{raw_ser=Sexplib.Conv.sexp_of_optionSer_tacexpr.sexp_of_raw_tactic_expr;glb_ser=Sexplib.Conv.sexp_of_optionSer_tacexpr.sexp_of_glob_tactic_expr;top_ser=Sexplib.Conv.sexp_of_optionSer_geninterp.Val.sexp_of_t;raw_des=Sexplib.Conv.option_of_sexpSer_tacexpr.raw_tactic_expr_of_sexp;glb_des=Sexplib.Conv.option_of_sexpSer_tacexpr.glob_tactic_expr_of_sexp;top_des=Sexplib.Conv.option_of_sexpSer_geninterp.Val.t_of_sexp;}letser_wit_lpar_id_colon=letopenSexplib.ConvinSer_genarg.mk_uniformsexp_of_unitunit_of_sexpletser_wit_occurences=letopenSexplib.ConvinSer_genarg.{raw_ser=Ser_locus.sexp_of_or_var(sexp_of_listsexp_of_int);glb_ser=Ser_locus.sexp_of_or_var(sexp_of_listsexp_of_int);top_ser=sexp_of_listsexp_of_int;raw_des=Ser_locus.or_var_of_sexp(list_of_sexpint_of_sexp);glb_des=Ser_locus.or_var_of_sexp(list_of_sexpint_of_sexp);top_des=list_of_sexpint_of_sexp;}letregister()=Ser_genarg.register_genserTacarg.wit_bindingsser_wit_bindings;Ser_genarg.register_genserTacarg.wit_constr_with_bindingsser_wit_constr_with_bindings;Ser_genarg.register_genserTacarg.wit_open_constr_with_bindingsser_wit_constr_with_bindings;Ser_genarg.register_genserTacarg.wit_destruction_argser_wit_destruction_arg;Ser_genarg.register_genserTacarg.wit_simple_intropatternser_wit_simple_intropattern;(* Ser_genarg.register_genser Tacarg.wit_intro_pattern ser_wit_intropattern; *)Ser_genarg.register_genserTacarg.wit_ltacser_wit_ltac;Ser_genarg.register_genserTacarg.wit_quant_hypser_wit_quant_hyp;(* Ser_genarg.register_genser Tacarg.wit_quantified_hypothesis ser_wit_quant_hyp; *)Ser_genarg.register_genserTacarg.wit_tacticser_wit_tactic;Ser_genarg.register_genserG_ltac.wit_ltac_infoser_wit_ltac_info;Ser_genarg.register_genserG_ltac.wit_ltac_production_itemser_wit_production_item;Ser_genarg.register_genserG_ltac.wit_ltac_production_sepser_wit_ltac_production_sep;Ser_genarg.register_genserG_ltac.wit_ltac_selectorser_wit_ltac_selector;Ser_genarg.register_genserG_ltac.wit_ltac_tacdef_bodyser_wit_ltac_tacdef_body;Ser_genarg.register_genserG_ltac.wit_ltac_tactic_levelser_wit_ltac_tactic_level;Ser_genarg.register_genserG_ltac.wit_ltac_use_defaultser_wit_ltac_use_default;Ser_genarg.register_genserG_auto.wit_auto_usingser_wit_auto_using;Ser_genarg.register_genserG_auto.wit_hintbasesser_wit_hintbases;Ser_genarg.register_genserG_auto.wit_hints_pathser_wit_hintbases_path;Ser_genarg.register_genserG_auto.wit_hints_path_atomser_wit_hintbases_path_atom;Ser_genarg.register_genserG_auto.wit_opthintsser_wit_opthints;Ser_genarg.register_genserG_rewrite.wit_bindersG_rewrite.ser_wit_binders;Ser_genarg.register_genserG_rewrite.wit_glob_constr_with_bindingsG_rewrite.ser_wit_glob_constr_with_bindings;Ser_genarg.register_genserG_rewrite.wit_rewstrategyG_rewrite.ser_wit_rewstrategy;Ser_genarg.register_genserG_class.wit_debugser_wit_debug;Ser_genarg.register_genserG_class.wit_eauto_search_strategyser_wit_eauto_search_strategy;Ser_genarg.register_genserG_obligations.wit_withtacser_wit_withtac;Ser_genarg.register_genserExtraargs.wit_by_arg_tacser_wit_by_arg_tac;(* XXX *)(* Ser_genarg.register_genser Extraargs.wit_casted_constr ser_wit_casted_constr; *)Ser_genarg.register_genserExtraargs.wit_globser_wit_lglob;Ser_genarg.register_genserExtraargs.wit_hlocser_wit_hloc;Ser_genarg.register_genserExtraargs.wit_in_clauseser_wit_in_clause;Ser_genarg.register_genserExtraargs.wit_lconstrser_wit_lconstr;Ser_genarg.register_genserExtraargs.wit_lglobser_wit_lglob;Ser_genarg.register_genserExtraargs.wit_naturalser_wit_natural;Ser_genarg.register_genserExtraargs.wit_orientser_wit_orient;Ser_genarg.register_genserExtraargs.wit_occurrencesser_wit_occurences;Ser_genarg.register_genserExtraargs.wit_renameser_wit_rename;Ser_genarg.register_genserExtraargs.wit_test_lpar_id_colonser_wit_lpar_id_colon;()let()=register()