diff options
| author | Pierre-Marie Pédrot | 2019-05-14 23:28:11 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2019-05-14 23:28:11 +0200 |
| commit | 2fa28cedc140580fcf4231f7270b68b24e3c1230 (patch) | |
| tree | 12db4bb4cf331376faa84244b47b2cd5887aba3a /vernac/comDefinition.ml | |
| parent | 2a60906dd9d295615bcfa4b1fce8cea9626d965f (diff) | |
| parent | ce083774403b70d58c71c5a6ba104c337613add4 (diff) | |
Merge PR #8893: Moving evars_of_term from constr to econstr
Ack-by: SkySkimmer
Reviewed-by: gares
Ack-by: herbelin
Reviewed-by: maximedenes
Reviewed-by: ppedrot
Diffstat (limited to 'vernac/comDefinition.ml')
| -rw-r--r-- | vernac/comDefinition.ml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/vernac/comDefinition.ml b/vernac/comDefinition.ml index 12df3215ad..d2c986fe5c 100644 --- a/vernac/comDefinition.ml +++ b/vernac/comDefinition.ml @@ -88,11 +88,12 @@ let do_definition ~ontop ~program_mode ?hook ident k univdecl bl red_option c ct let (c,ctx), sideff = Future.force ce.const_entry_body in assert(Safe_typing.empty_private_constants = sideff); assert(Univ.ContextSet.is_empty ctx); + Obligations.check_evars env evd; + let c = EConstr.of_constr c in let typ = match ce.const_entry_type with - | Some t -> t - | None -> EConstr.to_constr ~abort_on_undefined_evars:false evd (Retyping.get_type_of env evd (EConstr.of_constr c)) + | Some t -> EConstr.of_constr t + | None -> Retyping.get_type_of env evd c in - Obligations.check_evars env evd; let obls, _, c, cty = Obligations.eterm_obligations env ident evd 0 c typ in |
