123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608(************************************************************************)(* * The Coq Proof Assistant / The Coq Development Team *)(* v * INRIA, CNRS and contributors - Copyright 1999-2018 *)(* <O___,, * (see CREDITS file for the list of authors) *)(* \VV/ **************************************************************)(* // * This file is distributed under the terms of the *)(* * GNU Lesser General Public License Version 2.1 *)(* * (see LICENSE file for the text of the license) *)(************************************************************************)(************************************************************************)(* Coq serialization API/Plugin *)(* Copyright 2016-2018 MINES ParisTech *)(************************************************************************)(* Status: Very Experimental *)(************************************************************************)openSexplibopenSexplib.StdopenSerlibmoduleC=CAstmoduleLoc=Ser_locmoduleCAst=Ser_cAstmoduleNames=Ser_namesmoduleLocus=Ser_locusmoduleConstr=Ser_constrmoduleEConstr=Ser_eConstrmoduleNametab=Ser_nametabmoduleConstr_matching=Ser_constr_matchingmoduleLibnames=Ser_libnamesmoduleNamegen=Ser_namegenmoduleGenarg=Ser_genargmoduleStdarg=Ser_stdargmoduleGenredexpr=Ser_genredexprmoduleGenintern=Ser_geninternmoduleGoal_select=Ser_goal_selectmodulePattern=Ser_patternmoduleConstrexpr=Ser_constrexprmoduleVernacexpr=Ser_vernacexprmoduleTactypes=Ser_tactypesmoduleTactics=Ser_tacticsmoduleEquality=Ser_equalitymoduleInv=Ser_invtypedirection_flag=[%import:Ltac_plugin.Tacexpr.direction_flag][@@derivingsexp]typelazy_flag=[%import:Ltac_plugin.Tacexpr.lazy_flag][@@derivingsexp]typeglobal_flag=[%import:Ltac_plugin.Tacexpr.global_flag][@@derivingsexp]typeevars_flag=[%import:Ltac_plugin.Tacexpr.evars_flag][@@derivingsexp]typerec_flag=[%import:Ltac_plugin.Tacexpr.rec_flag][@@derivingsexp]typeadvanced_flag=[%import:Ltac_plugin.Tacexpr.advanced_flag][@@deriving sexp]typeletin_flag=[%import:Ltac_plugin.Tacexpr.letin_flag][@@derivingsexp]typeclear_flag=[%import:Ltac_plugin.Tacexpr.clear_flag][@@derivingsexp]typecheck_flag=[%import:Ltac_plugin.Tacexpr.check_flag][@@derivingsexp]typeltac_constant=[%import:Ltac_plugin.Tacexpr.ltac_constant][@@derivingsexp]type('c,'d,'id)inversion_strength=[%import:('c,'d,'id)Ltac_plugin.Tacexpr.inversion_strength][@@derivingsexp]type('a,'b)location=[%import:('a,'b)Ltac_plugin.Tacexpr.location][@@derivingsexp]type'idmessage_token=[%import:('id)Ltac_plugin.Tacexpr.message_token][@@derivingsexp]type('dconstr,'id)induction_clause=[%import:('dconstr,'id)Ltac_plugin.Tacexpr.induction_clause][@@derivingsexp]type('constr,'dconstr,'id)induction_clause_list=[%import:('constr,'dconstr,'id)Ltac_plugin.Tacexpr.induction_clause_list][@@derivingsexp]type'awith_bindings_arg=[%import:'aLtac_plugin.Tacexpr.with_bindings_arg][@@derivingsexp]type'amatch_pattern=[%import:'aLtac_plugin.Tacexpr.match_pattern][@@derivingsexp]type'amatch_context_hyps=[%import:'aLtac_plugin.Tacexpr.match_context_hyps][@@derivingsexp]type('a,'t)match_rule=[%import:('a,'t)Ltac_plugin.Tacexpr.match_rule][@@derivingsexp]typeml_tactic_name=[%import:Ltac_plugin.Tacexpr.ml_tactic_name][@@derivingsexp]typeml_tactic_entry=[%import:Ltac_plugin.Tacexpr.ml_tactic_entry][@@derivingsexp](* type dyn = Ser_Dyn [@@deriving sexp] *)(* let to_dyn _ = Ser_Dyn *)(* let from_dyn _ = fst (Dyn.create "dyn_tac") 0 *)(* This is beyond import and sexp for the moment, see:
* https://github.com/janestreet/ppx_sexp_conv/issues/6
*)(* We thus iso-project the tactic definition in a virtually identical copy (but for the Dyn) *)moduleITac=structtype('trm,'dtrm,'pat,'cst,'ref,'nam,'tacexpr,'lev)gen_atomic_tactic_expr=|TacIntroPatternofevars_flag*'dtrmTactypes.intro_pattern_exprCAst.tlist|TacApplyofadvanced_flag*evars_flag*'trmwith_bindings_arglist*('nam*'dtrmTactypes.intro_pattern_exprCAst.toption)list|TacElimofevars_flag*'trmwith_bindings_arg*'trmTactypes.with_bindingsoption|TacCaseofevars_flag*'trmwith_bindings_arg|TacMutualFixofNames.Id.t*int*(Names.Id.t*int*'trm)list|TacMutualCofixofNames.Id.t*(Names.Id.t*'trm)list|TacAssertofevars_flag*bool*'tacexproptionoption*'dtrmTactypes.intro_pattern_exprCAst.toption*'trm|TacGeneralizeof('trmLocus.with_occurrences*Names.Name.t)list|TacLetTacofevars_flag*Names.Name.t*'trm*'namLocus.clause_expr*letin_flag*Namegen.intro_pattern_naming_exprCAst.toption|TacInductionDestructofrec_flag*evars_flag*('trm,'dtrm,'nam)induction_clause_list|TacReduceof('trm,'cst,'pat)Genredexpr.red_expr_gen*'namLocus.clause_expr|TacChangeofcheck_flag*'patoption*'dtrm*'namLocus.clause_expr|TacRewriteofevars_flag*(bool*Equality.multi*'dtrmwith_bindings_arg)list*'namLocus.clause_expr*'tacexproption|TacInversionof('trm,'dtrm,'nam)inversion_strength*Tactypes.quantified_hypothesisand('trm,'dtrm,'pat,'cst,'ref,'nam,'tacexpr,'lev)gen_tactic_arg=|TacGenericofstringoption*'levGenarg.generic_argument|ConstrMayEvalof('trm,'cst,'pat)Genredexpr.may_eval|Referenceof'ref|TacCallof('ref*('trm,'dtrm,'pat,'cst,'ref,'nam,'tacexpr,'lev)gen_tactic_arglist)CAst.t|TacFreshIdofstringLocus.or_varlist|Tacexpof'tacexpr|TacPretypeof'trm|TacNumgoalsand('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr=|TacAtomof('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_atomic_tactic_exprCAst.t|TacThenof('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr*('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr|TacDispatchof('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_exprlist|TacExtendTacof('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_exprarray*('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr*('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_exprarray|TacThensof('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr*('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_exprlist|TacThens3partsof('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr*('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_exprarray*('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr*('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_exprarray|TacFirstof('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_exprlist|TacCompleteof('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr|TacSolveof('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_exprlist|TacTryof('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr|TacOrof('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr*('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr|TacOnceof('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr|TacExactlyOnceof('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr|TacIfThenCatchof('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr*('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr*('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr|TacOrelseof('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr*('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr|TacDoofintLocus.or_var*('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr|TacTimeoutofintLocus.or_var*('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr|TacTimeofstringoption*('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr|TacRepeatof('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr|TacProgressof('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr|TacShowHypsof('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr|TacAbstractof('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr*Names.Id.toption|TacIdof'nmessage_tokenlist|TacFailofglobal_flag*intLocus.or_var*'nmessage_tokenlist(* | TacInfo of ('t, 'dtrm, 'p, 'c, 'r, 'n, 'tacexpr, 'l)gen_tactic_expr *)|TacLetInofrec_flag*(Names.lname*('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_arg)list*('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr|TacMatchoflazy_flag*('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr*('p,('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr)match_rulelist|TacMatchGoaloflazy_flag*direction_flag*('p,('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr)match_rulelist|TacFunof('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_fun_ast|TacArgof('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_argCAst.t|TacSelectofGoal_select.t*('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr|TacMLof(ml_tactic_entry*('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_arglist)CAst.t|TacAliasof(Names.KerName.t*('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_arglist)CAst.tand('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_fun_ast=Names.Name.tlist*('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)gen_tactic_expr[@@derivingsexp]endletrec_gen_atom_tactic_expr_put(t:'aLtac_plugin.Tacexpr.gen_atomic_tactic_expr):('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)ITac.gen_atomic_tactic_expr=matchtwith|Ltac_plugin.Tacexpr.TacIntroPattern(a,b)->ITac.TacIntroPattern(a,b)|Ltac_plugin.Tacexpr.TacApply(a,b,c,d)->ITac.TacApply(a,b,c,d)|Ltac_plugin.Tacexpr.TacElim(a,b,c)->ITac.TacElim(a,b,c)|Ltac_plugin.Tacexpr.TacCase(a,b)->ITac.TacCase(a,b)|Ltac_plugin.Tacexpr.TacMutualFix(a,b,c)->ITac.TacMutualFix(a,b,c)|Ltac_plugin.Tacexpr.TacMutualCofix(a,b)->ITac.TacMutualCofix(a,b)|Ltac_plugin.Tacexpr.TacAssert(a,b,c,d,e)->ITac.TacAssert(a,b,c,d,e)|Ltac_plugin.Tacexpr.TacGeneralizea->ITac.TacGeneralizea|Ltac_plugin.Tacexpr.TacLetTac(a,b,c,d,e,f)->ITac.TacLetTac(a,b,c,d,e,f)|Ltac_plugin.Tacexpr.TacInductionDestruct(a,b,c)->ITac.TacInductionDestruct(a,b,c)|Ltac_plugin.Tacexpr.TacReduce(a,b)->ITac.TacReduce(a,b)|Ltac_plugin.Tacexpr.TacChange(a,b,c,d)->ITac.TacChange(a,b,c,d)|Ltac_plugin.Tacexpr.TacRewrite(a,b,c,d)->ITac.TacRewrite(a,b,c,d)|Ltac_plugin.Tacexpr.TacInversion(a,b)->ITac.TacInversion(a,b)and_gen_tactic_arg_put(t:'aLtac_plugin.Tacexpr.gen_tactic_arg):('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)ITac.gen_tactic_arg=matchtwith|Ltac_plugin.Tacexpr.TacGeneric(a,b)->ITac.TacGeneric(a,b)|Ltac_plugin.Tacexpr.ConstrMayEvala->ITac.ConstrMayEvala|Ltac_plugin.Tacexpr.Referencea->ITac.Referencea|Ltac_plugin.Tacexpr.TacCalll->ITac.TacCallC.(map(fun(b,c)->(b,List.map_gen_tactic_arg_putc))l)|Ltac_plugin.Tacexpr.TacFreshIda->ITac.TacFreshIda|Ltac_plugin.Tacexpr.Tacexpa->ITac.Tacexpa|Ltac_plugin.Tacexpr.TacPretypea->ITac.TacPretypea|Ltac_plugin.Tacexpr.TacNumgoals->ITac.TacNumgoalsand_gen_tactic_expr_put(t:'aLtac_plugin.Tacexpr.gen_tactic_expr):('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)ITac.gen_tactic_expr=letux=_gen_tactic_expr_putxinletuux=List.mapuxinletuax=Array.mapuxinmatchtwith|Ltac_plugin.Tacexpr.TacAtoml->ITac.TacAtomC.(map_gen_atom_tactic_expr_putl)|Ltac_plugin.Tacexpr.TacThen(a,b)->ITac.TacThen(ua,ub)|Ltac_plugin.Tacexpr.TacDispatcha->ITac.TacDispatch(uua)|Ltac_plugin.Tacexpr.TacExtendTac(a,b,c)->ITac.TacExtendTac(uaa,ub,uac)|Ltac_plugin.Tacexpr.TacThens(a,b)->ITac.TacThens(ua,uub)|Ltac_plugin.Tacexpr.TacThens3parts(a,b,c,d)->ITac.TacThens3parts(ua,uab,uc,uad)|Ltac_plugin.Tacexpr.TacFirsta->ITac.TacFirst(uua)|Ltac_plugin.Tacexpr.TacCompletea->ITac.TacComplete(ua)|Ltac_plugin.Tacexpr.TacSolvea->ITac.TacSolve(uua)|Ltac_plugin.Tacexpr.TacTrya->ITac.TacTry(ua)|Ltac_plugin.Tacexpr.TacOr(a,b)->ITac.TacOr(ua,ub)|Ltac_plugin.Tacexpr.TacOncea->ITac.TacOnce(ua)|Ltac_plugin.Tacexpr.TacExactlyOncea->ITac.TacExactlyOnce(ua)|Ltac_plugin.Tacexpr.TacIfThenCatch(a,b,c)->ITac.TacIfThenCatch(ua,ub,uc)|Ltac_plugin.Tacexpr.TacOrelse(a,b)->ITac.TacOrelse(ua,ub)|Ltac_plugin.Tacexpr.TacDo(a,b)->ITac.TacDo(a,ub)|Ltac_plugin.Tacexpr.TacTimeout(a,b)->ITac.TacTimeout(a,ub)|Ltac_plugin.Tacexpr.TacTime(a,b)->ITac.TacTime(a,ub)|Ltac_plugin.Tacexpr.TacRepeata->ITac.TacRepeat(ua)|Ltac_plugin.Tacexpr.TacProgressa->ITac.TacProgress(ua)|Ltac_plugin.Tacexpr.TacShowHypsa->ITac.TacShowHyps(ua)|Ltac_plugin.Tacexpr.TacAbstract(a,b)->ITac.TacAbstract(ua,b)|Ltac_plugin.Tacexpr.TacIda->ITac.TacIda|Ltac_plugin.Tacexpr.TacFail(a,b,c)->ITac.TacFail(a,b,c)(* | Ltac_plugin.Tacexpr.TacInfo a -> ITac.TacInfo (u a) *)(* | TacLetIn of rec_flag * *)(* (Names.Id.t located * 'a gen_tactic_arg) list * *)(* 'a gen_tactic_expr *)|Ltac_plugin.Tacexpr.TacLetIn(a,l,t)->let_pt=List.map(fun(a,t)->(a,_gen_tactic_arg_putt))inITac.TacLetIn(a,_ptl,_gen_tactic_expr_putt)(* | TacMatch of lazy_flag * *)(* 'a gen_tactic_expr * *)(* ('p,'a gen_tactic_expr) match_rule list *)(* type ('a,'t) match_rule = *)(* | Pat of 'a match_context_hyps list * 'a match_pattern * 't *)(* | All of 't *)|Ltac_plugin.Tacexpr.TacMatch(a,e,mr)->let_pmr=List.map(function|Ltac_plugin.Tacexpr.Pat(a,b,t)->Ltac_plugin.Tacexpr.Pat(a,b,_gen_tactic_expr_putt)|Ltac_plugin.Tacexpr.Alle->Ltac_plugin.Tacexpr.All(_gen_tactic_expr_pute))inITac.TacMatch(a,_gen_tactic_expr_pute,_pmrmr)|Ltac_plugin.Tacexpr.TacMatchGoal(e,d,t)->let_pmr=List.map(function|Ltac_plugin.Tacexpr.Pat(a,b,t)->Ltac_plugin.Tacexpr.Pat(a,b,_gen_tactic_expr_putt)|Ltac_plugin.Tacexpr.Alle->Ltac_plugin.Tacexpr.All(_gen_tactic_expr_pute))inITac.TacMatchGoal(e,d,_pmrt)|Ltac_plugin.Tacexpr.TacFuna->ITac.TacFun(_gen_tactic_fun_ast_puta)|Ltac_plugin.Tacexpr.TacArgl->ITac.TacArgC.(map_gen_tactic_arg_putl)|Ltac_plugin.Tacexpr.TacSelect(gs,te)->ITac.TacSelect(gs,_gen_tactic_expr_putte)|Ltac_plugin.Tacexpr.TacMLl->ITac.TacMLC.(map(fun(b,c)->(b,List.map_gen_tactic_arg_putc))l)|Ltac_plugin.Tacexpr.TacAliasl->ITac.TacAliasC.(map(fun(b,c)->(b,List.map_gen_tactic_arg_putc))l)and_gen_tactic_fun_ast_put(t:'aLtac_plugin.Tacexpr.gen_tactic_fun_ast):('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)ITac.gen_tactic_fun_ast=matchtwith|(a,b)->(a,_gen_tactic_expr_putb)letrec_gen_atom_tactic_expr_get(t:('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)ITac.gen_atomic_tactic_expr):'aLtac_plugin.Tacexpr.gen_atomic_tactic_expr=matchtwith|ITac.TacIntroPattern(a,b)->Ltac_plugin.Tacexpr.TacIntroPattern(a,b)|ITac.TacApply(a,b,c,d)->Ltac_plugin.Tacexpr.TacApply(a,b,c,d)|ITac.TacElim(a,b,c)->Ltac_plugin.Tacexpr.TacElim(a,b,c)|ITac.TacCase(a,b)->Ltac_plugin.Tacexpr.TacCase(a,b)|ITac.TacMutualFix(a,b,c)->Ltac_plugin.Tacexpr.TacMutualFix(a,b,c)|ITac.TacMutualCofix(a,b)->Ltac_plugin.Tacexpr.TacMutualCofix(a,b)|ITac.TacAssert(a,b,c,d,e)->Ltac_plugin.Tacexpr.TacAssert(a,b,c,d,e)|ITac.TacGeneralizea->Ltac_plugin.Tacexpr.TacGeneralizea|ITac.TacLetTac(a,b,c,d,e,f)->Ltac_plugin.Tacexpr.TacLetTac(a,b,c,d,e,f)|ITac.TacInductionDestruct(a,b,c)->Ltac_plugin.Tacexpr.TacInductionDestruct(a,b,c)|ITac.TacReduce(a,b)->Ltac_plugin.Tacexpr.TacReduce(a,b)|ITac.TacChange(a,b,c,d)->Ltac_plugin.Tacexpr.TacChange(a,b,c,d)|ITac.TacRewrite(a,b,c,d)->Ltac_plugin.Tacexpr.TacRewrite(a,b,c,d)|ITac.TacInversion(a,b)->Ltac_plugin.Tacexpr.TacInversion(a,b)and_gen_tactic_arg_get(t:('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)ITac.gen_tactic_arg):'aLtac_plugin.Tacexpr.gen_tactic_arg=matchtwith|ITac.TacGeneric(a,b)->Ltac_plugin.Tacexpr.TacGeneric(a,b)|ITac.ConstrMayEvala->Ltac_plugin.Tacexpr.ConstrMayEvala|ITac.Referencea->Ltac_plugin.Tacexpr.Referencea|ITac.TacCalll->Ltac_plugin.Tacexpr.TacCallC.(map(fun(b,c)->(b,List.map_gen_tactic_arg_getc))l)|ITac.TacFreshIda->Ltac_plugin.Tacexpr.TacFreshIda|ITac.Tacexpa->Ltac_plugin.Tacexpr.Tacexpa|ITac.TacPretypea->Ltac_plugin.Tacexpr.TacPretypea|ITac.TacNumgoals->Ltac_plugin.Tacexpr.TacNumgoalsand_gen_tactic_expr_get(t:('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)ITac.gen_tactic_expr):'aLtac_plugin.Tacexpr.gen_tactic_expr=letux=_gen_tactic_expr_getxinletuux=List.mapuxinletuax=Array.mapuxinmatchtwith|ITac.TacAtoml->Ltac_plugin.Tacexpr.TacAtomC.(map_gen_atom_tactic_expr_getl)|ITac.TacThen(a,b)->Ltac_plugin.Tacexpr.TacThen(ua,ub)|ITac.TacDispatcha->Ltac_plugin.Tacexpr.TacDispatch(uua)|ITac.TacExtendTac(a,b,c)->Ltac_plugin.Tacexpr.TacExtendTac(uaa,ub,uac)|ITac.TacThens(a,b)->Ltac_plugin.Tacexpr.TacThens(ua,uub)|ITac.TacThens3parts(a,b,c,d)->Ltac_plugin.Tacexpr.TacThens3parts(ua,uab,uc,uad)|ITac.TacFirsta->Ltac_plugin.Tacexpr.TacFirst(uua)|ITac.TacCompletea->Ltac_plugin.Tacexpr.TacComplete(ua)|ITac.TacSolvea->Ltac_plugin.Tacexpr.TacSolve(uua)|ITac.TacTrya->Ltac_plugin.Tacexpr.TacTry(ua)|ITac.TacOr(a,b)->Ltac_plugin.Tacexpr.TacOr(ua,ub)|ITac.TacOncea->Ltac_plugin.Tacexpr.TacOnce(ua)|ITac.TacExactlyOncea->Ltac_plugin.Tacexpr.TacExactlyOnce(ua)|ITac.TacIfThenCatch(a,b,c)->Ltac_plugin.Tacexpr.TacIfThenCatch(ua,ub,uc)|ITac.TacOrelse(a,b)->Ltac_plugin.Tacexpr.TacOrelse(ua,ub)|ITac.TacDo(a,b)->Ltac_plugin.Tacexpr.TacDo(a,ub)|ITac.TacTimeout(a,b)->Ltac_plugin.Tacexpr.TacTimeout(a,ub)|ITac.TacTime(a,b)->Ltac_plugin.Tacexpr.TacTime(a,ub)|ITac.TacRepeata->Ltac_plugin.Tacexpr.TacRepeat(ua)|ITac.TacProgressa->Ltac_plugin.Tacexpr.TacProgress(ua)|ITac.TacShowHypsa->Ltac_plugin.Tacexpr.TacShowHyps(ua)|ITac.TacAbstract(a,b)->Ltac_plugin.Tacexpr.TacAbstract(ua,b)|ITac.TacIda->Ltac_plugin.Tacexpr.TacIda|ITac.TacFail(a,b,c)->Ltac_plugin.Tacexpr.TacFail(a,b,c)(* | ITac.TacInfo a -> Ltac_plugin.Tacexpr.TacInfo (u a) *)|ITac.TacLetIn(a,l,t)->let_pt=List.map(fun(a,t)->(a,_gen_tactic_arg_gett))inLtac_plugin.Tacexpr.TacLetIn(a,_ptl,_gen_tactic_expr_gett)|ITac.TacMatch(a,e,mr)->let_gmr=List.map(function|Ltac_plugin.Tacexpr.Pat(a,b,t)->Ltac_plugin.Tacexpr.Pat(a,b,_gen_tactic_expr_gett)|Ltac_plugin.Tacexpr.Alle->Ltac_plugin.Tacexpr.All(_gen_tactic_expr_gete))inLtac_plugin.Tacexpr.TacMatch(a,_gen_tactic_expr_gete,_gmrmr)|ITac.TacMatchGoal(a,d,t)->let_gmr=List.map(function|Ltac_plugin.Tacexpr.Pat(a,b,t)->Ltac_plugin.Tacexpr.Pat(a,b,_gen_tactic_expr_gett)|Ltac_plugin.Tacexpr.Alle->Ltac_plugin.Tacexpr.All(_gen_tactic_expr_gete))inLtac_plugin.Tacexpr.TacMatchGoal(a,d,_gmrt)|ITac.TacFuna->Ltac_plugin.Tacexpr.TacFun(_gen_tactic_fun_ast_geta)|ITac.TacArgl->Ltac_plugin.Tacexpr.TacArgC.(map_gen_tactic_arg_getl)|ITac.TacSelect(gs,te)->Ltac_plugin.Tacexpr.TacSelect(gs,_gen_tactic_expr_gette)|ITac.TacMLl->Ltac_plugin.Tacexpr.TacMLC.(map(fun(b,c)->(b,List.map_gen_tactic_arg_getc))l)|ITac.TacAliasl->Ltac_plugin.Tacexpr.TacAliasC.(map(fun(b,c)->(b,List.map_gen_tactic_arg_getc))l)and_gen_tactic_fun_ast_get(t:('t,'dtrm,'p,'c,'r,'n,'tacexpr,'l)ITac.gen_tactic_fun_ast):'aLtac_plugin.Tacexpr.gen_tactic_fun_ast=matchtwith|(a,b)->(a,_gen_tactic_expr_getb)type'dgen_atomic_tactic_expr='dLtac_plugin.Tacexpr.gen_atomic_tactic_exprletsexp_of_gen_atomic_tactic_exprtdpcrntel(tac:'aLtac_plugin.Tacexpr.gen_atomic_tactic_expr):Sexp.t=ITac.sexp_of_gen_atomic_tactic_exprtdpcrntel(_gen_atom_tactic_expr_puttac)letsexp_of_gen_tactic_exprtdpcrntel(tac:'aLtac_plugin.Tacexpr.gen_tactic_expr):Sexp.t=ITac.sexp_of_gen_tactic_exprtdpcrntel(_gen_tactic_expr_puttac)letsexp_of_gen_tactic_argtdpcrntel(tac:'aLtac_plugin.Tacexpr.gen_tactic_arg):Sexp.t=ITac.sexp_of_gen_tactic_argtdpcrntel(_gen_tactic_arg_puttac)letsexp_of_gen_fun_asttdpcrntel(tac:'aLtac_plugin.Tacexpr.gen_tactic_fun_ast):Sexp.t=ITac.sexp_of_gen_tactic_fun_asttdpcrntel(_gen_tactic_fun_ast_puttac)letgen_atomic_tactic_expr_of_sexp(tac:Sexp.t)tdpcrntel:'aLtac_plugin.Tacexpr.gen_atomic_tactic_expr=_gen_atom_tactic_expr_get(ITac.gen_atomic_tactic_expr_of_sexptdpcrnteltac)letgen_tactic_expr_of_sexp(tac:Sexp.t)tdpcrntel:'aLtac_plugin.Tacexpr.gen_tactic_expr=_gen_tactic_expr_get(ITac.gen_tactic_expr_of_sexptdpcrnteltac)letgen_tactic_arg_of_sexp(tac:Sexp.t)tdpcrntel:'aLtac_plugin.Tacexpr.gen_tactic_arg=_gen_tactic_arg_get(ITac.gen_tactic_arg_of_sexptdpcrnteltac)letgen_fun_ast_of_sexp(tac:Sexp.t)tdpcrntel:'aLtac_plugin.Tacexpr.gen_tactic_fun_ast=_gen_tactic_fun_ast_get(ITac.gen_tactic_fun_ast_of_sexptdpcrnteltac)(************************************************************************)(* Main tactics types, we follow tacexpr and provide glob,raw, and *)(* atomic *)(************************************************************************)(* Glob *)typeglob_tactic_expr=Ltac_plugin.Tacexpr.glob_tactic_exprtypeglob_atomic_tactic_expr=Ltac_plugin.Tacexpr.glob_atomic_tactic_exprletrecglob_tactic_expr_of_sexptac=gen_tactic_expr_of_sexptacGenintern.glob_constr_and_expr_of_sexpGenintern.glob_constr_and_expr_of_sexpGenintern.glob_constr_pattern_and_expr_of_sexp(Locus.or_var_of_sexp(Genredexpr.and_short_name_of_sexpNames.evaluable_global_reference_of_sexp))(Locus.or_var_of_sexp(Loc.located_of_sexpltac_constant_of_sexp))Names.lident_of_sexpglob_tactic_expr_of_sexpGenarg.glevel_of_sexpandglob_atomic_tactic_expr_of_sexptac=gen_atomic_tactic_expr_of_sexptacGenintern.glob_constr_and_expr_of_sexpGenintern.glob_constr_and_expr_of_sexpGenintern.glob_constr_pattern_and_expr_of_sexp(Locus.or_var_of_sexp(Genredexpr.and_short_name_of_sexpNames.evaluable_global_reference_of_sexp))(Locus.or_var_of_sexp(Loc.located_of_sexpltac_constant_of_sexp))Names.lident_of_sexpglob_tactic_expr_of_sexpGenarg.glevel_of_sexpletrecsexp_of_glob_tactic_expr(tac:glob_tactic_expr)=sexp_of_gen_tactic_exprGenintern.sexp_of_glob_constr_and_exprGenintern.sexp_of_glob_constr_and_exprGenintern.sexp_of_glob_constr_pattern_and_expr(Locus.sexp_of_or_var(Genredexpr.sexp_of_and_short_nameNames.sexp_of_evaluable_global_reference))(Locus.sexp_of_or_var(Loc.sexp_of_locatedsexp_of_ltac_constant))Names.sexp_of_lidentsexp_of_glob_tactic_exprGenarg.sexp_of_gleveltacandsexp_of_glob_atomic_tactic_expr(tac:glob_atomic_tactic_expr)=sexp_of_gen_atomic_tactic_exprGenintern.sexp_of_glob_constr_and_exprGenintern.sexp_of_glob_constr_and_exprGenintern.sexp_of_glob_constr_pattern_and_expr(Locus.sexp_of_or_var(Genredexpr.sexp_of_and_short_nameNames.sexp_of_evaluable_global_reference))(Locus.sexp_of_or_var(Loc.sexp_of_locatedsexp_of_ltac_constant))Names.sexp_of_lidentsexp_of_glob_tactic_exprGenarg.sexp_of_gleveltac(* Raw *)typeraw_tactic_expr=Ltac_plugin.Tacexpr.raw_tactic_exprtyperaw_atomic_tactic_expr=Ltac_plugin.Tacexpr.raw_atomic_tactic_exprletrecraw_tactic_expr_of_sexptac=gen_tactic_expr_of_sexptacConstrexpr.constr_expr_of_sexpConstrexpr.constr_expr_of_sexpConstrexpr.constr_pattern_expr_of_sexp(Constrexpr.or_by_notation_of_sexpLibnames.qualid_of_sexp)Libnames.qualid_of_sexpNames.lident_of_sexpraw_tactic_expr_of_sexpGenarg.rlevel_of_sexpandraw_atomic_tactic_expr_of_sexptac=gen_atomic_tactic_expr_of_sexptacConstrexpr.constr_expr_of_sexpConstrexpr.constr_expr_of_sexpConstrexpr.constr_pattern_expr_of_sexp(Constrexpr.or_by_notation_of_sexpLibnames.qualid_of_sexp)Libnames.qualid_of_sexpNames.lident_of_sexpraw_tactic_expr_of_sexpGenarg.rlevel_of_sexpletrecsexp_of_raw_tactic_expr(tac:raw_tactic_expr)=sexp_of_gen_tactic_exprConstrexpr.sexp_of_constr_exprConstrexpr.sexp_of_constr_exprConstrexpr.sexp_of_constr_pattern_expr(Constrexpr.sexp_of_or_by_notationLibnames.sexp_of_qualid)Libnames.sexp_of_qualidNames.sexp_of_lidentsexp_of_raw_tactic_exprGenarg.sexp_of_rleveltacandsexp_of_raw_atomic_tactic_exprtac=sexp_of_gen_atomic_tactic_exprConstrexpr.sexp_of_constr_exprConstrexpr.sexp_of_constr_exprConstrexpr.sexp_of_constr_pattern_expr(Constrexpr.sexp_of_or_by_notationLibnames.sexp_of_qualid)Libnames.sexp_of_qualidNames.sexp_of_lidentsexp_of_raw_tactic_exprGenarg.sexp_of_rleveltac(* Atomic *)typeatomic_tactic_expr=Ltac_plugin.Tacexpr.atomic_tactic_exprletatomic_tactic_expr_of_sexptac=gen_atomic_tactic_expr_of_sexptacEConstr.t_of_sexpGenintern.glob_constr_and_expr_of_sexpPattern.constr_pattern_of_sexpNames.evaluable_global_reference_of_sexp(Loc.located_of_sexpltac_constant_of_sexp)Names.Id.t_of_sexpunit_of_sexpGenarg.tlevel_of_sexpletsexp_of_atomic_tactic_exprtac=sexp_of_gen_atomic_tactic_exprEConstr.sexp_of_tGenintern.sexp_of_glob_constr_and_exprPattern.sexp_of_constr_patternNames.sexp_of_evaluable_global_reference(Loc.sexp_of_locatedsexp_of_ltac_constant)Names.Id.sexp_of_tsexp_of_unitGenarg.sexp_of_tleveltac(* Helpers for raw_red_expr *)typetacdef_body=[%import:Ltac_plugin.Tacexpr.tacdef_body][@@derivingsexp](* Unsupported serializers *)typeintro_pattern=[%import:Ltac_plugin.Tacexpr.intro_pattern][@@derivingsexp]typeraw_red_expr=[%import:Ltac_plugin.Tacexpr.raw_red_expr][@@derivingsexp]typeg_trm=[%import:Ltac_plugin.Tacexpr.g_trm][@@derivingsexp]typeg_cst=[%import:Ltac_plugin.Tacexpr.g_cst][@@derivingsexp]typeg_pat=[%import:Ltac_plugin.Tacexpr.g_pat][@@derivingsexp]typeglob_red_expr=[%import:Ltac_plugin.Tacexpr.glob_red_expr][@@derivingsexp]