1 (* Copyright (C) 2000, HELM Team.
3 * This file is part of HELM, an Hypertextual, Electronic
4 * Library of Mathematics, developed at the Computer Science
5 * Department, University of Bologna, Italy.
7 * HELM is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * HELM is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with HELM; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
22 * For details, see the HELM World-Wide-Web page,
23 * http://cs.unibo.it/helm/.
26 (* These are the only exceptions that will be raised *)
27 exception TypeCheckerFailure of string Lazy.t
28 exception AssertFailure of string Lazy.t
30 (* this function is exported to be used also by the refiner;
31 the callback function (defaul value: ignore) is invoked on each
32 processed subterm; its first argument is the undebrujined term (the
33 input); its second argument the corresponding debrujined term (the
34 output). The callback is used to relocalize the error messages *)
35 val debrujin_constructor :
36 ?cb:(Cic.term -> Cic.term -> unit) ->
37 UriManager.uri -> int -> Cic.term -> Cic.term
39 val typecheck : UriManager.uri -> Cic.obj * CicUniv.universe_graph
41 (* FUNCTIONS USED ONLY IN THE TOPLEVEL *)
43 (* type_of_aux' metasenv context term *)
45 ?subst:Cic.substitution -> Cic.metasenv -> Cic.context ->
46 Cic.term -> CicUniv.universe_graph ->
47 Cic.term * CicUniv.universe_graph
49 (* typechecks the obj and puts it in the environment *)
50 val typecheck_obj : UriManager.uri -> Cic.obj -> unit
52 (* check_allowed_sort_elimination uri i s1 s2
53 This function is used outside the kernel to determine in advance whether
54 a MutCase will be allowed or not.
55 [uri,i] is the type of the term to match
56 [s1] is the sort of the term to eliminate (i.e. the head of the arity
57 of the inductive type [uri,i])
58 [s2] is the sort of the goal (i.e. the head of the type of the outtype
60 val check_allowed_sort_elimination:
61 UriManager.uri -> int -> Cic.sort -> Cic.sort -> bool