diff options
| author | Emilio Jesus Gallego Arias | 2020-03-14 16:34:30 -0400 |
|---|---|---|
| committer | Emilio Jesus Gallego Arias | 2020-03-30 19:05:37 -0400 |
| commit | 8fbc927ac40cc707b1a940d8339a2a289755d533 (patch) | |
| tree | 878bc7f245ca49f8049d67576f7311de7f37716d /vernac/classes.ml | |
| parent | dc03a4d9a7b527df0c2e571de55fd200666bdb11 (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/classes.ml')
| -rw-r--r-- | vernac/classes.ml | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/vernac/classes.ml b/vernac/classes.ml index 88b6ab34ff..a882f6db0a 100644 --- a/vernac/classes.ml +++ b/vernac/classes.ml @@ -313,11 +313,10 @@ let instance_hook info global ?hook cst = let declare_instance_constant info global impargs ?hook name udecl poly sigma term termtype = let kind = Decls.(IsDefinition Instance) in - let sigma, entry = DeclareDef.prepare_definition + let entry = DeclareDef.prepare_definition ~poly sigma ~udecl ~types:(Some termtype) ~body:term in - let ubind = Evd.universe_binders sigma in let scope = DeclareDef.Global Declare.ImportDefaultBehavior in - let kn = DeclareDef.declare_definition ~name ~kind ~scope ~ubind ~impargs entry in + let kn = DeclareDef.declare_definition ~name ~kind ~scope ~impargs entry in instance_hook info global ?hook kn let do_declare_instance sigma ~global ~poly k u ctx ctx' pri udecl impargs subst name = |
