From b21d4a3ec3d3f702cb95c5c123808b24403ac678 Mon Sep 17 00:00:00 2001 From: Pierre Roux Date: Fri, 7 Jul 2023 15:01:45 +0200 Subject: [PATCH 01/26] Adapt to https://github.com/coq/coq/pull/17823 --- src/coq_elpi_builtins.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coq_elpi_builtins.ml b/src/coq_elpi_builtins.ml index ef01f79a2..99a0b0ef9 100644 --- a/src/coq_elpi_builtins.ml +++ b/src/coq_elpi_builtins.ml @@ -2923,7 +2923,7 @@ Supported attributes: { nenv with Notation_term.ninterp_var_type = Id.Map.add id (Notation_term.NtnInternTypeAny None) nenv.Notation_term.ninterp_var_type }, - (id, ((Constrexpr.(InConstrEntry,(LevelSome,None)),([],[])),Notation_term.NtnTypeConstr)) :: vars in + (id, ((Notation_ops.constr_some_level,([],[])),Notation_term.NtnTypeConstr)) :: vars in let env = EConstr.push_rel (Context.Rel.Declaration.LocalAssum(name,ty)) env in aux vars nenv env (n-1) t | _ -> From a9eb74dc7ea7fb53f6d4e0029870bfb0c3fb8465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Gilbert?= Date: Mon, 10 Jul 2023 13:43:57 +0200 Subject: [PATCH 02/26] Adapt to coq/coq#17818 (APIs moved to `Vernactypes`) --- src/coq_elpi_vernacular.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coq_elpi_vernacular.ml b/src/coq_elpi_vernacular.ml index d58fe4a9b..cb4bd07b4 100644 --- a/src/coq_elpi_vernacular.ml +++ b/src/coq_elpi_vernacular.ml @@ -870,7 +870,7 @@ let cache_program (nature,p,p_str) = (Extend.TUentry (Genarg.get_arg_tag Coq_elpi_arg_syntax.wit_elpi_loc), Vernacextend.TyNil))))) - (fun loc0 args loc1 ?loc ~atts () -> Vernacextend.vtdefault (fun () -> + (fun loc0 args loc1 ?loc ~atts () -> Vernactypes.vtdefault (fun () -> run_program (Option.default (loc_merge loc0 loc1) loc) p ~atts args)) in Egramml.extend_vernac_command_grammar ~undoable:true ext From 2d4c43aad366c4946232ab46ccf7d265711bd624 Mon Sep 17 00:00:00 2001 From: Pierre Roux Date: Fri, 4 Aug 2023 13:27:24 +0200 Subject: [PATCH 03/26] Adapt to https://github.com/coq/coq/pull/17827 --- src/coq_elpi_builtins.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coq_elpi_builtins.ml b/src/coq_elpi_builtins.ml index 99a0b0ef9..4cc812479 100644 --- a/src/coq_elpi_builtins.ml +++ b/src/coq_elpi_builtins.ml @@ -2923,7 +2923,7 @@ Supported attributes: { nenv with Notation_term.ninterp_var_type = Id.Map.add id (Notation_term.NtnInternTypeAny None) nenv.Notation_term.ninterp_var_type }, - (id, ((Notation_ops.constr_some_level,([],[])),Notation_term.NtnTypeConstr)) :: vars in + (id, ((Notation_ops.constr_some_level,([],[])),Id.Set.empty,Notation_term.NtnTypeConstr)) :: vars in let env = EConstr.push_rel (Context.Rel.Declaration.LocalAssum(name,ty)) env in aux vars nenv env (n-1) t | _ -> From 5c23e9602fd5d74f748b8b6c5b7623ebd84fa16f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Marie=20P=C3=A9drot?= Date: Fri, 11 Aug 2023 23:23:37 +0200 Subject: [PATCH 04/26] Adapt w.r.t. coq/coq#17955. --- src/coq_elpi_builtins.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coq_elpi_builtins.ml b/src/coq_elpi_builtins.ml index 4cc812479..2dcdbb699 100644 --- a/src/coq_elpi_builtins.ml +++ b/src/coq_elpi_builtins.ml @@ -2750,7 +2750,7 @@ Supported attributes:|} ^ hint_locality_doc))))), Coq_elpi_utils.detype env sigma |> Patternops.pattern_of_glob_constr) in let info = { Typeclasses.hint_priority; hint_pattern } in - Hints.add_hints ~locality [db] Hints.(Hints.HintsResolveEntry[info,true,PathHints [gr], hint_globref gr]); + Hints.add_hints ~locality [db] Hints.(Hints.HintsResolveEntry[info, true, hint_globref gr]); state, (), [] ))), DocAbove); From 4a1c8ae0fe6ce222ec51487c15a6019c191568a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Gilbert?= Date: Tue, 4 Jul 2023 15:53:32 +0200 Subject: [PATCH 05/26] Adapt to coq/coq#17795 (ComInductive API and glob_sort changes) --- src/coq_elpi_HOAS.ml | 4 ++-- src/coq_elpi_arg_HOAS.ml | 4 ++-- src/coq_elpi_glob_quotation.ml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/coq_elpi_HOAS.ml b/src/coq_elpi_HOAS.ml index 8c65bd859..e9f7969fc 100644 --- a/src/coq_elpi_HOAS.ml +++ b/src/coq_elpi_HOAS.ml @@ -2799,7 +2799,7 @@ let lp2inductive_entry ~depth coq_ctx constraints state t = let arityconcl = match Reductionops.sort_of_arity env_ar_params sigma arity with | exception Reduction.NotArity -> None - | s -> Some (false,s) in + | s -> Some s in (* restruction to used universes *) let state = minimize_universes state in @@ -2831,7 +2831,7 @@ let lp2inductive_entry ~depth coq_ctx constraints state t = ~indnames:[itname] ~arities:[arity] ~arityconcl:[arityconcl] - ~constructors:[knames, List.map (EC.to_constr sigma) ktypes] + ~constructors:[knames, ktypes] ~env_ar_params ~cumulative ~poly diff --git a/src/coq_elpi_arg_HOAS.ml b/src/coq_elpi_arg_HOAS.ml index 83875d7f1..100c7d752 100644 --- a/src/coq_elpi_arg_HOAS.ml +++ b/src/coq_elpi_arg_HOAS.ml @@ -250,7 +250,7 @@ let raw_record_decl_to_glob glob_sign ({ name; sort; parameters; constructor; fi let name, space = sep_last_qualid name in let sort = match sort with | Some x -> Constrexpr.CSort x - | None -> Constrexpr.(CSort (Glob_term.UAnonymous {rigid=true})) in + | None -> Constrexpr.(CSort (Glob_term.UAnonymous {rigid=UnivRigid})) in let intern_env, params = intern_global_context glob_sign ~intern_env:Constrintern.empty_internalization_env parameters in let glob_sign_params = push_glob_ctx params glob_sign in let params = List.rev params in @@ -277,7 +277,7 @@ let raw_indt_decl_to_glob glob_sign ({ finiteness; name; parameters; non_uniform let name = Names.Id.of_string name in let indexes = match arity with | Some x -> x - | None -> CAst.make Constrexpr.(CSort (Glob_term.UAnonymous {rigid=true})) in + | None -> CAst.make Constrexpr.(CSort (Glob_term.UAnonymous {rigid=UnivRigid})) in let intern_env, params = intern_global_context glob_sign ~intern_env:Constrintern.empty_internalization_env parameters in let nuparams_given, nuparams = match non_uniform_parameters with diff --git a/src/coq_elpi_glob_quotation.ml b/src/coq_elpi_glob_quotation.ml index bd1e2fbb4..e7a73aeaf 100644 --- a/src/coq_elpi_glob_quotation.ml +++ b/src/coq_elpi_glob_quotation.ml @@ -164,7 +164,7 @@ let rec gterm2lp ~depth state x = Pp.(str"Free Coq variable " ++ Names.Id.print id ++ str " in context: " ++ prlist_with_sep spc Id.print (Id.Map.bindings ctx.name2db |> List.map fst)); state, E.mkConst (Id.Map.find id ctx.name2db) - | GSort(UAnonymous {rigid=true}) -> + | GSort(UAnonymous {rigid=UnivRigid}) -> let state, f = F.Elpi.make state in let s = API.RawData.mkUnifVar f ~args:[] state in state, in_elpi_flex_sort s From b8e9df2d02071afb91bf6d081e814fbedbef65be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Gilbert?= Date: Fri, 8 Sep 2023 12:09:16 +0200 Subject: [PATCH 06/26] Adapt to coq/coq#17667 (Genintern.register_subst0 moved to Gensubst) --- src/coq_elpi_arg_HOAS.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coq_elpi_arg_HOAS.ml b/src/coq_elpi_arg_HOAS.ml index 100c7d752..80020165b 100644 --- a/src/coq_elpi_arg_HOAS.ml +++ b/src/coq_elpi_arg_HOAS.ml @@ -482,7 +482,7 @@ let add_genarg tag pr_raw pr_glob pr_top glob subst interp = let wit = Genarg.make0 tag in let tag = Geninterp.Val.create tag in let () = Genintern.register_intern0 wit glob in - let () = Genintern.register_subst0 wit subst in + let () = Gensubst.register_subst0 wit subst in let () = Geninterp.register_interp0 wit (interp (fun x -> Ftactic.return @@ Geninterp.Val.Dyn (tag, x))) in let () = Geninterp.register_val0 wit (Some (Geninterp.Val.Base tag)) in Ltac_plugin.Pptactic.declare_extra_genarg_pprule wit pr_raw pr_glob pr_top; From d010b5a017cbdff1134d5e2a271e43d51719b5e9 Mon Sep 17 00:00:00 2001 From: Rodolphe Lepigre Date: Thu, 14 Sep 2023 18:53:42 +0200 Subject: [PATCH 07/26] Adapt to coq/coq#18023 (RedFlags moving out of CClosure) --- src/coq_elpi_HOAS.ml | 4 ++-- src/coq_elpi_HOAS.mli | 4 ++-- src/coq_elpi_builtins.ml | 10 ++++------ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/coq_elpi_HOAS.ml b/src/coq_elpi_HOAS.ml index e9f7969fc..0be690a51 100644 --- a/src/coq_elpi_HOAS.ml +++ b/src/coq_elpi_HOAS.ml @@ -342,7 +342,7 @@ type options = { universe_decl : universe_decl_option; reversible : bool option; keepunivs : bool option; - redflags : CClosure.RedFlags.reds option; + redflags : RedFlags.reds option; no_tc: bool option; } @@ -992,7 +992,7 @@ let module_inline_default = { module_inline_unspec with | state, Elpi.Builtin.Unspec, gls -> state,Declaremods.DefaultInline,gls) } -let reduction_flags = let open API.OpaqueData in let open CClosure in declare { +let reduction_flags = let open API.OpaqueData in let open RedFlags in declare { name = "coq.redflags"; doc = "Set of flags for lazy, cbv, ... reductions"; pp = (fun fmt (x : RedFlags.reds) -> Format.fprintf fmt "TODO"); diff --git a/src/coq_elpi_HOAS.mli b/src/coq_elpi_HOAS.mli index 97901a856..1821b92ea 100644 --- a/src/coq_elpi_HOAS.mli +++ b/src/coq_elpi_HOAS.mli @@ -45,7 +45,7 @@ type options = { universe_decl : universe_decl_option; reversible : bool option; keepunivs : bool option; - redflags : CClosure.RedFlags.reds option; + redflags : RedFlags.reds option; no_tc: bool option; } @@ -236,7 +236,7 @@ val in_coq_modpath : depth:int -> term -> Names.ModPath.t val modpath : Names.ModPath.t Conversion.t val modtypath : Names.ModPath.t Conversion.t val module_inline_default : Declaremods.inline Conversion.t -val reduction_flags : CClosure.RedFlags.reds Conversion.t +val reduction_flags : RedFlags.reds Conversion.t type module_item = | Module of Names.ModPath.t * module_item list diff --git a/src/coq_elpi_builtins.ml b/src/coq_elpi_builtins.ml index 12967afbf..2e2512bbe 100644 --- a/src/coq_elpi_builtins.ml +++ b/src/coq_elpi_builtins.ml @@ -631,7 +631,7 @@ let conversion_strategy = let open API.AlgebraicData in let open Conv_oracle in ] } |> CConv.(!<) -let reduction_kind = let open API.AlgebraicData in let open CClosure.RedFlags in declare { +let reduction_kind = let open API.AlgebraicData in let open RedFlags in declare { ty = Conv.TyName "coq.redflag"; doc = "Flags for lazy, cbv, ... reductions"; pp = (fun fmt (x : red_kind) -> Format.fprintf fmt "TODO"); @@ -3387,7 +3387,6 @@ Supported attributes: Out(reduction_flags,"NewFlags", Easy "Updates reduction Flags by adding Options"))), (fun f l _ ~depth -> - let open CClosure in let f = List.fold_left RedFlags.red_add f l in !: f)), DocAbove); @@ -3398,7 +3397,6 @@ Supported attributes: Out(reduction_flags,"NewFlags", Easy "Updates reduction Flags by removing Options"))), (fun f l _ ~depth -> - let open CClosure in let f = List.fold_left RedFlags.red_sub f l in !: f)), DocAbove); @@ -3413,7 +3411,7 @@ Supported attributes: - @redflags! (default coq.redflags.all)|}))), (fun t _ ~depth proof_context constraints state -> let sigma = get_sigma state in - let flags = Option.default CClosure.all proof_context.options.redflags in + let flags = Option.default RedFlags.all proof_context.options.redflags in let t = Reductionops.clos_whd_flags flags proof_context.env sigma t in !: t)), DocAbove); @@ -3426,7 +3424,7 @@ Supported attributes: - @redflags! (default coq.redflags.all)|}))), (fun t _ ~depth proof_context constraints state -> let sigma = get_sigma state in - let flags = Option.default CClosure.all proof_context.options.redflags in + let flags = Option.default RedFlags.all proof_context.options.redflags in let t = Reductionops.clos_norm_flags flags proof_context.env sigma t in !: t)), DocAbove); @@ -3449,7 +3447,7 @@ Supported attributes: - @redflags! (default coq.redflags.all)|}))), (fun t _ ~depth proof_context constraints state -> let sigma = get_sigma state in - let flags = Option.default CClosure.all proof_context.options.redflags in + let flags = Option.default RedFlags.all proof_context.options.redflags in let t = Tacred.cbv_norm_flags flags proof_context.env sigma t in !: t)), DocAbove); From f0ca80bcb2e30828822cea84477f1b7a02293ef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Gilbert?= Date: Tue, 19 Sep 2023 15:17:58 +0200 Subject: [PATCH 08/26] Automatic change in elpi-builtin Every time I run ci-elpi_hb from coq upstream this change wants to happen --- elpi-builtin.elpi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elpi-builtin.elpi b/elpi-builtin.elpi index c3dc18f8f..2b0186ec6 100644 --- a/elpi-builtin.elpi +++ b/elpi-builtin.elpi @@ -55,7 +55,7 @@ not _. % [declare_constraint C Key1 Key2...] declares C blocked % on Key1 Key2 ... (variables, or lists thereof). -external type declare_constraint variadic any prop. +external type declare_constraint any -> any -> variadic any prop. external pred print_constraints. % prints all constraints From 6b909340238bee1cc5b111f67bdd99688906ca86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Gilbert?= Date: Tue, 19 Sep 2023 15:17:04 +0200 Subject: [PATCH 09/26] Adapt to coq/coq#17836 (sort poly) --- coq-builtin.elpi | 2 +- src/coq_elpi_HOAS.ml | 112 ++++++++++++++++++--------------- src/coq_elpi_HOAS.mli | 32 +++++----- src/coq_elpi_builtins.ml | 53 +++++++++------- src/coq_elpi_glob_quotation.ml | 7 ++- 5 files changed, 116 insertions(+), 90 deletions(-) diff --git a/coq-builtin.elpi b/coq-builtin.elpi index f8008b533..399dc4c18 100644 --- a/coq-builtin.elpi +++ b/coq-builtin.elpi @@ -1001,7 +1001,7 @@ external pred coq.univ.variable.of-term i:term, o:coq.univ.variable.set. % crafts a fresh, appropriate, universe instance and possibly unify that % term (of the instance it contains) with another one. -% Universes level instance for a universe-polymoprhic constant +% Universes level instance for a universe-polymorphic constant typeabbrev univ-instance (ctype "univ-instance"). diff --git a/src/coq_elpi_HOAS.ml b/src/coq_elpi_HOAS.ml index 0be690a51..8ba22c70a 100644 --- a/src/coq_elpi_HOAS.ml +++ b/src/coq_elpi_HOAS.ml @@ -67,7 +67,7 @@ let pre_engine : coq_engine S.component option ref = ref None module UnivOrd = struct type t = Univ.Universe.t let compare = Univ.Universe.compare - let show x = Pp.string_of_ppcmds (Univ.Universe.pr UnivNames.pr_with_global_universes x) + let show x = Pp.string_of_ppcmds (Univ.Universe.pr UnivNames.pr_level_with_global_universes x) let pp fmt x = Format.fprintf fmt "%s" (show x) end module UnivSet = U.Set.Make(UnivOrd) @@ -75,7 +75,7 @@ module UnivMap = U.Map.Make(UnivOrd) module UnivLevelOrd = struct type t = Univ.Level.t let compare = Univ.Level.compare - let show x = Pp.string_of_ppcmds (UnivNames.pr_with_global_universes x) + let show x = Pp.string_of_ppcmds (UnivNames.pr_level_with_global_universes x) let pp fmt x = Format.fprintf fmt "%s" (show x) end module UnivLevelSet = U.Set.Make(UnivLevelOrd) @@ -85,8 +85,8 @@ module UnivLevelMap = U.Map.Make(UnivLevelOrd) module UM = F.Map(struct type t = Univ.Universe.t let compare = Univ.Universe.compare - let show x = Pp.string_of_ppcmds @@ Univ.Universe.pr UnivNames.pr_with_global_universes x - let pp fmt x = Format.fprintf fmt "%a" Pp.pp_with (Univ.Universe.pr UnivNames.pr_with_global_universes x) + let show x = Pp.string_of_ppcmds @@ Univ.Universe.pr UnivNames.pr_level_with_global_universes x + let pp fmt x = Format.fprintf fmt "%a" Pp.pp_with (Univ.Universe.pr UnivNames.pr_level_with_global_universes x) end) let um = S.declare ~name:"coq-elpi:evar-univ-map" @@ -109,9 +109,12 @@ let add_universe_constraint state c = try add_constraints state (Set.singleton c) with | UGraph.UniverseInconsistency p -> + let sigma = (S.get (Option.get !pre_engine) state).sigma in Feedback.msg_debug (UGraph.explain_universe_inconsistency - UnivNames.pr_with_global_universes p); + (Termops.pr_evd_qvar sigma) + (Termops.pr_evd_level sigma) + p); raise API.BuiltInPredicate.No_clause | Evd.UniversesDiffer | UState.UniversesDiffer -> Feedback.msg_debug Pp.(str"UniversesDiffer"); @@ -138,7 +141,7 @@ let isuniv, univout, (univ : Univ.Universe.t API.Conversion.t) = CD.name = "univ"; doc = "universe level (algebraic: max, +1, univ.variable)"; pp = (fun fmt x -> - let s = Pp.string_of_ppcmds (Univ.Universe.pr UnivNames.pr_with_global_universes x) in + let s = Pp.string_of_ppcmds (Univ.Universe.pr UnivNames.pr_level_with_global_universes x) in Format.fprintf fmt "«%s»" s); compare = Univ.Universe.compare; hash = Univ.Universe.hash; @@ -207,7 +210,7 @@ let universe_level_variable = CD.name = "univ.variable"; doc = "universe level variable"; pp = (fun fmt x -> - let s = Pp.string_of_ppcmds (UnivNames.pr_with_global_universes x) in + let s = Pp.string_of_ppcmds (UnivNames.pr_level_with_global_universes x) in Format.fprintf fmt "«%s»" s); compare = Univ.Level.compare; hash = Univ.Level.hash; @@ -249,7 +252,7 @@ let universe_constraint : Univ.univ_constraint API.Conversion.t = ] } |> API.ContextualConversion.(!<) -let universe_variance : (Univ.Level.t * Univ.Variance.t option) API.Conversion.t = +let universe_variance : (Univ.Level.t * UVars.Variance.t option) API.Conversion.t = let open API.Conversion in let open API.AlgebraicData in declare { ty = TyName "univ-variance"; doc = "Variance of a universe level variable"; @@ -259,14 +262,14 @@ let universe_variance : (Univ.Level.t * Univ.Variance.t option) API.Conversion.t B (fun u -> u,None), M (fun ~ok ~ko -> function (u,None) -> ok u | _ -> ko ())); K("covariant","",A(universe_level_variable,N), - B (fun u -> u,Some Univ.Variance.Covariant), - M (fun ~ok ~ko -> function (u,Some Univ.Variance.Covariant) -> ok u | _ -> ko ())); + B (fun u -> u,Some UVars.Variance.Covariant), + M (fun ~ok ~ko -> function (u,Some UVars.Variance.Covariant) -> ok u | _ -> ko ())); K("invariant","",A(universe_level_variable,N), - B (fun u -> u,Some Univ.Variance.Invariant), - M (fun ~ok ~ko -> function (u,Some Univ.Variance.Invariant) -> ok u | _ -> ko ())); + B (fun u -> u,Some UVars.Variance.Invariant), + M (fun ~ok ~ko -> function (u,Some UVars.Variance.Invariant) -> ok u | _ -> ko ())); K("irrelevant","",A(universe_level_variable,N), - B (fun u -> u,Some Univ.Variance.Invariant), - M (fun ~ok ~ko -> function (u,Some Univ.Variance.Irrelevant) -> ok u | _ -> ko ())); + B (fun u -> u,Some UVars.Variance.Invariant), + M (fun ~ok ~ko -> function (u,Some UVars.Variance.Irrelevant) -> ok u | _ -> ko ())); ] } |> API.ContextualConversion.(!<) @@ -283,7 +286,7 @@ let universe_decl : universe_decl API.Conversion.t = ] } |> API.ContextualConversion.(!<) -type universe_decl_cumul = ((Univ.Level.t * Univ.Variance.t option) list * bool) * (Univ.Constraints.t * bool) +type universe_decl_cumul = ((Univ.Level.t * UVars.Variance.t option) list * bool) * (Univ.Constraints.t * bool) let universe_decl_cumul : universe_decl_cumul API.Conversion.t = let open API.Conversion in let open API.BuiltInData in let open API.AlgebraicData in let open Elpi.Builtin in declare { ty = TyName "upoly-decl-cumul"; @@ -319,7 +322,7 @@ type hole_mapping = type uinstanceoption = | NoInstance (* the elpi command involved has to generate a fresh instance *) - | ConcreteInstance of Univ.Instance.t + | ConcreteInstance of UVars.Instance.t (* a concrete instance was provided, the command will use it *) | VarInstance of (F.Elpi.t * E.term list * inv_rel_key) (* a variable was provided, the command will compute the instance to unify with it *) @@ -472,16 +475,20 @@ let ({ CD.isc = isconstant; cout = constantout; cin = constantin },constant), } ;; +let compare_instances x y = + let qx, ux = UVars.Instance.to_array x + and qy, uy = UVars.Instance.to_array y in + Util.Compare.(compare [(CArray.compare Sorts.Quality.compare, qx, qy); (CArray.compare Univ.Level.compare, ux, uy)]) + let uinstancein, isuinstance, uinstanceout, uinstance = let { CD.cin; isc; cout }, uinstance = CD.declare { CD.name = "univ-instance"; - doc = "Universes level instance for a universe-polymoprhic constant"; + doc = "Universes level instance for a universe-polymorphic constant"; pp = (fun fmt x -> - let s = Pp.string_of_ppcmds (Univ.Instance.pr UnivNames.pr_with_global_universes x) in + let s = Pp.string_of_ppcmds (UVars.Instance.pr Sorts.QVar.raw_pr UnivNames.pr_level_with_global_universes x) in Format.fprintf fmt "«%s»" s); - compare = (fun x y -> - CArray.compare Univ.Level.compare (Univ.Instance.to_array x) (Univ.Instance.to_array y)); - hash = Univ.Instance.hash; + compare = compare_instances; + hash = UVars.Instance.hash; hconsed = false; constants = []; } in @@ -1326,7 +1333,7 @@ let rec constr2lp coq_ctx ~calldepth ~depth state t = let env = EConstr.push_rel Context.Rel.Declaration.(LocalAssum(name,typ0)) env in let state, bo = aux ~depth:(depth+1) env state bo in state, in_elpi_fix name.Context.binder_name rarg typ bo - | C.Proj(p,t) -> + | C.Proj(p,_,t) -> let state, t = aux ~depth env state t in let state, p = in_elpi_primitive ~depth state (Projection p) in state, in_elpi_app ~depth p [|t|] @@ -1458,20 +1465,20 @@ let () = E.set_extra_goals_postprocessing (fun l state -> let poly_ctx_size_of_gref env gr = let open Names.GlobRef in match gr with - | VarRef _ -> 0 + | VarRef _ -> 0, 0 | ConstRef c -> let cb = Environ.lookup_constant c env in let univs = Declareops.constant_polymorphic_context cb in - Univ.AbstractContext.size univs + UVars.AbstractContext.size univs | IndRef ind -> let (mib,_ as specif) = Inductive.lookup_mind_specif env ind in let univs = Declareops.inductive_polymorphic_context mib in - Univ.AbstractContext.size univs + UVars.AbstractContext.size univs | ConstructRef cstr -> let (mib,_ as specif) = Inductive.lookup_mind_specif env (inductive_of_constructor cstr) in let univs = Declareops.inductive_polymorphic_context mib in - Univ.AbstractContext.size univs + UVars.AbstractContext.size univs let mk_global state gr inst_opt = S.update_return engine state (fun x -> match inst_opt with @@ -1481,12 +1488,14 @@ let mk_global state gr inst_opt = S.update_return engine state (fun x -> { x with sigma }, (t, Some (EConstr.EInstance.kind sigma i)) | Some ui -> let expected = poly_ctx_size_of_gref x.global_env gr in - let actual = Univ.Instance.length ui in - if expected != actual then + let actual = UVars.Instance.length ui in + if not (UVars.eq_sizes expected actual) then begin + let plen (qlen,ulen) = Pp.(prlist_with_sep (fun () -> str ", ") int [qlen;ulen]) in U.type_error Pp.(string_of_ppcmds (str"Global reference " ++ Printer.pr_global gr ++ - str " takes a univ-instance of size " ++ int expected ++ - str " but was given an instance of size " ++ int actual)); + str " takes a univ-instance of size " ++ plen expected ++ + str " but was given an instance of size " ++ plen actual)) + end; let i = EConstr.EInstance.make ui in x, (EConstr.mkRef (gr,i), None) ) |> (fun (x,(y,z)) -> x,y,z) @@ -1498,11 +1507,11 @@ let body_of_constant state c inst_opt = S.update_return engine state (fun x -> | Some (bo, priv, ctx) -> let inst, ctx = UnivGen.fresh_instance_from ctx inst_opt in let bo = Vars.subst_instance_constr inst bo in - let sigma = Evd.merge_context_set Evd.univ_rigid x.sigma ctx in + let sigma = Evd.merge_sort_context_set Evd.univ_rigid x.sigma ctx in let sigma = match priv with | Opaqueproof.PrivateMonomorphic () -> sigma | Opaqueproof.PrivatePolymorphic ctx -> - let ctx = Util.on_snd (Univ.subst_univs_level_constraints (Univ.make_instance_subst inst)) ctx in + let ctx = Util.on_snd (Univ.subst_univs_level_constraints (snd (UVars.make_instance_subst inst))) ctx in Evd.merge_context_set Evd.univ_rigid sigma ctx in { x with sigma }, (Some (EConstr.of_constr bo), Some inst) @@ -1640,11 +1649,10 @@ let analyze_scope ~depth coq_ctx args = aux E.Constants.Set.empty [] [] false true args module UIM = F.Map(struct - type t = Univ.Instance.t - let compare i1 i2 = - CArray.compare Univ.Level.compare (Univ.Instance.to_array i1) (Univ.Instance.to_array i2) - let show x = Pp.string_of_ppcmds @@ Univ.Instance.pr UnivNames.pr_with_global_universes x - let pp fmt x = Format.fprintf fmt "%a" Pp.pp_with (Univ.Instance.pr UnivNames.pr_with_global_universes x) + type t = UVars.Instance.t + let compare = compare_instances + let show x = Pp.string_of_ppcmds @@ UVars.Instance.pr Sorts.QVar.raw_pr UnivNames.pr_level_with_global_universes x + let pp fmt x = Format.fprintf fmt "%a" Pp.pp_with (UVars.Instance.pr Sorts.QVar.raw_pr UnivNames.pr_level_with_global_universes x) end) let uim = S.declare ~name:"coq-elpi:evar-univ-instance-map" @@ -1661,7 +1669,7 @@ let in_coq_poly_gref ~depth ~origin ~failsafe s t i = s, u, [] with Not_found -> let u, ctx = UnivGen.fresh_global_instance (get_global_env s) t in - let s = update_sigma s (fun sigma -> Evd.merge_context_set UState.univ_flexible_alg sigma ctx) in + let s = update_sigma s (fun sigma -> Evd.merge_sort_context_set UState.univ_flexible_alg sigma ctx) in let u = match C.kind u with | C.Const (_, u) -> u @@ -1682,7 +1690,7 @@ let in_coq_poly_gref ~depth ~origin ~failsafe s t i = s, t, i, gls2 with API.Conversion.TypeErr _ -> if failsafe then - s, Coqlib.lib_ref "elpi.unknown_gref", Univ.Instance.empty, [] + s, Coqlib.lib_ref "elpi.unknown_gref", UVars.Instance.empty, [] else let open Pp in err ?loc:None @@ @@ -1692,7 +1700,7 @@ let in_coq_poly_gref ~depth ~origin ~failsafe s t i = type global_or_pglobal = | Global of E.term option - | PGlobal of E.term option * Univ.Instance.t option + | PGlobal of E.term option * UVars.Instance.t option | NotGlobal | Var @@ -1838,7 +1846,8 @@ and lp2constr ~calldepth syntactic_constraints coq_ctx ~depth state ?(on_ty=fals | Projection p -> let state, i, gl1 = aux ~depth state i in let state, xs, gl2 = API.Utils.map_acc (aux ~depth ~on_ty:false) state xs in - state, EC.mkApp (EC.mkProj (p,i),Array.of_list xs), gls @ gl1 @ gl2 + (* TODO handle relevance *) + state, EC.mkApp (EC.mkProj (p,Relevant,i),Array.of_list xs), gls @ gl1 @ gl2 | _ -> err Pp.(str"not a primitive projection:" ++ str (E.Constants.show c)) end | x, _ -> @@ -2661,12 +2670,13 @@ let restricted_sigma_of s state = let ustate = Evd.evar_universe_context sigma in let ustate = UState.restrict_even_binders ustate s in let ustate = UState.fix_undefined_variables ustate in + let ustate = UState.collapse_sort_variables ustate in let sigma = Evd.set_universe_context sigma ustate in sigma let universes_of_term state t = let sigma = get_sigma state in - EConstr.universes_of_constr sigma t + snd (EConstr.universes_of_constr sigma t) let universes_of_udecl state ({ UState.univdecl_instance ; univdecl_constraints } : UState.universe_decl) = let used1 = univdecl_instance in @@ -2697,7 +2707,8 @@ let poly_cumul_udecl_variance_of_options state options = let univdecl_instance, variance = List.split univ_lvlt_var in let open UState in state, true, true, - { univdecl_extensible_instance; + { univdecl_qualities = []; + univdecl_extensible_instance; univdecl_extensible_constraints; univdecl_constraints; univdecl_instance}, @@ -2707,7 +2718,8 @@ let poly_cumul_udecl_variance_of_options state options = let variance = List.init (List.length univdecl_instance) (fun _ -> None) in let open UState in state, true, false, - { univdecl_extensible_instance; + { univdecl_qualities = []; + univdecl_extensible_instance; univdecl_extensible_constraints; univdecl_constraints; univdecl_instance}, @@ -3008,7 +3020,7 @@ let type_of_global state r inst_opt = API.State.update_return engine state (fun let ty, ctx = Typeops.type_of_global_in_context x.global_env r in let inst, ctx = UnivGen.fresh_instance_from ctx inst_opt in let ty = Vars.subst_instance_constr inst ty in - let sigma = Evd.merge_context_set Evd.univ_rigid x.sigma ctx in + let sigma = Evd.merge_sort_context_set Evd.univ_rigid x.sigma ctx in { x with sigma }, (EConstr.of_constr ty, inst)) @@ -3195,9 +3207,11 @@ let upoly_decl_of ~depth state ~loose_udecl mie = match mie.mind_entry_universes with | Template_ind_entry _ -> nYI "template polymorphic inductives" | Polymorphic_ind_entry uc -> - let vars = Univ.Instance.to_array @@ Univ.UContext.instance uc in + let qvars, vars = UVars.Instance.to_array @@ UVars.UContext.instance uc in + if not (CArray.is_empty qvars) then nYI "sort poly inductives" + else let state, vars = CArray.fold_left_map (fun s l -> fst (name_universe_level s l), l) state vars in - let csts = Univ.UContext.constraints uc in + let csts = UVars.UContext.constraints uc in begin match mie.mind_entry_variance with | None -> let state, up, gls = universe_decl.API.Conversion.embed ~depth state ((Array.to_list vars,loose_udecl),(csts,loose_udecl)) in @@ -3230,7 +3244,7 @@ let inductive_entry2lp ~depth coq_ctx constraints state ~loose_udecl e = | Template_ind_entry _ -> nYI "template polymorphic inductives" | Monomorphic_ind_entry -> state | Polymorphic_ind_entry cs -> S.update engine state (fun e -> - { e with sigma = Evd.merge_context_set UState.univ_flexible e.sigma (Univ.ContextSet.of_context cs) }) (* ???? *) in + { e with sigma = Evd.merge_context_set UState.univ_flexible e.sigma (snd (UVars.UContext.to_context_set cs)) }) (* ???? *) in let state, upoly_decl_of, upoly_decl_gls = upoly_decl_of ~depth state ~loose_udecl mie in let allparams = mie.mind_entry_params in let allparams = Vars.lift_rel_context indno allparams in @@ -3285,7 +3299,7 @@ let record_entry2lp ~depth coq_ctx constraints state ~loose_udecl e = | Template_ind_entry _ -> nYI "template polymorphic inductives" | Monomorphic_ind_entry -> state | Polymorphic_ind_entry cs -> S.update engine state (fun e -> - { e with sigma = Evd.merge_context_set UState.univ_flexible e.sigma (Univ.ContextSet.of_context cs) }) (* ???? *) in + { e with sigma = Evd.merge_context_set UState.univ_flexible e.sigma (snd (UVars.UContext.to_context_set cs)) }) (* ???? *) in let state, upoly_decl_of, upoly_decl_gls = upoly_decl_of ~depth state ~loose_udecl mie in diff --git a/src/coq_elpi_HOAS.mli b/src/coq_elpi_HOAS.mli index 1821b92ea..b96405847 100644 --- a/src/coq_elpi_HOAS.mli +++ b/src/coq_elpi_HOAS.mli @@ -19,13 +19,13 @@ type hole_mapping = type uinstanceoption = | NoInstance (* the elpi command involved has to generate a fresh instance *) - | ConcreteInstance of Univ.Instance.t + | ConcreteInstance of UVars.Instance.t (* a concrete instance was provided, the command will use it *) | VarInstance of (FlexibleData.Elpi.t * RawData.term list * inv_rel_key) (* a variable was provided, the command will compute the instance to unify with it *) type universe_decl = (Univ.Level.t list * bool) * (Univ.Constraints.t * bool) -type universe_decl_cumul = ((Univ.Level.t * Univ.Variance.t option) list * bool) * (Univ.Constraints.t * bool) +type universe_decl_cumul = ((Univ.Level.t * UVars.Variance.t option) list * bool) * (Univ.Constraints.t * bool) type universe_decl_option = | NotUniversePolymorphic | Cumulative of universe_decl_cumul @@ -114,7 +114,7 @@ val lp2inductive_entry : State.t * (Entries.mutual_inductive_entry * Univ.ContextSet.t * UnivNames.universe_binders * (bool * record_field_spec list) option * DeclareInd.one_inductive_impls list) * Conversion.extra_goals val inductive_decl2lp : - depth:int -> empty coq_context -> constraints -> State.t -> (Names.MutInd.t * Univ.Instance.t * (Declarations.mutual_inductive_body * Declarations.one_inductive_body) * (Glob_term.binding_kind list * Glob_term.binding_kind list list)) -> + depth:int -> empty coq_context -> constraints -> State.t -> (Names.MutInd.t * UVars.Instance.t * (Declarations.mutual_inductive_body * Declarations.one_inductive_body) * (Glob_term.binding_kind list * Glob_term.binding_kind list list)) -> State.t * term * Conversion.extra_goals val inductive_entry2lp : @@ -145,7 +145,7 @@ val opt2unspec : 'a option -> 'a Elpi.Builtin.unspec val in_elpi_gr : depth:int -> State.t -> Names.GlobRef.t -> term val in_elpi_poly_gr : depth:int -> State.t -> Names.GlobRef.t -> term -> term -val in_elpi_poly_gr_instance : depth:int -> State.t -> Names.GlobRef.t -> Univ.Instance.t -> term +val in_elpi_poly_gr_instance : depth:int -> State.t -> Names.GlobRef.t -> UVars.Instance.t -> term val in_elpi_flex_sort : term -> term val in_elpi_sort : depth:int -> state -> Sorts.t -> state * term val in_elpi_prod : Name.t -> term -> term -> term @@ -183,10 +183,10 @@ type primitive_value = | Projection of Projection.t val primitive_value : primitive_value Conversion.t val in_elpi_primitive : depth:int -> state -> primitive_value -> state * term -val uinstance : Univ.Instance.t Conversion.t +val uinstance : UVars.Instance.t Conversion.t val universe_constraint : Univ.univ_constraint Conversion.t -val universe_variance : (Univ.Level.t * Univ.Variance.t option) Conversion.t +val universe_variance : (Univ.Level.t * UVars.Variance.t option) Conversion.t val universe_decl : universe_decl Conversion.t val universe_decl_cumul : universe_decl_cumul Conversion.t @@ -202,10 +202,10 @@ module UnivLevelSet : Elpi.API.Utils.Set.S with type elt = Univ.Level.t val compute_with_uinstance : depth:int -> options -> state -> - (state -> 'a -> Univ.Instance.t option -> state * 'c * Univ.Instance.t option) -> + (state -> 'a -> UVars.Instance.t option -> state * 'c * UVars.Instance.t option) -> 'a -> - Univ.Instance.t option -> - state * 'c * Univ.Instance.t option * Conversion.extra_goals + UVars.Instance.t option -> + state * 'c * UVars.Instance.t option * Conversion.extra_goals (* CData relevant for other modules, e.g the one exposing Coq's API *) val universe_level_variable : Univ.Level.t Conversion.t @@ -224,7 +224,7 @@ val name : Name.t Conversion.t type global_or_pglobal = | Global of term option - | PGlobal of term option * Univ.Instance.t option + | PGlobal of term option * UVars.Instance.t option | NotGlobal | Var val is_global_or_pglobal : depth:int -> term -> global_or_pglobal @@ -255,12 +255,12 @@ type record_field_att = val record_field_att : record_field_att Conversion.t val add_constraints : State.t -> UnivProblem.Set.t -> State.t -val mk_global : State.t -> Names.GlobRef.t -> Univ.Instance.t option -> - State.t * EConstr.t * Univ.Instance.t option -val poly_ctx_size_of_gref : Environ.env -> Names.GlobRef.t -> int +val mk_global : State.t -> Names.GlobRef.t -> UVars.Instance.t option -> + State.t * EConstr.t * UVars.Instance.t option +val poly_ctx_size_of_gref : Environ.env -> Names.GlobRef.t -> int * int val body_of_constant : - State.t -> Names.Constant.t -> Univ.Instance.t option -> - State.t * EConstr.t option * Univ.Instance.t option + State.t -> Names.Constant.t -> UVars.Instance.t option -> + State.t * EConstr.t option * UVars.Instance.t option val grab_global_env : State.t -> State.t val grab_global_env_drop_univs_and_sigma : State.t -> State.t @@ -289,7 +289,7 @@ val solution2evd : Evd.evar_map -> 'a Elpi.API.Data.solution -> Evar.Set.t -> Ev val show_coq_engine : ?with_univs:bool -> State.t -> string val show_coq_elpi_engine_mapping : State.t -> string -val type_of_global : state -> GlobRef.t -> Univ.Instance.t option -> state * (EConstr.t * Univ.Instance.t) +val type_of_global : state -> GlobRef.t -> UVars.Instance.t option -> state * (EConstr.t * UVars.Instance.t) val minimize_universes : state -> state val new_univ_level_variable : ?flexible:bool -> state -> state * (Univ.Level.t * Univ.Universe.t) val constraint_eq : Sorts.t -> Sorts.t -> UnivProblem.t diff --git a/src/coq_elpi_builtins.ml b/src/coq_elpi_builtins.ml index 2e2512bbe..78f8512e5 100644 --- a/src/coq_elpi_builtins.ml +++ b/src/coq_elpi_builtins.ml @@ -149,7 +149,7 @@ let err_if_contains_alg_univ ~depth t = begin match Univ.Universe.level u with | None -> err Pp.(strbrk "The hypothetical clause contains terms of type univ which are not global, you should abstract them out or replace them by global ones: " ++ - Univ.Universe.pr UnivNames.pr_with_global_universes u) + Univ.Universe.pr UnivNames.pr_level_with_global_universes u) | _ -> Univ.Universe.Set.add u acc end | x -> Coq_elpi_utils.fold_elpi_term aux acc ~depth x @@ -327,7 +327,7 @@ let handle_uinst_option_for_inductive ~depth options i state = match options.uinstance with | NoInstance -> let term, ctx = UnivGen.fresh_global_instance (get_global_env state) (GlobRef.IndRef i) in - let state = update_sigma state (fun sigma -> Evd.merge_context_set UState.univ_flexible_alg sigma ctx) in + let state = update_sigma state (fun sigma -> Evd.merge_sort_context_set UState.univ_flexible_alg sigma ctx) in snd @@ Constr.destInd term, state, [] | ConcreteInstance i -> i, state, [] | VarInstance (v_head, v_args, v_depth) -> @@ -336,7 +336,7 @@ let handle_uinst_option_for_inductive ~depth options i state = UnivGen.fresh_global_instance (get_global_env state) (GlobRef.IndRef i) in let uinst = snd @@ Constr.destInd term in let state, lp_uinst, extra_goals = uinstance.Conv.embed ~depth state uinst in - let state = update_sigma state (fun sigma -> Evd.merge_context_set UState.univ_flexible_alg sigma ctx) in + let state = update_sigma state (fun sigma -> Evd.merge_sort_context_set UState.univ_flexible_alg sigma ctx) in uinst, state, API.Conversion.Unify (v', lp_uinst) :: extra_goals type located = @@ -872,7 +872,7 @@ let add_axiom_or_variable api id ty local options state = if local then begin ComAssumption.declare_variable Vernacexpr.NoCoercion ~kind (EConstr.to_constr sigma ty) uentry impargs Glob_term.Explicit variable; Dumpglob.dump_definition variable true "var"; - GlobRef.VarRef(Id.of_string id), Univ.Instance.empty + GlobRef.VarRef(Id.of_string id), UVars.Instance.empty end else begin Dumpglob.dump_definition variable false "ax"; ComAssumption.declare_axiom Vernacexpr.NoCoercion ~local:Locality.ImportDefaultBehavior ~poly:false ~kind (EConstr.to_constr sigma ty) @@ -1075,29 +1075,29 @@ let unify_instances_gref gr ui1 ui2 diag env state cmp_constr_universes = let nargs, poly_ctx_size = let open Names.GlobRef in match gr with - | VarRef _ -> 0, 0 + | VarRef _ -> 0, (0, 0) | ConstRef c -> let cb = Environ.lookup_constant c env in let univs = Declareops.constant_polymorphic_context cb in - 0, Univ.AbstractContext.size univs + 0, UVars.AbstractContext.size univs | IndRef ind -> let (mib,_ as specif) = Inductive.lookup_mind_specif env ind in let univs = Declareops.inductive_polymorphic_context mib in - Conversion.inductive_cumulativity_arguments (mib,snd ind), Univ.AbstractContext.size univs + Conversion.inductive_cumulativity_arguments (mib,snd ind), UVars.AbstractContext.size univs | ConstructRef (ind,kno) -> let (mib,_ as specif) = Inductive.lookup_mind_specif env ind in let univs = Declareops.inductive_polymorphic_context mib in - Conversion.constructor_cumulativity_arguments (mib,snd ind,kno), Univ.AbstractContext.size univs + Conversion.constructor_cumulativity_arguments (mib,snd ind,kno), UVars.AbstractContext.size univs in - let l1 = Univ.Instance.length ui1 in - let l2 = Univ.Instance.length ui2 in + let l1 = UVars.Instance.length ui1 in + let l2 = UVars.Instance.length ui2 in if l1 <> l2 then state, !: (B.mkERROR "different universe instance lengths"), [] else if l1 <> poly_ctx_size then let msg = - Printf.sprintf "global reference %s expects instances of length %d, got %d" - (Pp.string_of_ppcmds (Printer.pr_global gr)) poly_ctx_size l1 in + Printf.sprintf "global reference %s expects instances of length (%d, %d), got (%d, %d)" + (Pp.string_of_ppcmds (Printer.pr_global gr)) (fst poly_ctx_size) (snd poly_ctx_size) (fst l1) (snd l1) in state, !: (B.mkERROR msg), [] else let t1 = EConstr.mkRef (gr, EConstr.EInstance.make ui1) in @@ -1116,9 +1116,13 @@ let unify_instances_gref gr ui1 ui2 diag env state cmp_constr_universes = match diag with | Data B.OK -> raise No_clause | _ -> + let sigma = get_sigma state in let msg = UGraph.explain_universe_inconsistency - UnivNames.pr_with_global_universes p in + (Termops.pr_evd_qvar sigma) + (Termops.pr_evd_level sigma) + p + in state, !: (B.mkERROR (Pp.string_of_ppcmds msg)), [] let gref_set, gref_set_decl = B.ocaml_set_conv ~name:"coq.gref.set" gref (module GRSet) @@ -1578,10 +1582,10 @@ Supported attributes: UnivGen.fresh_global_instance (get_global_env state) (GlobRef.ConstructRef kon) in snd @@ Constr.destConstruct term, update_sigma state - (fun sigma -> Evd.merge_context_set UState.univ_flexible_alg sigma ctx), + (fun sigma -> Evd.merge_sort_context_set UState.univ_flexible_alg sigma ctx), [] else - Univ.Instance.empty, state, [] + UVars.Instance.empty, state, [] | ConcreteInstance i -> i, state, [] | VarInstance (v_head, v_args, v_depth) -> let v' = U.move ~from:v_depth ~to_:depth (E.mkUnifVar v_head ~args:v_args state) in @@ -1591,7 +1595,7 @@ Supported attributes: let state, lp_uinst, extra_goals = uinstance.Conv.embed ~depth state uinst in uinst, update_sigma state - (fun sigma -> Evd.merge_context_set UState.univ_flexible_alg sigma ctx), + (fun sigma -> Evd.merge_sort_context_set UState.univ_flexible_alg sigma ctx), API.Conversion.Unify (v', lp_uinst) :: extra_goals in let ty = if_keep ty (fun () -> @@ -1663,7 +1667,12 @@ regarded as not non-informative).|})), Read(global, "checks if GR is universe polymorphic and if so returns the number of universe variables"))), (fun gr _ ~depth {env} _ _ -> if Environ.is_polymorphic env gr then - let open Univ.AbstractContext in let open Declareops in let open Environ in + let open Declareops in let open Environ in + let size auctx = + let qsize, usize = UVars.AbstractContext.size auctx in + let () = if qsize <> 0 then nYI "sort poly" in + usize + in match gr with | GlobRef.ConstRef c -> !: (size (constant_polymorphic_context (lookup_constant c env))) | GlobRef.ConstructRef ((i,_),_) @@ -2030,7 +2039,7 @@ Supported attributes: | Polymorphic_ind_entry uctx -> (Polymorphic_entry uctx, UState.Polymorphic_entry uctx, univ_binders) in - let () = DeclareUctx.declare_universe_context ~poly:false uctx in + let () = Global.push_context_set ~strict:true uctx in let mind = DeclareInd.declare_mutual_inductive_with_eliminations ~primitive_expected me (uentry', ubinders) ind_impls in let ind = mind, 0 in @@ -2437,7 +2446,7 @@ phase unnecessary.|}; begin match Univ.Universe.level u with | None -> raise Not_found | Some u -> - let l = Id.Map.bindings @@ Evd.universe_binders (get_sigma state) in + let l = Id.Map.bindings @@ snd @@ Evd.universe_binders (get_sigma state) in begin try !: (Id.to_string @@ fst @@ List.find (fun (_,u') -> Univ.Level.equal u u') l) +? None with Not_found -> raise No_clause end end | NoData, NoData -> err Pp.(str "coq.univ: both argument were omitted"))), @@ -2540,15 +2549,17 @@ term (of the instance it contains) with another one.|}; assert (gls = []); state, mkData t in + let quals, univs = UVars.Instance.to_array uinst in + let () = if not (CArray.is_empty quals) then nYI "sort poly" in let state, univs = - CArray.fold_left_map elpi_term_of_level state (Univ.Instance.to_array uinst) in + CArray.fold_left_map elpi_term_of_level state univs in state, ?: None +! Array.to_list univs, [] | NoData, Data univs -> let readback_or_new state = function | NoData -> let state, (l,_) = new_univ_level_variable state in state, l, [] | Data t -> universe_level_variable.Conv.readback ~depth state t in let state, levels, gls = U.map_acc readback_or_new state univs in - state, !: (Univ.Instance.of_array (Array.of_list levels)) +? None, gls + state, !: (UVars.Instance.of_array ([||], Array.of_list levels)) +? None, gls | NoData, NoData -> err (Pp.str "coq.univ-instance called with no input argument") )), diff --git a/src/coq_elpi_glob_quotation.ml b/src/coq_elpi_glob_quotation.ml index e7a73aeaf..97bf519cf 100644 --- a/src/coq_elpi_glob_quotation.ml +++ b/src/coq_elpi_glob_quotation.ml @@ -152,9 +152,10 @@ let rec gterm2lp ~depth state x = let state, f = F.Elpi.make state in let s = API.RawData.mkUnifVar f ~args:[] state in state, in_elpi_poly_gr ~depth state gr s - | Some l -> + | Some (ql,l) -> + let () = if not (CList.is_empty ql) then nYI "sort poly" in let l' = List.map (glob_level x.CAst.loc state) l in - state, in_elpi_poly_gr_instance ~depth state gr (Univ.Instance.of_array (Array.of_list l')) + state, in_elpi_poly_gr_instance ~depth state gr (UVars.Instance.of_array ([||], Array.of_list l')) end | GRef(gr,_ul) -> state, in_elpi_gr ~depth state gr | GVar(id) -> @@ -300,7 +301,7 @@ let rec gterm2lp ~depth state x = * the term can be read back (mkCases needs the ind) *) (* TODO: add whd reduction in spine *) let ty = - Inductive.type_of_inductive (indspecif,Univ.Instance.empty) in + Inductive.type_of_inductive (indspecif,UVars.Instance.empty) in let safe_tail = function [] -> [] | _ :: x -> x in let best_name n l = match n, l with | _, (Name x) :: rest -> Name x,DAst.make (GVar x), rest From 040cd23e3e630b1e9f429c032cde1789010b1cea Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Sun, 8 Oct 2023 16:09:33 +0200 Subject: [PATCH 10/26] Adapt to Coq PR #18007: Proof_using.definition_using takes names of recursive definitions as extra arguments. --- src/coq_elpi_builtins.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coq_elpi_builtins.ml b/src/coq_elpi_builtins.ml index 12967afbf..608489de1 100644 --- a/src/coq_elpi_builtins.ml +++ b/src/coq_elpi_builtins.ml @@ -1960,7 +1960,7 @@ Supported attributes: let sigma = get_sigma state in let types = Option.List.cons types [] in let using = using_from_string s in - definition_using (get_global_env state) sigma ~using ~terms:types) + definition_using (get_global_env state) sigma ~fixnames:[] ~using ~terms:types) options.using in let cinfo = Declare.CInfo.make ?using ~name:(Id.of_string id) ~typ:types ~impargs:[] () in let info = Declare.Info.make ~scope ~kind ~poly ~udecl () in From fdcce159b9f7c123c9a1d430f9ae4f84b7920d03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Gilbert?= Date: Mon, 23 Oct 2023 12:05:57 +0200 Subject: [PATCH 11/26] Adapt to coq/coq#18187 (reductionbehaviour is on constant not gref) --- src/coq_elpi_builtins.ml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/coq_elpi_builtins.ml b/src/coq_elpi_builtins.ml index d7975923b..a864eea4c 100644 --- a/src/coq_elpi_builtins.ml +++ b/src/coq_elpi_builtins.ml @@ -2994,7 +2994,11 @@ Supported attributes: Out(option simplification_strategy,"Strategy", Easy "reads the behavior of the simplification tactics. Positions are 0 based. See also the ! and / modifiers for the Arguments command")), (fun gref _ ~depth -> - !: (Reductionops.ReductionBehaviour.get gref))), + let flags = match gref with + | ConstRef c -> Reductionops.ReductionBehaviour.get c + | _ -> None + in + !: flags)), DocAbove); MLCode(Pred("coq.arguments.set-simplification", @@ -3007,9 +3011,12 @@ See also the ! and / modifiers for the Arguments command. Supported attributes: - @global! (default: false)|}))), (fun gref strategy ~depth { options } _ -> grab_global_env "coq.arguments.set-simplification" (fun state -> - let local = options.local <> Some false in - Reductionops.ReductionBehaviour.set ~local gref strategy; - state, (), []))), + match gref with + | ConstRef gref -> + let local = options.local <> Some false in + Reductionops.ReductionBehaviour.set ~local gref strategy; + state, (), [] + | _ -> err Pp.(str "set-simplification must be called on constant")))), DocAbove); MLCode(Pred("coq.locate-abbreviation", From 9bb2338da402e94f1bed606af665c35696736f95 Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Fri, 3 Nov 2023 19:37:57 +0100 Subject: [PATCH 12/26] Removing superfluous poly flag for try_add_new_coercion and declare_axiom. --- elpi-builtin.elpi | 2 +- src/coq_elpi_builtins.ml | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/elpi-builtin.elpi b/elpi-builtin.elpi index 2b0186ec6..c3dc18f8f 100644 --- a/elpi-builtin.elpi +++ b/elpi-builtin.elpi @@ -55,7 +55,7 @@ not _. % [declare_constraint C Key1 Key2...] declares C blocked % on Key1 Key2 ... (variables, or lists thereof). -external type declare_constraint any -> any -> variadic any prop. +external type declare_constraint variadic any prop. external pred print_constraints. % prints all constraints diff --git a/src/coq_elpi_builtins.ml b/src/coq_elpi_builtins.ml index a864eea4c..600aa64a0 100644 --- a/src/coq_elpi_builtins.ml +++ b/src/coq_elpi_builtins.ml @@ -875,7 +875,7 @@ let add_axiom_or_variable api id ty local options state = GlobRef.VarRef(Id.of_string id), Univ.Instance.empty end else begin Dumpglob.dump_definition variable false "ax"; - ComAssumption.declare_axiom Vernacexpr.NoCoercion ~local:Locality.ImportDefaultBehavior ~poly:false ~kind (EConstr.to_constr sigma ty) + ComAssumption.declare_axiom Vernacexpr.NoCoercion ~local:Locality.ImportDefaultBehavior ~kind (EConstr.to_constr sigma ty) uentry impargs options.inline variable end @@ -2750,15 +2750,14 @@ NParams can always be omitted, since it is inferred. - @reversible! (default: false)|})), (fun (gr, _, source, target) ~depth { options } _ -> grab_global_env "coq.coercion.declare" (fun state -> let local = options.local <> Some false in - let poly = false in let reversible = options.reversible = Some true in begin match source, target with | B.Given source, B.Given target -> let source = ComCoercion.class_of_global source in - ComCoercion.try_add_new_coercion_with_target gr ~local ~poly + ComCoercion.try_add_new_coercion_with_target gr ~local ~reversible ~source ~target | _, _ -> - ComCoercion.try_add_new_coercion gr ~local ~poly ~reversible + ComCoercion.try_add_new_coercion gr ~local ~reversible end; state, (), []))), DocAbove); From 1a81969bdb018fb3aa58531ce5d5fe3be9e0fd25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Marie=20P=C3=A9drot?= Date: Mon, 6 Nov 2023 10:56:36 +0100 Subject: [PATCH 13/26] Adapt w.r.t. coq/coq#17136. --- src/coq_elpi_vernacular.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coq_elpi_vernacular.ml b/src/coq_elpi_vernacular.ml index fe2d0e7e0..c410775fd 100644 --- a/src/coq_elpi_vernacular.ml +++ b/src/coq_elpi_vernacular.ml @@ -266,7 +266,7 @@ let atts2impl loc ~depth state atts q = match Pcoq.parse_string (Pvernac.main_entry None) (Printf.sprintf "#[%s] Qed." txt) |> Option.map (fun x -> x.CAst.v) with | None -> atts | Some { Vernacexpr.attrs ; _ } -> List.map (fun {CAst.v=(name,v)} -> convert_att_r ("elpi."^name,v)) attrs @ atts - | exception Gramlib.Stream.Error msg -> + | exception Gramlib.Grammar.Error msg -> CErrors.user_err Pp.(str"Environment variable COQ_ELPI_ATTRIBUTES contains ill formed value:" ++ spc () ++ str txt ++ cut () ++ str msg) in let state, atts, _ = EU.map_acc (Coq_elpi_builtins.attribute.API.Conversion.embed ~depth) state atts in let atts = ET.mkApp attributesc (EU.list_to_lp_list atts) [] in From bb9c54d924b53f5c90cf1fa6e8faf38494bb81ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Gilbert?= Date: Thu, 9 Nov 2023 16:24:10 +0100 Subject: [PATCH 14/26] Adapt to coq/coq#18280 (case relevance outside case info) --- elpi-builtin.elpi | 20 ++++++++++++++++++++ src/coq_elpi_HOAS.ml | 10 +++++----- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/elpi-builtin.elpi b/elpi-builtin.elpi index 2b0186ec6..2191df31e 100644 --- a/elpi-builtin.elpi +++ b/elpi-builtin.elpi @@ -1173,6 +1173,26 @@ external pred getenv i:string, o:option string. % [system Command RetVal] executes Command and sets RetVal to the exit code external pred system i:string, o:int. +% -- Unix -- + +% gathers the standard file descriptors or a process +kind unix.process type. +type unix.process out_stream -> in_stream -> in_stream -> unix.process. + +% [unix.process.open Executable Arguments Environment P Diagnostic] OCaml's +% Unix.open_process_args_full. +% Note that the first argument is the executable name (as in argv[0]). +% If Executable is omitted it defaults to the first element of +% Arguments. +% Environment can be left unspecified, defaults to the current process +% environment. +% This API only works reliably since OCaml 4.12. +external pred unix.process.open i:string, i:list string, i:list string, + o:unix.process, o:diagnostic. + +% [unix.process.close P Diagnostic] OCaml's Unix.close_process_full +external pred unix.process.close i:unix.process, o:diagnostic. + % -- Debugging -- % [term_to_string T S] prints T to S diff --git a/src/coq_elpi_HOAS.ml b/src/coq_elpi_HOAS.ml index 8ba22c70a..f46f8177d 100644 --- a/src/coq_elpi_HOAS.ml +++ b/src/coq_elpi_HOAS.ml @@ -1321,7 +1321,7 @@ let rec constr2lp coq_ctx ~calldepth ~depth state t = | C.Construct (construct, i) -> state, in_elpi_gr ~depth state (G.ConstructRef construct) | C.Case(ci, u, pms, rt, iv, t, bs) -> - let (_, rt, _, t, bs) = EConstr.expand_case env sigma (ci, u, pms, rt, iv, t, bs) in + let (_, (rt,_), _, t, bs) = EConstr.expand_case env sigma (ci, u, pms, rt, iv, t, bs) in let state, t = aux ~depth env state t in let state, rt = aux ~depth env state rt in let state, bs = CArray.fold_left_map (aux ~depth env) state bs in @@ -1886,7 +1886,7 @@ and lp2constr ~calldepth syntactic_constraints coq_ctx ~depth state ?(on_ty=fals begin match Coqlib.lib_ref "elpi.unknown_inductive" with | GlobRef.IndRef i -> i | _ -> assert false end - Sorts.Relevant C.LetStyle in + C.LetStyle in let b = List.hd bt in let l, _ = EC.decompose_lambda (get_sigma state) b in let ci_pp_info = { unknown_ind_cinfo.Constr.ci_pp_info with Constr.cstr_tags = @@ -1895,8 +1895,8 @@ and lp2constr ~calldepth syntactic_constraints coq_ctx ~depth state ?(on_ty=fals let { sigma } = S.get engine state in begin match ind with | `SomeInd ind -> - let ci = Inductiveops.make_case_info (get_global_env state) ind Sorts.Relevant C.RegularStyle in - state, EC.mkCase (EConstr.contract_case (get_global_env state) sigma (ci,rt,C.NoInvert,t,Array.of_list bt)), gl1 @ gl2 @ gl3 + let ci = Inductiveops.make_case_info (get_global_env state) ind C.RegularStyle in + state, EC.mkCase (EConstr.contract_case (get_global_env state) sigma (ci,(rt,Relevant),C.NoInvert,t,Array.of_list bt)), gl1 @ gl2 @ gl3 | `None -> CErrors.anomaly Pp.(str "non dependent match on unknown, non singleton, inductive") | `SomeTerm (n,rt) -> let ci = default_case_info () in @@ -1904,7 +1904,7 @@ and lp2constr ~calldepth syntactic_constraints coq_ctx ~depth state ?(on_ty=fals match bt with | [t] -> [||], t | _ -> assert false in - state, EConstr.mkCase (ci,EConstr.EInstance.empty,[||],([|n|],rt),Constr.NoInvert,t,[|b|]), gl1 @ gl2 @ gl3 + state, EConstr.mkCase (ci,EConstr.EInstance.empty,[||],(([|n|],rt),Relevant),Constr.NoInvert,t,[|b|]), gl1 @ gl2 @ gl3 end (* fix *) From 9ad9c440ceae4aa52483a1ed6c77ef05f8438c36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Marie=20P=C3=A9drot?= Date: Fri, 10 Nov 2023 16:42:12 +0100 Subject: [PATCH 15/26] Adapt w.r.t. coq/coq#18294. --- elpi-builtin.elpi | 2 +- src/coq_elpi_arg_HOAS.ml | 2 +- src/coq_elpi_builtins.ml | 8 ++++---- src/coq_elpi_utils.ml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/elpi-builtin.elpi b/elpi-builtin.elpi index 2b0186ec6..c3dc18f8f 100644 --- a/elpi-builtin.elpi +++ b/elpi-builtin.elpi @@ -55,7 +55,7 @@ not _. % [declare_constraint C Key1 Key2...] declares C blocked % on Key1 Key2 ... (variables, or lists thereof). -external type declare_constraint any -> any -> variadic any prop. +external type declare_constraint variadic any prop. external pred print_constraints. % prints all constraints diff --git a/src/coq_elpi_arg_HOAS.ml b/src/coq_elpi_arg_HOAS.ml index 100c7d752..9771aab3b 100644 --- a/src/coq_elpi_arg_HOAS.ml +++ b/src/coq_elpi_arg_HOAS.ml @@ -300,7 +300,7 @@ let raw_indt_decl_to_glob glob_sign ({ finiteness; name; parameters; non_uniform { finiteness; name = (space, name); arity; params; nuparams; nuparams_given; constructors; univpoly } let intern_indt_decl glob_sign (it : raw_indt_decl) = glob_sign, it -let expr_hole = CAst.make @@ Constrexpr.CHole(None,Namegen.IntroAnonymous) +let expr_hole = CAst.make @@ Constrexpr.CHole(None) let raw_context_decl_to_glob glob_sign fields = let _intern_env, fields = intern_global_context ~intern_env:Constrintern.empty_internalization_env glob_sign fields in diff --git a/src/coq_elpi_builtins.ml b/src/coq_elpi_builtins.ml index 20d25f533..d5818233b 100644 --- a/src/coq_elpi_builtins.ml +++ b/src/coq_elpi_builtins.ml @@ -95,7 +95,7 @@ let pr_econstr_env options env sigma t = let expr = Constrextern.extern_constr env sigma t in let expr = let rec aux () ({ CAst.v } as orig) = match v with - | Constrexpr.CEvar _ -> CAst.make @@ Constrexpr.CHole(None,Namegen.IntroAnonymous) + | Constrexpr.CEvar _ -> CAst.make @@ Constrexpr.CHole(None) | _ -> Constrexpr_ops.map_constr_expr_with_binders (fun _ () -> ()) aux () orig in if options.hoas_holes = Some Heuristic then aux () expr else expr in Ppconstr.pr_constr_expr_n env sigma options.pplevel expr) @@ -915,7 +915,7 @@ let cache_abbrev_for_tac { abbrev_name; tac_name = tacname; tac_fixed_args = mor | Coq_elpi_arg_HOAS.Tac.Term (t,_) -> let expr = Constrextern.extern_glob_constr Constrextern.empty_extern_env t in let rec aux () ({ CAst.v } as orig) = match v with - | Constrexpr.CEvar _ -> CAst.make @@ Constrexpr.CHole(None,Namegen.IntroAnonymous) + | Constrexpr.CEvar _ -> CAst.make @@ Constrexpr.CHole(None) | _ -> Constrexpr_ops.map_constr_expr_with_binders (fun _ () -> ()) aux () orig in Coq_elpi_arg_HOAS.Tac.Term (aux () expr) | _ -> assert false) in @@ -3120,7 +3120,7 @@ Supported attributes: let binders, vars = List.split (CList.init nargs (fun i -> let name = Coq_elpi_glob_quotation.mk_restricted_name i in let lname = CAst.make @@ Name.Name (Id.of_string name) in - CLocalAssum([lname],Default Glob_term.Explicit, CAst.make @@ CHole(None,Namegen.IntroAnonymous)), + CLocalAssum([lname],Default Glob_term.Explicit, CAst.make @@ CHole(None)), (CAst.make @@ CRef(Libnames.qualid_of_string name,None), None))) in let eta = CAst.(make @@ CLambdaN(binders,make @@ CApp(make @@ CRef(Libnames.qualid_of_string (KerName.to_string sd),None),vars))) in let sigma = get_sigma state in @@ -3150,7 +3150,7 @@ Supported attributes: let binders, vars = List.split (CList.init nargs (fun i -> let name = Coq_elpi_glob_quotation.mk_restricted_name i in let lname = CAst.make @@ Name.Name (Id.of_string name) in - CLocalAssum([lname],Default Glob_term.Explicit, CAst.make @@ CHole(None,Namegen.IntroAnonymous)), + CLocalAssum([lname],Default Glob_term.Explicit, CAst.make @@ CHole(None)), (CAst.make @@ CRef(Libnames.qualid_of_string name,None), None))) in let eta = CAst.(make @@ CLambdaN(binders,make @@ CApp(make @@ CRef(Libnames.qualid_of_string (KerName.to_string sd),None),vars))) in let sigma = get_sigma state in diff --git a/src/coq_elpi_utils.ml b/src/coq_elpi_utils.ml index 3a63fc9a4..8da1a03a9 100644 --- a/src/coq_elpi_utils.ml +++ b/src/coq_elpi_utils.ml @@ -77,7 +77,7 @@ let safe_destApp sigma t = let mkGHole = DAst.make - (Glob_term.GHole(Evar_kinds.InternalHole,Namegen.IntroAnonymous)) + (Glob_term.(GHole GInternalHole)) let mkApp ~depth t l = match l with From 71a82a548e69b0f732b37dc356f0dbfe9c7f948b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Marie=20P=C3=A9drot?= Date: Wed, 15 Nov 2023 12:22:31 +0100 Subject: [PATCH 16/26] Adapt w.r.t. coq/coq#18312. --- src/coq_elpi_builtins.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coq_elpi_builtins.ml b/src/coq_elpi_builtins.ml index d5818233b..423ac1e5c 100644 --- a/src/coq_elpi_builtins.ml +++ b/src/coq_elpi_builtins.ml @@ -593,8 +593,8 @@ let implicit_kind : Glob_term.binding_kind Conv.t = let open Conv in let open AP let implicit_kind_of_status = function | None -> Glob_term.Explicit - | Some (_,_,(maximal,_)) -> - if maximal then Glob_term.MaxImplicit else Glob_term.NonMaxImplicit + | Some imp -> + if imp.Impargs.impl_max then Glob_term.MaxImplicit else Glob_term.NonMaxImplicit let simplification_strategy = let open API.AlgebraicData in let open Reductionops.ReductionBehaviour in declare { From 3c08a3cf20ecf2d9f02131e8ddc92cd3db8f2d64 Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Fri, 27 Oct 2023 16:38:15 +0200 Subject: [PATCH 17/26] This is to adapt to coq/coq#8190. Function cbv_norm_flags now needs to know if the reduction is expected to be weak or strong. We set it to strong:true preserving the previous semantics. --- src/coq_elpi_builtins.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coq_elpi_builtins.ml b/src/coq_elpi_builtins.ml index d5818233b..2d316565a 100644 --- a/src/coq_elpi_builtins.ml +++ b/src/coq_elpi_builtins.ml @@ -3466,7 +3466,7 @@ Supported attributes: (fun t _ ~depth proof_context constraints state -> let sigma = get_sigma state in let flags = Option.default RedFlags.all proof_context.options.redflags in - let t = Tacred.cbv_norm_flags flags proof_context.env sigma t in + let t = Tacred.cbv_norm_flags flags ~strong:true proof_context.env sigma t in !: t)), DocAbove); From 131853c16169c7fc3d479dfc15b25d9d03c93237 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Gilbert?= Date: Mon, 20 Nov 2023 15:12:12 +0100 Subject: [PATCH 18/26] Adapt to coq/coq#18331 (mind_kelim -> mind_squashed) --- src/coq_elpi_builtins.ml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/coq_elpi_builtins.ml b/src/coq_elpi_builtins.ml index 423ac1e5c..c8f8b683c 100644 --- a/src/coq_elpi_builtins.ml +++ b/src/coq_elpi_builtins.ml @@ -1612,10 +1612,7 @@ informative, as well a singleton types in Prop (which are regarded as not non-informative).|})), (fun i ~depth {env} _ state -> let _, indbo = Inductive.lookup_mind_specif env i in - match indbo.Declarations.mind_kelim with - | (Sorts.InSProp | Sorts.InProp) -> raise No_clause - | Sorts.InSet when Environ.is_impredicative_set env -> raise No_clause - | (Sorts.InSet | Sorts.InType | Sorts.InQSort) -> () + if Option.has_some indbo.Declarations.mind_squashed then raise No_clause )), DocAbove); From 41c5fd3511189566b80ec166754babe7acbc5e31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Marie=20P=C3=A9drot?= Date: Thu, 23 Nov 2023 09:20:47 +0100 Subject: [PATCH 19/26] Adapt w.r.t. coq/coq#18345. --- src/coq_elpi_vernacular.ml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/coq_elpi_vernacular.ml b/src/coq_elpi_vernacular.ml index c410775fd..5f51c9ca0 100644 --- a/src/coq_elpi_vernacular.ml +++ b/src/coq_elpi_vernacular.ml @@ -444,9 +444,14 @@ let loc_merge l1 l2 = let cache_program (nature,p,p_str) = match nature with | Command _ -> + let command = Vernacexpr.{ + ext_plugin = "coq-elpi.elpi"; + ext_entry = "Elpi" ^ p_str; + ext_index = 0; + } in let ext = Vernacextend.declare_dynamic_vernac_extend - ~command:("Elpi"^p_str) + ~command ?entry:None ~depr:false From 0ef2f9b0dc36d00ca652a67dad2275e5e8a0cad7 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Sat, 23 Dec 2023 14:13:18 +0100 Subject: [PATCH 20/26] master on 8.19 --- .github/workflows/main.yml | 2 +- .github/workflows/nix-action-coq-8.18.yml | 1512 --------------------- coq-elpi.opam | 2 +- 3 files changed, 2 insertions(+), 1514 deletions(-) delete mode 100644 .github/workflows/nix-action-coq-8.18.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 910b08993..4719e452f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: coq_version: - - '8.18' + - '8.19' ocaml_version: - '4.14-flambda' steps: diff --git a/.github/workflows/nix-action-coq-8.18.yml b/.github/workflows/nix-action-coq-8.18.yml deleted file mode 100644 index 1e4e1afad..000000000 --- a/.github/workflows/nix-action-coq-8.18.yml +++ /dev/null @@ -1,1512 +0,0 @@ -jobs: - Verdi: - needs: - - coq - - mathcomp-ssreflect - runs-on: ubuntu-latest - steps: - - name: Determine which commit to initially checkout - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ - \ }}\" >> $GITHUB_ENV\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.target_commit }} - - name: Determine which commit to test - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ - \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ - \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ - \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ - \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ - \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ - \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.tested_commit }} - - name: Cachix install - uses: cachix/install-nix-action@v20 - with: - nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Cachix setup coq-elpi - uses: cachix/cachix-action@v12 - with: - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - extraPullNames: coq, coq-community, math-comp - name: coq-elpi - - id: stepCheck - name: Checking presence of CI target Verdi - run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ - \ bundle \"coq-8.18\" --argstr job \"Verdi\" \\\n --dry-run 2>&1 > /dev/null)\n\ - echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\ - s/.*/built/\") >> $GITHUB_OUTPUT\n" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: coq' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coq" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: Cheerios' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "Cheerios" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: InfSeqExt' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "InfSeqExt" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-ssreflect' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-ssreflect" - - if: steps.stepCheck.outputs.status == 'built' - name: Building/fetching current CI target - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "Verdi" - addition-chains: - needs: - - coq - - mathcomp-ssreflect - - mathcomp-algebra - - mathcomp-fingroup - runs-on: ubuntu-latest - steps: - - name: Determine which commit to initially checkout - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ - \ }}\" >> $GITHUB_ENV\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.target_commit }} - - name: Determine which commit to test - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ - \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ - \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ - \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ - \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ - \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ - \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.tested_commit }} - - name: Cachix install - uses: cachix/install-nix-action@v20 - with: - nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Cachix setup coq-elpi - uses: cachix/cachix-action@v12 - with: - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - extraPullNames: coq, coq-community, math-comp - name: coq-elpi - - id: stepCheck - name: Checking presence of CI target addition-chains - run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ - \ bundle \"coq-8.18\" --argstr job \"addition-chains\" \\\n --dry-run 2>&1\ - \ > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"\ - built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: coq' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coq" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-ssreflect' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-ssreflect" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-algebra' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-algebra" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-fingroup' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-fingroup" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: paramcoq' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "paramcoq" - - if: steps.stepCheck.outputs.status == 'built' - name: Building/fetching current CI target - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "addition-chains" - autosubst: - needs: - - coq - - mathcomp-ssreflect - runs-on: ubuntu-latest - steps: - - name: Determine which commit to initially checkout - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ - \ }}\" >> $GITHUB_ENV\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.target_commit }} - - name: Determine which commit to test - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ - \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ - \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ - \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ - \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ - \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ - \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.tested_commit }} - - name: Cachix install - uses: cachix/install-nix-action@v20 - with: - nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Cachix setup coq-elpi - uses: cachix/cachix-action@v12 - with: - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - extraPullNames: coq, coq-community, math-comp - name: coq-elpi - - id: stepCheck - name: Checking presence of CI target autosubst - run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ - \ bundle \"coq-8.18\" --argstr job \"autosubst\" \\\n --dry-run 2>&1 > /dev/null)\n\ - echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\ - s/.*/built/\") >> $GITHUB_OUTPUT\n" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: coq' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coq" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-ssreflect' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-ssreflect" - - if: steps.stepCheck.outputs.status == 'built' - name: Building/fetching current CI target - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "autosubst" - coq: - needs: [] - runs-on: ubuntu-latest - steps: - - name: Determine which commit to initially checkout - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ - \ }}\" >> $GITHUB_ENV\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.target_commit }} - - name: Determine which commit to test - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ - \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ - \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ - \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ - \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ - \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ - \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.tested_commit }} - - name: Cachix install - uses: cachix/install-nix-action@v20 - with: - nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Cachix setup coq-elpi - uses: cachix/cachix-action@v12 - with: - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - extraPullNames: coq, coq-community, math-comp - name: coq-elpi - - id: stepCheck - name: Checking presence of CI target coq - run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ - \ bundle \"coq-8.18\" --argstr job \"coq\" \\\n --dry-run 2>&1 > /dev/null)\n\ - echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\ - s/.*/built/\") >> $GITHUB_OUTPUT\n" - - if: steps.stepCheck.outputs.status == 'built' - name: Building/fetching current CI target - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coq" - coq-elpi: - needs: - - coq - runs-on: ubuntu-latest - steps: - - name: Determine which commit to initially checkout - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ - \ }}\" >> $GITHUB_ENV\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.target_commit }} - - name: Determine which commit to test - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ - \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ - \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ - \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ - \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ - \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ - \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.tested_commit }} - - name: Cachix install - uses: cachix/install-nix-action@v20 - with: - nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Cachix setup coq-elpi - uses: cachix/cachix-action@v12 - with: - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - extraPullNames: coq, coq-community, math-comp - name: coq-elpi - - id: stepCheck - name: Checking presence of CI target coq-elpi - run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ - \ bundle \"coq-8.18\" --argstr job \"coq-elpi\" \\\n --dry-run 2>&1 > /dev/null)\n\ - echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\ - s/.*/built/\") >> $GITHUB_OUTPUT\n" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: coq' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coq" - - if: steps.stepCheck.outputs.status == 'built' - name: Building/fetching current CI target - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coq-elpi" - coquelicot: - needs: - - coq - - mathcomp-ssreflect - runs-on: ubuntu-latest - steps: - - name: Determine which commit to initially checkout - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ - \ }}\" >> $GITHUB_ENV\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.target_commit }} - - name: Determine which commit to test - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ - \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ - \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ - \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ - \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ - \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ - \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.tested_commit }} - - name: Cachix install - uses: cachix/install-nix-action@v20 - with: - nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Cachix setup coq-elpi - uses: cachix/cachix-action@v12 - with: - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - extraPullNames: coq, coq-community, math-comp - name: coq-elpi - - id: stepCheck - name: Checking presence of CI target coquelicot - run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ - \ bundle \"coq-8.18\" --argstr job \"coquelicot\" \\\n --dry-run 2>&1 >\ - \ /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\"\ - \ | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: coq' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coq" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-ssreflect' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-ssreflect" - - if: steps.stepCheck.outputs.status == 'built' - name: Building/fetching current CI target - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coquelicot" - deriving: - needs: - - coq - - mathcomp-ssreflect - runs-on: ubuntu-latest - steps: - - name: Determine which commit to initially checkout - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ - \ }}\" >> $GITHUB_ENV\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.target_commit }} - - name: Determine which commit to test - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ - \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ - \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ - \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ - \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ - \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ - \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.tested_commit }} - - name: Cachix install - uses: cachix/install-nix-action@v20 - with: - nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Cachix setup coq-elpi - uses: cachix/cachix-action@v12 - with: - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - extraPullNames: coq, coq-community, math-comp - name: coq-elpi - - id: stepCheck - name: Checking presence of CI target deriving - run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ - \ bundle \"coq-8.18\" --argstr job \"deriving\" \\\n --dry-run 2>&1 > /dev/null)\n\ - echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\ - s/.*/built/\") >> $GITHUB_OUTPUT\n" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: coq' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coq" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-ssreflect' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-ssreflect" - - if: steps.stepCheck.outputs.status == 'built' - name: Building/fetching current CI target - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "deriving" - hierarchy-builder: - needs: - - coq - - coq-elpi - runs-on: ubuntu-latest - steps: - - name: Determine which commit to initially checkout - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ - \ }}\" >> $GITHUB_ENV\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.target_commit }} - - name: Determine which commit to test - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ - \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ - \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ - \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ - \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ - \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ - \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.tested_commit }} - - name: Cachix install - uses: cachix/install-nix-action@v20 - with: - nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Cachix setup coq-elpi - uses: cachix/cachix-action@v12 - with: - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - extraPullNames: coq, coq-community, math-comp - name: coq-elpi - - id: stepCheck - name: Checking presence of CI target hierarchy-builder - run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ - \ bundle \"coq-8.18\" --argstr job \"hierarchy-builder\" \\\n --dry-run\ - \ 2>&1 > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep\ - \ \"built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: coq' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coq" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: coq-elpi' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coq-elpi" - - if: steps.stepCheck.outputs.status == 'built' - name: Building/fetching current CI target - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "hierarchy-builder" - interval: - needs: - - coq - - coquelicot - - mathcomp-ssreflect - - mathcomp-fingroup - runs-on: ubuntu-latest - steps: - - name: Determine which commit to initially checkout - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ - \ }}\" >> $GITHUB_ENV\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.target_commit }} - - name: Determine which commit to test - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ - \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ - \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ - \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ - \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ - \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ - \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.tested_commit }} - - name: Cachix install - uses: cachix/install-nix-action@v20 - with: - nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Cachix setup coq-elpi - uses: cachix/cachix-action@v12 - with: - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - extraPullNames: coq, coq-community, math-comp - name: coq-elpi - - id: stepCheck - name: Checking presence of CI target interval - run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ - \ bundle \"coq-8.18\" --argstr job \"interval\" \\\n --dry-run 2>&1 > /dev/null)\n\ - echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\ - s/.*/built/\") >> $GITHUB_OUTPUT\n" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: coq' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coq" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: bignums' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "bignums" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: coquelicot' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coquelicot" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: flocq' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "flocq" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-ssreflect' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-ssreflect" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-fingroup' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-fingroup" - - if: steps.stepCheck.outputs.status == 'built' - name: Building/fetching current CI target - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "interval" - mathcomp: - needs: - - coq - - mathcomp-ssreflect - - mathcomp-fingroup - - mathcomp-algebra - - mathcomp-solvable - - mathcomp-field - - mathcomp-character - - hierarchy-builder - runs-on: ubuntu-latest - steps: - - name: Determine which commit to initially checkout - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ - \ }}\" >> $GITHUB_ENV\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.target_commit }} - - name: Determine which commit to test - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ - \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ - \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ - \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ - \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ - \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ - \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.tested_commit }} - - name: Cachix install - uses: cachix/install-nix-action@v20 - with: - nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Cachix setup coq-elpi - uses: cachix/cachix-action@v12 - with: - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - extraPullNames: coq, coq-community, math-comp - name: coq-elpi - - id: stepCheck - name: Checking presence of CI target mathcomp - run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ - \ bundle \"coq-8.18\" --argstr job \"mathcomp\" \\\n --dry-run 2>&1 > /dev/null)\n\ - echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\ - s/.*/built/\") >> $GITHUB_OUTPUT\n" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: coq' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coq" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-ssreflect' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-ssreflect" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-fingroup' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-fingroup" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-algebra' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-algebra" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-solvable' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-solvable" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-field' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-field" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-character' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-character" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: hierarchy-builder' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "hierarchy-builder" - - if: steps.stepCheck.outputs.status == 'built' - name: Building/fetching current CI target - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp" - mathcomp-algebra: - needs: - - coq - - mathcomp-ssreflect - - mathcomp-fingroup - - hierarchy-builder - runs-on: ubuntu-latest - steps: - - name: Determine which commit to initially checkout - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ - \ }}\" >> $GITHUB_ENV\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.target_commit }} - - name: Determine which commit to test - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ - \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ - \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ - \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ - \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ - \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ - \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.tested_commit }} - - name: Cachix install - uses: cachix/install-nix-action@v20 - with: - nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Cachix setup coq-elpi - uses: cachix/cachix-action@v12 - with: - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - extraPullNames: coq, coq-community, math-comp - name: coq-elpi - - id: stepCheck - name: Checking presence of CI target mathcomp-algebra - run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ - \ bundle \"coq-8.18\" --argstr job \"mathcomp-algebra\" \\\n --dry-run 2>&1\ - \ > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"\ - built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: coq' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coq" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-ssreflect' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-ssreflect" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-fingroup' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-fingroup" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: hierarchy-builder' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "hierarchy-builder" - - if: steps.stepCheck.outputs.status == 'built' - name: Building/fetching current CI target - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-algebra" - mathcomp-analysis: - needs: - - coq - - mathcomp-classical - - mathcomp-field - - mathcomp-bigenough - - hierarchy-builder - runs-on: ubuntu-latest - steps: - - name: Determine which commit to initially checkout - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ - \ }}\" >> $GITHUB_ENV\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.target_commit }} - - name: Determine which commit to test - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ - \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ - \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ - \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ - \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ - \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ - \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.tested_commit }} - - name: Cachix install - uses: cachix/install-nix-action@v20 - with: - nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Cachix setup coq-elpi - uses: cachix/cachix-action@v12 - with: - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - extraPullNames: coq, coq-community, math-comp - name: coq-elpi - - id: stepCheck - name: Checking presence of CI target mathcomp-analysis - run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ - \ bundle \"coq-8.18\" --argstr job \"mathcomp-analysis\" \\\n --dry-run\ - \ 2>&1 > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep\ - \ \"built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: coq' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coq" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-classical' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-classical" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-field' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-field" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-bigenough' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-bigenough" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: hierarchy-builder' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "hierarchy-builder" - - if: steps.stepCheck.outputs.status == 'built' - name: Building/fetching current CI target - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-analysis" - mathcomp-bigenough: - needs: - - coq - - mathcomp-ssreflect - runs-on: ubuntu-latest - steps: - - name: Determine which commit to initially checkout - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ - \ }}\" >> $GITHUB_ENV\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.target_commit }} - - name: Determine which commit to test - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ - \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ - \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ - \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ - \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ - \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ - \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.tested_commit }} - - name: Cachix install - uses: cachix/install-nix-action@v20 - with: - nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Cachix setup coq-elpi - uses: cachix/cachix-action@v12 - with: - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - extraPullNames: coq, coq-community, math-comp - name: coq-elpi - - id: stepCheck - name: Checking presence of CI target mathcomp-bigenough - run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ - \ bundle \"coq-8.18\" --argstr job \"mathcomp-bigenough\" \\\n --dry-run\ - \ 2>&1 > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep\ - \ \"built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: coq' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coq" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-ssreflect' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-ssreflect" - - if: steps.stepCheck.outputs.status == 'built' - name: Building/fetching current CI target - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-bigenough" - mathcomp-character: - needs: - - coq - - mathcomp-ssreflect - - mathcomp-fingroup - - mathcomp-algebra - - mathcomp-solvable - - mathcomp-field - - hierarchy-builder - runs-on: ubuntu-latest - steps: - - name: Determine which commit to initially checkout - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ - \ }}\" >> $GITHUB_ENV\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.target_commit }} - - name: Determine which commit to test - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ - \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ - \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ - \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ - \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ - \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ - \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.tested_commit }} - - name: Cachix install - uses: cachix/install-nix-action@v20 - with: - nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Cachix setup coq-elpi - uses: cachix/cachix-action@v12 - with: - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - extraPullNames: coq, coq-community, math-comp - name: coq-elpi - - id: stepCheck - name: Checking presence of CI target mathcomp-character - run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ - \ bundle \"coq-8.18\" --argstr job \"mathcomp-character\" \\\n --dry-run\ - \ 2>&1 > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep\ - \ \"built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: coq' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coq" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-ssreflect' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-ssreflect" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-fingroup' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-fingroup" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-algebra' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-algebra" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-solvable' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-solvable" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-field' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-field" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: hierarchy-builder' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "hierarchy-builder" - - if: steps.stepCheck.outputs.status == 'built' - name: Building/fetching current CI target - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-character" - mathcomp-classical: - needs: - - coq - - mathcomp-algebra - - mathcomp-finmap - - hierarchy-builder - runs-on: ubuntu-latest - steps: - - name: Determine which commit to initially checkout - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ - \ }}\" >> $GITHUB_ENV\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.target_commit }} - - name: Determine which commit to test - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ - \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ - \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ - \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ - \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ - \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ - \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.tested_commit }} - - name: Cachix install - uses: cachix/install-nix-action@v20 - with: - nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Cachix setup coq-elpi - uses: cachix/cachix-action@v12 - with: - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - extraPullNames: coq, coq-community, math-comp - name: coq-elpi - - id: stepCheck - name: Checking presence of CI target mathcomp-classical - run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ - \ bundle \"coq-8.18\" --argstr job \"mathcomp-classical\" \\\n --dry-run\ - \ 2>&1 > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep\ - \ \"built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: coq' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coq" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-algebra' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-algebra" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-finmap' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-finmap" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: hierarchy-builder' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "hierarchy-builder" - - if: steps.stepCheck.outputs.status == 'built' - name: Building/fetching current CI target - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-classical" - mathcomp-field: - needs: - - coq - - mathcomp-ssreflect - - mathcomp-fingroup - - mathcomp-algebra - - mathcomp-solvable - - hierarchy-builder - runs-on: ubuntu-latest - steps: - - name: Determine which commit to initially checkout - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ - \ }}\" >> $GITHUB_ENV\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.target_commit }} - - name: Determine which commit to test - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ - \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ - \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ - \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ - \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ - \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ - \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.tested_commit }} - - name: Cachix install - uses: cachix/install-nix-action@v20 - with: - nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Cachix setup coq-elpi - uses: cachix/cachix-action@v12 - with: - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - extraPullNames: coq, coq-community, math-comp - name: coq-elpi - - id: stepCheck - name: Checking presence of CI target mathcomp-field - run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ - \ bundle \"coq-8.18\" --argstr job \"mathcomp-field\" \\\n --dry-run 2>&1\ - \ > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"\ - built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: coq' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coq" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-ssreflect' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-ssreflect" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-fingroup' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-fingroup" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-algebra' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-algebra" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-solvable' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-solvable" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: hierarchy-builder' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "hierarchy-builder" - - if: steps.stepCheck.outputs.status == 'built' - name: Building/fetching current CI target - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-field" - mathcomp-fingroup: - needs: - - coq - - mathcomp-ssreflect - - hierarchy-builder - runs-on: ubuntu-latest - steps: - - name: Determine which commit to initially checkout - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ - \ }}\" >> $GITHUB_ENV\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.target_commit }} - - name: Determine which commit to test - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ - \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ - \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ - \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ - \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ - \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ - \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.tested_commit }} - - name: Cachix install - uses: cachix/install-nix-action@v20 - with: - nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Cachix setup coq-elpi - uses: cachix/cachix-action@v12 - with: - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - extraPullNames: coq, coq-community, math-comp - name: coq-elpi - - id: stepCheck - name: Checking presence of CI target mathcomp-fingroup - run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ - \ bundle \"coq-8.18\" --argstr job \"mathcomp-fingroup\" \\\n --dry-run\ - \ 2>&1 > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep\ - \ \"built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: coq' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coq" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-ssreflect' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-ssreflect" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: hierarchy-builder' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "hierarchy-builder" - - if: steps.stepCheck.outputs.status == 'built' - name: Building/fetching current CI target - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-fingroup" - mathcomp-finmap: - needs: - - coq - - mathcomp-ssreflect - runs-on: ubuntu-latest - steps: - - name: Determine which commit to initially checkout - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ - \ }}\" >> $GITHUB_ENV\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.target_commit }} - - name: Determine which commit to test - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ - \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ - \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ - \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ - \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ - \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ - \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.tested_commit }} - - name: Cachix install - uses: cachix/install-nix-action@v20 - with: - nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Cachix setup coq-elpi - uses: cachix/cachix-action@v12 - with: - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - extraPullNames: coq, coq-community, math-comp - name: coq-elpi - - id: stepCheck - name: Checking presence of CI target mathcomp-finmap - run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ - \ bundle \"coq-8.18\" --argstr job \"mathcomp-finmap\" \\\n --dry-run 2>&1\ - \ > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"\ - built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: coq' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coq" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-ssreflect' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-ssreflect" - - if: steps.stepCheck.outputs.status == 'built' - name: Building/fetching current CI target - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-finmap" - mathcomp-solvable: - needs: - - coq - - mathcomp-ssreflect - - mathcomp-fingroup - - mathcomp-algebra - - hierarchy-builder - runs-on: ubuntu-latest - steps: - - name: Determine which commit to initially checkout - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ - \ }}\" >> $GITHUB_ENV\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.target_commit }} - - name: Determine which commit to test - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ - \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ - \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ - \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ - \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ - \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ - \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.tested_commit }} - - name: Cachix install - uses: cachix/install-nix-action@v20 - with: - nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Cachix setup coq-elpi - uses: cachix/cachix-action@v12 - with: - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - extraPullNames: coq, coq-community, math-comp - name: coq-elpi - - id: stepCheck - name: Checking presence of CI target mathcomp-solvable - run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ - \ bundle \"coq-8.18\" --argstr job \"mathcomp-solvable\" \\\n --dry-run\ - \ 2>&1 > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep\ - \ \"built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: coq' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coq" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-ssreflect' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-ssreflect" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-fingroup' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-fingroup" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-algebra' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-algebra" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: hierarchy-builder' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "hierarchy-builder" - - if: steps.stepCheck.outputs.status == 'built' - name: Building/fetching current CI target - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-solvable" - mathcomp-ssreflect: - needs: - - coq - - hierarchy-builder - runs-on: ubuntu-latest - steps: - - name: Determine which commit to initially checkout - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ - \ }}\" >> $GITHUB_ENV\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.target_commit }} - - name: Determine which commit to test - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ - \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ - \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ - \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ - \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ - \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ - \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.tested_commit }} - - name: Cachix install - uses: cachix/install-nix-action@v20 - with: - nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Cachix setup coq-elpi - uses: cachix/cachix-action@v12 - with: - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - extraPullNames: coq, coq-community, math-comp - name: coq-elpi - - id: stepCheck - name: Checking presence of CI target mathcomp-ssreflect - run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ - \ bundle \"coq-8.18\" --argstr job \"mathcomp-ssreflect\" \\\n --dry-run\ - \ 2>&1 > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep\ - \ \"built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: coq' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coq" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: hierarchy-builder' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "hierarchy-builder" - - if: steps.stepCheck.outputs.status == 'built' - name: Building/fetching current CI target - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-ssreflect" - odd-order: - needs: - - coq - - mathcomp-character - - mathcomp-ssreflect - - mathcomp-fingroup - - mathcomp-algebra - - mathcomp-solvable - - mathcomp-field - - mathcomp - runs-on: ubuntu-latest - steps: - - name: Determine which commit to initially checkout - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ - \ }}\" >> $GITHUB_ENV\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.target_commit }} - - name: Determine which commit to test - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ - \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ - \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ - \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ - \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ - \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ - \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.tested_commit }} - - name: Cachix install - uses: cachix/install-nix-action@v20 - with: - nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Cachix setup coq-elpi - uses: cachix/cachix-action@v12 - with: - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - extraPullNames: coq, coq-community, math-comp - name: coq-elpi - - id: stepCheck - name: Checking presence of CI target odd-order - run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ - \ bundle \"coq-8.18\" --argstr job \"odd-order\" \\\n --dry-run 2>&1 > /dev/null)\n\ - echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\ - s/.*/built/\") >> $GITHUB_OUTPUT\n" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: coq' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coq" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-character' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-character" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-ssreflect' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-ssreflect" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-fingroup' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-fingroup" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-algebra' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-algebra" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-solvable' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-solvable" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-field' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-field" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp" - - if: steps.stepCheck.outputs.status == 'built' - name: Building/fetching current CI target - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "odd-order" - reglang: - needs: - - coq - - mathcomp-ssreflect - runs-on: ubuntu-latest - steps: - - name: Determine which commit to initially checkout - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ - \ }}\" >> $GITHUB_ENV\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.target_commit }} - - name: Determine which commit to test - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ - \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ - \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ - \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ - \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ - \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ - \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.tested_commit }} - - name: Cachix install - uses: cachix/install-nix-action@v20 - with: - nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Cachix setup coq-elpi - uses: cachix/cachix-action@v12 - with: - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - extraPullNames: coq, coq-community, math-comp - name: coq-elpi - - id: stepCheck - name: Checking presence of CI target reglang - run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ - \ bundle \"coq-8.18\" --argstr job \"reglang\" \\\n --dry-run 2>&1 > /dev/null)\n\ - echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\ - s/.*/built/\") >> $GITHUB_OUTPUT\n" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: coq' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coq" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: mathcomp-ssreflect' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "mathcomp-ssreflect" - - if: steps.stepCheck.outputs.status == 'built' - name: Building/fetching current CI target - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "reglang" - trakt: - needs: - - coq - - coq-elpi - runs-on: ubuntu-latest - steps: - - name: Determine which commit to initially checkout - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ - \ }}\" >> $GITHUB_ENV\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.target_commit }} - - name: Determine which commit to test - run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ - \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ - \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ - \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ - \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ - \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ - \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ - \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" - - name: Git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ env.tested_commit }} - - name: Cachix install - uses: cachix/install-nix-action@v20 - with: - nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Cachix setup coq-elpi - uses: cachix/cachix-action@v12 - with: - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - extraPullNames: coq, coq-community, math-comp - name: coq-elpi - - id: stepCheck - name: Checking presence of CI target trakt - run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ - \ bundle \"coq-8.18\" --argstr job \"trakt\" \\\n --dry-run 2>&1 > /dev/null)\n\ - echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\ - s/.*/built/\") >> $GITHUB_OUTPUT\n" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: coq' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coq" - - if: steps.stepCheck.outputs.status == 'built' - name: 'Building/fetching previous CI target: coq-elpi' - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "coq-elpi" - - if: steps.stepCheck.outputs.status == 'built' - name: Building/fetching current CI target - run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18" - --argstr job "trakt" -name: Nix CI for bundle coq-8.18 -'on': - pull_request: - paths: - - .github/workflows/nix-action-coq-8.18.yml - pull_request_target: - paths-ignore: - - .github/workflows/nix-action-coq-8.18.yml - types: - - opened - - synchronize - - reopened - push: - branches: - - master diff --git a/coq-elpi.opam b/coq-elpi.opam index 80009a2ea..89f963769 100644 --- a/coq-elpi.opam +++ b/coq-elpi.opam @@ -16,7 +16,7 @@ depends: [ "ocaml" {>= "4.09.0" } "stdlib-shims" "elpi" {>= "1.18.1" & < "1.19.0~"} - "coq" {>= "8.18" & < "8.19~" } + "coq" {>= "8.19" & < "8.20~" } "dot-merlin-reader" {with-dev} "ocaml-lsp-server" {with-dev} ] From b525f72a61292889dedb36058ce4f0e637bf2ea8 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Sat, 23 Dec 2023 16:12:09 +0100 Subject: [PATCH 21/26] nix --- .github/workflows/nix-action-coq-8.19.yml | 954 ++++++++++++++++++++++ .nix/config.nix | 6 +- .nix/coq-nix-toolbox.nix | 2 +- 3 files changed, 958 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/nix-action-coq-8.19.yml diff --git a/.github/workflows/nix-action-coq-8.19.yml b/.github/workflows/nix-action-coq-8.19.yml new file mode 100644 index 000000000..e32b837ef --- /dev/null +++ b/.github/workflows/nix-action-coq-8.19.yml @@ -0,0 +1,954 @@ +jobs: + coq: + needs: [] + runs-on: ubuntu-latest + steps: + - name: Determine which commit to initially checkout + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ + \ }}\" >> $GITHUB_ENV\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.target_commit }} + - name: Determine which commit to test + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ + \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ + \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ + \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ + \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ + \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ + \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.tested_commit }} + - name: Cachix install + uses: cachix/install-nix-action@v20 + with: + nix_path: nixpkgs=channel:nixpkgs-unstable + - name: Cachix setup coq-elpi + uses: cachix/cachix-action@v12 + with: + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + extraPullNames: coq, coq-community, math-comp + name: coq-elpi + - id: stepCheck + name: Checking presence of CI target coq + run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ + \ bundle \"coq-8.19\" --argstr job \"coq\" \\\n --dry-run 2>&1 > /dev/null)\n\ + echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\ + s/.*/built/\") >> $GITHUB_OUTPUT\n" + - if: steps.stepCheck.outputs.status == 'built' + name: Building/fetching current CI target + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "coq" + coq-elpi: + needs: + - coq + runs-on: ubuntu-latest + steps: + - name: Determine which commit to initially checkout + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ + \ }}\" >> $GITHUB_ENV\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.target_commit }} + - name: Determine which commit to test + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ + \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ + \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ + \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ + \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ + \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ + \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.tested_commit }} + - name: Cachix install + uses: cachix/install-nix-action@v20 + with: + nix_path: nixpkgs=channel:nixpkgs-unstable + - name: Cachix setup coq-elpi + uses: cachix/cachix-action@v12 + with: + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + extraPullNames: coq, coq-community, math-comp + name: coq-elpi + - id: stepCheck + name: Checking presence of CI target coq-elpi + run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ + \ bundle \"coq-8.19\" --argstr job \"coq-elpi\" \\\n --dry-run 2>&1 > /dev/null)\n\ + echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\ + s/.*/built/\") >> $GITHUB_OUTPUT\n" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: coq' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "coq" + - if: steps.stepCheck.outputs.status == 'built' + name: Building/fetching current CI target + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "coq-elpi" + hierarchy-builder: + needs: + - coq + - coq-elpi + runs-on: ubuntu-latest + steps: + - name: Determine which commit to initially checkout + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ + \ }}\" >> $GITHUB_ENV\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.target_commit }} + - name: Determine which commit to test + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ + \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ + \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ + \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ + \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ + \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ + \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.tested_commit }} + - name: Cachix install + uses: cachix/install-nix-action@v20 + with: + nix_path: nixpkgs=channel:nixpkgs-unstable + - name: Cachix setup coq-elpi + uses: cachix/cachix-action@v12 + with: + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + extraPullNames: coq, coq-community, math-comp + name: coq-elpi + - id: stepCheck + name: Checking presence of CI target hierarchy-builder + run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ + \ bundle \"coq-8.19\" --argstr job \"hierarchy-builder\" \\\n --dry-run\ + \ 2>&1 > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep\ + \ \"built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: coq' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "coq" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: coq-elpi' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "coq-elpi" + - if: steps.stepCheck.outputs.status == 'built' + name: Building/fetching current CI target + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "hierarchy-builder" + mathcomp: + needs: + - coq + - mathcomp-ssreflect + - mathcomp-fingroup + - mathcomp-algebra + - mathcomp-solvable + - mathcomp-field + - mathcomp-character + - hierarchy-builder + runs-on: ubuntu-latest + steps: + - name: Determine which commit to initially checkout + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ + \ }}\" >> $GITHUB_ENV\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.target_commit }} + - name: Determine which commit to test + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ + \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ + \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ + \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ + \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ + \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ + \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.tested_commit }} + - name: Cachix install + uses: cachix/install-nix-action@v20 + with: + nix_path: nixpkgs=channel:nixpkgs-unstable + - name: Cachix setup coq-elpi + uses: cachix/cachix-action@v12 + with: + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + extraPullNames: coq, coq-community, math-comp + name: coq-elpi + - id: stepCheck + name: Checking presence of CI target mathcomp + run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ + \ bundle \"coq-8.19\" --argstr job \"mathcomp\" \\\n --dry-run 2>&1 > /dev/null)\n\ + echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\ + s/.*/built/\") >> $GITHUB_OUTPUT\n" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: coq' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "coq" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-ssreflect' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-ssreflect" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-fingroup' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-fingroup" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-algebra' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-algebra" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-solvable' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-solvable" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-field' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-field" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-character' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-character" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: hierarchy-builder' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "hierarchy-builder" + - if: steps.stepCheck.outputs.status == 'built' + name: Building/fetching current CI target + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp" + mathcomp-algebra: + needs: + - coq + - mathcomp-ssreflect + - mathcomp-fingroup + - hierarchy-builder + runs-on: ubuntu-latest + steps: + - name: Determine which commit to initially checkout + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ + \ }}\" >> $GITHUB_ENV\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.target_commit }} + - name: Determine which commit to test + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ + \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ + \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ + \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ + \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ + \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ + \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.tested_commit }} + - name: Cachix install + uses: cachix/install-nix-action@v20 + with: + nix_path: nixpkgs=channel:nixpkgs-unstable + - name: Cachix setup coq-elpi + uses: cachix/cachix-action@v12 + with: + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + extraPullNames: coq, coq-community, math-comp + name: coq-elpi + - id: stepCheck + name: Checking presence of CI target mathcomp-algebra + run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ + \ bundle \"coq-8.19\" --argstr job \"mathcomp-algebra\" \\\n --dry-run 2>&1\ + \ > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"\ + built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: coq' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "coq" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-ssreflect' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-ssreflect" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-fingroup' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-fingroup" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: hierarchy-builder' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "hierarchy-builder" + - if: steps.stepCheck.outputs.status == 'built' + name: Building/fetching current CI target + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-algebra" + mathcomp-analysis: + needs: + - coq + - mathcomp-classical + - mathcomp-field + - hierarchy-builder + runs-on: ubuntu-latest + steps: + - name: Determine which commit to initially checkout + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ + \ }}\" >> $GITHUB_ENV\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.target_commit }} + - name: Determine which commit to test + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ + \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ + \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ + \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ + \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ + \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ + \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.tested_commit }} + - name: Cachix install + uses: cachix/install-nix-action@v20 + with: + nix_path: nixpkgs=channel:nixpkgs-unstable + - name: Cachix setup coq-elpi + uses: cachix/cachix-action@v12 + with: + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + extraPullNames: coq, coq-community, math-comp + name: coq-elpi + - id: stepCheck + name: Checking presence of CI target mathcomp-analysis + run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ + \ bundle \"coq-8.19\" --argstr job \"mathcomp-analysis\" \\\n --dry-run\ + \ 2>&1 > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep\ + \ \"built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: coq' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "coq" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-classical' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-classical" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-field' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-field" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: hierarchy-builder' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "hierarchy-builder" + - if: steps.stepCheck.outputs.status == 'built' + name: Building/fetching current CI target + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-analysis" + mathcomp-character: + needs: + - coq + - mathcomp-ssreflect + - mathcomp-fingroup + - mathcomp-algebra + - mathcomp-solvable + - mathcomp-field + - hierarchy-builder + runs-on: ubuntu-latest + steps: + - name: Determine which commit to initially checkout + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ + \ }}\" >> $GITHUB_ENV\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.target_commit }} + - name: Determine which commit to test + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ + \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ + \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ + \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ + \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ + \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ + \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.tested_commit }} + - name: Cachix install + uses: cachix/install-nix-action@v20 + with: + nix_path: nixpkgs=channel:nixpkgs-unstable + - name: Cachix setup coq-elpi + uses: cachix/cachix-action@v12 + with: + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + extraPullNames: coq, coq-community, math-comp + name: coq-elpi + - id: stepCheck + name: Checking presence of CI target mathcomp-character + run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ + \ bundle \"coq-8.19\" --argstr job \"mathcomp-character\" \\\n --dry-run\ + \ 2>&1 > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep\ + \ \"built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: coq' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "coq" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-ssreflect' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-ssreflect" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-fingroup' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-fingroup" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-algebra' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-algebra" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-solvable' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-solvable" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-field' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-field" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: hierarchy-builder' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "hierarchy-builder" + - if: steps.stepCheck.outputs.status == 'built' + name: Building/fetching current CI target + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-character" + mathcomp-classical: + needs: + - coq + - mathcomp-algebra + - mathcomp-finmap + - hierarchy-builder + runs-on: ubuntu-latest + steps: + - name: Determine which commit to initially checkout + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ + \ }}\" >> $GITHUB_ENV\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.target_commit }} + - name: Determine which commit to test + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ + \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ + \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ + \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ + \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ + \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ + \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.tested_commit }} + - name: Cachix install + uses: cachix/install-nix-action@v20 + with: + nix_path: nixpkgs=channel:nixpkgs-unstable + - name: Cachix setup coq-elpi + uses: cachix/cachix-action@v12 + with: + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + extraPullNames: coq, coq-community, math-comp + name: coq-elpi + - id: stepCheck + name: Checking presence of CI target mathcomp-classical + run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ + \ bundle \"coq-8.19\" --argstr job \"mathcomp-classical\" \\\n --dry-run\ + \ 2>&1 > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep\ + \ \"built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: coq' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "coq" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-algebra' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-algebra" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-finmap' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-finmap" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: hierarchy-builder' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "hierarchy-builder" + - if: steps.stepCheck.outputs.status == 'built' + name: Building/fetching current CI target + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-classical" + mathcomp-field: + needs: + - coq + - mathcomp-ssreflect + - mathcomp-fingroup + - mathcomp-algebra + - mathcomp-solvable + - hierarchy-builder + runs-on: ubuntu-latest + steps: + - name: Determine which commit to initially checkout + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ + \ }}\" >> $GITHUB_ENV\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.target_commit }} + - name: Determine which commit to test + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ + \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ + \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ + \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ + \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ + \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ + \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.tested_commit }} + - name: Cachix install + uses: cachix/install-nix-action@v20 + with: + nix_path: nixpkgs=channel:nixpkgs-unstable + - name: Cachix setup coq-elpi + uses: cachix/cachix-action@v12 + with: + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + extraPullNames: coq, coq-community, math-comp + name: coq-elpi + - id: stepCheck + name: Checking presence of CI target mathcomp-field + run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ + \ bundle \"coq-8.19\" --argstr job \"mathcomp-field\" \\\n --dry-run 2>&1\ + \ > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"\ + built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: coq' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "coq" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-ssreflect' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-ssreflect" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-fingroup' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-fingroup" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-algebra' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-algebra" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-solvable' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-solvable" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: hierarchy-builder' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "hierarchy-builder" + - if: steps.stepCheck.outputs.status == 'built' + name: Building/fetching current CI target + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-field" + mathcomp-fingroup: + needs: + - coq + - mathcomp-ssreflect + - hierarchy-builder + runs-on: ubuntu-latest + steps: + - name: Determine which commit to initially checkout + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ + \ }}\" >> $GITHUB_ENV\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.target_commit }} + - name: Determine which commit to test + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ + \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ + \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ + \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ + \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ + \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ + \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.tested_commit }} + - name: Cachix install + uses: cachix/install-nix-action@v20 + with: + nix_path: nixpkgs=channel:nixpkgs-unstable + - name: Cachix setup coq-elpi + uses: cachix/cachix-action@v12 + with: + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + extraPullNames: coq, coq-community, math-comp + name: coq-elpi + - id: stepCheck + name: Checking presence of CI target mathcomp-fingroup + run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ + \ bundle \"coq-8.19\" --argstr job \"mathcomp-fingroup\" \\\n --dry-run\ + \ 2>&1 > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep\ + \ \"built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: coq' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "coq" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-ssreflect' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-ssreflect" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: hierarchy-builder' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "hierarchy-builder" + - if: steps.stepCheck.outputs.status == 'built' + name: Building/fetching current CI target + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-fingroup" + mathcomp-finmap: + needs: + - coq + - mathcomp-ssreflect + runs-on: ubuntu-latest + steps: + - name: Determine which commit to initially checkout + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ + \ }}\" >> $GITHUB_ENV\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.target_commit }} + - name: Determine which commit to test + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ + \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ + \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ + \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ + \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ + \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ + \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.tested_commit }} + - name: Cachix install + uses: cachix/install-nix-action@v20 + with: + nix_path: nixpkgs=channel:nixpkgs-unstable + - name: Cachix setup coq-elpi + uses: cachix/cachix-action@v12 + with: + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + extraPullNames: coq, coq-community, math-comp + name: coq-elpi + - id: stepCheck + name: Checking presence of CI target mathcomp-finmap + run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ + \ bundle \"coq-8.19\" --argstr job \"mathcomp-finmap\" \\\n --dry-run 2>&1\ + \ > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"\ + built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: coq' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "coq" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-ssreflect' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-ssreflect" + - if: steps.stepCheck.outputs.status == 'built' + name: Building/fetching current CI target + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-finmap" + mathcomp-solvable: + needs: + - coq + - mathcomp-ssreflect + - mathcomp-fingroup + - mathcomp-algebra + - hierarchy-builder + runs-on: ubuntu-latest + steps: + - name: Determine which commit to initially checkout + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ + \ }}\" >> $GITHUB_ENV\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.target_commit }} + - name: Determine which commit to test + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ + \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ + \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ + \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ + \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ + \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ + \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.tested_commit }} + - name: Cachix install + uses: cachix/install-nix-action@v20 + with: + nix_path: nixpkgs=channel:nixpkgs-unstable + - name: Cachix setup coq-elpi + uses: cachix/cachix-action@v12 + with: + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + extraPullNames: coq, coq-community, math-comp + name: coq-elpi + - id: stepCheck + name: Checking presence of CI target mathcomp-solvable + run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ + \ bundle \"coq-8.19\" --argstr job \"mathcomp-solvable\" \\\n --dry-run\ + \ 2>&1 > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep\ + \ \"built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: coq' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "coq" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-ssreflect' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-ssreflect" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-fingroup' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-fingroup" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-algebra' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-algebra" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: hierarchy-builder' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "hierarchy-builder" + - if: steps.stepCheck.outputs.status == 'built' + name: Building/fetching current CI target + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-solvable" + mathcomp-ssreflect: + needs: + - coq + - hierarchy-builder + runs-on: ubuntu-latest + steps: + - name: Determine which commit to initially checkout + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ + \ }}\" >> $GITHUB_ENV\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.target_commit }} + - name: Determine which commit to test + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ + \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ + \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ + \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ + \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ + \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ + \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.tested_commit }} + - name: Cachix install + uses: cachix/install-nix-action@v20 + with: + nix_path: nixpkgs=channel:nixpkgs-unstable + - name: Cachix setup coq-elpi + uses: cachix/cachix-action@v12 + with: + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + extraPullNames: coq, coq-community, math-comp + name: coq-elpi + - id: stepCheck + name: Checking presence of CI target mathcomp-ssreflect + run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ + \ bundle \"coq-8.19\" --argstr job \"mathcomp-ssreflect\" \\\n --dry-run\ + \ 2>&1 > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep\ + \ \"built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: coq' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "coq" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: hierarchy-builder' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "hierarchy-builder" + - if: steps.stepCheck.outputs.status == 'built' + name: Building/fetching current CI target + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-ssreflect" + odd-order: + needs: + - coq + - mathcomp-character + - mathcomp-ssreflect + - mathcomp-fingroup + - mathcomp-algebra + - mathcomp-solvable + - mathcomp-field + - mathcomp + runs-on: ubuntu-latest + steps: + - name: Determine which commit to initially checkout + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\ + \ }}\" >> $GITHUB_ENV\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.target_commit }} + - name: Determine which commit to test + run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\ + \ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\ + \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\ + \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\ + \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\ + \ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\ + \ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\ + \ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n" + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ env.tested_commit }} + - name: Cachix install + uses: cachix/install-nix-action@v20 + with: + nix_path: nixpkgs=channel:nixpkgs-unstable + - name: Cachix setup coq-elpi + uses: cachix/cachix-action@v12 + with: + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + extraPullNames: coq, coq-community, math-comp + name: coq-elpi + - id: stepCheck + name: Checking presence of CI target odd-order + run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\ + \ bundle \"coq-8.19\" --argstr job \"odd-order\" \\\n --dry-run 2>&1 > /dev/null)\n\ + echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\ + s/.*/built/\") >> $GITHUB_OUTPUT\n" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: coq' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "coq" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-character' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-character" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-ssreflect' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-ssreflect" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-fingroup' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-fingroup" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-algebra' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-algebra" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-solvable' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-solvable" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp-field' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp-field" + - if: steps.stepCheck.outputs.status == 'built' + name: 'Building/fetching previous CI target: mathcomp' + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "mathcomp" + - if: steps.stepCheck.outputs.status == 'built' + name: Building/fetching current CI target + run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19" + --argstr job "odd-order" +name: Nix CI for bundle coq-8.19 +'on': + pull_request: + paths: + - .github/workflows/nix-action-coq-8.19.yml + pull_request_target: + paths-ignore: + - .github/workflows/nix-action-coq-8.19.yml + types: + - opened + - synchronize + - reopened + push: + branches: + - master diff --git a/.nix/config.nix b/.nix/config.nix index b7da643fe..a706bcba2 100644 --- a/.nix/config.nix +++ b/.nix/config.nix @@ -1,11 +1,11 @@ { format = "1.0.0"; attribute = "coq-elpi"; - default-bundle = "coq-8.18"; + default-bundle = "coq-8.19"; bundles = { - "coq-8.18".coqPackages = { - coq.override.version = "8.18"; + "coq-8.19".coqPackages = { + coq.override.version = "8.19+rc1"; hierarchy-builder.override.version = "coq-elpi-2"; hierarchy-builder-shim.job = false; diff --git a/.nix/coq-nix-toolbox.nix b/.nix/coq-nix-toolbox.nix index 7049784dd..40241c864 100644 --- a/.nix/coq-nix-toolbox.nix +++ b/.nix/coq-nix-toolbox.nix @@ -1 +1 @@ -"68a4a68e689dca0d9c081a0f1b9a454379522d78" +"4e48948fa8252a2fc755182abdd4b199f4798724" From e8f64e86331cc12b1fac8423d1ae391d7e4dba96 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Sat, 23 Dec 2023 17:59:10 +0100 Subject: [PATCH 22/26] import classes from 8.19 --- apps/tc/src/coq_elpi_class_tactics_hacked.ml | 109 +++++++++++-------- 1 file changed, 65 insertions(+), 44 deletions(-) diff --git a/apps/tc/src/coq_elpi_class_tactics_hacked.ml b/apps/tc/src/coq_elpi_class_tactics_hacked.ml index 1b9ff8113..fc332dc84 100644 --- a/apps/tc/src/coq_elpi_class_tactics_hacked.ml +++ b/apps/tc/src/coq_elpi_class_tactics_hacked.ml @@ -157,7 +157,7 @@ let e_give_exact flags h = let sigma, c = Hints.fresh_hint env sigma h in let (sigma, t1) = Typing.type_of (pf_env gl) sigma c in Proofview.Unsafe.tclEVARS sigma <*> - Clenv.unify ~flags t1 <*> exact_no_check c + Clenv.unify ~flags ~cv_pb:CUMUL t1 <*> exact_no_check c end let unify_resolve ~with_evars flags h diff = match diff with @@ -257,20 +257,18 @@ and e_my_find_search db_list local_db secvars hdc complete only_classes env sigm let nprods = List.length prods in let allowed_evars = let all = Evarsolve.AllowedEvars.all in - try - match hdc with - | Some (hd,_) when only_classes -> - begin match Typeclasses.class_info hd with - | Some cl -> - if cl.cl_strict then - let undefined = lazy (Evarutil.undefined_evars_of_term sigma concl) in - let allowed evk = not (Evar.Set.mem evk (Lazy.force undefined)) in - Evarsolve.AllowedEvars.from_pred allowed - else all - | None -> all - end - | _ -> all - with e when CErrors.noncritical e -> all + match hdc with + | Some (hd,_) when only_classes -> + begin match Typeclasses.class_info hd with + | Some cl -> + if cl.cl_strict then + let undefined = lazy (Evarutil.undefined_evars_of_term sigma concl) in + let allowed evk = not (Evar.Set.mem evk (Lazy.force undefined)) in + Evarsolve.AllowedEvars.from_pred allowed + else all + | None -> all + end + | _ -> all in let tac_of_hint = fun (flags, h) -> @@ -414,16 +412,12 @@ let evars_to_goals p evm = let make_resolve_hyp env sigma st only_classes decl db = let id = NamedDecl.get_id decl in let cty = Evarutil.nf_evar sigma (NamedDecl.get_type decl) in - let rec iscl env ty = + let iscl env ty = let ctx, ar = decompose_prod_decls sigma ty in match EConstr.kind sigma (fst (decompose_app sigma ar)) with | Const (c,_) -> is_class (GlobRef.ConstRef c) | Ind (i,_) -> is_class (GlobRef.IndRef i) - | _ -> - let env' = push_rel_context ctx env in - let ty' = Reductionops.whd_all env' sigma ar in - if not (EConstr.eq_constr sigma ty' ar) then iscl env' ty' - else false + | _ -> false in let is_class = iscl env cty in let keep = not only_classes || is_class in @@ -504,11 +498,18 @@ module Search = struct | _, _ -> e (** Determine if backtracking is needed for this goal. - If the type class is unique or in Prop - and there are no evars in the goal then we do - NOT backtrack. *) - let needs_backtrack env evd unique concl = - if unique || is_Prop env evd concl then + We generally backtrack except in the following (possibly + overlapping) cases: + - [unique_instances] is [true]. + This is the case when the goal's class has [Unique Instances]. + - [indep] is [true] and the current goal has no evars. + [indep] is generally [true] and only gets set to [false] if the + current goal's evar is mentioned in other goals. + ([indep] is the negation of [search_dep].) + - The current goal is a [Prop] and has no evars. *) + let needs_backtrack env evd ~unique_instances ~indep concl = + if unique_instances then false else + if indep || is_Prop env evd concl then occur_existential evd concl else true @@ -530,7 +531,15 @@ module Search = struct else tclUNIT () - let _ = CErrors.register_handler begin function + let pr_internal_exception ie = + match fst ie with + | ReachedLimit -> str "Proof-search reached its limit." + | NoApplicableHint -> str "Proof-search failed." + | StuckGoal | NonStuckFailure -> str "Proof-search got stuck." + | e -> CErrors.iprint ie + + (* XXX Is this handler needed for something? *) + let () = CErrors.register_handler begin function | NonStuckFailure -> Some (str "NonStuckFailure") | NoApplicableHint -> Some (str "NoApplicableHint") | _ -> None @@ -583,12 +592,12 @@ module Search = struct in cycle 1 (* Puts the first goal last *) <*> fixpoint progress tacs ((glid, ev, status, tac) :: stuck) fk (* Launches the search on the rest of the goals *) - | Fail (e, info) -> + | Fail ie -> let () = ppdebug 1 (fun () -> str "Goal " ++ int glid ++ str" has no more solutions, returning exception: " - ++ CErrors.iprint (e, info)) + ++ pr_internal_exception ie) in - fk (e, info) + fk ie | Next (res, fk') -> let () = ppdebug 1 (fun () -> str "Goal " ++ int glid ++ str" has a success, continuing resolution") @@ -677,8 +686,9 @@ module Search = struct let env = Goal.env gl in let concl = Goal.concl gl in let sigma = Goal.sigma gl in - let unique = not info.search_dep || is_unique env sigma concl in - let backtrack = needs_backtrack env sigma unique concl in + let unique_instances = is_unique env sigma concl in + let indep = not info.search_dep in + let backtrack = needs_backtrack env sigma ~unique_instances ~indep concl in let () = ppdebug 0 (fun () -> pr_depth info.search_depth ++ str": looking for " ++ Printer.pr_econstr_env (Goal.env gl) sigma concl ++ @@ -700,7 +710,11 @@ module Search = struct let idx = ref 1 in let foundone = ref false in let rec onetac e (tac, pat, b, name, pp) tl = - let derivs = path_derivate info.search_cut name in + let path = match name with + | None -> PathAny + | Some gr -> PathHints [gr] + in + let derivs = path_derivate info.search_cut path in let pr_error ie = ppdebug 1 (fun () -> let idx = if fst ie == NoApplicableHint then pred !idx else !idx in @@ -711,14 +725,7 @@ module Search = struct str" on" ++ spc () ++ pr_ev sigma (Proofview.Goal.goal gl) else mt ()) in - let msg = - match fst ie with - | ReachedLimit -> str "Proof-search reached its limit." - | NoApplicableHint -> str "Proof-search failed." - | StuckGoal | NonStuckFailure -> str "Proof-search got stuck." - | e -> CErrors.iprint ie - in - (header ++ str " failed with: " ++ msg)) + (header ++ str " failed with: " ++ pr_internal_exception ie)) in let tac_of gls i j = Goal.enter begin fun gl' -> let sigma' = Goal.sigma gl' in @@ -1029,7 +1036,7 @@ module Search = struct in let nongoals' = Evar.Set.fold (fun ev acc -> match Evarutil.advance evm' ev with - | Some ev' -> Evar.Set.add ev acc + | Some ev -> Evar.Set.add ev acc | None -> acc) (Evar.Set.union goals nongoals) (Evd.get_typeclass_evars evm') in (* FIXME: the need to merge metas seems to come from this being called @@ -1053,11 +1060,13 @@ module Search = struct ~depth ~dep:(unique || dep) hints in run_on_evars env evd p eauto_tac - let typeclasses_eauto env evd ?depth unique ~best_effort st hints p = - evars_eauto env evd depth true ~best_effort unique false st hints p (** Typeclasses eauto is an eauto which tries to resolve only goals of typeclass type, and assumes that the initially selected evars in evd are independent of the rest of the evars *) + let typeclasses_eauto env evd ?depth unique ~best_effort st hints p = + NewProfile.profile "typeclass search" (fun () -> + evars_eauto env evd depth true ~best_effort unique false st hints p) + () let typeclasses_resolve env evd depth unique ~best_effort p = let db = searchtable_map typeclasses_db in @@ -1317,3 +1326,15 @@ let autoapply c i = let sigma = Typeclasses.make_unresolvables (fun ev -> Typeclasses.all_goals ev (Lazy.from_val (snd (Evd.evar_source (Evd.find_undefined sigma ev))))) sigma in Proofview.Unsafe.tclEVARS sigma) end + +let resolve_tc c = + let open Proofview.Notations in + Proofview.tclENV >>= fun env -> + Proofview.tclEVARMAP >>= fun sigma -> + let depth = get_typeclasses_depth () in + let unique = get_typeclasses_unique_solutions () in + let evars = Evarutil.undefined_evars_of_term sigma c in + let filter = (fun ev _ -> Evar.Set.mem ev evars) in + let fail = true in + let sigma = resolve_all_evars depth unique env (initial_select_evars filter) sigma fail in + Proofview.Unsafe.tclEVARS sigma From feb3c8407787bc5067dc0ae4dacb7384a2ab0144 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Sat, 23 Dec 2023 18:33:25 +0100 Subject: [PATCH 23/26] nix --- .nix/coq-overlays/coq-elpi/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/.nix/coq-overlays/coq-elpi/default.nix b/.nix/coq-overlays/coq-elpi/default.nix index 23513e1e8..a1a7b70e0 100644 --- a/.nix/coq-overlays/coq-elpi/default.nix +++ b/.nix/coq-overlays/coq-elpi/default.nix @@ -10,6 +10,7 @@ with builtins; with lib; let { case = "8.16"; out = { version = "1.17.0"; };} { case = "8.17"; out = { version = "1.17.0"; };} { case = "8.18"; out = { version = "v1.18.1"; };} + { case = "8.19"; out = { version = "v1.18.1"; };} ] {} ); in mkCoqDerivation { pname = "elpi"; From 6f5bcd584b5f4091e555e123db7cc93a566e2701 Mon Sep 17 00:00:00 2001 From: Cyril Cohen Date: Sat, 23 Dec 2023 22:11:22 +0100 Subject: [PATCH 24/26] removing explicit test of master --- .nix/config.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/.nix/config.nix b/.nix/config.nix index a706bcba2..01ceccfa5 100644 --- a/.nix/config.nix +++ b/.nix/config.nix @@ -10,8 +10,6 @@ hierarchy-builder.override.version = "coq-elpi-2"; hierarchy-builder-shim.job = false; - coq-elpi.override.version = "master"; - mathcomp.override.version = "master"; mathcomp.job = true; From 35e2530d919e9e17ca5ce7ae42183b319bc76ade Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Sun, 24 Dec 2023 14:09:31 +0100 Subject: [PATCH 25/26] check no module in section at synterp time --- src/coq_elpi_builtins_synterp.ml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/coq_elpi_builtins_synterp.ml b/src/coq_elpi_builtins_synterp.ml index 27a575561..6ea44f15d 100644 --- a/src/coq_elpi_builtins_synterp.ml +++ b/src/coq_elpi_builtins_synterp.ml @@ -734,6 +734,8 @@ type loc-modtypath modtypath -> located. In(list (pair id modtypath), "Parameters of the functor", Full(unit_ctx, "Starts a functor *E*")))), (fun name mp binders ~depth _ _ state -> + if Lib.sections_are_opened () then + err Pp.(str"This code cannot be run within a section since it opens a module"); let ty = match mp with | None -> Declaremods.Check [] @@ -773,6 +775,8 @@ coq.env.begin-module Name MP :- In(list (pair id modtypath), "The parameters of the functor", Full(unit_ctx,"Starts a module type functor *E*"))), (fun name binders ~depth _ _ state -> + if Lib.sections_are_opened () then + err Pp.(str"This code cannot be run within a section since it opens a module"); let id = Id.of_string name in let binders_ast = List.map (fun (id, mty) -> From fb1ecf06206d1f7233d8c7ce76efd95bfad590f3 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Sun, 24 Dec 2023 14:10:22 +0100 Subject: [PATCH 26/26] update changelog --- Changelog.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Changelog.md b/Changelog.md index 1707ca1d9..4a6edf70d 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,11 @@ # Changelog +## [2.0.1] - 24/12/2023 + +Requires Elpi 1.18.1 and Coq 8.19. + +This minor release adds compatibility with Coq 8.19. + ## [2.0.0] - 23/12/2023 Requires Elpi 1.18.1 and Coq 8.18.