Up

module UCharTbl

: sig

Fast lookup tables for Unicode. Accessible by constant time.

#
type 'a tbl

Fast lookup tables. Accessible by constant time.

#
type 'a t = 'a tbl
#
val get : 'a tbl -> UChar.t -> 'a
#
module type Type = sig
#
type elt
#
type t = elt tbl
#
val get : elt tbl -> UChar.t -> elt
#
val of_map : elt -> elt UMap.t -> t

of_map def m creates the table which has the same value to m. The table returns def for the characters for which m is undefined.

end
#
module Make : functor (H : Hashtbl.HashedType) -> Type with type elt = H.t

Equality and hash are necessary for table generation.

#
module Bool : sig

Tables for boolean values.

#
type t
#
val get : t -> UChar.t -> bool
#
val of_set : USet.t -> t
end
#
module Bits : sig

Tables for small (< 256, >=0) integers

#
type t
#
val of_map : int -> int UMap.t -> t
#
val get : t -> UChar.t -> int
end
#
module Bytes : sig

Tables for integers. If integers are not span the whole 31-bit or 63-bit values, Bytes.t is more space efficient than int tbl.

#
type t
#
val of_map : int -> int UMap.t -> t
#
val get : t -> UChar.t -> int
end
#
module Char : sig

Tables for bytes.

#
type t
#
val of_map : char -> char UMap.t -> t
#
val get : t -> UChar.t -> char
end
end