assert (goal_arity >= 0);
let rec aux metasenv = function
| NCic.Prod (name,s,t) as ty ->
- let metasenv1, arg,_ =
+ let metasenv1, _, arg,_ =
NCicMetaSubst.mk_meta ~name:name metasenv context (`WithType s) in
let t, metasenv1, args, pno =
aux metasenv1 (NCicSubstitution.subst arg t)
let rec aux () (m,l as acc) = function
| NCic.Meta _ as t -> acc, t
| NCic.LetIn (name,ty,bo,t) ->
- let m,i,_=NCicMetaSubst.mk_meta ~name m context (`WithType ty)in
+ let m,_,i,_=
+ NCicMetaSubst.mk_meta ~name m context (`WithType ty)in
let t = NCicSubstitution.subst i t in
aux () (m, (i,bo)::l) t
| t -> NCicUntrusted.map_term_fold_a (fun _ () -> ()) () aux acc t
let rc =
List.map
(function
- | (prec,true,(NCic.Appl [_; t1; t2],metasenv,l))-> prec,metasenv, (t1,t2),l
- | (prec,false,(NCic.Appl [_; t1; t2],metasenv,l))-> prec,metasenv, (t2,t1),l
+ | (prec,true,(NCic.Appl [_; t1; t2],metasenv,l))-> prec,metasenv,(t1,t2),l
+ | (prec,false,(NCic.Appl [_; t1; t2],metasenv,l))-> prec,metasenv,(t2,t1),l
| _ -> assert false)
rc
in
in
let rc = List.map (fun (_,x,y,z) -> x,y,z) rc in
(*
+ prerr_endline "Hints:";
List.iter
(fun (metasenv, (t1, t2), premises) ->
prerr_endline
- (String.concat "\n"
- (List.map (fun (a,b) ->
- NCicPp.ppterm ~metasenv ~subst ~context a ^
- " =?= "^NCicPp.ppterm ~metasenv ~subst ~context b)
+ ("\t" ^ String.concat "; "
+ (List.map (fun (a,b) ->
+ NCicPp.ppterm ~margin:max_int ~metasenv ~subst ~context a ^
+ " =?= "^
+ NCicPp.ppterm ~margin:max_int ~metasenv ~subst ~context b)
premises) ^
- "\n--------------------------------------------------"^
- "\n"^NCicPp.ppterm ~metasenv ~subst ~context t1 ^
- " = "^NCicPp.ppterm ~metasenv ~subst ~context t2 ^ "\n\n"))
+ " ==> "^
+ NCicPp.ppterm ~margin:max_int ~metasenv ~subst ~context t1 ^
+ " = "^NCicPp.ppterm ~margin:max_int ~metasenv ~subst ~context t2))
rc;
*)
rc