summaryrefslogtreecommitdiffstats
path: root/ocamldoc/odoc_type.ml
diff options
context:
space:
mode:
Diffstat (limited to 'ocamldoc/odoc_type.ml')
-rw-r--r--ocamldoc/odoc_type.ml20
1 files changed, 12 insertions, 8 deletions
diff --git a/ocamldoc/odoc_type.ml b/ocamldoc/odoc_type.ml
index dadc6b1ba..f9bd9cda1 100644
--- a/ocamldoc/odoc_type.ml
+++ b/ocamldoc/odoc_type.ml
@@ -17,14 +17,6 @@ module Name = Odoc_name
type private_flag = Asttypes.private_flag =
Private | Public
-(** Description of a variant type constructor. *)
-type variant_constructor = {
- vc_name : string ;
- vc_args : Types.type_expr list ; (** arguments of the constructor *)
- vc_ret : Types.type_expr option ;
- mutable vc_text : Odoc_types.info option ; (** optional user description *)
- }
-
(** Description of a record type field. *)
type record_field = {
rf_name : string ;
@@ -33,6 +25,18 @@ type record_field = {
mutable rf_text : Odoc_types.info option ; (** optional user description *)
}
+type constructor_args =
+ | Cstr_record of record_field list
+ | Cstr_tuple of Types.type_expr list
+
+(** Description of a variant type constructor. *)
+type variant_constructor = {
+ vc_name : string ;
+ vc_args : constructor_args ;
+ vc_ret : Types.type_expr option ;
+ mutable vc_text : Odoc_types.info option ; (** optional user description *)
+ }
+
(** The various kinds of type. *)
type type_kind =
Type_abstract