`sig
module Variant_and_record_intf :
sig
module M :
functor (X : sig type 'a t end) ->
sig
module Tag_internal :
sig
type ('variant, 'args) create =
Args of ('args -> 'variant)
| Const of 'variant
type ('variant, 'args) t = {
label : string;
rep : 'args X.t;
arity : int;
index : int;
ocaml_repr : int;
tyid : 'args Typename.t;
create : ('variant, 'args) create;
}
end
module Tag :
sig
type ('variant, 'args) create =
Args of ('args -> 'variant)
| Const of 'variant
type ('variant, 'args) t
val label : ('a, 'b) t -> string
val arity : ('a, 'b) t -> int
val index : ('a, 'b) t -> int
val ocaml_repr : ('a, 'b) t -> int
val create : ('variant, 'args) t -> ('variant, 'args) create
val tyid : ('a, 'args) t -> 'args Typename.t
val traverse : ('a, 'args) t -> 'args X.t
val internal_use_only : ('a, 'b) Tag_internal.t -> ('a, 'b) t
end
module Variant_internal :
sig
type _ tag = Tag : ('variant, 'a) Tag.t -> 'variant tag
type _ value =
Value : ('variant, 'a) Tag.t * 'a -> 'variant value
type 'a t = {
typename : 'a Typename.t;
tags : 'a tag array;
polymorphic : bool;
value : 'a -> 'a value;
}
end
module Variant :
sig
type _ tag = Tag : ('variant, 'args) Tag.t -> 'variant tag
type _ value =
Value : ('variant, 'args) Tag.t * 'args -> 'variant value
type 'a t
val typename_of_t : 'a t -> 'a Typename.t
val length : 'a t -> int
val tag : 'a t -> int -> 'a tag
val is_polymorphic : 'a t -> bool
val value : 'a t -> 'a -> 'a value
val fold :
'a t -> init:'acc -> f:('acc -> 'a tag -> 'acc) -> 'acc
val internal_use_only : 'a Variant_internal.t -> 'a t
end
module Field_internal :
sig
type ('record, 'field) t = {
label : string;
rep : 'field X.t;
index : int;
tyid : 'field Typename.t;
get : 'record -> 'field;
}
end
module Field :
sig
type ('record, 'field) t
val label : ('a, 'b) t -> string
val index : ('a, 'b) t -> int
val get : ('record, 'field) t -> 'record -> 'field
val tyid : ('a, 'field) t -> 'field Typename.t
val traverse : ('a, 'field) t -> 'field X.t
val internal_use_only :
('a, 'b) Field_internal.t -> ('a, 'b) t
end
module Record_internal :
sig
type _ field = Field : ('record, 'a) Field.t -> 'record field
type 'record fields = {
get : 'field. ('record, 'field) Field.t -> 'field;
}
type 'a t = {
typename : 'a Typename.t;
fields : 'a field array;
has_double_array_tag : bool;
create : 'a fields -> 'a;
}
end
module Record :
sig
type _ field = Field : ('record, 'a) Field.t -> 'record field
type 'record fields = {
get : 'field. ('record, 'field) Field.t -> 'field;
}
type 'a t
val typename_of_t : 'a t -> 'a Typename.t
val length : 'a t -> int
val field : 'a t -> int -> 'a field
val has_double_array_tag : 'a t -> bool
val create : 'a t -> 'a fields -> 'a
val fold :
'a t -> init:'acc -> f:('acc -> 'a field -> 'acc) -> 'acc
val internal_use_only : 'a Record_internal.t -> 'a t
end
end
module type S =
sig
type 'a t
module Tag_internal :
sig
type ('variant, 'args) create =
Args of ('args -> 'variant)
| Const of 'variant
type ('variant, 'args) t = {
label : string;
rep : 'args t;
arity : int;
index : int;
ocaml_repr : int;
tyid : 'args Typename.t;
create : ('variant, 'args) create;
}
end
module Tag :
sig
type ('variant, 'args) create =
Args of ('args -> 'variant)
| Const of 'variant
type ('variant, 'args) t
val label : ('a, 'b) t -> string
val arity : ('a, 'b) t -> int
val index : ('a, 'b) t -> int
val ocaml_repr : ('a, 'b) t -> int
val create : ('variant, 'args) t -> ('variant, 'args) create
val tyid : ('a, 'args) t -> 'args Typename.t
val traverse : ('a, 'args) t -> 'args t
val internal_use_only : ('a, 'b) Tag_internal.t -> ('a, 'b) t
end
module Variant_internal :
sig
type _ tag = Tag : ('variant, 'a) Tag.t -> 'variant tag
type _ value =
Value : ('variant, 'a) Tag.t * 'a -> 'variant value
type 'a t = {
typename : 'a Typename.t;
tags : 'a tag array;
polymorphic : bool;
value : 'a -> 'a value;
}
end
module Variant :
sig
type _ tag = Tag : ('variant, 'args) Tag.t -> 'variant tag
type _ value =
Value : ('variant, 'args) Tag.t * 'args -> 'variant value
type 'a t
val typename_of_t : 'a t -> 'a Typename.t
val length : 'a t -> int
val tag : 'a t -> int -> 'a tag
val is_polymorphic : 'a t -> bool
val value : 'a t -> 'a -> 'a value
val fold :
'a t -> init:'acc -> f:('acc -> 'a tag -> 'acc) -> 'acc
val internal_use_only : 'a Variant_internal.t -> 'a t
end
module Field_internal :
sig
type ('record, 'field) t = {
label : string;
rep : 'field t;
index : int;
tyid : 'field Typename.t;
get : 'record -> 'field;
}
end
module Field :
sig
type ('record, 'field) t
val label : ('a, 'b) t -> string
val index : ('a, 'b) t -> int
val get : ('record, 'field) t -> 'record -> 'field
val tyid : ('a, 'field) t -> 'field Typename.t
val traverse : ('a, 'field) t -> 'field t
val internal_use_only : ('a, 'b) Field_internal.t -> ('a, 'b) t
end
module Record_internal :
sig
type _ field = Field : ('record, 'a) Field.t -> 'record field
type 'record fields = {
get : 'field. ('record, 'field) Field.t -> 'field;
}
type 'a t = {
typename : 'a Typename.t;
fields : 'a field array;
has_double_array_tag : bool;
create : 'a fields -> 'a;
}
end
module Record :
sig
type _ field = Field : ('record, 'a) Field.t -> 'record field
type 'record fields = {
get : 'field. ('record, 'field) Field.t -> 'field;
}
type 'a t
val typename_of_t : 'a t -> 'a Typename.t
val length : 'a t -> int
val field : 'a t -> int -> 'a field
val has_double_array_tag : 'a t -> bool
val create : 'a t -> 'a fields -> 'a
val fold :
'a t -> init:'acc -> f:('acc -> 'a field -> 'acc) -> 'acc
val internal_use_only : 'a Record_internal.t -> 'a t
end
end
end
module Helper :
functor
(A : Variant_and_record_intf.S) (B : Variant_and_record_intf.S) ->
sig
type map = { map : 'a. 'a A.t -> 'a B.t; }
val map_variant :
Type_generic.Helper.map -> 'a A.Variant.t -> 'a B.Variant.t
val map_record :
Type_generic.Helper.map -> 'a A.Record.t -> 'a B.Record.t
end
module type Named =
sig
type 'a computation
module Context :
sig type t val create : unit -> Type_generic.Named.Context.t end
type 'a t
val init :
Type_generic.Named.Context.t ->
'a Typename.t -> 'a Type_generic.Named.t
val get_wip_computation :
'a Type_generic.Named.t -> 'a Type_generic.Named.computation
val set_final_computation :
'a Type_generic.Named.t ->
'a Type_generic.Named.computation ->
'a Type_generic.Named.computation
val share : 'a Std_internal.Typerep.t -> bool
end
module type Computation =
sig
type 'a t
module Tag_internal :
sig
type ('variant, 'args) create =
Args of ('args -> 'variant)
| Const of 'variant
type ('variant, 'args) t = {
label : string;
rep : 'args t;
arity : int;
index : int;
ocaml_repr : int;
tyid : 'args Typename.t;
create : ('variant, 'args) create;
}
end
module Tag :
sig
type ('variant, 'args) create =
Args of ('args -> 'variant)
| Const of 'variant
type ('variant, 'args) t
val label : ('a, 'b) t -> string
val arity : ('a, 'b) t -> int
val index : ('a, 'b) t -> int
val ocaml_repr : ('a, 'b) t -> int
val create : ('variant, 'args) t -> ('variant, 'args) create
val tyid : ('a, 'args) t -> 'args Typename.t
val traverse : ('a, 'args) t -> 'args t
val internal_use_only : ('a, 'b) Tag_internal.t -> ('a, 'b) t
end
module Variant_internal :
sig
type _ tag = Tag : ('variant, 'a) Tag.t -> 'variant tag
type _ value = Value : ('variant, 'a) Tag.t * 'a -> 'variant value
type 'a t = {
typename : 'a Typename.t;
tags : 'a tag array;
polymorphic : bool;
value : 'a -> 'a value;
}
end
module Variant :
sig
type _ tag = Tag : ('variant, 'args) Tag.t -> 'variant tag
type _ value =
Value : ('variant, 'args) Tag.t * 'args -> 'variant value
type 'a t
val typename_of_t : 'a t -> 'a Typename.t
val length : 'a t -> int
val tag : 'a t -> int -> 'a tag
val is_polymorphic : 'a t -> bool
val value : 'a t -> 'a -> 'a value
val fold : 'a t -> init:'acc -> f:('acc -> 'a tag -> 'acc) -> 'acc
val internal_use_only : 'a Variant_internal.t -> 'a t
end
module Field_internal :
sig
type ('record, 'field) t = {
label : string;
rep : 'field t;
index : int;
tyid : 'field Typename.t;
get : 'record -> 'field;
}
end
module Field :
sig
type ('record, 'field) t
val label : ('a, 'b) t -> string
val index : ('a, 'b) t -> int
val get : ('record, 'field) t -> 'record -> 'field
val tyid : ('a, 'field) t -> 'field Typename.t
val traverse : ('a, 'field) t -> 'field t
val internal_use_only : ('a, 'b) Field_internal.t -> ('a, 'b) t
end
module Record_internal :
sig
type _ field = Field : ('record, 'a) Field.t -> 'record field
type 'record fields = {
get : 'field. ('record, 'field) Field.t -> 'field;
}
type 'a t = {
typename : 'a Typename.t;
fields : 'a field array;
has_double_array_tag : bool;
create : 'a fields -> 'a;
}
end
module Record :
sig
type _ field = Field : ('record, 'a) Field.t -> 'record field
type 'record fields = {
get : 'field. ('record, 'field) Field.t -> 'field;
}
type 'a t
val typename_of_t : 'a t -> 'a Typename.t
val length : 'a t -> int
val field : 'a t -> int -> 'a field
val has_double_array_tag : 'a t -> bool
val create : 'a t -> 'a fields -> 'a
val fold :
'a t -> init:'acc -> f:('acc -> 'a field -> 'acc) -> 'acc
val internal_use_only : 'a Record_internal.t -> 'a t
end
val int : int Type_generic.Computation.t
val int32 : int32 Type_generic.Computation.t
val int64 : int64 Type_generic.Computation.t
val nativeint : nativeint Type_generic.Computation.t
val char : char Type_generic.Computation.t
val float : float Type_generic.Computation.t
val string : string Type_generic.Computation.t
val bool : bool Type_generic.Computation.t
val unit : unit Type_generic.Computation.t
val option :
'a Type_generic.Computation.t -> 'a option Type_generic.Computation.t
val list :
'a Type_generic.Computation.t -> 'a list Type_generic.Computation.t
val array :
'a Type_generic.Computation.t -> 'a array Type_generic.Computation.t
val lazy_t :
'a Type_generic.Computation.t -> 'a lazy_t Type_generic.Computation.t
val ref_ :
'a Type_generic.Computation.t ->
'a Pervasives.ref Type_generic.Computation.t
val function_ :
'a Type_generic.Computation.t ->
'b Type_generic.Computation.t ->
('a -> 'b) Type_generic.Computation.t
val tuple2 :
'a Type_generic.Computation.t ->
'b Type_generic.Computation.t -> ('a * 'b) Type_generic.Computation.t
val tuple3 :
'a Type_generic.Computation.t ->
'b Type_generic.Computation.t ->
'c Type_generic.Computation.t ->
('a * 'b * 'c) Type_generic.Computation.t
val tuple4 :
'a Type_generic.Computation.t ->
'b Type_generic.Computation.t ->
'c Type_generic.Computation.t ->
'd Type_generic.Computation.t ->
('a * 'b * 'c * 'd) Type_generic.Computation.t
val tuple5 :
'a Type_generic.Computation.t ->
'b Type_generic.Computation.t ->
'c Type_generic.Computation.t ->
'd Type_generic.Computation.t ->
'e Type_generic.Computation.t ->
('a * 'b * 'c * 'd * 'e) Type_generic.Computation.t
val record : 'a Record.t -> 'a Type_generic.Computation.t
val variant : 'a Variant.t -> 'a Type_generic.Computation.t
module Named :
sig
module Context : sig type t val create : unit -> t end
type 'a t
val init : Context.t -> 'a Typename.t -> 'a t
val get_wip_computation : 'a t -> 'a t
val set_final_computation : 'a t -> 'a t -> 'a t
val share : 'a Std_internal.Typerep.t -> bool
end
end
module Make_named_for_closure :
functor
(X : sig
type 'a input
type 'a output
type 'a t =
'a Type_generic.Make_named_for_closure.input ->
'a Type_generic.Make_named_for_closure.output
end) ->
sig
module Context : sig type t val create : unit -> t end
type 'a t
val init : Context.t -> 'a Typename.t -> 'a t
val get_wip_computation : 'a t -> 'a X.t
val set_final_computation : 'a t -> 'a X.t -> 'a X.t
val share : 'a Std_internal.Typerep.t -> bool
end
module Ident : sig type t end
module type S =
sig
type 'a t
type 'a computation = 'a Type_generic.S.t
val ident : Type_generic.Ident.t
exception Not_implemented of string * string
module type S0 =
sig
type t
val typerep_of_t : t Std_internal.Typerep.t
val typename_of_t : t Typename.t
val compute : t t
end
module type S1 =
sig
type 'a t
val typerep_of_t :
'a Std_internal.Typerep.t -> 'a t Std_internal.Typerep.t
val typename_of_t : 'a Typename.t -> 'a t Typename.t
val compute : 'a t -> 'a t t
end
module type S2 =
sig
type ('a, 'b) t
val typerep_of_t :
'a Std_internal.Typerep.t ->
'b Std_internal.Typerep.t -> ('a, 'b) t Std_internal.Typerep.t
val typename_of_t :
'a Typename.t -> 'b Typename.t -> ('a, 'b) t Typename.t
val compute : 'a t -> 'b t -> ('a, 'b) t t
end
module type S3 =
sig
type ('a, 'b, 'c) t
val typerep_of_t :
'a Std_internal.Typerep.t ->
'b Std_internal.Typerep.t ->
'c Std_internal.Typerep.t ->
('a, 'b, 'c) t Std_internal.Typerep.t
val typename_of_t :
'a Typename.t ->
'b Typename.t -> 'c Typename.t -> ('a, 'b, 'c) t Typename.t
val compute : 'a t -> 'b t -> 'c t -> ('a, 'b, 'c) t t
end
module type S4 =
sig
type ('a, 'b, 'c, 'd) t
val typerep_of_t :
'a Std_internal.Typerep.t ->
'b Std_internal.Typerep.t ->
'c Std_internal.Typerep.t ->
'd Std_internal.Typerep.t ->
('a, 'b, 'c, 'd) t Std_internal.Typerep.t
val typename_of_t :
'a Typename.t ->
'b Typename.t ->
'c Typename.t -> 'd Typename.t -> ('a, 'b, 'c, 'd) t Typename.t
val compute : 'a t -> 'b t -> 'c t -> 'd t -> ('a, 'b, 'c, 'd) t t
end
module type S5 =
sig
type ('a, 'b, 'c, 'd, 'e) t
val typerep_of_t :
'a Std_internal.Typerep.t ->
'b Std_internal.Typerep.t ->
'c Std_internal.Typerep.t ->
'd Std_internal.Typerep.t ->
'e Std_internal.Typerep.t ->
('a, 'b, 'c, 'd, 'e) t Std_internal.Typerep.t
val typename_of_t :
'a Typename.t ->
'b Typename.t ->
'c Typename.t ->
'd Typename.t ->
'e Typename.t -> ('a, 'b, 'c, 'd, 'e) t Typename.t
val compute :
'a t -> 'b t -> 'c t -> 'd t -> 'e t -> ('a, 'b, 'c, 'd, 'e) t t
end
val register0 : (module S0) -> unit
val register1 : (module S1) -> unit
val register2 : (module S2) -> unit
val register3 : (module S3) -> unit
val register4 : (module S4) -> unit
val register5 : (module S5) -> unit
val register :
'a Std_internal.Typerep.t -> 'a Type_generic.S.computation -> unit
val of_typerep :
'a Std_internal.Typerep.t ->
[ `generic of 'a Type_generic.S.computation ]
module Computation :
sig
type 'a t = 'a t
module Tag_internal :
sig
type ('variant, 'args) create =
Args of ('args -> 'variant)
| Const of 'variant
type ('variant, 'args) t = {
label : string;
rep : 'args t;
arity : int;
index : int;
ocaml_repr : int;
tyid : 'args Typename.t;
create : ('variant, 'args) create;
}
end
module Tag :
sig
type ('variant, 'args) create =
Args of ('args -> 'variant)
| Const of 'variant
type ('variant, 'args) t
val label : ('a, 'b) t -> string
val arity : ('a, 'b) t -> int
val index : ('a, 'b) t -> int
val ocaml_repr : ('a, 'b) t -> int
val create : ('variant, 'args) t -> ('variant, 'args) create
val tyid : ('a, 'args) t -> 'args Typename.t
val traverse : ('a, 'args) t -> 'args t
val internal_use_only : ('a, 'b) Tag_internal.t -> ('a, 'b) t
end
module Variant_internal :
sig
type _ tag = Tag : ('variant, 'a) Tag.t -> 'variant tag
type _ value =
Value : ('variant, 'a) Tag.t * 'a -> 'variant value
type 'a t = {
typename : 'a Typename.t;
tags : 'a tag array;
polymorphic : bool;
value : 'a -> 'a value;
}
end
module Variant :
sig
type _ tag = Tag : ('variant, 'args) Tag.t -> 'variant tag
type _ value =
Value : ('variant, 'args) Tag.t * 'args -> 'variant value
type 'a t
val typename_of_t : 'a t -> 'a Typename.t
val length : 'a t -> int
val tag : 'a t -> int -> 'a tag
val is_polymorphic : 'a t -> bool
val value : 'a t -> 'a -> 'a value
val fold :
'a t -> init:'acc -> f:('acc -> 'a tag -> 'acc) -> 'acc
val internal_use_only : 'a Variant_internal.t -> 'a t
end
module Field_internal :
sig
type ('record, 'field) t = {
label : string;
rep : 'field t;
index : int;
tyid : 'field Typename.t;
get : 'record -> 'field;
}
end
module Field :
sig
type ('record, 'field) t
val label : ('a, 'b) t -> string
val index : ('a, 'b) t -> int
val get : ('record, 'field) t -> 'record -> 'field
val tyid : ('a, 'field) t -> 'field Typename.t
val traverse : ('a, 'field) t -> 'field t
val internal_use_only : ('a, 'b) Field_internal.t -> ('a, 'b) t
end
module Record_internal :
sig
type _ field = Field : ('record, 'a) Field.t -> 'record field
type 'record fields = {
get : 'field. ('record, 'field) Field.t -> 'field;
}
type 'a t = {
typename : 'a Typename.t;
fields : 'a field array;
has_double_array_tag : bool;
create : 'a fields -> 'a;
}
end
module Record :
sig
type _ field = Field : ('record, 'a) Field.t -> 'record field
type 'record fields = {
get : 'field. ('record, 'field) Field.t -> 'field;
}
type 'a t
val typename_of_t : 'a t -> 'a Typename.t
val length : 'a t -> int
val field : 'a t -> int -> 'a field
val has_double_array_tag : 'a t -> bool
val create : 'a t -> 'a fields -> 'a
val fold :
'a t -> init:'acc -> f:('acc -> 'a field -> 'acc) -> 'acc
val internal_use_only : 'a Record_internal.t -> 'a t
end
val int : int t
val int32 : int32 t
val int64 : int64 t
val nativeint : nativeint t
val char : char t
val float : float t
val string : string t
val bool : bool t
val unit : unit t
val option : 'a t -> 'a option t
val list : 'a t -> 'a list t
val array : 'a t -> 'a array t
val lazy_t : 'a t -> 'a lazy_t t
val ref_ : 'a t -> 'a ref t
val function_ : 'a t -> 'b t -> ('a -> 'b) t
val tuple2 : 'a t -> 'b t -> ('a * 'b) t
val tuple3 : 'a t -> 'b t -> 'c t -> ('a * 'b * 'c) t
val tuple4 : 'a t -> 'b t -> 'c t -> 'd t -> ('a * 'b * 'c * 'd) t
val tuple5 :
'a t ->
'b t -> 'c t -> 'd t -> 'e t -> ('a * 'b * 'c * 'd * 'e) t
val record : 'a Record.t -> 'a t
val variant : 'a Variant.t -> 'a t
module Named :
sig
module Context : sig type t val create : unit -> t end
type 'a t
val init : Context.t -> 'a Typename.t -> 'a t
val get_wip_computation : 'a t -> 'a t
val set_final_computation : 'a t -> 'a t -> 'a t
val share : 'a Std_internal.Typerep.t -> bool
end
end
end
module Make :
functor
(X : sig
type 'a t
val name : string
val required : Type_generic.Ident.t list
module Tag_internal :
sig
type ('variant, 'args) create =
Args of ('args -> 'variant)
| Const of 'variant
type ('variant, 'args) t = {
label : string;
rep : 'args t;
arity : int;
index : int;
ocaml_repr : int;
tyid : 'args Typename.t;
create : ('variant, 'args) create;
}
end
module Tag :
sig
type ('variant, 'args) create =
Args of ('args -> 'variant)
| Const of 'variant
type ('variant, 'args) t
val label : ('a, 'b) t -> string
val arity : ('a, 'b) t -> int
val index : ('a, 'b) t -> int
val ocaml_repr : ('a, 'b) t -> int
val create : ('variant, 'args) t -> ('variant, 'args) create
val tyid : ('a, 'args) t -> 'args Typename.t
val traverse : ('a, 'args) t -> 'args t
val internal_use_only :
('a, 'b) Tag_internal.t -> ('a, 'b) t
end
module Variant_internal :
sig
type _ tag = Tag : ('variant, 'a) Tag.t -> 'variant tag
type _ value =
Value : ('variant, 'a) Tag.t * 'a -> 'variant value
type 'a t = {
typename : 'a Typename.t;
tags : 'a tag array;
polymorphic : bool;
value : 'a -> 'a value;
}
end
module Variant :
sig
type _ tag = Tag : ('variant, 'args) Tag.t -> 'variant tag
type _ value =
Value : ('variant, 'args) Tag.t *
'args -> 'variant value
type 'a t
val typename_of_t : 'a t -> 'a Typename.t
val length : 'a t -> int
val tag : 'a t -> int -> 'a tag
val is_polymorphic : 'a t -> bool
val value : 'a t -> 'a -> 'a value
val fold :
'a t -> init:'acc -> f:('acc -> 'a tag -> 'acc) -> 'acc
val internal_use_only : 'a Variant_internal.t -> 'a t
end
module Field_internal :
sig
type ('record, 'field) t = {
label : string;
rep : 'field t;
index : int;
tyid : 'field Typename.t;
get : 'record -> 'field;
}
end
module Field :
sig
type ('record, 'field) t
val label : ('a, 'b) t -> string
val index : ('a, 'b) t -> int
val get : ('record, 'field) t -> 'record -> 'field
val tyid : ('a, 'field) t -> 'field Typename.t
val traverse : ('a, 'field) t -> 'field t
val internal_use_only :
('a, 'b) Field_internal.t -> ('a, 'b) t
end
module Record_internal :
sig
type _ field =
Field : ('record, 'a) Field.t -> 'record field
type 'record fields = {
get : 'field. ('record, 'field) Field.t -> 'field;
}
type 'a t = {
typename : 'a Typename.t;
fields : 'a field array;
has_double_array_tag : bool;
create : 'a fields -> 'a;
}
end
module Record :
sig
type _ field =
Field : ('record, 'a) Field.t -> 'record field
type 'record fields = {
get : 'field. ('record, 'field) Field.t -> 'field;
}
type 'a t
val typename_of_t : 'a t -> 'a Typename.t
val length : 'a t -> int
val field : 'a t -> int -> 'a field
val has_double_array_tag : 'a t -> bool
val create : 'a t -> 'a fields -> 'a
val fold :
'a t -> init:'acc -> f:('acc -> 'a field -> 'acc) -> 'acc
val internal_use_only : 'a Record_internal.t -> 'a t
end
val int : int t
val int32 : int32 t
val int64 : int64 t
val nativeint : nativeint t
val char : char t
val float : float t
val string : string t
val bool : bool t
val unit : unit t
val option : 'a t -> 'a option t
val list : 'a t -> 'a list t
val array : 'a t -> 'a array t
val lazy_t : 'a t -> 'a lazy_t t
val ref_ : 'a t -> 'a ref t
val function_ : 'a t -> 'b t -> ('a -> 'b) t
val tuple2 : 'a t -> 'b t -> ('a * 'b) t
val tuple3 : 'a t -> 'b t -> 'c t -> ('a * 'b * 'c) t
val tuple4 :
'a t -> 'b t -> 'c t -> 'd t -> ('a * 'b * 'c * 'd) t
val tuple5 :
'a t ->
'b t -> 'c t -> 'd t -> 'e t -> ('a * 'b * 'c * 'd * 'e) t
val record : 'a Record.t -> 'a t
val variant : 'a Variant.t -> 'a t
module Named :
sig
module Context : sig type t val create : unit -> t end
type 'a t
val init : Context.t -> 'a Typename.t -> 'a t
val get_wip_computation : 'a t -> 'a t
val set_final_computation : 'a t -> 'a t -> 'a t
val share : 'a Std_internal.Typerep.t -> bool
end
end) ->
sig
type 'a t = 'a X.t
type 'a computation = 'a t
val ident : Ident.t
exception Not_implemented of string * string
module type S0 =
sig
type t
val typerep_of_t : t Std_internal.Typerep.t
val typename_of_t : t Typename.t
val compute : t t
end
module type S1 =
sig
type 'a t
val typerep_of_t :
'a Std_internal.Typerep.t -> 'a t Std_internal.Typerep.t
val typename_of_t : 'a Typename.t -> 'a t Typename.t
val compute : 'a t -> 'a t t
end
module type S2 =
sig
type ('a, 'b) t
val typerep_of_t :
'a Std_internal.Typerep.t ->
'b Std_internal.Typerep.t -> ('a, 'b) t Std_internal.Typerep.t
val typename_of_t :
'a Typename.t -> 'b Typename.t -> ('a, 'b) t Typename.t
val compute : 'a t -> 'b t -> ('a, 'b) t t
end
module type S3 =
sig
type ('a, 'b, 'c) t
val typerep_of_t :
'a Std_internal.Typerep.t ->
'b Std_internal.Typerep.t ->
'c Std_internal.Typerep.t ->
('a, 'b, 'c) t Std_internal.Typerep.t
val typename_of_t :
'a Typename.t ->
'b Typename.t -> 'c Typename.t -> ('a, 'b, 'c) t Typename.t
val compute : 'a t -> 'b t -> 'c t -> ('a, 'b, 'c) t t
end
module type S4 =
sig
type ('a, 'b, 'c, 'd) t
val typerep_of_t :
'a Std_internal.Typerep.t ->
'b Std_internal.Typerep.t ->
'c Std_internal.Typerep.t ->
'd Std_internal.Typerep.t ->
('a, 'b, 'c, 'd) t Std_internal.Typerep.t
val typename_of_t :
'a Typename.t ->
'b Typename.t ->
'c Typename.t -> 'd Typename.t -> ('a, 'b, 'c, 'd) t Typename.t
val compute :
'a t -> 'b t -> 'c t -> 'd t -> ('a, 'b, 'c, 'd) t t
end
module type S5 =
sig
type ('a, 'b, 'c, 'd, 'e) t
val typerep_of_t :
'a Std_internal.Typerep.t ->
'b Std_internal.Typerep.t ->
'c Std_internal.Typerep.t ->
'd Std_internal.Typerep.t ->
'e Std_internal.Typerep.t ->
('a, 'b, 'c, 'd, 'e) t Std_internal.Typerep.t
val typename_of_t :
'a Typename.t ->
'b Typename.t ->
'c Typename.t ->
'd Typename.t ->
'e Typename.t -> ('a, 'b, 'c, 'd, 'e) t Typename.t
val compute :
'a t ->
'b t -> 'c t -> 'd t -> 'e t -> ('a, 'b, 'c, 'd, 'e) t t
end
val register0 : (module S0) -> unit
val register1 : (module S1) -> unit
val register2 : (module S2) -> unit
val register3 : (module S3) -> unit
val register4 : (module S4) -> unit
val register5 : (module S5) -> unit
val register : 'a Std_internal.Typerep.t -> 'a computation -> unit
val of_typerep :
'a Std_internal.Typerep.t -> [ `generic of 'a computation ]
module Computation :
sig
type 'a t = 'a t
module Tag_internal :
sig
type ('variant, 'args) create =
Args of ('args -> 'variant)
| Const of 'variant
type ('variant, 'args) t = {
label : string;
rep : 'args t;
arity : int;
index : int;
ocaml_repr : int;
tyid : 'args Typename.t;
create : ('variant, 'args) create;
}
end
module Tag :
sig
type ('variant, 'args) create =
Args of ('args -> 'variant)
| Const of 'variant
type ('variant, 'args) t
val label : ('a, 'b) t -> string
val arity : ('a, 'b) t -> int
val index : ('a, 'b) t -> int
val ocaml_repr : ('a, 'b) t -> int
val create : ('variant, 'args) t -> ('variant, 'args) create
val tyid : ('a, 'args) t -> 'args Typename.t
val traverse : ('a, 'args) t -> 'args t
val internal_use_only : ('a, 'b) Tag_internal.t -> ('a, 'b) t
end
module Variant_internal :
sig
type _ tag = Tag : ('variant, 'a) Tag.t -> 'variant tag
type _ value =
Value : ('variant, 'a) Tag.t * 'a -> 'variant value
type 'a t = {
typename : 'a Typename.t;
tags : 'a tag array;
polymorphic : bool;
value : 'a -> 'a value;
}
end
module Variant :
sig
type _ tag = Tag : ('variant, 'args) Tag.t -> 'variant tag
type _ value =
Value : ('variant, 'args) Tag.t * 'args -> 'variant value
type 'a t
val typename_of_t : 'a t -> 'a Typename.t
val length : 'a t -> int
val tag : 'a t -> int -> 'a tag
val is_polymorphic : 'a t -> bool
val value : 'a t -> 'a -> 'a value
val fold :
'a t -> init:'acc -> f:('acc -> 'a tag -> 'acc) -> 'acc
val internal_use_only : 'a Variant_internal.t -> 'a t
end
module Field_internal :
sig
type ('record, 'field) t = {
label : string;
rep : 'field t;
index : int;
tyid : 'field Typename.t;
get : 'record -> 'field;
}
end
module Field :
sig
type ('record, 'field) t
val label : ('a, 'b) t -> string
val index : ('a, 'b) t -> int
val get : ('record, 'field) t -> 'record -> 'field
val tyid : ('a, 'field) t -> 'field Typename.t
val traverse : ('a, 'field) t -> 'field t
val internal_use_only :
('a, 'b) Field_internal.t -> ('a, 'b) t
end
module Record_internal :
sig
type _ field = Field : ('record, 'a) Field.t -> 'record field
type 'record fields = {
get : 'field. ('record, 'field) Field.t -> 'field;
}
type 'a t = {
typename : 'a Typename.t;
fields : 'a field array;
has_double_array_tag : bool;
create : 'a fields -> 'a;
}
end
module Record :
sig
type _ field = Field : ('record, 'a) Field.t -> 'record field
type 'record fields = {
get : 'field. ('record, 'field) Field.t -> 'field;
}
type 'a t
val typename_of_t : 'a t -> 'a Typename.t
val length : 'a t -> int
val field : 'a t -> int -> 'a field
val has_double_array_tag : 'a t -> bool
val create : 'a t -> 'a fields -> 'a
val fold :
'a t -> init:'acc -> f:('acc -> 'a field -> 'acc) -> 'acc
val internal_use_only : 'a Record_internal.t -> 'a t
end
val int : int t
val int32 : int32 t
val int64 : int64 t
val nativeint : nativeint t
val char : char t
val float : float t
val string : string t
val bool : bool t
val unit : unit t
val option : 'a t -> 'a option t
val list : 'a t -> 'a list t
val array : 'a t -> 'a array t
val lazy_t : 'a t -> 'a lazy_t t
val ref_ : 'a t -> 'a ref t
val function_ : 'a t -> 'b t -> ('a -> 'b) t
val tuple2 : 'a t -> 'b t -> ('a * 'b) t
val tuple3 : 'a t -> 'b t -> 'c t -> ('a * 'b * 'c) t
val tuple4 :
'a t -> 'b t -> 'c t -> 'd t -> ('a * 'b * 'c * 'd) t
val tuple5 :
'a t ->
'b t -> 'c t -> 'd t -> 'e t -> ('a * 'b * 'c * 'd * 'e) t
val record : 'a Record.t -> 'a t
val variant : 'a Variant.t -> 'a t
module Named :
sig
module Context : sig type t val create : unit -> t end
type 'a t
val init : Context.t -> 'a Typename.t -> 'a t
val get_wip_computation : 'a t -> 'a t
val set_final_computation : 'a t -> 'a t -> 'a t
val share : 'a Std_internal.Typerep.t -> bool
end
end
end
end`