]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/ng_tactics/nTacStatus.ml
1. new implementation of normalize to have a speed up in case of fully applicative...
[helm.git] / helm / software / components / ng_tactics / nTacStatus.ml
index 1aaeb50f6367ea58863034b8d12af18981203101..4a7f9819650b0efa11954f27017129a1b43aefa5 100644 (file)
@@ -249,11 +249,15 @@ let to_subst status i entry =
   status#set_obj (name,height,metasenv,subst,obj)
 ;;
 
-let instantiate status i t =
+let instantiate status ?refine:(dorefine=false) i t =
  let _,_,metasenv,_,_ = status#obj in
  let gname, context, gty = List.assoc i metasenv in
- let status, (_,t), (_,ty) = refine status context t (Some (context,gty)) in
-  to_subst status i (gname,context,t,ty)
+  if dorefine then
+   let status, (_,t), (_,ty) = refine status context t (Some (context,gty)) in
+    to_subst status i (gname,context,t,ty)
+  else
+   let status,(_,ty) = typeof status context t in
+    to_subst status i (gname,context,snd t,ty)
 ;;
 
 let instantiate_with_ast status i t =