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
|
type abstract
(** Some {e documentation}. *)
type alias = int
type private_ = private int
type 'a constructor = 'a
type arrow = int -> int
type higher_order = (int -> int) -> int
type labeled = l:int -> int
type optional = ?l:int -> int
type labeled_higher_order = (l:int -> int) -> (?l:int -> int) -> int
type pair = int * int
type parens_dropped = (int * int)
type triple = int * int * int
type nested_pair = (int * int) * int
type instance = int constructor
type long = labeled_higher_order -> [ `Bar | `Baz of triple] -> pair -> labeled -> higher_order -> (string -> int) -> (int * float * char * string * char * unit) option -> nested_pair -> arrow -> string -> nested_pair array
type variant_e = {a : int}
type variant =
| A
| B of int
| C (** foo *)
| D (** {e bar} *)
| E of variant_e
type variant_c = {a: int}
type _ gadt =
| A : int gadt
| B : int -> string gadt
| C : variant_c -> unit gadt
type degenerate_gadt =
| A : degenerate_gadt
type private_variant = private A
type record = {
a : int;
mutable b : int;
c : int; (** foo *)
d : int; (** {e bar} *)
e : 'a. 'a;
}
(* 4.02 doesn't preserve doc comments on polymorphic variant constructors, but
they should be restored if 4.02 support is dropped, or if creating a test
that won't run on 4.02. *)
type polymorphic_variant = [
| `A
| `B of int
| `C of int * unit
| `D
]
type polymorphic_variant_extension = [
| polymorphic_variant (** {not e} shown *)
| `E
]
type nested_polymorphic_variant = [
| `A of [ `B | `C ]
]
type private_extenion = private [> polymorphic_variant ]
type object_ = <
a : int;
b : int; (** foo *)
c : int; (** {e bar} *)
>
module type X = sig type t type u end
type module_ = (module X)
type module_substitution = (module X with type t = int and type u = unit)
type +'a covariant
type -'a contravariant
type _ bivariant = int
type ('a, 'b) binary
type using_binary = (int, int) binary
type 'custom name
type 'a constrained = 'a constraint 'a = int
type 'a exact_variant = 'a constraint 'a = [ `A | `B of int ]
type 'a lower_variant = 'a constraint 'a = [> `A | `B of int ]
type 'a any_variant = 'a constraint 'a = [> ]
type 'a upper_variant = 'a constraint 'a = [< `A | `B of int ]
type 'a named_variant = 'a constraint 'a = [< polymorphic_variant ]
type 'a exact_object = 'a constraint 'a = <a : int; b : int>
type 'a lower_object = 'a constraint 'a = <a : int; b : int; ..>
type 'a poly_object = 'a constraint 'a = <a : 'a. 'a>
type ('a, 'b) double_constrained = 'a * 'b
constraint 'a = int
constraint 'b = unit
type as_ = (int as 'a) * 'a
type extensible = ..
type extensible +=
| Extension (** Documentation for {!Extension}. *)
| Another_extension (** Documentation for {!Another_extension}. *)
type mutually = A of recursive
and recursive = B of mutually
(* Not a type, but analogous to extensions. *)
exception Foo of int * int
|