diff options
| author | Pierre-Marie Pédrot | 2019-06-28 14:02:49 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2019-06-28 14:02:49 +0200 |
| commit | 6d6b2d7132bc768783bad6738d778519c28c8f08 (patch) | |
| tree | 96d1c5fa72c40f481a4cd80e7231cacc7cb5b9ec /tactics | |
| parent | a2751a19e9c5c0fd91031f9a62948ad29efea038 (diff) | |
| parent | 5a532f2e00d0e3dca8d7079f067c79f2bb1b6b14 (diff) | |
Merge PR #10438: Kernel transparent definition entries have no body universes.
Reviewed-by: gares
Reviewed-by: ppedrot
Diffstat (limited to 'tactics')
| -rw-r--r-- | tactics/declare.ml | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tactics/declare.ml b/tactics/declare.ml index 74196bb875..aa94ab5a25 100644 --- a/tactics/declare.ml +++ b/tactics/declare.ml @@ -173,12 +173,21 @@ let definition_entry ?fix_exn ?(opaque=false) ?(inline=false) ?types let cast_proof_entry e = let open Proof_global in let (body, ctx), () = Future.force e.proof_entry_body in + let univs = + if Univ.ContextSet.is_empty ctx then e.proof_entry_universes + else match e.proof_entry_universes with + | Monomorphic_entry ctx' -> + (* This can actually happen, try compiling EqdepFacts for instance *) + Monomorphic_entry (Univ.ContextSet.union ctx' ctx) + | Polymorphic_entry _ -> + anomaly Pp.(str "Local universes in non-opaque polymorphic definition."); + in { - const_entry_body = (body, ctx); + const_entry_body = body; const_entry_secctx = e.proof_entry_secctx; const_entry_feedback = e.proof_entry_feedback; const_entry_type = e.proof_entry_type; - const_entry_universes = e.proof_entry_universes; + const_entry_universes = univs; const_entry_inline_code = e.proof_entry_inline_code; } |
