summaryrefslogtreecommitdiff
path: root/pretyping/typing.mli
blob: 32b64c5fe88fbcb6d20233f7a92e8b2394910430 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
(************************************************************************)
(*  v      *   The Coq Proof Assistant  /  The Coq Development Team     *)
(* <O___,, *   INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2010     *)
(*   \VV/  **************************************************************)
(*    //   *      This file is distributed under the terms of the       *)
(*         *       GNU Lesser General Public License Version 2.1        *)
(************************************************************************)

(*i $Id: typing.mli 13323 2010-07-24 15:57:30Z herbelin $ i*)

(*i*)
open Term
open Environ
open Evd
(*i*)

(* This module provides the typing machine with existential variables
   (but without universes). *)

(* Typecheck a term and return its type *)
val type_of : env -> evar_map -> constr -> types
(* Typecheck a type and return its sort *)
val sort_of : env -> evar_map -> types -> sorts
(* Typecheck a term has a given type (assuming the type is OK) *)
val check   : env -> evar_map -> constr -> types -> unit

(* Returns the instantiated type of a metavariable *)
val meta_type : evar_map -> metavariable -> types

(* Solve existential variables using typing *)
val solve_evars : env -> evar_map -> constr -> constr