sig
  module ISet :
    sig
      type t = (int * int) AvlTree.tree
      type elt = int
      val empty : Main.Type.ISet.t
      val is_empty : Main.Type.ISet.t -> bool
      val mem : int -> Main.Type.ISet.t -> bool
      val add : int -> Main.Type.ISet.t -> Main.Type.ISet.t
      val add_range : int -> int -> Main.Type.ISet.t -> Main.Type.ISet.t
      val singleton : int -> Main.Type.ISet.t
      val remove : int -> Main.Type.ISet.t -> Main.Type.ISet.t
      val remove_range : int -> int -> Main.Type.ISet.t -> Main.Type.ISet.t
      val union : Main.Type.ISet.t -> Main.Type.ISet.t -> Main.Type.ISet.t
      val inter : Main.Type.ISet.t -> Main.Type.ISet.t -> Main.Type.ISet.t
      val diff : Main.Type.ISet.t -> Main.Type.ISet.t -> Main.Type.ISet.t
      val compl : Main.Type.ISet.t -> Main.Type.ISet.t
      val compare : Main.Type.ISet.t -> Main.Type.ISet.t -> int
      val equal : Main.Type.ISet.t -> Main.Type.ISet.t -> bool
      val subset : Main.Type.ISet.t -> Main.Type.ISet.t -> bool
      val from : int -> Main.Type.ISet.t -> Main.Type.ISet.t
      val after : int -> Main.Type.ISet.t -> Main.Type.ISet.t
      val until : int -> Main.Type.ISet.t -> Main.Type.ISet.t
      val before : int -> Main.Type.ISet.t -> Main.Type.ISet.t
      val iter : (int -> unit) -> Main.Type.ISet.t -> unit
      val iter_range : (int -> int -> unit) -> Main.Type.ISet.t -> unit
      val fold : (int -> '-> 'a) -> Main.Type.ISet.t -> '-> 'a
      val fold_range :
        (int -> int -> '-> 'a) -> Main.Type.ISet.t -> '-> 'a
      val for_all : (int -> bool) -> Main.Type.ISet.t -> bool
      val exists : (int -> bool) -> Main.Type.ISet.t -> bool
      val filter : (int -> bool) -> Main.Type.ISet.t -> Main.Type.ISet.t
      val partition :
        (int -> bool) ->
        Main.Type.ISet.t -> Main.Type.ISet.t * Main.Type.ISet.t
      val cardinal : Main.Type.ISet.t -> int
      val elements : Main.Type.ISet.t -> int list
      val ranges : Main.Type.ISet.t -> (int * int) list
      val min_elt : Main.Type.ISet.t -> int
      val max_elt : Main.Type.ISet.t -> int
      val choose : Main.Type.ISet.t -> int
    end
  module IMap :
    sig
      type 'a t = (int * int * 'a) AvlTree.tree
      type key = int
      val empty : 'Main.Type.IMap.t
      val is_empty : 'Main.Type.IMap.t -> bool
      val add :
        ?eq:('-> '-> bool) ->
        int -> '-> 'Main.Type.IMap.t -> 'Main.Type.IMap.t
      val add_range :
        ?eq:('-> '-> bool) ->
        int -> int -> '-> 'Main.Type.IMap.t -> 'Main.Type.IMap.t
      val find : int -> 'Main.Type.IMap.t -> 'a
      val remove : int -> 'Main.Type.IMap.t -> 'Main.Type.IMap.t
      val remove_range :
        int -> int -> 'Main.Type.IMap.t -> 'Main.Type.IMap.t
      val from : int -> 'Main.Type.IMap.t -> 'Main.Type.IMap.t
      val after : int -> 'Main.Type.IMap.t -> 'Main.Type.IMap.t
      val until : int -> 'Main.Type.IMap.t -> 'Main.Type.IMap.t
      val before : int -> 'Main.Type.IMap.t -> 'Main.Type.IMap.t
      val mem : int -> 'Main.Type.IMap.t -> bool
      val iter : (int -> '-> unit) -> 'Main.Type.IMap.t -> unit
      val iter_range :
        (int -> int -> '-> unit) -> 'Main.Type.IMap.t -> unit
      val map :
        ?eq:('-> '-> bool) ->
        ('-> 'a) -> 'Main.Type.IMap.t -> 'Main.Type.IMap.t
      val mapi :
        ?eq:('-> '-> bool) ->
        (int -> '-> 'a) -> 'Main.Type.IMap.t -> 'Main.Type.IMap.t
      val fold : (int -> '-> '-> 'b) -> 'Main.Type.IMap.t -> '-> 'b
      val fold_range :
        (int -> int -> '-> '-> 'b) -> 'Main.Type.IMap.t -> '-> 'b
      val set_to_map : Main.Type.ISet.t -> '-> 'Main.Type.IMap.t
      val domain : 'Main.Type.IMap.t -> Main.Type.ISet.t
      val map_to_set :
        ('-> bool) -> 'Main.Type.IMap.t -> Main.Type.ISet.t
    end
  module XArray :
    sig
      type 'a xarray
      type 'a t = 'Main.Type.XArray.xarray
      val init :
        ?bufsize:int ->
        int -> '-> (int -> 'a) -> 'Main.Type.XArray.xarray
      val make : ?bufsize:int -> int -> '-> 'Main.Type.XArray.xarray
      val length : 'Main.Type.XArray.xarray -> int
      val get : 'Main.Type.XArray.xarray -> int -> 'a
      val set : 'Main.Type.XArray.xarray -> int -> '-> unit
      type index
      val nth : 'Main.Type.XArray.xarray -> int -> Main.Type.XArray.index
      val first : 'Main.Type.XArray.xarray -> Main.Type.XArray.index
      val last : 'Main.Type.XArray.xarray -> Main.Type.XArray.index
      val look : 'Main.Type.XArray.xarray -> Main.Type.XArray.index -> 'a
      val next :
        'Main.Type.XArray.t ->
        Main.Type.XArray.index -> Main.Type.XArray.index
      val prev :
        'Main.Type.XArray.t ->
        Main.Type.XArray.index -> Main.Type.XArray.index
      val move :
        'Main.Type.XArray.t ->
        Main.Type.XArray.index -> int -> Main.Type.XArray.index
      val out_of_range :
        'Main.Type.XArray.xarray -> Main.Type.XArray.index -> bool
      val compare_index :
        'Main.Type.XArray.xarray ->
        Main.Type.XArray.index -> Main.Type.XArray.index -> int
      val clear : 'Main.Type.XArray.xarray -> unit
      val reset : 'Main.Type.XArray.xarray -> unit
      val copy : 'Main.Type.XArray.xarray -> 'Main.Type.XArray.xarray
      val sub :
        'Main.Type.XArray.xarray ->
        int -> int -> 'Main.Type.XArray.xarray
      val add_element : 'Main.Type.XArray.xarray -> '-> unit
      val add_array : 'Main.Type.XArray.xarray -> 'a array -> unit
      val add_xarray :
        'Main.Type.XArray.xarray -> 'Main.Type.XArray.xarray -> unit
      val append :
        'Main.Type.XArray.xarray ->
        'Main.Type.XArray.xarray -> 'Main.Type.XArray.xarray
      val iter : ('-> unit) -> 'Main.Type.XArray.xarray -> unit
      val array_of : 'Main.Type.XArray.xarray -> 'a array
      val shrink : 'Main.Type.XArray.xarray -> int -> unit
    end
  module OOChannel :
    sig
      class type ['a] obj_input_channel =
        object method close_in : unit -> unit method get : unit -> 'end
      class type ['a] obj_output_channel =
        object
          method close_out : unit -> unit
          method flush : unit -> unit
          method put : '-> unit
        end
      class ['a] channel_of_stream : 'Stream.t -> ['a] obj_input_channel
      val stream_of_channel :
        '#Main.Type.OOChannel.obj_input_channel -> 'Stream.t
      class type char_input_channel =
        object
          method close_in : unit -> unit
          method input : string -> int -> int -> int
        end
      class type char_output_channel =
        object
          method close_out : unit -> unit
          method flush : unit -> unit
          method output : string -> int -> int -> int
        end
      class char_input_channel_of :
        char #Main.Type.OOChannel.obj_input_channel -> char_input_channel
      class char_obj_input_channel_of :
        Main.Type.OOChannel.char_input_channel -> [char] obj_input_channel
      class char_output_channel_of :
        char #Main.Type.OOChannel.obj_output_channel -> char_output_channel
      class char_obj_output_channel_of :
        Main.Type.OOChannel.char_output_channel -> [char] obj_output_channel
      class of_in_channel : Pervasives.in_channel -> char_input_channel
      class of_out_channel : Pervasives.out_channel -> char_output_channel
    end
  module UChar :
    sig
      type t
      exception Out_of_range
      val char_of : Main.Type.UChar.t -> char
      val of_char : char -> Main.Type.UChar.t
      val code : Main.Type.UChar.t -> int
      val chr : int -> Main.Type.UChar.t
      external uint_code : Main.Type.UChar.t -> int = "%identity"
      val chr_of_uint : int -> Main.Type.UChar.t
      val eq : Main.Type.UChar.t -> Main.Type.UChar.t -> bool
      val compare : Main.Type.UChar.t -> Main.Type.UChar.t -> int
      type uchar = Main.Type.UChar.t
      val int_of : Main.Type.UChar.uchar -> int
      val of_int : int -> Main.Type.UChar.uchar
    end
  module USet :
    sig
      type t
      val empty : Main.Type.USet.t
      val is_empty : Main.Type.USet.t -> bool
      val mem : Main.Type.UChar.t -> Main.Type.USet.t -> bool
      val add : Main.Type.UChar.t -> Main.Type.USet.t -> Main.Type.USet.t
      val add_range :
        Main.Type.UChar.t ->
        Main.Type.UChar.t -> Main.Type.USet.t -> Main.Type.USet.t
      val singleton : Main.Type.UChar.t -> Main.Type.USet.t
      val remove : Main.Type.UChar.t -> Main.Type.USet.t -> Main.Type.USet.t
      val remove_range :
        Main.Type.UChar.t ->
        Main.Type.UChar.t -> Main.Type.USet.t -> Main.Type.USet.t
      val union : Main.Type.USet.t -> Main.Type.USet.t -> Main.Type.USet.t
      val inter : Main.Type.USet.t -> Main.Type.USet.t -> Main.Type.USet.t
      val diff : Main.Type.USet.t -> Main.Type.USet.t -> Main.Type.USet.t
      val compl : Main.Type.USet.t -> Main.Type.USet.t
      val compare : Main.Type.USet.t -> Main.Type.USet.t -> int
      val equal : Main.Type.USet.t -> Main.Type.USet.t -> bool
      val subset : Main.Type.USet.t -> Main.Type.USet.t -> bool
      val from : Main.Type.UChar.t -> Main.Type.USet.t -> Main.Type.USet.t
      val after : Main.Type.UChar.t -> Main.Type.USet.t -> Main.Type.USet.t
      val until : Main.Type.UChar.t -> Main.Type.USet.t -> Main.Type.USet.t
      val before : Main.Type.UChar.t -> Main.Type.USet.t -> Main.Type.USet.t
      val iter : (Main.Type.UChar.t -> unit) -> Main.Type.USet.t -> unit
      val iter_range :
        (Main.Type.UChar.t -> Main.Type.UChar.t -> unit) ->
        Main.Type.USet.t -> unit
      val fold :
        (Main.Type.UChar.t -> '-> 'a) -> Main.Type.USet.t -> '-> 'a
      val fold_range :
        (Main.Type.UChar.t -> Main.Type.UChar.t -> '-> 'a) ->
        Main.Type.USet.t -> '-> 'a
      val for_all : (Main.Type.UChar.t -> bool) -> Main.Type.USet.t -> bool
      val exists : (Main.Type.UChar.t -> bool) -> Main.Type.USet.t -> bool
      val filter :
        (Main.Type.UChar.t -> bool) -> Main.Type.USet.t -> Main.Type.USet.t
      val partition :
        (Main.Type.UChar.t -> bool) ->
        Main.Type.USet.t -> Main.Type.USet.t * Main.Type.USet.t
      val cardinal : Main.Type.USet.t -> int
      val elements : Main.Type.USet.t -> Main.Type.UChar.t list
      val ranges :
        Main.Type.USet.t -> (Main.Type.UChar.t * Main.Type.UChar.t) list
      val min_elt : Main.Type.USet.t -> Main.Type.UChar.t
      val max_elt : Main.Type.USet.t -> Main.Type.UChar.t
      val choose : Main.Type.USet.t -> Main.Type.UChar.t
      val uset_of_iset : Main.Type.ISet.t -> Main.Type.USet.t
      val iset_of_uset : Main.Type.USet.t -> Main.Type.ISet.t
    end
  module UMap :
    sig
      type 'a t
      val empty : 'Main.Type.UMap.t
      val is_empty : 'Main.Type.UMap.t -> bool
      val add :
        ?eq:('-> '-> bool) ->
        Main.Type.UChar.t -> '-> 'Main.Type.UMap.t -> 'Main.Type.UMap.t
      val add_range :
        ?eq:('-> '-> bool) ->
        Main.Type.UChar.t ->
        Main.Type.UChar.t -> '-> 'Main.Type.UMap.t -> 'Main.Type.UMap.t
      val find : Main.Type.UChar.t -> 'Main.Type.UMap.t -> 'a
      val remove :
        Main.Type.UChar.t -> 'Main.Type.UMap.t -> 'Main.Type.UMap.t
      val remove_range :
        Main.Type.UChar.t ->
        Main.Type.UChar.t -> 'Main.Type.UMap.t -> 'Main.Type.UMap.t
      val from :
        Main.Type.UChar.t -> 'Main.Type.UMap.t -> 'Main.Type.UMap.t
      val after :
        Main.Type.UChar.t -> 'Main.Type.UMap.t -> 'Main.Type.UMap.t
      val until :
        Main.Type.UChar.t -> 'Main.Type.UMap.t -> 'Main.Type.UMap.t
      val before :
        Main.Type.UChar.t -> 'Main.Type.UMap.t -> 'Main.Type.UMap.t
      val mem : Main.Type.UChar.t -> 'Main.Type.UMap.t -> bool
      val iter :
        (Main.Type.UChar.t -> '-> unit) -> 'Main.Type.UMap.t -> unit
      val iter_range :
        (Main.Type.UChar.t -> Main.Type.UChar.t -> '-> unit) ->
        'Main.Type.UMap.t -> unit
      val map :
        ?eq:('-> '-> bool) ->
        ('-> 'a) -> 'Main.Type.UMap.t -> 'Main.Type.UMap.t
      val mapi :
        ?eq:('-> '-> bool) ->
        (Main.Type.UChar.t -> '-> 'a) ->
        'Main.Type.UMap.t -> 'Main.Type.UMap.t
      val fold :
        (Main.Type.UChar.t -> '-> '-> 'b) ->
        'Main.Type.UMap.t -> '-> 'b
      val fold_range :
        (Main.Type.UChar.t -> Main.Type.UChar.t -> '-> '-> 'b) ->
        'Main.Type.UMap.t -> '-> 'b
      val set_to_map : Main.Type.USet.t -> '-> 'Main.Type.UMap.t
      val domain : 'Main.Type.UMap.t -> Main.Type.USet.t
      val map_to_set :
        ('-> bool) -> 'Main.Type.UMap.t -> Main.Type.USet.t
      val umap_of_imap : 'Main.Type.IMap.t -> 'Main.Type.UMap.t
      val imap_of_umap : 'Main.Type.UMap.t -> 'Main.Type.IMap.t
    end
  module UCharTbl :
    sig
      type 'a tbl
      type 'a t = 'Main.Type.UCharTbl.tbl
      val get : 'Main.Type.UCharTbl.tbl -> Main.Type.UChar.t -> 'a
      module type Type =
        sig
          type elt
          type t = Main.Type.UCharTbl.Type.elt Main.Type.UCharTbl.tbl
          val get :
            Main.Type.UCharTbl.Type.elt Main.Type.UCharTbl.tbl ->
            Main.Type.UChar.t -> Main.Type.UCharTbl.Type.elt
          val of_map :
            Main.Type.UCharTbl.Type.elt ->
            Main.Type.UCharTbl.Type.elt Main.Type.UMap.t ->
            Main.Type.UCharTbl.Type.t
        end
      module Make :
        functor (H : Hashtbl.HashedType->
          sig
            type elt = H.t
            type t = elt tbl
            val get : elt tbl -> UChar.t -> elt
            val of_map : elt -> elt UMap.t -> t
          end
      module Bool :
        sig
          type t
          val get : Main.Type.UCharTbl.Bool.t -> Main.Type.UChar.t -> bool
          val of_set : Main.Type.USet.t -> Main.Type.UCharTbl.Bool.t
        end
      module Bits :
        sig
          type t
          val of_map :
            int -> int Main.Type.UMap.t -> Main.Type.UCharTbl.Bits.t
          val get : Main.Type.UCharTbl.Bits.t -> Main.Type.UChar.t -> int
        end
      module Bytes :
        sig
          type t
          val of_map :
            int -> int Main.Type.UMap.t -> Main.Type.UCharTbl.Bytes.t
          val get : Main.Type.UCharTbl.Bytes.t -> Main.Type.UChar.t -> int
        end
      module Char :
        sig
          type t
          val of_map :
            char -> char Main.Type.UMap.t -> Main.Type.UCharTbl.Char.t
          val get : Main.Type.UCharTbl.Char.t -> Main.Type.UChar.t -> char
        end
    end
  module UnicodeString :
    sig
      module type Type =
        sig
          type t
          val get :
            Main.Type.UnicodeString.Type.t -> int -> Main.Type.UChar.t
          val init :
            int ->
            (int -> Main.Type.UChar.t) -> Main.Type.UnicodeString.Type.t
          val length : Main.Type.UnicodeString.Type.t -> int
          type index
          val look :
            Main.Type.UnicodeString.Type.t ->
            Main.Type.UnicodeString.Type.index -> Main.Type.UChar.t
          val nth :
            Main.Type.UnicodeString.Type.t ->
            int -> Main.Type.UnicodeString.Type.index
          val next :
            Main.Type.UnicodeString.Type.t ->
            Main.Type.UnicodeString.Type.index ->
            Main.Type.UnicodeString.Type.index
          val prev :
            Main.Type.UnicodeString.Type.t ->
            Main.Type.UnicodeString.Type.index ->
            Main.Type.UnicodeString.Type.index
          val out_of_range :
            Main.Type.UnicodeString.Type.t ->
            Main.Type.UnicodeString.Type.index -> bool
          val iter :
            (Main.Type.UChar.t -> unit) ->
            Main.Type.UnicodeString.Type.t -> unit
          val compare :
            Main.Type.UnicodeString.Type.t ->
            Main.Type.UnicodeString.Type.t -> int
          val first :
            Main.Type.UnicodeString.Type.t ->
            Main.Type.UnicodeString.Type.index
          val last :
            Main.Type.UnicodeString.Type.t ->
            Main.Type.UnicodeString.Type.index
          val move :
            Main.Type.UnicodeString.Type.t ->
            Main.Type.UnicodeString.Type.index ->
            int -> Main.Type.UnicodeString.Type.index
          val compare_index :
            Main.Type.UnicodeString.Type.t ->
            Main.Type.UnicodeString.Type.index ->
            Main.Type.UnicodeString.Type.index -> int
          module Buf :
            sig
              type buf
              val create : int -> Main.Type.UnicodeString.Type.Buf.buf
              val contents :
                Main.Type.UnicodeString.Type.Buf.buf ->
                Main.Type.UnicodeString.Type.t
              val clear : Main.Type.UnicodeString.Type.Buf.buf -> unit
              val reset : Main.Type.UnicodeString.Type.Buf.buf -> unit
              val add_char :
                Main.Type.UnicodeString.Type.Buf.buf ->
                Main.Type.UChar.t -> unit
              val add_string :
                Main.Type.UnicodeString.Type.Buf.buf ->
                Main.Type.UnicodeString.Type.t -> unit
              val add_buffer :
                Main.Type.UnicodeString.Type.Buf.buf ->
                Main.Type.UnicodeString.Type.Buf.buf -> unit
            end
        end
    end
  module UText :
    sig
      type mutability = [ `Immutable | `Mutable ]
      type 'a text
      type utext = [ `Immutable ] Main.Type.UText.text
      type ustring = [ `Mutable ] Main.Type.UText.text
      type t = Main.Type.UText.utext
      val utext_of_ustring : Main.Type.UText.ustring -> Main.Type.UText.utext
      val ustring_of_utext : Main.Type.UText.utext -> Main.Type.UText.ustring
      val get : 'Main.Type.UText.text -> int -> Main.Type.UChar.t
      val set : Main.Type.UText.ustring -> int -> Main.Type.UChar.t -> unit
      type index
      val look :
        'Main.Type.UText.text -> Main.Type.UText.index -> Main.Type.UChar.t
      val nth : 'Main.Type.UText.text -> int -> Main.Type.UText.index
      val first : 'Main.Type.UText.text -> Main.Type.UText.index
      val last : 'Main.Type.UText.text -> Main.Type.UText.index
      val out_of_range :
        'Main.Type.UText.text -> Main.Type.UText.index -> bool
      val compare_index :
        'Main.Type.UText.text ->
        Main.Type.UText.index -> Main.Type.UText.index -> int
      val next :
        'Main.Type.UText.text ->
        Main.Type.UText.index -> Main.Type.UText.index
      val prev :
        'Main.Type.UText.text ->
        Main.Type.UText.index -> Main.Type.UText.index
      val move :
        'Main.Type.UText.text ->
        Main.Type.UText.index -> int -> Main.Type.UText.index
      val length : 'Main.Type.UText.text -> int
      val of_string : string -> Main.Type.UText.utext
      val init : int -> (int -> Main.Type.UChar.t) -> Main.Type.UText.utext
      val init_ustring :
        int -> (int -> Main.Type.UChar.t) -> Main.Type.UText.ustring
      val make : int -> Main.Type.UChar.t -> Main.Type.UText.ustring
      val copy : Main.Type.UText.ustring -> Main.Type.UText.ustring
      val sub :
        'Main.Type.UText.text -> int -> int -> 'Main.Type.UText.text
      val fill :
        Main.Type.UText.ustring -> int -> int -> Main.Type.UChar.t -> unit
      val blit :
        'Main.Type.UText.text ->
        int -> Main.Type.UText.ustring -> int -> int -> unit
      val append :
        'Main.Type.UText.text ->
        'Main.Type.UText.text -> 'Main.Type.UText.text
      val iter :
        (Main.Type.UChar.t -> unit) -> 'Main.Type.UText.text -> unit
      val compare : 'Main.Type.UText.text -> 'Main.Type.UText.text -> int
      module Buf :
        sig
          type buf
          val create : int -> Main.Type.UText.Buf.buf
          val contents : Main.Type.UText.Buf.buf -> Main.Type.UText.t
          val contents_string :
            Main.Type.UText.Buf.buf -> Main.Type.UText.ustring
          val length : Main.Type.UText.Buf.buf -> int
          val clear : Main.Type.UText.Buf.buf -> unit
          val reset : Main.Type.UText.Buf.buf -> unit
          val add_char : Main.Type.UText.Buf.buf -> Main.Type.UChar.t -> unit
          val add_string :
            Main.Type.UText.Buf.buf -> 'Main.Type.UText.text -> unit
          val add_buffer :
            Main.Type.UText.Buf.buf -> Main.Type.UText.Buf.buf -> unit
        end
    end
  module XString :
    sig
      type xstring
      type t = Main.Type.XString.xstring
      val get : Main.Type.XString.xstring -> int -> Main.Type.UChar.t
      val set : Main.Type.XString.xstring -> int -> Main.Type.UChar.t -> unit
      val length : Main.Type.XString.xstring -> int
      val init :
        int -> (int -> Main.Type.UChar.t) -> Main.Type.XString.xstring
      type index
      val look :
        Main.Type.XString.xstring ->
        Main.Type.XString.index -> Main.Type.UChar.t
      val nth : Main.Type.XString.xstring -> int -> Main.Type.XString.index
      val first : Main.Type.XString.xstring -> Main.Type.XString.index
      val last : Main.Type.XString.xstring -> Main.Type.XString.index
      val out_of_range :
        Main.Type.XString.xstring -> Main.Type.XString.index -> bool
      val next :
        Main.Type.XString.xstring ->
        Main.Type.XString.index -> Main.Type.XString.index
      val prev :
        Main.Type.XString.xstring ->
        Main.Type.XString.index -> Main.Type.XString.index
      val move :
        Main.Type.XString.xstring ->
        Main.Type.XString.index -> int -> Main.Type.XString.index
      val compare_index :
        Main.Type.XString.xstring ->
        Main.Type.XString.index -> Main.Type.XString.index -> int
      val make :
        ?bufsize:int -> int -> Main.Type.UChar.t -> Main.Type.XString.xstring
      val clear : Main.Type.XString.xstring -> unit
      val reset : Main.Type.XString.xstring -> unit
      val copy : Main.Type.XString.xstring -> Main.Type.XString.xstring
      val sub :
        Main.Type.XString.xstring -> int -> int -> Main.Type.XString.xstring
      val add_char : Main.Type.XString.xstring -> Main.Type.UChar.t -> unit
      val add_text :
        Main.Type.XString.xstring -> 'Main.Type.UText.text -> unit
      val add_xstring :
        Main.Type.XString.xstring -> Main.Type.XString.xstring -> unit
      val shrink : Main.Type.XString.xstring -> int -> unit
      val append :
        Main.Type.XString.xstring ->
        Main.Type.XString.xstring -> Main.Type.XString.xstring
      val utext_of : Main.Type.XString.xstring -> Main.Type.UText.t
      val ustring_of : Main.Type.XString.xstring -> Main.Type.UText.ustring
      val iter :
        (Main.Type.UChar.t -> unit) -> Main.Type.XString.xstring -> unit
      val compare : Main.Type.XString.t -> Main.Type.XString.t -> int
      module Buf :
        sig
          type buf
          val create : int -> Main.Type.XString.Buf.buf
          val contents : Main.Type.XString.Buf.buf -> Main.Type.XString.t
          val length : Main.Type.XString.Buf.buf -> int
          val clear : Main.Type.XString.Buf.buf -> unit
          val reset : Main.Type.XString.Buf.buf -> unit
          val add_char :
            Main.Type.XString.Buf.buf -> Main.Type.UChar.t -> unit
          val add_string :
            Main.Type.XString.Buf.buf -> Main.Type.XString.t -> unit
          val add_buffer :
            Main.Type.XString.Buf.buf -> Main.Type.XString.Buf.buf -> unit
        end
    end
  module SubText :
    sig
      module type Type =
        sig
          type t
          val get : Main.Type.SubText.Type.t -> int -> Main.Type.UChar.t
          val init :
            int -> (int -> Main.Type.UChar.t) -> Main.Type.SubText.Type.t
          val length : Main.Type.SubText.Type.t -> int
          type index
          val look :
            Main.Type.SubText.Type.t ->
            Main.Type.SubText.Type.index -> Main.Type.UChar.t
          val nth :
            Main.Type.SubText.Type.t -> int -> Main.Type.SubText.Type.index
          val first :
            Main.Type.SubText.Type.t -> Main.Type.SubText.Type.index
          val last : Main.Type.SubText.Type.t -> Main.Type.SubText.Type.index
          val next :
            Main.Type.SubText.Type.t ->
            Main.Type.SubText.Type.index -> Main.Type.SubText.Type.index
          val prev :
            Main.Type.SubText.Type.t ->
            Main.Type.SubText.Type.index -> Main.Type.SubText.Type.index
          val move :
            Main.Type.SubText.Type.t ->
            Main.Type.SubText.Type.index ->
            int -> Main.Type.SubText.Type.index
          val out_of_range :
            Main.Type.SubText.Type.t -> Main.Type.SubText.Type.index -> bool
          val compare_index :
            Main.Type.SubText.Type.t ->
            Main.Type.SubText.Type.index ->
            Main.Type.SubText.Type.index -> int
          val iter :
            (Main.Type.UChar.t -> unit) -> Main.Type.SubText.Type.t -> unit
          val compare :
            Main.Type.SubText.Type.t -> Main.Type.SubText.Type.t -> int
          module Buf :
            sig
              type buf
              val create : int -> Main.Type.SubText.Type.Buf.buf
              val contents :
                Main.Type.SubText.Type.Buf.buf -> Main.Type.SubText.Type.t
              val clear : Main.Type.SubText.Type.Buf.buf -> unit
              val reset : Main.Type.SubText.Type.Buf.buf -> unit
              val add_char :
                Main.Type.SubText.Type.Buf.buf -> Main.Type.UChar.t -> unit
              val add_string :
                Main.Type.SubText.Type.Buf.buf ->
                Main.Type.SubText.Type.t -> unit
              val add_buffer :
                Main.Type.SubText.Type.Buf.buf ->
                Main.Type.SubText.Type.Buf.buf -> unit
            end
          type ur_text
          type ur_index
          val refer :
            Main.Type.SubText.Type.ur_text ->
            Main.Type.SubText.Type.ur_index ->
            Main.Type.SubText.Type.ur_index -> Main.Type.SubText.Type.t
          val excerpt :
            Main.Type.SubText.Type.t -> Main.Type.SubText.Type.ur_text
          val context :
            Main.Type.SubText.Type.t ->
            Main.Type.SubText.Type.ur_text *
            Main.Type.SubText.Type.ur_index * Main.Type.SubText.Type.ur_index
          val ur_index_of :
            Main.Type.SubText.Type.t ->
            Main.Type.SubText.Type.index -> Main.Type.SubText.Type.ur_index
        end
      module Make :
        functor (Text : UnicodeString.Type->
          sig
            type t
            val get : t -> int -> UChar.t
            val init : int -> (int -> UChar.t) -> t
            val length : t -> int
            type index
            val look : t -> index -> UChar.t
            val nth : t -> int -> index
            val first : t -> index
            val last : t -> index
            val next : t -> index -> index
            val prev : t -> index -> index
            val move : t -> index -> int -> index
            val out_of_range : t -> index -> bool
            val compare_index : t -> index -> index -> int
            val iter : (UChar.t -> unit) -> t -> unit
            val compare : t -> t -> int
            module Buf :
              sig
                type buf
                val create : int -> buf
                val contents : buf -> t
                val clear : buf -> unit
                val reset : buf -> unit
                val add_char : buf -> UChar.t -> unit
                val add_string : buf -> t -> unit
                val add_buffer : buf -> buf -> unit
              end
            type ur_text = Text.t
            type ur_index = Text.index
            val refer : ur_text -> ur_index -> ur_index -> t
            val excerpt : t -> ur_text
            val context : t -> ur_text * ur_index * ur_index
            val ur_index_of : t -> index -> ur_index
          end
    end
  module ULine :
    sig
      type separator = [ `CR | `CRLF | `LF | `LS | `NEL | `PS ]
      class input :
        Main.Type.ULine.separator ->
        Main.Type.UChar.t #Main.Type.OOChannel.obj_input_channel ->
        [Main.Type.UChar.t] OOChannel.obj_input_channel
      class output :
        Main.Type.ULine.separator ->
        Main.Type.UChar.t #Main.Type.OOChannel.obj_output_channel ->
        [Main.Type.UChar.t] OOChannel.obj_output_channel
      module type Type =
        sig
          type text
          class input_line :
            Main.Type.UChar.t #Main.Type.OOChannel.obj_input_channel ->
            [Main.Type.ULine.Type.text] OOChannel.obj_input_channel
          class output_line :
            ?sp:Main.Type.ULine.separator ->
            Main.Type.UChar.t #Main.Type.OOChannel.obj_output_channel ->
            [Main.Type.ULine.Type.text] OOChannel.obj_output_channel
        end
      module Make :
        functor (Text : UnicodeString.Type->
          sig
            type text = Text.t
            class input_line :
              UChar.t #OOChannel.obj_input_channel ->
              [text] OOChannel.obj_input_channel
            class output_line :
              ?sp:separator ->
              UChar.t #OOChannel.obj_output_channel ->
              [text] OOChannel.obj_output_channel
          end
    end
  module Locale :
    sig
      type t = string
      val read :
        string -> string -> (Pervasives.in_channel -> 'a) -> string -> 'a
      val contain : string -> string -> bool
    end
  module CharEncoding : CharEncoding.Interface
  module UTF8 :
    sig
      type t = string
      exception Malformed_code
      val validate : Main.Type.UTF8.t -> unit
      val get : Main.Type.UTF8.t -> int -> Main.Type.UChar.t
      val init : int -> (int -> Main.Type.UChar.t) -> Main.Type.UTF8.t
      val length : Main.Type.UTF8.t -> int
      type index = int
      val nth : Main.Type.UTF8.t -> int -> Main.Type.UTF8.index
      val first : Main.Type.UTF8.t -> Main.Type.UTF8.index
      val last : Main.Type.UTF8.t -> Main.Type.UTF8.index
      val look :
        Main.Type.UTF8.t -> Main.Type.UTF8.index -> Main.Type.UChar.t
      val out_of_range : Main.Type.UTF8.t -> Main.Type.UTF8.index -> bool
      val compare_index :
        Main.Type.UTF8.t ->
        Main.Type.UTF8.index -> Main.Type.UTF8.index -> int
      val next :
        Main.Type.UTF8.t -> Main.Type.UTF8.index -> Main.Type.UTF8.index
      val prev :
        Main.Type.UTF8.t -> Main.Type.UTF8.index -> Main.Type.UTF8.index
      val move :
        Main.Type.UTF8.t ->
        Main.Type.UTF8.index -> int -> Main.Type.UTF8.index
      val iter : (Main.Type.UChar.t -> unit) -> Main.Type.UTF8.t -> unit
      val compare : Main.Type.UTF8.t -> Main.Type.UTF8.t -> int
      module Buf :
        sig
          type buf = Buffer.t
          val create : int -> Main.Type.UTF8.Buf.buf
          val contents : Main.Type.UTF8.Buf.buf -> Main.Type.UTF8.t
          val clear : Main.Type.UTF8.Buf.buf -> unit
          val reset : Main.Type.UTF8.Buf.buf -> unit
          val add_char : Main.Type.UTF8.Buf.buf -> Main.Type.UChar.t -> unit
          val add_string : Main.Type.UTF8.Buf.buf -> Main.Type.UTF8.t -> unit
          val add_buffer :
            Main.Type.UTF8.Buf.buf -> Main.Type.UTF8.Buf.buf -> unit
        end
    end
  module UTF16 :
    sig
      type t =
          (int, Bigarray.int16_unsigned_elt, Bigarray.c_layout)
          Bigarray.Array1.t
      exception Malformed_code
      val validate : Main.Type.UTF16.t -> unit
      val get : Main.Type.UTF16.t -> int -> Main.Type.UChar.t
      exception Out_of_range
      val init : int -> (int -> Main.Type.UChar.t) -> Main.Type.UTF16.t
      val length : Main.Type.UTF16.t -> int
      type index = int
      val nth : Main.Type.UTF16.t -> int -> Main.Type.UTF16.index
      val first : Main.Type.UTF16.t -> Main.Type.UTF16.index
      val last : Main.Type.UTF16.t -> Main.Type.UTF16.index
      val look :
        Main.Type.UTF16.t -> Main.Type.UTF16.index -> Main.Type.UChar.t
      val out_of_range : Main.Type.UTF16.t -> Main.Type.UTF16.index -> bool
      val compare_index :
        Main.Type.UTF16.t ->
        Main.Type.UTF16.index -> Main.Type.UTF16.index -> int
      val next :
        Main.Type.UTF16.t -> Main.Type.UTF16.index -> Main.Type.UTF16.index
      val prev :
        Main.Type.UTF16.t -> Main.Type.UTF16.index -> Main.Type.UTF16.index
      val move :
        Main.Type.UTF16.t ->
        Main.Type.UTF16.index -> int -> Main.Type.UTF16.index
      val iter : (Main.Type.UChar.t -> unit) -> Main.Type.UTF16.t -> unit
      val compare : Main.Type.UTF16.t -> Main.Type.UTF16.t -> int
      module Buf :
        sig
          type buf
          val create : int -> Main.Type.UTF16.Buf.buf
          val contents : Main.Type.UTF16.Buf.buf -> Main.Type.UTF16.t
          val clear : Main.Type.UTF16.Buf.buf -> unit
          val reset : Main.Type.UTF16.Buf.buf -> unit
          val add_char : Main.Type.UTF16.Buf.buf -> Main.Type.UChar.t -> unit
          val add_string :
            Main.Type.UTF16.Buf.buf -> Main.Type.UTF16.t -> unit
          val add_buffer :
            Main.Type.UTF16.Buf.buf -> Main.Type.UTF16.Buf.buf -> unit
        end
    end
  module UCS4 :
    sig
      type t =
          (int32, Bigarray.int32_elt, Bigarray.c_layout) Bigarray.Array1.t
      exception Malformed_code
      val validate : Main.Type.UCS4.t -> unit
      val get : Main.Type.UCS4.t -> int -> Main.Type.UChar.t
      val init : int -> (int -> Main.Type.UChar.t) -> Main.Type.UCS4.t
      val length : Main.Type.UCS4.t -> int
      type index = int
      val nth : Main.Type.UCS4.t -> int -> Main.Type.UCS4.index
      val first : Main.Type.UCS4.t -> Main.Type.UCS4.index
      val last : Main.Type.UCS4.t -> Main.Type.UCS4.index
      val look :
        Main.Type.UCS4.t -> Main.Type.UCS4.index -> Main.Type.UChar.t
      val out_of_range : Main.Type.UCS4.t -> Main.Type.UCS4.index -> bool
      val compare_index :
        Main.Type.UCS4.t ->
        Main.Type.UCS4.index -> Main.Type.UCS4.index -> int
      val next :
        Main.Type.UCS4.t -> Main.Type.UCS4.index -> Main.Type.UCS4.index
      val prev :
        Main.Type.UCS4.t -> Main.Type.UCS4.index -> Main.Type.UCS4.index
      val move :
        Main.Type.UCS4.t ->
        Main.Type.UCS4.index -> int -> Main.Type.UCS4.index
      val iter : (Main.Type.UChar.t -> unit) -> Main.Type.UCS4.t -> unit
      val compare : Main.Type.UCS4.t -> Main.Type.UCS4.t -> int
      module Buf :
        sig
          type buf
          val create : int -> Main.Type.UCS4.Buf.buf
          val contents : Main.Type.UCS4.Buf.buf -> Main.Type.UCS4.t
          val clear : Main.Type.UCS4.Buf.buf -> unit
          val reset : Main.Type.UCS4.Buf.buf -> unit
          val add_char : Main.Type.UCS4.Buf.buf -> Main.Type.UChar.t -> unit
          val add_string : Main.Type.UCS4.Buf.buf -> Main.Type.UCS4.t -> unit
          val add_buffer :
            Main.Type.UCS4.Buf.buf -> Main.Type.UCS4.Buf.buf -> unit
        end
    end
  module UPervasives :
    sig
      type uchar = Main.Type.UChar.t
      val int_of_uchar : Main.Type.UPervasives.uchar -> int
      val uchar_of_int : int -> Main.Type.UPervasives.uchar
      val escaped_uchar : Main.Type.UPervasives.uchar -> string
      val escaped_utf8 : string -> string
      val printer_utf8 : Format.formatter -> string -> unit
      val printer_uchar :
        Format.formatter -> Main.Type.UPervasives.uchar -> unit
    end
  module URe :
    sig
      type regexp =
          [ `After of Main.Type.URe.regexp
          | `Alt of Main.Type.URe.regexp * Main.Type.URe.regexp
          | `Before of Main.Type.URe.regexp
          | `BoS
          | `EoS
          | `Epsilon
          | `Group of Main.Type.URe.regexp
          | `OneChar
          | `Rep of Main.Type.URe.regexp
          | `Repn of Main.Type.URe.regexp * int * int option
          | `Seq of Main.Type.URe.regexp * Main.Type.URe.regexp
          | `Set of Main.Type.USet.t
          | `String of Main.Type.UChar.t list ]
      type match_semantics = [ `First | `Longest | `Shortest ]
      val no_group : Main.Type.URe.regexp -> Main.Type.URe.regexp
      module type Type =
        sig
          type text
          type index
          type compiled_regexp
          module SubText :
            sig
              type t
              val get : t -> int -> UChar.t
              val init : int -> (int -> UChar.t) -> t
              val length : t -> int
              type index
              val look : t -> index -> UChar.t
              val nth : t -> int -> index
              val first : t -> index
              val last : t -> index
              val next : t -> index -> index
              val prev : t -> index -> index
              val move : t -> index -> int -> index
              val out_of_range : t -> index -> bool
              val compare_index : t -> index -> index -> int
              val iter : (UChar.t -> unit) -> t -> unit
              val compare : t -> t -> int
              module Buf :
                sig
                  type buf
                  val create : int -> buf
                  val contents : buf -> t
                  val clear : buf -> unit
                  val reset : buf -> unit
                  val add_char : buf -> UChar.t -> unit
                  val add_string : buf -> t -> unit
                  val add_buffer : buf -> buf -> unit
                end
              type ur_text = text
              type ur_index = index
              val refer : ur_text -> ur_index -> ur_index -> t
              val excerpt : t -> ur_text
              val context : t -> ur_text * ur_index * ur_index
              val ur_index_of : t -> index -> ur_index
            end
          val compile :
            Main.Type.URe.regexp -> Main.Type.URe.Type.compiled_regexp
          val regexp_match :
            ?sem:Main.Type.URe.match_semantics ->
            Main.Type.URe.Type.compiled_regexp ->
            Main.Type.URe.Type.text ->
            Main.Type.URe.Type.index ->
            Main.Type.URe.Type.SubText.t option array option
          val string_match :
            Main.Type.URe.Type.compiled_regexp ->
            Main.Type.URe.Type.text -> Main.Type.URe.Type.index -> bool
          val search_forward :
            ?sem:Main.Type.URe.match_semantics ->
            Main.Type.URe.Type.compiled_regexp ->
            Main.Type.URe.Type.text ->
            Main.Type.URe.Type.index ->
            Main.Type.URe.Type.SubText.t option array option
        end
      module Make :
        functor (Text : UnicodeString.Type->
          sig
            type text = Text.t
            type index = Text.index
            type compiled_regexp
            module SubText :
              sig
                type t
                val get : t -> int -> UChar.t
                val init : int -> (int -> UChar.t) -> t
                val length : t -> int
                type index
                val look : t -> index -> UChar.t
                val nth : t -> int -> index
                val first : t -> index
                val last : t -> index
                val next : t -> index -> index
                val prev : t -> index -> index
                val move : t -> index -> int -> index
                val out_of_range : t -> index -> bool
                val compare_index : t -> index -> index -> int
                val iter : (UChar.t -> unit) -> t -> unit
                val compare : t -> t -> int
                module Buf :
                  sig
                    type buf
                    val create : int -> buf
                    val contents : buf -> t
                    val clear : buf -> unit
                    val reset : buf -> unit
                    val add_char : buf -> UChar.t -> unit
                    val add_string : buf -> t -> unit
                    val add_buffer : buf -> buf -> unit
                  end
                type ur_text = text
                type ur_index = index
                val refer : ur_text -> ur_index -> ur_index -> t
                val excerpt : t -> ur_text
                val context : t -> ur_text * ur_index * ur_index
                val ur_index_of : t -> index -> ur_index
              end
            val compile : regexp -> compiled_regexp
            val regexp_match :
              ?sem:match_semantics ->
              compiled_regexp ->
              text -> index -> SubText.t option array option
            val string_match : compiled_regexp -> text -> index -> bool
            val search_forward :
              ?sem:match_semantics ->
              compiled_regexp ->
              text -> index -> SubText.t option array option
          end
    end
  module UCharInfo : UCharInfo.Type
  module UNF :
    sig
      module type Type = UNF.Type
      module Make :
        functor (Text : UnicodeString.Type->
          sig
            type text = Text.t
            class nfd :
              UChar.t #OOChannel.obj_output_channel ->
              [UChar.t] OOChannel.obj_output_channel
            class nfc :
              UChar.t #OOChannel.obj_output_channel ->
              [UChar.t] OOChannel.obj_output_channel
            class nfkd :
              UChar.t #OOChannel.obj_output_channel ->
              [UChar.t] OOChannel.obj_output_channel
            class nfkc :
              UChar.t #OOChannel.obj_output_channel ->
              [UChar.t] OOChannel.obj_output_channel
            val nfd : text -> text
            val nfkd : text -> text
            val nfc : text -> text
            val nfkc : text -> text
            module NFCBuf :
              sig
                type buf
                val create : int -> buf
                val contents : buf -> text
                val clear : buf -> unit
                val reset : buf -> unit
                val add_char : buf -> UChar.t -> unit
                val add_string : buf -> text -> unit
                val add_buffer : buf -> buf -> unit
              end
            val nfc_append : text -> text -> text
            val put_nfd : XString.t -> text -> unit
            val put_nfkd : XString.t -> text -> unit
            val put_nfc : XString.t -> text -> unit
            val put_nfkc : XString.t -> text -> unit
            type index = Text.index
            val nfd_inc :
              text ->
              index -> ([ `Inc of UChar.t list * index * 'a lazy_t ] as 'a)
            val canon_compare : text -> text -> int
            val nfd_decompose : UChar.t -> UChar.t list
            val nfkd_decompose : UChar.t -> UChar.t list
          end
    end
  module UCol :
    sig
      type variable_option =
          [ `Blanked | `Non_ignorable | `Shift_Trimmed | `Shifted ]
      type precision = [ `Primary | `Quaternary | `Secondary | `Tertiary ]
      module type Type = UCol.Type
      module Make :
        functor (Text : UnicodeString.Type->
          sig
            type text = Text.t
            type index = Text.index
            val compare :
              ?locale:string ->
              ?prec:UCol.precision ->
              ?variable:UCol.variable_option -> text -> text -> int
            val sort_key :
              ?locale:string ->
              ?prec:UCol.precision ->
              ?variable:UCol.variable_option -> text -> string
            val compare_with_key :
              ?locale:string ->
              ?prec:UCol.precision ->
              ?variable:UCol.variable_option -> string -> text -> int
            val search_with_key :
              ?locale:string ->
              ?prec:UCol.precision ->
              ?variable:UCol.variable_option ->
              string -> text -> index -> index * index
            val search :
              ?locale:string ->
              ?prec:UCol.precision ->
              ?variable:UCol.variable_option ->
              text -> text -> index -> index * index
          end
    end
  module CaseMap :
    sig
      module type Type = CaseMap.Type
      module Make :
        functor (Text : UnicodeString.Type->
          sig
            type text = Text.t
            val lowercase : ?locale:string -> text -> text
            val uppercase : ?locale:string -> text -> text
            val titlecase : ?locale:string -> text -> text
            val casefolding : text -> text
            val compare_caseless : text -> text -> int
          end
    end
  module UReStr : UReStr.Interface
end