forked from rescript-lang/rescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprinttyp.mli
112 lines (102 loc) · 4.23 KB
/
printtyp.mli
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
(**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
(* *)
(* Copyright 1996 Institut National de Recherche en Informatique et *)
(* en Automatique. *)
(* *)
(* All rights reserved. This file is distributed under the terms of *)
(* the GNU Lesser General Public License version 2.1, with the *)
(* special exception on linking described in the file LICENSE. *)
(* *)
(**************************************************************************)
(* Printing functions *)
open Format
open Types
open Outcometree
val print_res_poly_identifier : (string -> string) ref
val longident : formatter -> Longident.t -> unit
val ident : formatter -> Ident.t -> unit
val tree_of_path : Path.t -> out_ident
val path : formatter -> Path.t -> unit
val string_of_path : Path.t -> string
val raw_type_expr : formatter -> type_expr -> unit
val string_of_label : Asttypes.arg_label -> string
val wrap_printing_env : Env.t -> (unit -> 'a) -> 'a
(* Call the function using the environment for type path shortening *)
(* This affects all the printing functions below *)
val reset : unit -> unit
val mark_loops : type_expr -> unit
val reset_and_mark_loops : type_expr -> unit
val reset_and_mark_loops_list : type_expr list -> unit
val type_expr : formatter -> type_expr -> unit
val constructor_arguments : formatter -> constructor_arguments -> unit
val tree_of_type_scheme : type_expr -> out_type
val type_sch : formatter -> type_expr -> unit
val type_scheme : formatter -> type_expr -> unit
(* Maxence *)
val reset_names : unit -> unit
val type_scheme_max : ?b_reset_names:bool -> formatter -> type_expr -> unit
(* End Maxence *)
val tree_of_value_description : Ident.t -> value_description -> out_sig_item
val value_description : Ident.t -> formatter -> value_description -> unit
val tree_of_type_declaration :
Ident.t -> type_declaration -> rec_status -> out_sig_item
val type_declaration : Ident.t -> formatter -> type_declaration -> unit
val tree_of_extension_constructor :
Ident.t -> extension_constructor -> ext_status -> out_sig_item
val extension_constructor :
Ident.t -> formatter -> extension_constructor -> unit
val tree_of_module :
Ident.t -> ?ellipsis:bool -> module_type -> rec_status -> out_sig_item
val modtype : formatter -> module_type -> unit
val signature : formatter -> signature -> unit
val tree_of_modtype_declaration : Ident.t -> modtype_declaration -> out_sig_item
val tree_of_signature : Types.signature -> out_sig_item list
val tree_of_typexp : bool -> type_expr -> out_type
val modtype_declaration : Ident.t -> formatter -> modtype_declaration -> unit
val type_expansion : type_expr -> Format.formatter -> type_expr -> unit
val prepare_expansion : type_expr * type_expr -> type_expr * type_expr
val trace :
bool -> bool -> string -> formatter -> (type_expr * type_expr) list -> unit
val report_unification_error :
formatter ->
Env.t ->
?unif:bool ->
(type_expr * type_expr) list ->
(formatter -> unit) ->
(formatter -> unit) ->
unit
val super_report_unification_error :
?print_extra_info:(formatter -> type_expr -> type_expr -> unit) ->
formatter ->
Env.t ->
?unif:bool ->
(type_expr * type_expr) list ->
(formatter -> unit) ->
(formatter -> unit) ->
unit
val report_subtyping_error :
formatter ->
Env.t ->
(type_expr * type_expr) list ->
string ->
(type_expr * type_expr) list ->
unit
val report_ambiguous_type_error :
formatter ->
Env.t ->
Path.t * Path.t ->
(Path.t * Path.t) list ->
(formatter -> unit) ->
(formatter -> unit) ->
(formatter -> unit) ->
unit
(* for toploop *)
val print_items :
(Env.t -> signature_item -> 'a option) ->
Env.t ->
signature_item list ->
(out_sig_item * 'a option) list