Skip to content

Commit

Permalink
Merge pull request #696 from SkySkimmer/push-context-strict
Browse files Browse the repository at this point in the history
Adapt to coq/coq#19620 (Global.push_context_set no strict argument)
  • Loading branch information
gares authored Oct 14, 2024
2 parents 959bdcd + 4b8c0b0 commit c7174ba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/coq_elpi_builtins.ml
Original file line number Diff line number Diff line change
Expand Up @@ -530,12 +530,14 @@ let is_global_level env u =
let () = UGraph.check_declared_universes (Environ.universes env) set in
true
with UGraph.UndeclaredLevel _ -> false
let global_push_context_set x = Global.push_context_set ~strict:true x
[%%else]
let is_global_level env u =
let set = Univ.Level.Set.singleton u in
match UGraph.check_declared_universes (Environ.universes env) set with
| Ok () -> true
| Error _ -> false
let global_push_context_set x = Global.push_context_set x
[%%endif]

let err_if_contains_alg_univ ~depth t =
Expand Down Expand Up @@ -2103,7 +2105,7 @@ Supported attributes:
| Polymorphic_ind_entry uctx ->
(Polymorphic_entry uctx, UState.Polymorphic_entry uctx, univ_binders)
in
let () = Global.push_context_set ~strict:true uctx in
let () = global_push_context_set uctx in
let mind =
declare_mutual_inductive_with_eliminations ~primitive_expected ~default_dep_elim me (uentry', ubinders) ind_impls in
let ind = mind, 0 in
Expand Down

0 comments on commit c7174ba

Please sign in to comment.