(* ||M|| This file is part of HELM, an Hypertextual, Electronic ||A|| Library of Mathematics, developed at the Computer Science ||T|| Department, University of Bologna, Italy. ||I|| ||T|| HELM is free software; you can redistribute it and/or ||A|| modify it under the terms of the GNU General Public License \ / version 2 or (at your option) any later version. \ / This software is distributed as is, NO WARRANTY. V_______________________________________________________________ *) module U = NUri module L = Log module Y = Entity module B = Brg module E = BrgEnvironment module R = BrgReduction module T = BrgType (* Interface functions ******************************************************) (* to share *) let type_check err f ?(si=false) g = function | a, uri, Y.Abst t -> let f xt tt = let e = E.set_entity (a, uri, Y.Abst xt) in f tt e in let st = Y.initial_status si in L.loc := U.string_of_uri uri; T.type_of err f st g R.empty_kam t | a, uri, Y.Abbr t -> let f xt tt = let e = E.set_entity (a, uri, Y.Abbr xt) in f tt e in let st = Y.initial_status si in L.loc := U.string_of_uri uri; T.type_of err f st g R.empty_kam t | _, _, Y.Void -> assert false