X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_unification%2FcicMkImplicit.ml;h=0fa33047f3e2adeab1b2f931746155cb3786cd2c;hb=cdb9c1c0efcf68e15f0d7e63f5d92dc87d2b3ac9;hp=99e599ab2f6feff6e9bcfe4ce8d6a3d21fe3a3c6;hpb=e626927b4c1c77bdcd6b545203a0a9c17a9ff136;p=helm.git diff --git a/helm/ocaml/cic_unification/cicMkImplicit.ml b/helm/ocaml/cic_unification/cicMkImplicit.ml index 99e599ab2..0fa33047f 100644 --- a/helm/ocaml/cic_unification/cicMkImplicit.ml +++ b/helm/ocaml/cic_unification/cicMkImplicit.ml @@ -1,3 +1,27 @@ +(* Copyright (C) 2004, HELM Team. + * + * This file is part of HELM, an Hypertextual, Electronic + * Library of Mathematics, developed at the Computer Science + * Department, University of Bologna, Italy. + * + * HELM is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * HELM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with HELM; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, + * MA 02111-1307, USA. + * + * For details, see the HELM World-Wide-Web page, + * http://cs.unibo.it/helm/. + *) (* identity_relocation_list_for_metavariable i canonical_context *) (* returns the identity relocation list, which is the list [1 ; ... ; n] *) @@ -28,11 +52,21 @@ let new_meta metasenv = let mk_implicit metasenv context = let newmeta = new_meta metasenv in let irl = identity_relocation_list_for_metavariable context in - ([ newmeta, context, Cic.Sort Cic.Type ; - newmeta + 1, context, Cic.Meta (newmeta, irl); + ([ newmeta, [], Cic.Sort Cic.Type ; + newmeta + 1, context, Cic.Meta (newmeta, []); newmeta + 2, context, Cic.Meta (newmeta + 1,irl) ] @ metasenv, newmeta + 2) +let mk_implicit_type metasenv context = + let newmeta = new_meta metasenv in + ([ newmeta, [], Cic.Sort Cic.Type ; + newmeta + 1, context, Cic.Meta (newmeta, []) ] @metasenv, + newmeta + 1) + +let mk_implicit_sort metasenv = + let newmeta = new_meta metasenv in + ([ newmeta, [], Cic.Sort Cic.Type] @ metasenv, newmeta) + let n_fresh_metas metasenv context n = if n = 0 then metasenv, [] else @@ -61,13 +95,6 @@ let fresh_subst metasenv context uris = (uri,Cic.Meta(newmeta+2,irl))::l in aux newmeta uris -let mk_implicit_type metasenv context = - let newmeta = new_meta metasenv in - let irl = identity_relocation_list_for_metavariable context in - ([ newmeta, context, Cic.Sort Cic.Type ; - newmeta + 1, context, Cic.Meta (newmeta, irl) ] @metasenv, - newmeta + 1) - let expand_implicits metasenv context term = let rec aux metasenv context = function | (Cic.Rel _) as t -> metasenv, t