aboutsummaryrefslogtreecommitdiffhomepage
path: root/toplevel/fhimsg.mli
blob: ff3eac8ee4fec39a6bfaef23362121bc6866290d (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73

(* $Id$ *)

(*i*)
open Pp
open Names
open Term
open Sign
open Environ
open Type_errors
(*i*)

(* This module provides functions to explain the various typing errors.
   It is parameterized by a function to pretty-print a term in a given
   context. *)

module type Printer = sig
  val pr_term : path_kind -> context -> constr -> std_ppcmds
end

(*s The result is a module which provides a function [explain_type_error]
  to explain a type error for a given kind in a given context, which are 
  usually the three arguments carried by the exception [TypeError] 
  (see \refsec{typeerrors}). *)

module Make (P : Printer) : sig

val explain_type_error : path_kind -> context -> type_error -> std_ppcmds

val pr_ne_ctx : std_ppcmds -> path_kind -> context -> std_ppcmds

val explain_unbound_rel : path_kind -> context -> int -> std_ppcmds

val explain_cant_execute : path_kind -> context -> constr -> std_ppcmds

val explain_not_type : path_kind -> context -> constr -> std_ppcmds

val explain_bad_assumption : path_kind -> context -> constr -> std_ppcmds
 
val explain_reference_variables : identifier -> std_ppcmds

val explain_elim_arity : 
  path_kind -> context -> constr -> constr list -> constr 
    -> constr -> constr -> (constr * constr * string) option -> std_ppcmds

val explain_case_not_inductive : 
  path_kind -> context -> constr -> constr -> std_ppcmds

val explain_number_branches : 
  path_kind -> context -> constr -> constr -> int -> std_ppcmds

val explain_ill_formed_branch :
  path_kind -> context -> constr -> int -> constr -> constr -> std_ppcmds

val explain_generalization :
  path_kind -> context -> name * typed_type -> constr -> std_ppcmds

val explain_actual_type :
  path_kind -> context -> constr -> constr -> constr -> std_ppcmds

val explain_cant_apply : 
  path_kind -> context -> string -> unsafe_judgment 
    -> unsafe_judgment list -> std_ppcmds

val explain_ill_formed_rec_body :
  path_kind -> context -> std_ppcmds -> 
    name list -> int -> constr array -> std_ppcmds

val explain_ill_typed_rec_body  :
  path_kind -> context -> int -> name list -> unsafe_judgment array 
    -> typed_type array -> std_ppcmds

end