X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Finterface%2FcicAnnotationHinter.ml;h=86bcb4588b163202ed176b4a7855d749182777d5;hb=f15a13bab100064a4da238cede323b8d4568c174;hp=21f30a722b74b163652702f8ee0a2aa34afb85b5;hpb=c01d2aaea05f7385bee46addd900cd0397756389;p=helm.git diff --git a/helm/interface/cicAnnotationHinter.ml b/helm/interface/cicAnnotationHinter.ml index 21f30a722..86bcb4588 100644 --- a/helm/interface/cicAnnotationHinter.ml +++ b/helm/interface/cicAnnotationHinter.ml @@ -1,3 +1,28 @@ +(* Copyright (C) 2000, 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/. + *) + (******************************************************************************) (* *) (* PROJECT HELM *) @@ -75,6 +100,7 @@ let get_id annterm = | C.ACast (id,_,_,_) -> id | C.AProd (id,_,_,_,_) -> id | C.ALambda (id,_,_,_,_) -> id + | C.ALetIn (id,_,_,_,_) -> id | C.AAppl (id,_,_) -> id | C.AConst (id,_,_,_) -> id | C.AAbst (id,_,_) -> id @@ -127,6 +153,15 @@ let create_hint_from_term annotation_window annterm = "Body", "" ; "Type", "" |] + | C.ALetIn (id,_,_,ty,bo) -> + let boid = get_id bo + and tyid = get_id ty in + link_hints annotation_window + [| "Binder", + "" ; + "Term", "" ; + "Target", "" + |] | C.AAppl (id,_,args) -> let argsid = Array.mapi @@ -248,12 +283,21 @@ let create_hint_from_obj annotation_window annobj = "Ingredients", "" ; "Type", "" |] - | C.AVariable (id,_,_,ty) -> + | C.AVariable (id,_,_,bo,ty) -> let tyid = get_id ty in link_hints annotation_window - [| "Name", "" ; - "Type", "" - |] + (match bo with + None -> + [| "Name", "" ; + "Type", "" + |] + | Some bo -> + let boid = get_id bo in + [| "Name", "" ; + "Body", "" ; + "Type", "" + |] + ) | C.ACurrentProof (id,_,_,conjs,bo,ty) -> let boid = get_id bo and tyid = get_id ty