summaryrefslogtreecommitdiffstats
path: root/ocamldoc/odoc_type.ml
diff options
context:
space:
mode:
authorAlain Frisch <alain@frisch.fr>2014-10-14 15:51:30 +0000
committerAlain Frisch <alain@frisch.fr>2014-10-14 15:51:30 +0000
commite3ad818fb5f8ddc7b477779a6da69ccac0f00f4f (patch)
tree9016f709d251804278be1a75f518787aa571904b /ocamldoc/odoc_type.ml
parenta4e637ea622cf33b4c0870a98c6b1db0090f8e38 (diff)
parent8da19ea098b270230a9f1e1d252350bd69cbf8ee (diff)
Reintegrate-merge constructors_with_record5 branch.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15556 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
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