diff options
author | Amin Timany <amintimany@gmail.com> | 2017-04-06 19:03:24 +0200 |
---|---|---|
committer | Emilio Jesus Gallego Arias <e+git@x80.org> | 2017-06-16 04:45:20 +0200 |
commit | c07215582ab75faeea864827b153eed80a28527a (patch) | |
tree | e54ac354dad67269d709f065890e373822d7d2b6 /vernac | |
parent | bef2e53ae2286d0a7c61697f7a7a71bfdc0a3c99 (diff) |
Change the place of inference after sect discharge
Diffstat (limited to 'vernac')
-rw-r--r-- | vernac/command.ml | 5 | ||||
-rw-r--r-- | vernac/discharge.ml | 28 |
2 files changed, 12 insertions, 21 deletions
diff --git a/vernac/command.ml b/vernac/command.ml index 35b75370e..2d4f05134 100644 --- a/vernac/command.ml +++ b/vernac/command.ml @@ -660,7 +660,10 @@ let interp_mutual_inductive (paramsl,indl) notations poly prv finite = mind_entry_private = if prv then Some false else None; mind_entry_universes = ground_uinfind; } - in (Inductiveops.infer_inductive_subtyping env_ar_params evd mind_ent), pl, impls + in + (if poly then + Inductiveops.infer_inductive_subtyping env_ar_params evd mind_ent + else mind_ent), pl, impls (* Very syntactical equality *) let eq_local_binders bl1 bl2 = diff --git a/vernac/discharge.ml b/vernac/discharge.ml index 21ffa4cbf..c7a741c13 100644 --- a/vernac/discharge.ml +++ b/vernac/discharge.ml @@ -111,24 +111,12 @@ let process_inductive (sechyps,abs_ctx) modlist mib = | Some None -> Some None | None -> None in - let mind_ent = - { mind_entry_record = record; - mind_entry_finite = mib.mind_finite; - mind_entry_params = params'; - mind_entry_inds = inds'; - mind_entry_polymorphic = mib.mind_polymorphic; - mind_entry_private = mib.mind_private; - mind_entry_universes = univ_info_ind - } - in - if mib.mind_polymorphic then - begin - let env = Global.env () in - let env' = Environ.push_context univs env in - let (env'', typed_params) = Typeops.infer_local_decls env' params' in - let evd = Evd.from_env env'' in - Inductiveops.infer_inductive_subtyping env'' evd mind_ent - end - else - mind_ent + { mind_entry_record = record; + mind_entry_finite = mib.mind_finite; + mind_entry_params = params'; + mind_entry_inds = inds'; + mind_entry_polymorphic = mib.mind_polymorphic; + mind_entry_private = mib.mind_private; + mind_entry_universes = univ_info_ind + } |