2 ||M|| This file is part of HELM, an Hypertextual, Electronic
3 ||A|| Library of Mathematics, developed at the Computer Science
4 ||T|| Department, University of Bologna, Italy.
6 ||T|| HELM is free software; you can redistribute it and/or
7 ||A|| modify it under the terms of the GNU General Public License
8 \ / version 2 or (at your option) any later version.
9 \ / This software is distributed as is, NO WARRANTY.
10 V_______________________________________________________________ *)
14 module E = BrgEnvironment
17 (* Interface functions ******************************************************)
20 let type_check f g = function
22 | Some (e, uri, B.Abst t) ->
23 let f tt obj = f (Some tt) (Some obj) in
24 let f xt tt = E.set_obj (f tt) (e, uri, B.Abst xt) in
25 L.loc := e; T.type_of f g B.empty_context t
26 | Some (e, uri, B.Abbr t) ->
27 let f tt obj = f (Some tt) (Some obj) in
28 let f xt tt = E.set_obj (f tt) (e, uri, B.Abbr xt) in
29 L.loc := e; T.type_of f g B.empty_context t
30 | Some (e, uri, B.Void) ->
31 let f obj = f None (Some obj) in
32 L.loc := e; E.set_obj f (e, uri, B.Void)