aboutsummaryrefslogtreecommitdiff
path: root/vernac/comDefinition.ml
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2020-03-14 16:34:30 -0400
committerEmilio Jesus Gallego Arias2020-03-30 19:05:37 -0400
commit8fbc927ac40cc707b1a940d8339a2a289755d533 (patch)
tree878bc7f245ca49f8049d67576f7311de7f37716d /vernac/comDefinition.ml
parentdc03a4d9a7b527df0c2e571de55fd200666bdb11 (diff)
[declareDef] More consistent handling of universe binders
The only reasons that `prepare_definition` returned a sigma were: - to obtain the universe binders to be passed to declare - to obtain the UState.t to be passed to the equations hook We handle this automatically now; it seems like a reasonably good API improvement. However, it is not clear what we do now is right for all cases; must check.
Diffstat (limited to 'vernac/comDefinition.ml')
-rw-r--r--vernac/comDefinition.ml7
1 files changed, 2 insertions, 5 deletions
diff --git a/vernac/comDefinition.ml b/vernac/comDefinition.ml
index 73b523f0b3..bf4567e57f 100644
--- a/vernac/comDefinition.ml
+++ b/vernac/comDefinition.ml
@@ -74,13 +74,10 @@ let do_definition ?hook ~name ~scope ~poly ~kind udecl bl red_option c ctypopt =
let (body, types), evd, udecl, impargs =
interp_definition ~program_mode udecl bl ~poly red_option c ctypopt
in
- let evd, ce = DeclareDef.prepare_definition ~opaque:false ~poly evd ~udecl ~types ~body in
- let uctx = Evd.evar_universe_context evd in
- let hook_data = Option.map (fun hook -> hook, uctx, []) hook in
+ let ce = DeclareDef.prepare_definition ~opaque:false ~poly evd ~udecl ~types ~body in
let kind = Decls.IsDefinition kind in
- let ubind = Evd.universe_binders evd in
let _ : Names.GlobRef.t =
- DeclareDef.declare_definition ~name ~scope ~kind ?hook_data ~ubind ~impargs ce
+ DeclareDef.declare_definition ~name ~scope ~kind ?hook ~impargs ce
in ()
let do_definition_program ?hook ~name ~scope ~poly ~kind udecl bl red_option c ctypopt =