forked from lpw25/bin-doc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
doctree.mli
140 lines (115 loc) · 3.81 KB
/
doctree.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
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
(***********************************************************************)
(* *)
(* 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 Q Public License version 1.0. *)
(* *)
(***********************************************************************)
(* Type declarations *)
type type_kind =
Dtype_abstract
| Dtype_variant of (string * Info.t option) list
| Dtype_record of (string * Info.t option) list
(* Type expressions for the class language *)
and class_type =
Dcty_constr
| Dcty_signature of class_signature
| Dcty_fun of class_type
and class_signature = class_type_field list
and class_type_field =
{ dctf_desc: class_type_field_desc;
dctf_info: Info.t option;
dctf_after_info: Info.t option; }
and class_type_field_desc =
Dctf_inher of class_type
| Dctf_val of string
| Dctf_meth of string
| Dctf_cstr
| Dctf_comment
| Dctf_stop
(* Value expressions for the class language *)
type class_expr =
Dcl_constr
| Dcl_structure of class_structure
| Dcl_fun of class_expr
| Dcl_apply of class_expr
| Dcl_let of class_expr
| Dcl_constraint of class_expr * class_type
and class_structure = class_field list
and class_field =
{ dcf_desc : class_field_desc;
dcf_info: Info.t option; }
and class_field_desc =
Dcf_inher of class_expr
| Dcf_val of string
| Dcf_meth of string
| Dcf_constr
| Dcf_init
| Dcf_comment
| Dcf_stop
(* Type expressions for the module language *)
and module_type =
Dmty_ident
| Dmty_signature of signature
| Dmty_functor of module_type * module_type
| Dmty_with of module_type
| Dmty_typeof of module_expr
and signature = signature_item list
and signature_item =
{ dsig_desc: signature_item_desc;
dsig_info: Info.t option;
dsig_after_info: Info.t option }
and signature_item_desc =
Dsig_value of string
| Dsig_type of string * type_kind
| Dsig_exception of string
| Dsig_module of string * module_type
| Dsig_recmodule of string * module_type
| Dsig_modtype of string * module_type option
| Dsig_open
| Dsig_include of module_type
| Dsig_class of string* class_type
| Dsig_class_type of string * class_type
| Dsig_comment
| Dsig_stop
(* Value expressions for the module language *)
and module_expr =
Dmod_ident
| Dmod_structure of structure
| Dmod_functor of module_type * module_expr
| Dmod_apply of module_expr * module_expr
| Dmod_constraint of module_expr * module_type
| Dmod_unpack
and structure = structure_item list
and structure_item =
{ dstr_desc : structure_item_desc;
dstr_info: Info.t option; }
and structure_item_desc =
Dstr_eval
| Dstr_value of string option
| Dstr_primitive of string
| Dstr_type of string * type_kind
| Dstr_exception of string
| Dstr_exn_rebind of string
| Dstr_module of string * module_expr
| Dstr_recmodule of string * module_type * module_expr
| Dstr_modtype of string * module_type
| Dstr_open
| Dstr_class of string * class_expr
| Dstr_class_type of string * class_type
| Dstr_include of module_expr
| Dstr_comment
| Dstr_stop
and interface =
{ dintf_items: signature_item list;
dintf_info: Info.t option; }
and implementation =
{ dimpl_items: structure_item list;
dimpl_info: Info.t option; }
and file =
Dfile_intf of interface
| Dfile_impl of implementation