diff options
| -rw-r--r-- | kernel/term_typing.ml | 1 | ||||
| -rw-r--r-- | plugins/setoid_ring/newring.ml | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/kernel/term_typing.ml b/kernel/term_typing.ml index 088dd98db8..af2c511db9 100644 --- a/kernel/term_typing.ml +++ b/kernel/term_typing.ml @@ -169,6 +169,7 @@ the polymorphic case | DefinitionEntry c -> let { const_entry_type = typ; const_entry_opaque = opaque ; _ } = c in let { const_entry_body = body; const_entry_feedback = feedback_id; _ } = c in + let () = assert (not (opaque && Option.is_empty typ)) in let (body, ctx), side_eff = Future.join body in let body, ctx = match trust with | Pure -> body, ctx diff --git a/plugins/setoid_ring/newring.ml b/plugins/setoid_ring/newring.ml index aeceeb4e50..8e7b045b8e 100644 --- a/plugins/setoid_ring/newring.ml +++ b/plugins/setoid_ring/newring.ml @@ -153,9 +153,11 @@ let decl_constant na univs c = let open Constr in let vars = CVars.universes_of_constr c in let univs = UState.restrict_universe_context univs vars in - let univs = Monomorphic_entry univs in + let () = Declare.declare_universe_context false univs in + let types = (Typeops.infer (Global.env ()) c).uj_type in + let univs = Monomorphic_entry Univ.ContextSet.empty in mkConst(declare_constant (Id.of_string na) - (DefinitionEntry (definition_entry ~opaque:true ~univs c), + (DefinitionEntry (definition_entry ~opaque:true ~types ~univs c), IsProof Lemma)) (* Calling a global tactic *) |
