Skip to content

Commit

Permalink
Merge pull request #654 from LPCIC/fixup-652
Browse files Browse the repository at this point in the history
fix PR #652
  • Loading branch information
gares authored Jul 5, 2024
2 parents 81c6c15 + 81236db commit 50b305a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/coq_elpi_builtins.ml
Original file line number Diff line number Diff line change
Expand Up @@ -518,12 +518,20 @@ let set_accumulate_to_db_interp, get_accumulate_to_db_interp =
(fun x -> f := x),
(fun () -> !f)

[%%if coq = "8.19" || coq = "8.20"]
let is_global_level env u =
try
let set = Univ.Level.Set.singleton u in
let () = UGraph.check_declared_universes (Environ.universes env) set in
true
with UGraph.UndeclaredLevel _ -> false
[%%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
[%%endif]

let err_if_contains_alg_univ ~depth t =
let global_univs = UGraph.domain (Environ.universes (Global.env ())) in
Expand Down

0 comments on commit 50b305a

Please sign in to comment.