]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/ng_disambiguation/nCicDisambiguate.ml
we rebuilt the dependences
[helm.git] / helm / software / components / ng_disambiguation / nCicDisambiguate.ml
index f426f712686e3babe0ef42e0d6d5b92da95eee88..b9b4fa42b837d1c64041ad874570add883f40a8d 100644 (file)
@@ -36,8 +36,8 @@ let refine_term
     let localise t = 
       try NCicUntrusted.NCicHash.find localization_tbl t
       with Not_found -> 
-        prerr_endline (NCicPp.ppterm ~metasenv ~subst ~context t);
-        assert false
+        prerr_endline ("NOT LOCALISED" ^ NCicPp.ppterm ~metasenv ~subst ~context t);
+        (*assert false*) HExtlib.dummy_floc
     in
     let metasenv, subst, term, _ = 
       NCicRefiner.typeof
@@ -61,8 +61,8 @@ let refine_term
 ;;
 
 let refine_obj 
-  ~coercion_db metasenv subst context uri 
-  ~use_coercions obj _ ugraph ~localization_tbl 
+  ~coercion_db metasenv subst context _uri 
+  ~use_coercions obj _ _ugraph ~localization_tbl 
 =
   assert (metasenv=[]);
   assert (subst=[]);
@@ -322,8 +322,7 @@ let interpretate_term_and_interpretate_term_option
         with NRef.IllFormedReference _ ->
          CicNotationPt.fail loc "Ill formed reference")
     | CicNotationPt.Implicit -> NCic.Implicit `Term
-    | CicNotationPt.UserInput -> assert false (*NCic.Implicit (Some `Hole)
-patterns not implemented *)
+    | CicNotationPt.UserInput -> NCic.Implicit `Hole
     | CicNotationPt.Num (num, i) -> 
         Disambiguate.resolve ~env ~mk_choice (Num i) (`Num_arg num)
     | CicNotationPt.Meta (index, subst) ->
@@ -386,6 +385,15 @@ let interpretate_term_option
     ~context 
 ;;
 
+let disambiguate_path path =
+  let localization_tbl = NCicUntrusted.NCicHash.create 23 in
+  fst
+    (interpretate_term_and_interpretate_term_option 
+    ~obj_context:[] ~mk_choice:(fun _ -> assert false)
+    ~create_dummy_ids:true ~env:DisambiguateTypes.Environment.empty
+    ~uri:None ~is_path:true ~localization_tbl) ~context:[] path
+;;
+
 let new_flavour_of_flavour = function 
   | `Definition -> `Definition
   | `MutualDefinition -> `Definition