diff options
| author | Maxime Dénès | 2015-07-06 17:04:10 +0200 |
|---|---|---|
| committer | Maxime Dénès | 2015-07-06 17:04:10 +0200 |
| commit | 139c92bebd3f3d22c9f4d8220647bb7dd4e43890 (patch) | |
| tree | a650355330521a776719279328e82a47527d15a5 /pretyping/inductiveops.ml | |
| parent | 7ad2fe2bd30a07eb2495ea8cf902a24ef13a3627 (diff) | |
| parent | 2face8d77628ded64f7d0a824f4b377694b9d7fd (diff) | |
Merge branch 'v8.5' into trunk
Diffstat (limited to 'pretyping/inductiveops.ml')
| -rw-r--r-- | pretyping/inductiveops.ml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pretyping/inductiveops.ml b/pretyping/inductiveops.ml index dfdc24d480..90aa8000a8 100644 --- a/pretyping/inductiveops.ml +++ b/pretyping/inductiveops.ml @@ -584,6 +584,15 @@ let type_of_inductive_knowing_conclusion env sigma ((mib,mip),u) conclty = env evdref scl ar.template_level (ctx,ar.template_param_levels) in !evdref, mkArity (List.rev ctx,scl) +let type_of_projection_knowing_arg env sigma p c ty = + let IndType(pars,realargs) = + try find_rectype env sigma ty + with Not_found -> + raise (Invalid_argument "type_of_projection_knowing_arg_type: not an inductive type") + in + let (_,u), pars = dest_ind_family pars in + substl (c :: List.rev pars) (Typeops.type_of_projection env (p,u)) + (***********************************************) (* Guard condition *) |
