X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_unification%2FfreshNamesGenerator.ml;h=0dc5dadae51d2b58317098888c3688ba48e10319;hb=ef51893c7f8a5f1319e122322782b734b48c205a;hp=3bdde5b593426125143aa874e904feb1069d1e4b;hpb=a785a3526d4dcbb6c5810ed4fb943132c9ff2d45;p=helm.git diff --git a/helm/ocaml/cic_unification/freshNamesGenerator.ml b/helm/ocaml/cic_unification/freshNamesGenerator.ml index 3bdde5b59..0dc5dadae 100644 --- a/helm/ocaml/cic_unification/freshNamesGenerator.ml +++ b/helm/ocaml/cic_unification/freshNamesGenerator.ml @@ -23,6 +23,8 @@ * http://cs.unibo.it/helm/. *) +let debug_print = fun _ -> () + (* mk_fresh_name context name typ *) (* returns an identifier which is fresh in the context *) (* and that resembles [name] as much as possible. *) @@ -34,7 +36,10 @@ let mk_fresh_name ~subst metasenv context name ~typ = C.Anonymous -> (*CSC: great space for improvements here *) (try - (match CicTypeChecker.type_of_aux' ~subst metasenv context typ with + let ty,_ = + CicTypeChecker.type_of_aux' ~subst metasenv context typ + CicUniv.empty_ugraph in + (match ty with C.Sort C.Prop | C.Sort C.CProp -> "H" | C.Sort C.Set -> "x" @@ -108,7 +113,7 @@ let clean_dummy_dependent_types t = C.Anonymous -> if List.mem k rels2 then ( - prerr_endline "If this happens often, we can do something about it (i.e. we can generate a new fresh name; problem: we need the metasenv and context ;-(. Alternative solution: mk_implicit does not generate entries for the elements in the context that have no name" ; + debug_print "If this happens often, we can do something about it (i.e. we can generate a new fresh name; problem: we need the metasenv and context ;-(. Alternative solution: mk_implicit does not generate entries for the elements in the context that have no name" ; C.Anonymous ) else