Skip to content

Commit af6a8f4

Browse files
authored
Merge pull request #948 from ppedrot/rm-legacy-uctx-hack
Remove a legacy hack relying on the bad PConstraint.ContextSet API.
2 parents dc41241 + 8085614 commit af6a8f4

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/rocq_elpi_builtins.ml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@ let make_polyflags poly cumul =
994994
PolyFlags.make ~univ_poly:poly ~cumulative:cumul ~collapse_sort_variables:true
995995
[%%endif]
996996

997-
let declare_definition _ using ~cinfo ~info ~opaque ~body sigma =
997+
let declare_definition using ~cinfo ~info ~opaque ~body sigma =
998998
let using = Option.map Proof_using.using_from_string using in
999999
let (kn, uctx) = Declare.declare_definition_full ~cinfo ~info ~opaque ~body ?using sigma in
10001000
kn, uctx
@@ -2268,12 +2268,7 @@ Supported attributes:
22682268
else Locality.(Global ImportDefaultBehavior) in
22692269
let cinfo = cinfo_make state types options.using ~name:(Id.of_string id) ~typ:types ~impargs:[] () in
22702270

2271-
(* This is a hack, drop after 8.21 *)
2272-
let uctx = ref None in
2273-
let hook = Declare.Hook.make (fun { Declare.Hook.S.uctx = x } -> uctx := Some (UState.context_set x)) in
2274-
(* End hack *)
2275-
2276-
let info = Declare.Info.make ~scope ~kind ~poly:(make_polyflags poly cumul) ~udecl ~hook () in
2271+
let info = Declare.Info.make ~scope ~kind ~poly:(make_polyflags poly cumul) ~udecl () in
22772272

22782273
let used =
22792274
Univ.Level.Set.union
@@ -2282,7 +2277,7 @@ Supported attributes:
22822277
let used = Univ.Level.Set.union used (universes_of_udecl state udecl) in
22832278
let sigma = restricted_sigma_of used state in
22842279

2285-
let gr, uctx = declare_definition uctx options.using ~cinfo ~info ~opaque ~body sigma in
2280+
let gr, uctx = declare_definition options.using ~cinfo ~info ~opaque ~body sigma in
22862281
let () =
22872282
let lid = CAst.make ~loc:(to_coq_loc @@ State.get Rocq_elpi_builtins_synterp.invocation_site_loc state) (Id.of_string id) in
22882283
match scope with

0 commit comments

Comments
 (0)