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 * '-> 'variant value
                type 'a t = {
                  typename : 'Typename.t;
                  tags : 'a tag array;
                  polymorphic : bool;
                  value : '-> '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 -> '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 value
                val fold :
                  'a t -> init:'acc -> f:('acc -> 'a tag -> 'acc) -> 'acc
                val internal_use_only : '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 : '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 -> '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 : '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 * '-> 'variant value
              type 'a t = {
                typename : 'Typename.t;
                tags : 'a tag array;
                polymorphic : bool;
                value : '-> '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 -> '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 value
              val fold :
                'a t -> init:'acc -> f:('acc -> 'a tag -> 'acc) -> 'acc
              val internal_use_only : '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 : '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 -> '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 : '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.t -> 'B.t; }
        val map_variant :
          Type_generic.Helper.map -> 'A.Variant.t -> 'B.Variant.t
        val map_record :
          Type_generic.Helper.map -> 'A.Record.t -> '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 ->
        'Typename.t -> 'Type_generic.Named.t
      val get_wip_computation :
        'Type_generic.Named.t -> 'Type_generic.Named.computation
      val set_final_computation :
        'Type_generic.Named.t ->
        'Type_generic.Named.computation ->
        'Type_generic.Named.computation
      val share : '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 * '-> 'variant value
          type 'a t = {
            typename : 'Typename.t;
            tags : 'a tag array;
            polymorphic : bool;
            value : '-> '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 -> '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 value
          val fold : 'a t -> init:'acc -> f:('acc -> 'a tag -> 'acc) -> 'acc
          val internal_use_only : '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 : '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 -> '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 : '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 :
        'Type_generic.Computation.t -> 'a option Type_generic.Computation.t
      val list :
        'Type_generic.Computation.t -> 'a list Type_generic.Computation.t
      val array :
        'Type_generic.Computation.t -> 'a array Type_generic.Computation.t
      val lazy_t :
        'Type_generic.Computation.t -> 'a lazy_t Type_generic.Computation.t
      val ref_ :
        'Type_generic.Computation.t ->
        'Pervasives.ref Type_generic.Computation.t
      val function_ :
        'Type_generic.Computation.t ->
        'Type_generic.Computation.t ->
        ('-> 'b) Type_generic.Computation.t
      val tuple2 :
        'Type_generic.Computation.t ->
        'Type_generic.Computation.t -> ('a * 'b) Type_generic.Computation.t
      val tuple3 :
        'Type_generic.Computation.t ->
        'Type_generic.Computation.t ->
        'Type_generic.Computation.t ->
        ('a * 'b * 'c) Type_generic.Computation.t
      val tuple4 :
        'Type_generic.Computation.t ->
        'Type_generic.Computation.t ->
        'Type_generic.Computation.t ->
        'Type_generic.Computation.t ->
        ('a * 'b * 'c * 'd) Type_generic.Computation.t
      val tuple5 :
        'Type_generic.Computation.t ->
        'Type_generic.Computation.t ->
        'Type_generic.Computation.t ->
        'Type_generic.Computation.t ->
        'Type_generic.Computation.t ->
        ('a * 'b * 'c * 'd * 'e) Type_generic.Computation.t
      val record : 'Record.t -> 'Type_generic.Computation.t
      val variant : 'Variant.t -> 'Type_generic.Computation.t
      module Named :
        sig
          module Context : sig type t val create : unit -> t end
          type 'a t
          val init : Context.t -> 'Typename.t -> 'a t
          val get_wip_computation : 'a t -> 'a t
          val set_final_computation : 'a t -> 'a t -> 'a t
          val share : 'Std_internal.Typerep.t -> bool
        end
    end
  module Make_named_for_closure :
    functor
      (X : sig
             type 'a input
             type 'a output
             type 'a t =
                 'Type_generic.Make_named_for_closure.input ->
                 '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 -> 'Typename.t -> 'a t
        val get_wip_computation : 'a t -> 'X.t
        val set_final_computation : 'a t -> 'X.t -> 'X.t
        val share : 'Std_internal.Typerep.t -> bool
      end
  module Ident : sig type t end
  module type S =
    sig
      type 'a t
      type 'a computation = '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 :
            'Std_internal.Typerep.t -> 'a t Std_internal.Typerep.t
          val typename_of_t : '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 :
            'Std_internal.Typerep.t ->
            'Std_internal.Typerep.t -> ('a, 'b) t Std_internal.Typerep.t
          val typename_of_t :
            'Typename.t -> '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 :
            'Std_internal.Typerep.t ->
            'Std_internal.Typerep.t ->
            'Std_internal.Typerep.t ->
            ('a, 'b, 'c) t Std_internal.Typerep.t
          val typename_of_t :
            'Typename.t ->
            'Typename.t -> '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 :
            'Std_internal.Typerep.t ->
            'Std_internal.Typerep.t ->
            'Std_internal.Typerep.t ->
            'Std_internal.Typerep.t ->
            ('a, 'b, 'c, 'd) t Std_internal.Typerep.t
          val typename_of_t :
            'Typename.t ->
            'Typename.t ->
            'Typename.t -> '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 :
            'Std_internal.Typerep.t ->
            'Std_internal.Typerep.t ->
            'Std_internal.Typerep.t ->
            'Std_internal.Typerep.t ->
            'Std_internal.Typerep.t ->
            ('a, 'b, 'c, 'd, 'e) t Std_internal.Typerep.t
          val typename_of_t :
            'Typename.t ->
            'Typename.t ->
            'Typename.t ->
            'Typename.t ->
            '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 :
        'Std_internal.Typerep.t -> 'Type_generic.S.computation -> unit
      val of_typerep :
        'Std_internal.Typerep.t ->
        [ `generic of '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 * '-> 'variant value
              type 'a t = {
                typename : 'Typename.t;
                tags : 'a tag array;
                polymorphic : bool;
                value : '-> '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 -> '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 value
              val fold :
                'a t -> init:'acc -> f:('acc -> 'a tag -> 'acc) -> 'acc
              val internal_use_only : '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 : '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 -> '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 : '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 -> ('-> '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 : 'Record.t -> 'a t
          val variant : 'Variant.t -> 'a t
          module Named :
            sig
              module Context : sig type t val create : unit -> t end
              type 'a t
              val init : Context.t -> 'Typename.t -> 'a t
              val get_wip_computation : 'a t -> 'a t
              val set_final_computation : 'a t -> 'a t -> 'a t
              val share : '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 * '-> 'variant value
                 type 'a t = {
                   typename : 'Typename.t;
                   tags : 'a tag array;
                   polymorphic : bool;
                   value : '-> '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 -> '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 value
                 val fold :
                   'a t -> init:'acc -> f:('acc -> 'a tag -> 'acc) -> 'acc
                 val internal_use_only : '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 : '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 -> '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 : '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 -> ('-> '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 : 'Record.t -> 'a t
             val variant : 'Variant.t -> 'a t
             module Named :
               sig
                 module Context : sig type t val create : unit -> t end
                 type 'a t
                 val init : Context.t -> 'Typename.t -> 'a t
                 val get_wip_computation : 'a t -> 'a t
                 val set_final_computation : 'a t -> 'a t -> 'a t
                 val share : 'Std_internal.Typerep.t -> bool
               end
           end->
      sig
        type 'a t = '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 :
              'Std_internal.Typerep.t -> 'a t Std_internal.Typerep.t
            val typename_of_t : '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 :
              'Std_internal.Typerep.t ->
              'Std_internal.Typerep.t -> ('a, 'b) t Std_internal.Typerep.t
            val typename_of_t :
              'Typename.t -> '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 :
              'Std_internal.Typerep.t ->
              'Std_internal.Typerep.t ->
              'Std_internal.Typerep.t ->
              ('a, 'b, 'c) t Std_internal.Typerep.t
            val typename_of_t :
              'Typename.t ->
              'Typename.t -> '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 :
              'Std_internal.Typerep.t ->
              'Std_internal.Typerep.t ->
              'Std_internal.Typerep.t ->
              'Std_internal.Typerep.t ->
              ('a, 'b, 'c, 'd) t Std_internal.Typerep.t
            val typename_of_t :
              'Typename.t ->
              'Typename.t ->
              'Typename.t -> '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 :
              'Std_internal.Typerep.t ->
              'Std_internal.Typerep.t ->
              'Std_internal.Typerep.t ->
              'Std_internal.Typerep.t ->
              'Std_internal.Typerep.t ->
              ('a, 'b, 'c, 'd, 'e) t Std_internal.Typerep.t
            val typename_of_t :
              'Typename.t ->
              'Typename.t ->
              'Typename.t ->
              'Typename.t ->
              '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 : 'Std_internal.Typerep.t -> 'a computation -> unit
        val of_typerep :
          '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 * '-> 'variant value
                type 'a t = {
                  typename : 'Typename.t;
                  tags : 'a tag array;
                  polymorphic : bool;
                  value : '-> '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 -> '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 value
                val fold :
                  'a t -> init:'acc -> f:('acc -> 'a tag -> 'acc) -> 'acc
                val internal_use_only : '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 : '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 -> '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 : '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 -> ('-> '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 : 'Record.t -> 'a t
            val variant : 'Variant.t -> 'a t
            module Named :
              sig
                module Context : sig type t val create : unit -> t end
                type 'a t
                val init : Context.t -> 'Typename.t -> 'a t
                val get_wip_computation : 'a t -> 'a t
                val set_final_computation : 'a t -> 'a t -> 'a t
                val share : 'Std_internal.Typerep.t -> bool
              end
          end
      end
end