let u = OCic2NCic.nuri_of_ouri u in
indent := 0;
match NCicLibrary.get_obj u with
- | _,_,_,_,NCic.Constant (_,_,Some bo, ty, _) ->
+ | _,_,_,_,NCic.Constant (_,_,_, ty, _) ->
let rec intros = function
| NCic.Prod (name, s, t) ->
let ctx, t = intros t in
ctx @ [(name, (NCic.Decl s))] , t
| t -> [], t
in
+ let rec perforate ctx menv = function
+ | NCic.Appl (NCic.Const (NReference.Ref (u,_))::ty::_)
+ when NUri.string_of_uri u = "cic:/matita/tests/hole.con" ->
+ NCicMetaSubst.mk_meta menv ctx ty
+ | t ->
+ NCicUntrusted.map_term_fold_a
+ (fun e ctx -> e::ctx) ctx perforate menv t
+ in
let ctx, ity = intros ty in
+ let menv, pty = perforate [] [] ty in
+(*
let sty, menv, _ =
NCicMetaSubst.saturate ~delta:max_int [] ctx ty 0
in
+*)
let ctx, ty = intros ty in
let whd ty =
match ty with
let metasenv, subst =
try
(* prerr_endline ("INIZIO: " ^ NUri.string_of_uri u); *)
- NCicUnification.unify menv [] ctx ity (whd sty)
+ NCicUnification.unify menv [] ctx ity sty
with
| NCicUnification.Uncertain msg
| NCicUnification.UnificationFailure msg