]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/cic_disambiguation/disambiguate.ml
reverder change. no more owner passed to the locate.
[helm.git] / helm / ocaml / cic_disambiguation / disambiguate.ml
index 0ff738fda91229a207408ffcba96452abadc0fc2..67b6d115c2cd908daac51084287ce958be60f0c6 100644 (file)
@@ -35,7 +35,6 @@ exception NoWellTypedInterpretation
 exception Try_again
 
 let debug = false
-let debug = true
 let debug_print = if debug then prerr_endline else ignore
 
 (*
@@ -70,8 +69,11 @@ let refine metasenv context term ugraph =
       | CicRefine.Uncertain _ ->
           debug_print ("%%% UNCERTAIN!!! " ^ CicPp.ppterm term) ;
           Uncertain,ugraph
-      | CicRefine.RefineFailure _ ->
-          debug_print ("%%% PRUNED!!! " ^ CicPp.ppterm term) ;
+      | CicRefine.RefineFailure msg ->
+          debug_print (
+            (sprintf ("%%%%%% PRUNED!!!\n<<begin cause>>\n" ^^ 
+              "%s\n<<end cause>>\n<<begin term>>\n%s\n<<end term>>") 
+              msg (CicPp.ppterm term)));
           Ko,ugraph
       | CicUnification.UnificationFailure s -> 
         prerr_endline ("PASSADI QUI: " ^ s);
@@ -450,7 +452,7 @@ module Make (C: Callbacks) =
         uris
 
     let disambiguate_term ~(dbd:Mysql.dbd) context metasenv term
-      ?(initial_ugraph = CicUniv.empty_ugraph)  ~aliases:current_env
+      ?(initial_ugraph = CicUniv.empty_ugraph) ~aliases:current_env
     =
       debug_print "NEW DISAMBIGUATE INPUT";
       let disambiguate_context =  (* cic context -> disambiguate context *)