X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fsoftware%2Fcomponents%2Fng_disambiguation%2FnCicDisambiguate.ml;h=9f14c503f3bc30a99cb9ae29457e7ecb345645ff;hb=f2e2d1f6cccad2cc1ce70ef7fa2841cf0a457953;hp=9e9130857145c2bb84d74eb718c33625f78d0e3b;hpb=6110532ca4a8e80f0e867500fcae92bf2f44b899;p=helm.git diff --git a/helm/software/components/ng_disambiguation/nCicDisambiguate.ml b/helm/software/components/ng_disambiguation/nCicDisambiguate.ml index 9e9130857..9f14c503f 100644 --- a/helm/software/components/ng_disambiguation/nCicDisambiguate.ml +++ b/helm/software/components/ng_disambiguation/nCicDisambiguate.ml @@ -40,7 +40,8 @@ let refine_term assert false in let metasenv, subst, term, _ = - NCicRefiner.typeof + NCicRefiner.typeof + (NCicUnifHint.db ()) ~look_for_coercion:( if use_coercions then NCicCoercion.look_for_coercion coercion_db @@ -76,9 +77,6 @@ let interpretate_term assert (uri = None); let rec aux ~localize loc context = function - t -> - let res = - match t with | CicNotationPt.AttributedTerm (`Loc loc, term) -> let res = aux ~localize loc context term in if localize then @@ -399,16 +397,17 @@ patterns not implemented *) [false,NUri.uri_of_string "cic:/matita/pts/Type.univ"]) | CicNotationPt.Sort (`Type _u) -> NCic.Sort (NCic.Type [false,NUri.uri_of_string "cic:/matita/pts/Type.univ"]) + | CicNotationPt.Sort (`NType s) -> NCic.Sort (NCic.Type + [false,NUri.uri_of_string ("cic:/matita/pts/Type" ^ s ^ ".univ")]) | CicNotationPt.Sort (`CProp _u) -> NCic.Sort (NCic.Type [false,NUri.uri_of_string "cic:/matita/pts/CProp.univ"]) | CicNotationPt.Symbol (symbol, instance) -> Disambiguate.resolve ~env ~mk_choice (Symbol (symbol, instance)) (`Args []) - | _ -> assert false (* god bless Bologna *) - - in -(* prerr_endline (NCicPp.ppterm ~metasenv:[] ~context:[] ~subst:[] res); *) - res + | CicNotationPt.Variable _ + | CicNotationPt.Magic _ + | CicNotationPt.Layout _ + | CicNotationPt.Literal _ -> assert false (* god bless Bologna *) and aux_option ~localize loc context annotation = function | None -> NCic.Implicit annotation | Some (CicNotationPt.AttributedTerm (`Loc loc, term)) -> @@ -486,5 +485,16 @@ in NCicEnvironment.add_constraint true (mk_type 0) (mk_cprop 1); NCicEnvironment.add_constraint false (mk_cprop 0) (mk_type 0); NCicEnvironment.add_constraint false (mk_type 0) (mk_cprop 0); + + NCicEnvironment.add_constraint true (mk_type 1) (mk_type 2); + NCicEnvironment.add_constraint true (mk_cprop 1) (mk_cprop 2); + NCicEnvironment.add_constraint true (mk_cprop 1) (mk_type 2); + NCicEnvironment.add_constraint true (mk_type 1) (mk_cprop 2); + NCicEnvironment.add_constraint false (mk_cprop 1) (mk_type 1); + NCicEnvironment.add_constraint false (mk_type 1) (mk_cprop 1); + + NCicEnvironment.add_constraint false (mk_cprop 2) (mk_type 2); + NCicEnvironment.add_constraint false (mk_type 2) (mk_cprop 2); + ;;