diff options
| author | Gaëtan Gilbert | 2020-01-17 14:32:28 +0100 |
|---|---|---|
| committer | Gaëtan Gilbert | 2020-02-12 13:13:24 +0100 |
| commit | d81375002501cdc6e677244557a87b2f1a445e5b (patch) | |
| tree | 45e3f1f5a93e9676952637eec853a510f25f2919 /vernac | |
| parent | 6c1de3455d5cd79958a8e26ac728f7d5d1b8d025 (diff) | |
Check instance length in type_of_{inductive,constructor}
Diffstat (limited to 'vernac')
| -rw-r--r-- | vernac/assumptions.ml | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/vernac/assumptions.ml b/vernac/assumptions.ml index 9f92eba729..fb61a1089f 100644 --- a/vernac/assumptions.ml +++ b/vernac/assumptions.ml @@ -240,8 +240,16 @@ and traverse_inductive (curr, data, ax2ty) mind obj = (* Build the context of all arities *) let arities_ctx = let global_env = Global.env () in + let instance = + let open Univ in + Instance.of_array + (Array.init + (AUContext.size + (Declareops.inductive_polymorphic_context mib)) + Level.var) + in Array.fold_left (fun accu oib -> - let pspecif = Univ.in_punivs (mib, oib) in + let pspecif = ((mib, oib), instance) in let ind_type = Inductive.type_of_inductive global_env pspecif in let indr = oib.mind_relevance in let ind_name = Name oib.mind_typename in |
