File: pp_debug.ml

package info (click to toggle)
camlp5 8.04.00-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,968 kB
  • sloc: ml: 137,918; makefile: 2,055; perl: 1,729; sh: 1,653; python: 38
file content (216 lines) | stat: -rw-r--r-- 7,705 bytes parent folder | download
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
(* camlp5r *)
(* pp_debug.ml,v *)

module Pp_MLast =
  struct
    let ref_pp_str_item =
      ref
        (fun pps (x : MLast.str_item) ->
           Format.fprintf pps "<unrecognized str_item>")
    ;;
    let ref_pp_loc =
      ref (fun pps (x : MLast.loc) -> Format.fprintf pps "<unrecognized loc>")
    ;;
    let ref_pp_type_var =
      ref
        (fun pps (x : MLast.type_var) ->
           Format.fprintf pps "<unrecognized type_var>")
    ;;
    let ref_pp_longid =
      ref
        (fun pps (x : MLast.longid) ->
           Format.fprintf pps "<unrecognized longid>")
    ;;
    let ref_pp_ctyp =
      ref
        (fun pps (x : MLast.ctyp) -> Format.fprintf pps "<unrecognized ctyp>")
    ;;
    let ref_pp_poly_variant =
      ref
        (fun pps (x : MLast.poly_variant) ->
           Format.fprintf pps "<unrecognized poly_variant>")
    ;;
    let ref_pp_patt =
      ref
        (fun pps (x : MLast.patt) -> Format.fprintf pps "<unrecognized patt>")
    ;;
    let ref_pp_expr =
      ref
        (fun pps (x : MLast.expr) -> Format.fprintf pps "<unrecognized expr>")
    ;;
    let ref_pp_case_branch =
      ref
        (fun pps (x : MLast.case_branch) ->
           Format.fprintf pps "<unrecognized case_branch>")
    ;;
    let ref_pp_module_type =
      ref
        (fun pps (x : MLast.module_type) ->
           Format.fprintf pps "<unrecognized module_type>")
    ;;
    let ref_pp_functor_parameter =
      ref
        (fun pps (x : MLast.functor_parameter) ->
           Format.fprintf pps "<unrecognized functor_parameter>")
    ;;
    let ref_pp_sig_item =
      ref
        (fun pps (x : MLast.sig_item) ->
           Format.fprintf pps "<unrecognized sig_item>")
    ;;
    let ref_pp_with_constr =
      ref
        (fun pps (x : MLast.with_constr) ->
           Format.fprintf pps "<unrecognized with_constr>")
    ;;
    let ref_pp_module_expr =
      ref
        (fun pps (x : MLast.module_expr) ->
           Format.fprintf pps "<unrecognized module_expr>")
    ;;
    let ref_pp_str_item =
      ref
        (fun pps (x : MLast.str_item) ->
           Format.fprintf pps "<unrecognized str_item>")
    ;;
    let ref_pp_type_decl =
      ref
        (fun pps (x : MLast.type_decl) ->
           Format.fprintf pps "<unrecognized type_decl>")
    ;;
    let ref_pp_generic_constructor =
      ref
        (fun pps (x : MLast.generic_constructor) ->
           Format.fprintf pps "<unrecognized generic_constructor>")
    ;;
    let ref_pp_extension_constructor =
      ref
        (fun pps (x : MLast.extension_constructor) ->
           Format.fprintf pps "<unrecognized extension_constructor>")
    ;;
    let ref_pp_type_extension =
      ref
        (fun pps (x : MLast.type_extension) ->
           Format.fprintf pps "<unrecognized type_extension>")
    ;;
    let ref_pp_class_type =
      ref
        (fun pps (x : MLast.class_type) ->
           Format.fprintf pps "<unrecognized class_type>")
    ;;
    let ref_pp_class_sig_item =
      ref
        (fun pps (x : MLast.class_sig_item) ->
           Format.fprintf pps "<unrecognized class_sig_item>")
    ;;
    let ref_pp_class_expr =
      ref
        (fun pps (x : MLast.class_expr) ->
           Format.fprintf pps "<unrecognized class_expr>")
    ;;
    let ref_pp_class_str_item =
      ref
        (fun pps (x : MLast.class_str_item) ->
           Format.fprintf pps "<unrecognized class_str_item>")
    ;;
    let ref_pp_longid_lident =
      ref
        (fun pps (x : MLast.longid_lident) ->
           Format.fprintf pps "<unrecognized longid_lident>")
    ;;
    let ref_pp_payload =
      ref
        (fun pps (x : MLast.payload) ->
           Format.fprintf pps "<unrecognized payload>")
    ;;
    let ref_pp_attribute_body =
      ref
        (fun pps (x : MLast.attribute_body) ->
           Format.fprintf pps "<unrecognized attribute_body>")
    ;;
    let ref_pp_attribute =
      ref
        (fun pps (x : MLast.attribute) ->
           Format.fprintf pps "<unrecognized attribute>")
    ;;
    let ref_pp_attributes_no_anti =
      ref
        (fun pps (x : MLast.attributes_no_anti) ->
           Format.fprintf pps "<unrecognized attributes_no_anti>")
    ;;
    let ref_pp_attributes =
      ref
        (fun pps (x : MLast.attributes) ->
           Format.fprintf pps "<unrecognized attributes>")
    ;;
    let pp_loc x = !ref_pp_loc x;;
    let pp_type_var x = !ref_pp_type_var x;;
    let pp_longid x = !ref_pp_longid x;;
    let pp_ctyp x = !ref_pp_ctyp x;;
    let pp_poly_variant x = !ref_pp_poly_variant x;;
    let pp_patt x = !ref_pp_patt x;;
    let pp_expr x = !ref_pp_expr x;;
    let pp_case_branch x = !ref_pp_case_branch x;;
    let pp_module_type x = !ref_pp_module_type x;;
    let pp_functor_parameter x = !ref_pp_functor_parameter x;;
    let pp_sig_item x = !ref_pp_sig_item x;;
    let pp_with_constr x = !ref_pp_with_constr x;;
    let pp_module_expr x = !ref_pp_module_expr x;;
    let pp_str_item x = !ref_pp_str_item x;;
    let pp_type_decl x = !ref_pp_type_decl x;;
    let pp_generic_constructor x = !ref_pp_generic_constructor x;;
    let pp_extension_constructor x = !ref_pp_extension_constructor x;;
    let pp_type_extension x = !ref_pp_type_extension x;;
    let pp_class_type x = !ref_pp_class_type x;;
    let pp_class_sig_item x = !ref_pp_class_sig_item x;;
    let pp_class_expr x = !ref_pp_class_expr x;;
    let pp_class_str_item x = !ref_pp_class_str_item x;;
    let pp_longid_lident x = !ref_pp_longid_lident x;;
    let pp_payload x = !ref_pp_payload x;;
    let pp_attribute_body x = !ref_pp_attribute_body x;;
    let pp_attribute x = !ref_pp_attribute x;;
    let pp_attributes_no_anti x = !ref_pp_attributes_no_anti x;;
    let pp_attributes x = !ref_pp_attributes x;;
    let show_fun ppf x = Format.asprintf "%a" ppf x;;
    let show_loc x = show_fun pp_loc x;;
    let show_type_var x = show_fun pp_type_var x;;
    let show_longid x = show_fun pp_longid x;;
    let show_ctyp x = show_fun pp_ctyp x;;
    let show_poly_variant x = show_fun pp_poly_variant x;;
    let show_patt x = show_fun pp_patt x;;
    let show_expr x = show_fun pp_expr x;;
    let show_case_branch x = show_fun pp_case_branch x;;
    let show_module_type x = show_fun pp_module_type x;;
    let show_functor_parameter x = show_fun pp_functor_parameter x;;
    let show_sig_item x = show_fun pp_sig_item x;;
    let show_with_constr x = show_fun pp_with_constr x;;
    let show_module_expr x = show_fun pp_module_expr x;;
    let show_str_item x = show_fun pp_str_item x;;
    let show_type_decl x = show_fun pp_type_decl x;;
    let show_generic_constructor x = show_fun pp_generic_constructor x;;
    let show_extension_constructor x = show_fun pp_extension_constructor x;;
    let show_type_extension x = show_fun pp_type_extension x;;
    let show_class_type x = show_fun pp_class_type x;;
    let show_class_sig_item x = show_fun pp_class_sig_item x;;
    let show_class_expr x = show_fun pp_class_expr x;;
    let show_class_str_item x = show_fun pp_class_str_item x;;
    let show_longid_lident x = show_fun pp_longid_lident x;;
    let show_payload x = show_fun pp_payload x;;
    let show_attribute_body x = show_fun pp_attribute_body x;;
    let show_attribute x = show_fun pp_attribute x;;
    let show_attributes_no_anti x = show_fun pp_attributes_no_anti x;;
    let show_attributes x = show_fun pp_attributes x;;
  end
;;

module Pp_outcometree =
  struct
    let ref_pp_out_sig_item =
      ref
        (fun pps (x : Outcometree.out_sig_item) ->
           Format.fprintf pps "<unrecognized out_sig_item>")
    ;;
    let pp_out_sig_item x = !ref_pp_out_sig_item x;;
    let show_out_sig_item x = Pp_MLast.show_fun pp_out_sig_item x;;
  end
;;