preceed its lefts parameters; in the former case, there is nothing to
permute *)
let rec aux k octx (ctx : ctx list) n_fix uri = function
- | Cic.CoFix (cofixno, fl) ->
+ | Cic.CoFix _ as cofix ->
+ let octx,ctx,fix,rels = restrict octx ctx cofix in
+ let cofixno,fl =
+ match fix with Cic.CoFix (cofixno,fl)->cofixno,fl | _-> assert false in
let buri =
UriManager.uri_of_string
(UriManager.buri_of_uri uri^"/"^
in
splat_args ctx
(NCic.Const (Ref.reference_of_ouri buri (Ref.CoFix cofixno)))
- n_fix (assert false),
+ n_fix rels,
fixpoints @ [obj]
| Cic.Fix _ as fix ->
let octx,ctx,fix,rels = restrict octx ctx fix in
NCic.LetIn ("cast", ty, t, NCic.Rel 1), fixpoints_t @ fixpoints_ty
| Cic.Sort Cic.Prop -> NCic.Sort NCic.Prop,[]
| Cic.Sort Cic.CProp -> NCic.Sort NCic.CProp,[]
- | Cic.Sort (Cic.Type _) -> NCic.Sort (NCic.Type 0),[]
+ | Cic.Sort (Cic.Type u) ->
+ NCic.Sort (NCic.Type (CicUniv.get_rank u)),[]
| Cic.Sort Cic.Set -> NCic.Sort (NCic.Type 0),[]
(* calculate depth in the univ_graph*)
| Cic.Appl l ->