X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fcomponents%2Fng_disambiguation%2FnCicDisambiguate.ml;h=be5aacb93b1daf512730eed4ab846b58c8b5680c;hb=4d7c59271640be57e8ba0691c03c6f8088d625ef;hp=f3341a5f77bd55172b22a87024585c5c00a1bb1d;hpb=d284dd23d0e12a62a001d3473eadf4942d12ffaa;p=helm.git diff --git a/matita/components/ng_disambiguation/nCicDisambiguate.ml b/matita/components/ng_disambiguation/nCicDisambiguate.ml index f3341a5f7..be5aacb93 100644 --- a/matita/components/ng_disambiguation/nCicDisambiguate.ml +++ b/matita/components/ng_disambiguation/nCicDisambiguate.ml @@ -14,7 +14,6 @@ open Printf open DisambiguateTypes -open UriManager module Ast = NotationPt module NRef = NReference @@ -22,9 +21,6 @@ module NRef = NReference let debug_print s = prerr_endline (Lazy.force s);; let debug_print _ = ();; -let reference_of_oxuri = ref (fun _ -> assert false);; -let set_reference_of_oxuri f = reference_of_oxuri := f;; - let cic_name_of_name = function | Ast.Ident (n, None) -> n | _ -> assert false @@ -328,14 +324,11 @@ let interpretate_term_and_interpretate_term_option | NotationPt.Uri (uri, subst) -> assert (subst = None); (try - NCic.Const (!reference_of_oxuri(UriManager.uri_of_string uri)) + NCic.Const (NReference.reference_of_string uri) with NRef.IllFormedReference _ -> NotationPt.fail loc "Ill formed reference") | NotationPt.NRef nref -> NCic.Const nref - | NotationPt.NCic t -> - let context = (* to make metas_of_term happy *) - List.map (fun x -> x,NCic.Decl (NCic.Implicit `Type)) context in - assert(NCicUntrusted.metas_of_term [] context t = []); t + | NotationPt.NCic t -> t | NotationPt.Implicit `Vector -> NCic.Implicit `Vector | NotationPt.Implicit `JustOne -> NCic.Implicit `Term | NotationPt.Implicit (`Tagged s) -> NCic.Implicit (`Tagged s) @@ -410,17 +403,6 @@ let disambiguate_path path = ~uri:None ~is_path:true ~localization_tbl) ~context:[] path ;; -let new_flavour_of_flavour = function - | `Definition -> `Definition - | `MutualDefinition -> `Definition - | `Fact -> `Fact - | `Lemma -> `Lemma - | `Remark -> `Example - | `Theorem -> `Theorem - | `Variant -> `Corollary - | `Axiom -> `Fact -;; - let ncic_name_of_ident = function | Ast.Ident (name, None) -> name | _ -> assert false @@ -447,11 +429,11 @@ let interpretate_obj uri, height, [], [], (match bo,flavour with | None,`Axiom -> - let attrs = `Provided, new_flavour_of_flavour flavour, pragma in + let attrs = `Provided, flavour, pragma in NCic.Constant ([],name,None,ty',attrs) | Some _,`Axiom -> assert false | None,_ -> - let attrs = `Provided, new_flavour_of_flavour flavour, pragma in + let attrs = `Provided, flavour, pragma in NCic.Constant ([],name,Some (NCic.Implicit `Term),ty',attrs) | Some bo,_ -> (match bo with @@ -488,14 +470,14 @@ let interpretate_obj ([],ncic_name_of_ident name, decr_idx, cic_type, cic_body)) defs in - let attrs = `Provided, new_flavour_of_flavour flavour, pragma in + let attrs = `Provided, flavour, pragma in NCic.Fixpoint (inductive,inductiveFuns,attrs) | bo -> let bo = interpretate_term ~obj_context:[] ~context:[] ~env ~uri:None ~is_path:false bo in - let attrs = `Provided, new_flavour_of_flavour flavour, pragma in + let attrs = `Provided, flavour, pragma in NCic.Constant ([],name,Some bo,ty',attrs))) | NotationPt.Inductive (params,tyl) -> let context,params =