diff --git a/sig-builder-no-typ-dup/less-power/Ast_check/Feature/index.html b/sig-builder-no-typ-dup/less-power/Ast_check/Feature/index.html index 2d36511..aacd331 100644 --- a/sig-builder-no-typ-dup/less-power/Ast_check/Feature/index.html +++ b/sig-builder-no-typ-dup/less-power/Ast_check/Feature/index.html @@ -1,2 +1,2 @@ -Feature (less-power.Ast_check.Feature)

Module Ast_check.Feature

type t =
  1. | Array
  2. | Mutable_member
  3. | Object
  4. | Loop
  5. | Primitive
  6. | Internal_name
  7. | Alert_control
  8. | Tail_mod_cons
module Set : Stdlib.Set.S with type elt = t
val to_identifier : t -> string

Unique identifier for this feature.

val of_identifier : string -> t

Provides the feature corresponding to a unique identifier returned by to_identifier.

val minimum : Set.t

Primitive and Internal_name, required to prevent circumventing restrictions.

val default : Set.t

Everything but Tail_mod_cons.

val all : Set.t

Everything.

val to_message : t -> string

Provide a message explaining why a feature is prohibited.

+Feature (less-power.Ast_check.Feature)

Module Ast_check.Feature

type t =
  1. | Array
  2. | Mutable_member
  3. | Object
  4. | Loop
  5. | Primitive
  6. | Internal_name
  7. | Alert_control
  8. | Tail_mod_cons
module Set : Stdlib.Set.S with type elt = t
val to_identifier : t -> string

Unique identifier for this feature.

val of_identifier : string -> t

Provides the feature corresponding to a unique identifier returned by to_identifier.

val minimum : Set.t

Primitive and Internal_name, required to prevent circumventing restrictions.

val default : Set.t

Everything but Tail_mod_cons.

val all : Set.t

Everything.

val to_message : t -> string

Provide a message explaining why a feature is prohibited.

diff --git a/sig-builder-no-typ-dup/less-power/Ast_check/index.html b/sig-builder-no-typ-dup/less-power/Ast_check/index.html index 4ffa5d2..3c2c6c7 100644 --- a/sig-builder-no-typ-dup/less-power/Ast_check/index.html +++ b/sig-builder-no-typ-dup/less-power/Ast_check/index.html @@ -1,5 +1,5 @@ -Ast_check (less-power.Ast_check)

Module Ast_check

AST checker.

Tool to enforce restrictions on what syntax elements are allowed in OCaml code. Restricts use of the following class features and imperative elements:

external declarations and internal dune modules are forbidden, as they can be used to circumvent restrictions in the Stdlib replacement. The sequence operator is not forbidden as there would be no point, a; b can be trivially replaced by let _ = a in b.

An executable is installed as lp-ast-check. All files passed as arguments, and all .ml files contained recursively in directories passed as arguments, are checked. Exits with code 0 if no violations are detected, 1 if violations are found, or 2 if an error occurs.

module Feature : sig ... end
type violation = {
  1. location : Ppxlib.Location.t;
    (*

    Location of the violation.

    *)
  2. message : string option;
    (*

    Error message.

    *)
  3. feature : Feature.t;
    (*

    Which prohibited feature was used.

    *)
}

A violation that occurred in the AST.

val ast_violations : +Ast_check (less-power.Ast_check)

Module Ast_check

AST checker.

Tool to enforce restrictions on what syntax elements are allowed in OCaml code. Restricts use of the following class features and imperative elements:

  • class declarations
  • class type declarations
  • class method calls
  • new class expressions
  • setting class and record fields
  • array literals
  • while loops
  • for loops
  • declaring records with mutable entries
  • external declarations
  • internal dune modules (Package__Module)

external declarations and internal dune modules are forbidden, as they can be used to circumvent restrictions in the Stdlib replacement. The sequence operator is not forbidden as there would be no point, a; b can be trivially replaced by let _ = a in b.

An executable is installed as lp-ast-check. All files passed as arguments, and all .ml files contained recursively in directories passed as arguments, are checked. Exits with code 0 if no violations are detected, 1 if violations are found, or 2 if an error occurs.

module Feature : sig ... end
type violation = {
  1. location : Ppxlib.Location.t;
    (*

    Location of the violation.

    *)
  2. message : string option;
    (*

    Error message.

    *)
  3. feature : Feature.t;
    (*

    Which prohibited feature was used.

    *)
}

A violation that occurred in the AST.

val ast_violations : ?prohibited:Feature.Set.t -> ?limit:int -> Ppxlib.structure -> diff --git a/sig-builder-no-typ-dup/less-power/Ast_check_ppx/index.html b/sig-builder-no-typ-dup/less-power/Ast_check_ppx/index.html index 6825878..fc85677 100644 --- a/sig-builder-no-typ-dup/less-power/Ast_check_ppx/index.html +++ b/sig-builder-no-typ-dup/less-power/Ast_check_ppx/index.html @@ -1,2 +1,2 @@ -Ast_check_ppx (less-power.Ast_check_ppx)

Module Ast_check_ppx

Use the AST check as a PPX rewriter, with arguments. If further customization is needed, it's best to define a PPX directly in the given exercise's repository instead.

val feature_identifiers : string list
val prohibited_features : Ast_check.Feature.Set.t Stdlib.ref
val update_feature : prohibit:bool -> string -> unit
val feature_spec : prohibit:bool -> Stdlib.Arg.spec
val violation_limit : int option Stdlib.ref
val strip_signatures : bool Stdlib.ref
+Ast_check_ppx (less-power.Ast_check_ppx)

Module Ast_check_ppx

Use the AST check as a PPX rewriter, with arguments. If further customization is needed, it's best to define a PPX directly in the given exercise's repository instead.

val feature_identifiers : string list
val prohibited_features : Ast_check.Feature.Set.t Stdlib.ref
val update_feature : prohibit:bool -> string -> unit
val feature_spec : prohibit:bool -> Stdlib.Arg.spec
val violation_limit : int option Stdlib.ref
val strip_signatures : bool Stdlib.ref
diff --git a/sig-builder-no-typ-dup/less-power/Common/Ctx_util/Syntax/index.html b/sig-builder-no-typ-dup/less-power/Common/Ctx_util/Syntax/index.html index 0c0a3f7..1786754 100644 --- a/sig-builder-no-typ-dup/less-power/Common/Ctx_util/Syntax/index.html +++ b/sig-builder-no-typ-dup/less-power/Common/Ctx_util/Syntax/index.html @@ -1,2 +1,2 @@ -Syntax (less-power.Common.Ctx_util.Syntax)

Module Ctx_util.Syntax

val let< : ('a, 'b, 'c) t -> ('a -> 'b) -> 'c

Let-syntax for with_context

+Syntax (less-power.Common.Ctx_util.Syntax)

Module Ctx_util.Syntax

val let< : ('a, 'b, 'c) t -> ('a -> 'b) -> 'c

Let-syntax for with_context

diff --git a/sig-builder-no-typ-dup/less-power/Common/Ctx_util/index.html b/sig-builder-no-typ-dup/less-power/Common/Ctx_util/index.html index a904361..e67799e 100644 --- a/sig-builder-no-typ-dup/less-power/Common/Ctx_util/index.html +++ b/sig-builder-no-typ-dup/less-power/Common/Ctx_util/index.html @@ -1,19 +1,19 @@ -Ctx_util (less-power.Common.Ctx_util)

Module Common.Ctx_util

Context managers, loosely inspired by Python

type ('a, 'b, 'c) t = +Ctx_util (less-power.Common.Ctx_util)

Module Common.Ctx_util

Context managers, loosely inspired by Python

type ('a, 'b, 'c) t = ('a -> ('b, Util.exn_info) Stdlib.result) -> - ('c, Util.exn_info) Stdlib.result

A context manager of type ('a, 'b, 'c) t takes a continuation, and should feed the continuation a value of type 'a. Once the continuation returns with either a 'b (in Ok) or an exn_info (in Error), the continuation should perform cleanup, and may suppress the exception by producing a suitable result (of type 'c) instead. Often, 'b = 'c.

This representation has the advantage that existing context managers of type ('a -> 'b) -> 'b (where 'a can be some concrete type like unit) already conform to this type (e.g. In_channel.with_open_text and Mutex.protect).

val with_context : ('a, 'b, 'c) t -> ('d -> 'e) -> 'f

with_context cm f runs f in the context manager cm

module Syntax : sig ... end
val temp_file : ?temp_dir:string -> string -> string -> (string, 'a, 'b) t

As per Filename.temp_file. Removes the temporary file upon completion.

val openfile : + ('c, Util.exn_info) Stdlib.result

A context manager of type ('a, 'b, 'c) t takes a continuation, and should feed the continuation a value of type 'a. Once the continuation returns with either a 'b (in Ok) or an exn_info (in Error), the continuation should perform cleanup, and may suppress the exception by producing a suitable result (of type 'c) instead. Often, 'b = 'c.

This representation has the advantage that existing context managers of type ('a -> 'b) -> 'b (where 'a can be some concrete type like unit) already conform to this type (e.g. In_channel.with_open_text and Mutex.protect).

val with_context : ('a, 'b, 'c) t -> ('a -> 'b) -> 'c

with_context cm f runs f in the context manager cm

module Syntax : sig ... end
val temp_file : ?temp_dir:string -> string -> string -> (string, 'a, 'a) t

As per Filename.temp_file. Removes the temporary file upon completion.

val openfile : string -> Unix.open_flag list -> Unix.file_perm -> - (Unix.file_descr, 'a, 'b) t

As per Unix.openfile. Closes the file descriptor upon completion.

val set_signal : int -> Stdlib.Sys.signal_behavior -> (unit, 'a, 'b) t

As per Sys.set_signal. Restores the previous signal behavior on completion.

val sigprocmask : Unix.sigprocmask_command -> int list -> (unit, 'a, 'b) t

As per Unix.sigprocmask. Restores the previous mask on completion.

val timeout_unix : + (Unix.file_descr, 'a, 'a) t

As per Unix.openfile. Closes the file descriptor upon completion.

val set_signal : int -> Stdlib.Sys.signal_behavior -> (unit, 'a, 'a) t

As per Sys.set_signal. Restores the previous signal behavior on completion.

val sigprocmask : Unix.sigprocmask_command -> int list -> (unit, 'a, 'a) t

As per Unix.sigprocmask. Restores the previous mask on completion.

val timeout_unix : ?timer:Unix.interval_timer -> Mtime.span -> - (unit, 'a, 'b option) t
val timed : (unit, 'a, 'b * Mtime.span) t
val capture_exceptions : + (unit, 'a, 'a option) t
val timed : (unit, 'a, 'a * Mtime.span) t
val capture_exceptions : ?filter:(exn -> bool) -> unit -> - (unit, 'a, ('b, Util.exn_info) Stdlib.result) t
val empty_context : 'a -> ('b -> 'c) -> ('d, 'e, 'f) t
val empty_context' : 'a -> ('b, 'c, 'd) t
val optional_context : + (unit, 'a, ('a, Util.exn_info) Stdlib.result) t
val empty_context : 'a -> ('b -> 'c) -> ('a, 'b, 'c) t
val empty_context' : 'a -> ('a, 'b, 'b) t
val optional_context : some:('a -> ('b, 'c, 'd) t) -> - 'e -> + 'b -> ('c -> 'd) -> - 'f option -> - ('b, 'c, 'd) t
val optional_timeout_unix : ?timeout:Mtime.span -> (unit, 'a, 'b option) t
+ 'a option -> + ('b, 'c, 'd) t
val optional_timeout_unix : ?timeout:Mtime.span -> (unit, 'a, 'a option) t
diff --git a/sig-builder-no-typ-dup/less-power/Common/P_run/index.html b/sig-builder-no-typ-dup/less-power/Common/P_run/index.html index 3fd7773..0aa569e 100644 --- a/sig-builder-no-typ-dup/less-power/Common/P_run/index.html +++ b/sig-builder-no-typ-dup/less-power/Common/P_run/index.html @@ -1,5 +1,5 @@ -P_run (less-power.Common.P_run)

Module Common.P_run

Even higher-level wrapper around Unix.open_process.

val wait_pid_timeout : Mtime.span -> int -> Unix.process_status option

Waits for the given process or times out.

type timeout_description = {
  1. duration : Mtime.span;
  2. signal : int;
  3. kill_after : Mtime.span option;
}

Timeout after duration, sending signal. If kill_after is Some t, then send SIGKILL after waiting an additional t.

val timeout : +P_run (less-power.Common.P_run)

Module Common.P_run

Even higher-level wrapper around Unix.open_process.

val wait_pid_timeout : Mtime.span -> int -> Unix.process_status option

Waits for the given process or times out.

type timeout_description = {
  1. duration : Mtime.span;
  2. signal : int;
  3. kill_after : Mtime.span option;
}

Timeout after duration, sending signal. If kill_after is Some t, then send SIGKILL after waiting an additional t.

val timeout : ?signal:int -> ?kill_after:Mtime.span -> Mtime.span -> diff --git a/sig-builder-no-typ-dup/less-power/Common/Path_util/index.html b/sig-builder-no-typ-dup/less-power/Common/Path_util/index.html index f6408f5..98f5cc2 100644 --- a/sig-builder-no-typ-dup/less-power/Common/Path_util/index.html +++ b/sig-builder-no-typ-dup/less-power/Common/Path_util/index.html @@ -1,5 +1,5 @@ -Path_util (less-power.Common.Path_util)

Module Common.Path_util

Path and file-related utility functions.

val (/) : string -> string -> string
val readdir_p : string -> string Stdlib.Seq.t

like Sys.readdir, but the returned entries are full paths

val is_code : ?condition:FileUtil.test_file -> FilePath.filename -> bool

Checks that either p is a regular file and condition holds for it, or p is a symlink to a regular file, and condition holds for the symlink.

val parents : FilePath.filename -> string list
val default_mode : int
val mkdir : +Path_util (less-power.Common.Path_util)

Module Common.Path_util

Path and file-related utility functions.

val (/) : string -> string -> string
val readdir_p : string -> string Stdlib.Seq.t

like Sys.readdir, but the returned entries are full paths

val is_code : ?condition:FileUtil.test_file -> FilePath.filename -> bool

Checks that either p is a regular file and condition holds for it, or p is a symlink to a regular file, and condition holds for the symlink.

val parents : FilePath.filename -> string list
val default_mode : int
val mkdir : ?mode:Unix.file_perm -> ?parents:bool -> ?exist_ok:bool -> diff --git a/sig-builder-no-typ-dup/less-power/Common/Pp_util/index.html b/sig-builder-no-typ-dup/less-power/Common/Pp_util/index.html index 32fc71c..8b3340d 100644 --- a/sig-builder-no-typ-dup/less-power/Common/Pp_util/index.html +++ b/sig-builder-no-typ-dup/less-power/Common/Pp_util/index.html @@ -1,2 +1,2 @@ -Pp_util (less-power.Common.Pp_util)

Module Common.Pp_util

More pretty-printing combinators.

val pp_of : (Stdlib.Format.formatter -> 'a -> unit) -> ('b -> 'c) -> 'd Fmt.t
val pp_repeat : ?sep:unit Fmt.t -> int -> 'a Fmt.t -> 'a0 Fmt.t
val pp_text : ?line:string Fmt.t -> string Fmt.t
val pp_flow : ?word:string Fmt.t -> string Fmt.t
val pp_text_ : string Fmt.t
val pp_flow_ : string Fmt.t
+Pp_util (less-power.Common.Pp_util)

Module Common.Pp_util

More pretty-printing combinators.

val pp_of : (Stdlib.Format.formatter -> 'a -> unit) -> ('b -> 'a) -> 'b Fmt.t
val pp_repeat : ?sep:unit Fmt.t -> int -> 'a Fmt.t -> 'a Fmt.t
val pp_text : ?line:string Fmt.t -> string Fmt.t
val pp_flow : ?word:string Fmt.t -> string Fmt.t
val pp_text_ : string Fmt.t
val pp_flow_ : string Fmt.t
diff --git a/sig-builder-no-typ-dup/less-power/Common/Util/index.html b/sig-builder-no-typ-dup/less-power/Common/Util/index.html index 80de3f5..e23694f 100644 --- a/sig-builder-no-typ-dup/less-power/Common/Util/index.html +++ b/sig-builder-no-typ-dup/less-power/Common/Util/index.html @@ -1,5 +1,5 @@ -Util (less-power.Common.Util)

Module Common.Util

Various utility functions.

val (%) : ('a -> 'b) -> ('c -> 'd) -> 'e -> 'f

Function composition, f % g is f \circ g.

val (%>) : ('a -> 'b) -> ('c -> 'd) -> 'e -> 'f

Reverse function composition, f %> g is g \circ f.

val peek : ('a -> unit) -> 'b -> 'c

peek f x is (f x; x).

val singleton : 'a -> 'b list

One-element list.

val null : 'a list -> bool
val uncons : 'a list -> ('b * 'c list) option
val unsnoc : 'a list -> ('b list * 'c) option
val list_equal : ('a -> 'b -> bool) -> 'c list -> 'd list -> bool

Same as List.equal, but allows lists of different types

val update_assoc : - ('a option -> 'b option) -> - 'c -> - ('d * 'e) list -> - ('d * 'e) list
val or_option : 'a option -> 'b option -> 'b option
val filter_option : ('a -> bool) -> 'b option -> 'c option
val if_option : bool -> 'a -> 'b option
val string_contains : needle:string -> string -> bool

string_contains ~needle haystack: does needle exist as a substring of haystack? Naive \mathcal{O}(nm) implementation.

val (~$) : 'a -> ('a -> 'b) -> 'b

(~$ x) f is f x, e.g.: List.map (~$ 2) [List.nth ["a"; "b"; "c"]; String.sub "def" 1] returns ["c"; "ef"]

type exn_info = {
  1. exn : exn;
  2. backtrace : Stdlib.Printexc.raw_backtrace;
}

Exception and its associated (raw) backtrace.

val raise_exn_info : exn_info -> 'a
val try_to_result : ('a -> 'b) -> 'c -> ('d, exn_info) Stdlib.result
val unresult_exn : ('a, exn_info) Stdlib.result -> 'b
val run_main : (string -> string list -> int) -> 'a

Timeouts

val min_span : Mtime.span -> Mtime.span -> Mtime.span
exception Timeout
val span_to_float_s : Mtime.span -> float

Can overflow for large t

val timeout_unix : +

Module Common.Util

Various utility functions.

val (%) : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b

Function composition, f % g is f \circ g.

val (%>) : ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c

Reverse function composition, f %> g is g \circ f.

val peek : ('a -> unit) -> 'a -> 'a

peek f x is (f x; x).

val singleton : 'a -> 'a list

One-element list.

val null : 'a list -> bool
val uncons : 'a list -> ('a * 'a list) option
val unsnoc : 'a list -> ('a list * 'a) option
val list_equal : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool

Same as List.equal, but allows lists of different types

val update_assoc : + ('a option -> 'a option) -> + 'b -> + ('b * 'a) list -> + ('b * 'a) list
val or_option : 'a option -> 'a option -> 'a option
val filter_option : ('a -> bool) -> 'a option -> 'a option
val if_option : bool -> 'a -> 'a option
val string_contains : needle:string -> string -> bool

string_contains ~needle haystack: does needle exist as a substring of haystack? Naive \mathcal{O}(nm) implementation.

val (~$) : 'a -> ('a -> 'b) -> 'b

(~$ x) f is f x, e.g.: List.map (~$ 2) [List.nth ["a"; "b"; "c"]; String.sub "def" 1] returns ["c"; "ef"]

type exn_info = {
  1. exn : exn;
  2. backtrace : Stdlib.Printexc.raw_backtrace;
}

Exception and its associated (raw) backtrace.

val raise_exn_info : exn_info -> 'a
val try_to_result : ('a -> 'b) -> 'a -> ('b, exn_info) Stdlib.result
val unresult_exn : ('a, exn_info) Stdlib.result -> 'a
val run_main : (string -> string list -> int) -> 'a

Timeouts

val min_span : Mtime.span -> Mtime.span -> Mtime.span
exception Timeout
val span_to_float_s : Mtime.span -> float

Can overflow for large t

val timeout_unix : ?timer:Unix.interval_timer -> Mtime.span -> ('a -> 'b) -> - 'c -> - 'd option

timeout_unix t f is Some (f ()) if the call to f terminates within t, otherwise None. The timeout is triggered by a Unix signal.

Notes:

  • - Does not interrupt f until an allocation occurs, which may be never.
  • - Any existing Unix timer is suspended for the duration of the call to f.
  • + If f is interrupted, it will not be left running in the background.
val timed : ('a -> 'b) -> 'c -> 'd * Mtime.span
+ 'a -> + 'b option

timeout_unix t f is Some (f ()) if the call to f terminates within t, otherwise None. The timeout is triggered by a Unix signal.

Notes:

  • - Does not interrupt f until an allocation occurs, which may be never.
  • - Any existing Unix timer is suspended for the duration of the call to f.
  • + If f is interrupted, it will not be left running in the background.
val timed : ('a -> 'b) -> 'a -> 'b * Mtime.span
diff --git a/sig-builder-no-typ-dup/less-power/Common/index.html b/sig-builder-no-typ-dup/less-power/Common/index.html index b49d7c9..ae7321f 100644 --- a/sig-builder-no-typ-dup/less-power/Common/index.html +++ b/sig-builder-no-typ-dup/less-power/Common/index.html @@ -1,5 +1,5 @@ -Common (less-power.Common)

Module Signature_builder.Ordered_set

type 'a t =
  1. | Univ
  2. | Empty
  3. | Singleton of 'a
  4. | Union of 'a t * 'a t
  5. | Minus of 'a t * 'a t
val map : ('a -> 'b) -> 'c t -> 'd t
val eval : ?eq:('a -> 'b -> bool) -> 'b list -> 'c t -> 'b list
+Ordered_set (less-power.Signature_builder.Ordered_set)

Module Signature_builder.Ordered_set

type 'a t =
  1. | Univ
  2. | Empty
  3. | Singleton of 'a
  4. | Union of 'a t * 'a t
  5. | Minus of 'a t * 'a t
val map : ('a -> 'b) -> 'a t -> 'b t
val eval : ?eq:('a -> 'a -> bool) -> 'a list -> 'a t -> 'a list
diff --git a/sig-builder-no-typ-dup/less-power/Signature_builder/Parse/index.html b/sig-builder-no-typ-dup/less-power/Signature_builder/Parse/index.html index 782aa47..8d172c9 100644 --- a/sig-builder-no-typ-dup/less-power/Signature_builder/Parse/index.html +++ b/sig-builder-no-typ-dup/less-power/Signature_builder/Parse/index.html @@ -1,5 +1,5 @@ -Parse (less-power.Signature_builder.Parse)

Module Signature_builder.Parse

Parser for include specifications.

To use the signature builder, first enable the PPX rewriter. With dune, add the PPX rewriter to your component's dune file:

(preprocess (pps less-power.signature-builder-ppx))

Then, within a signature, use an extension point to include signature items, for example:

module type Foo : sig
+Parse (less-power.Signature_builder.Parse)

Module Signature_builder.Parse

Parser for include specifications.

To use the signature builder, first enable the PPX rewriter. With dune, add the PPX rewriter to your component's dune file:

(preprocess (pps less-power.signature-builder-ppx))

Then, within a signature, use an extension point to include signature items, for example:

module type Foo : sig
   [%%include stdlib.stdlib (fst, snd)]
 end

Inclusion specifications can be more complex. The full grammar is as follows:

include-specs := include-spec | '()' | '(' include-spec {',' include-spec} ')'
 include-spec :=
diff --git a/sig-builder-no-typ-dup/less-power/Signature_builder/index.html b/sig-builder-no-typ-dup/less-power/Signature_builder/index.html
index 990c7ad..123cea7 100644
--- a/sig-builder-no-typ-dup/less-power/Signature_builder/index.html
+++ b/sig-builder-no-typ-dup/less-power/Signature_builder/index.html
@@ -1,5 +1,5 @@
 
-Signature_builder (less-power.Signature_builder)

Module Signature_builder

Library and PPX rewriter for building interfaces from existing interfaces by selectively adding and removing interface items.

See Parse for the full grammar for inclusion specifications.

Loading saved signatures

type raw_signature = [
  1. | `IntfMarshal of string
    (*

    Marshalled Ppxlib.interface

    *)
  2. | `IntfSrc of string
    (*

    Plain source code of an interface

    *)
]
type raw_signature_info = (string list * raw_signature) list
type signature_infos = (string * signature_info) list
and signature_info =
  1. | Node of Ppxlib.signature option * signature_infos
val infos_add_signature : +Signature_builder (less-power.Signature_builder)

Module Signature_builder

Library and PPX rewriter for building interfaces from existing interfaces by selectively adding and removing interface items.

See Parse for the full grammar for inclusion specifications.

Loading saved signatures

type raw_signature = [
  1. | `IntfMarshal of string
    (*

    Marshalled Ppxlib.interface

    *)
  2. | `IntfSrc of string
    (*

    Plain source code of an interface

    *)
]
type raw_signature_info = (string list * raw_signature) list
type signature_infos = (string * signature_info) list
and signature_info =
  1. | Node of Ppxlib.signature option * signature_infos
val infos_add_signature : string -> string list -> Ppxlib.signature -> diff --git a/sig-builder-no-typ-dup/less-power/Signature_builder_ppx/index.html b/sig-builder-no-typ-dup/less-power/Signature_builder_ppx/index.html index 0269db2..cf00aa1 100644 --- a/sig-builder-no-typ-dup/less-power/Signature_builder_ppx/index.html +++ b/sig-builder-no-typ-dup/less-power/Signature_builder_ppx/index.html @@ -1,2 +1,2 @@ -Signature_builder_ppx (less-power.Signature_builder_ppx)

Module Signature_builder_ppx

+Signature_builder_ppx (less-power.Signature_builder_ppx)

Module Signature_builder_ppx

diff --git a/sig-builder-no-typ-dup/less-power/Std_overrides/Hide_stdlib_variants/Stdlib_alerts/index.html b/sig-builder-no-typ-dup/less-power/Std_overrides/Hide_stdlib_variants/Stdlib_alerts/index.html index 929d143..6c9e43e 100644 --- a/sig-builder-no-typ-dup/less-power/Std_overrides/Hide_stdlib_variants/Stdlib_alerts/index.html +++ b/sig-builder-no-typ-dup/less-power/Std_overrides/Hide_stdlib_variants/Stdlib_alerts/index.html @@ -1,2 +1,2 @@ -Stdlib_alerts (less-power.Std_overrides.Hide_stdlib_variants.Stdlib_alerts)

Module Hide_stdlib_variants.Stdlib_alerts

+Stdlib_alerts (less-power.Std_overrides.Hide_stdlib_variants.Stdlib_alerts)

Module Hide_stdlib_variants.Stdlib_alerts

diff --git a/sig-builder-no-typ-dup/less-power/Std_overrides/Hide_stdlib_variants/Stdlib_components/index.html b/sig-builder-no-typ-dup/less-power/Std_overrides/Hide_stdlib_variants/Stdlib_components/index.html index 3351e15..d3c24ee 100644 --- a/sig-builder-no-typ-dup/less-power/Std_overrides/Hide_stdlib_variants/Stdlib_components/index.html +++ b/sig-builder-no-typ-dup/less-power/Std_overrides/Hide_stdlib_variants/Stdlib_components/index.html @@ -1,2 +1,2 @@ -Stdlib_components (less-power.Std_overrides.Hide_stdlib_variants.Stdlib_components)

Module Hide_stdlib_variants.Stdlib_components

+Stdlib_components (less-power.Std_overrides.Hide_stdlib_variants.Stdlib_components)

Module Hide_stdlib_variants.Stdlib_components

diff --git a/sig-builder-no-typ-dup/less-power/Std_overrides/Hide_stdlib_variants/Stdlib_variants/index.html b/sig-builder-no-typ-dup/less-power/Std_overrides/Hide_stdlib_variants/Stdlib_variants/index.html index cf542c6..a22b5e8 100644 --- a/sig-builder-no-typ-dup/less-power/Std_overrides/Hide_stdlib_variants/Stdlib_variants/index.html +++ b/sig-builder-no-typ-dup/less-power/Std_overrides/Hide_stdlib_variants/Stdlib_variants/index.html @@ -1,2 +1,2 @@ -Stdlib_variants (less-power.Std_overrides.Hide_stdlib_variants.Stdlib_variants)

Module Hide_stdlib_variants.Stdlib_variants

+Stdlib_variants (less-power.Std_overrides.Hide_stdlib_variants.Stdlib_variants)

Module Hide_stdlib_variants.Stdlib_variants

diff --git a/sig-builder-no-typ-dup/less-power/Std_overrides/Hide_stdlib_variants/Threads_alerts/index.html b/sig-builder-no-typ-dup/less-power/Std_overrides/Hide_stdlib_variants/Threads_alerts/index.html index ed80c84..6988699 100644 --- a/sig-builder-no-typ-dup/less-power/Std_overrides/Hide_stdlib_variants/Threads_alerts/index.html +++ b/sig-builder-no-typ-dup/less-power/Std_overrides/Hide_stdlib_variants/Threads_alerts/index.html @@ -1,2 +1,2 @@ -Threads_alerts (less-power.Std_overrides.Hide_stdlib_variants.Threads_alerts)

Module Hide_stdlib_variants.Threads_alerts

+Threads_alerts (less-power.Std_overrides.Hide_stdlib_variants.Threads_alerts)

Module Hide_stdlib_variants.Threads_alerts

diff --git a/sig-builder-no-typ-dup/less-power/Std_overrides/Hide_stdlib_variants/index.html b/sig-builder-no-typ-dup/less-power/Std_overrides/Hide_stdlib_variants/index.html index 4e99c3d..e20b8c7 100644 --- a/sig-builder-no-typ-dup/less-power/Std_overrides/Hide_stdlib_variants/index.html +++ b/sig-builder-no-typ-dup/less-power/Std_overrides/Hide_stdlib_variants/index.html @@ -1,2 +1,2 @@ -Hide_stdlib_variants (less-power.Std_overrides.Hide_stdlib_variants)

Module Std_overrides.Hide_stdlib_variants

Prevent access to the full variant library. Intended to be opened at the top level to hide the Stdlib_variants module, and a couple others.

This is included in the other overrides modules, so you usually don't need to pass it to the -open flag yourself. However, you should use it if you define your own override module based on less-power stdlib variants.

These modules are intentionally empty.

module Stdlib_variants : sig ... end
module Stdlib_components : sig ... end
module Stdlib_alerts : sig ... end
module Threads_alerts : sig ... end
+Hide_stdlib_variants (less-power.Std_overrides.Hide_stdlib_variants)

Module Std_overrides.Hide_stdlib_variants

Prevent access to the full variant library. Intended to be opened at the top level to hide the Stdlib_variants module, and a couple others.

This is included in the other overrides modules, so you usually don't need to pass it to the -open flag yourself. However, you should use it if you define your own override module based on less-power stdlib variants.

These modules are intentionally empty.

module Stdlib_variants : sig ... end
module Stdlib_components : sig ... end
module Stdlib_alerts : sig ... end
module Threads_alerts : sig ... end
diff --git a/sig-builder-no-typ-dup/less-power/Std_overrides/Stdlib_alerting/index.html b/sig-builder-no-typ-dup/less-power/Std_overrides/Stdlib_alerting/index.html index 744e23d..726a728 100644 --- a/sig-builder-no-typ-dup/less-power/Std_overrides/Stdlib_alerting/index.html +++ b/sig-builder-no-typ-dup/less-power/Std_overrides/Stdlib_alerting/index.html @@ -1,5 +1,5 @@ -Stdlib_alerting (less-power.Std_overrides.Stdlib_alerting)

Module Std_overrides.Stdlib_alerting

Puts an alerting Stdlib into scope, from Stdlib_alerts.Stdlib_alerting.

include module type of struct include Stdlib_alerts.Stdlib_alerting end

Stdlib, but with the above module type.

raise primitives and standard exceptions

include sig ... end
val raise : exn -> 'a

Raise the given exception value

val raise_notrace : exn -> 'a

A faster version raise which does not record the backtrace.

  • since 4.02
val failwith : string -> 'a

Raise exception Failure with the given string.

val invalid_arg : string -> 'a

Raise exception Invalid_argument with the given string.

exception Exit

The Exit exception is not raised by any library function. It is provided for use in your programs.

exception Match_failure of string * int * int

Exception raised when none of the cases of a pattern-matching apply. The arguments are the location of the match keyword in the source code (file name, line number, column number).

exception Assert_failure of string * int * int

Exception raised when an assertion fails. The arguments are the location of the assert keyword in the source code (file name, line number, column number).

exception Invalid_argument of string

Exception raised by library functions to signal that the given arguments do not make sense. The string gives some information to the programmer. As a general rule, this exception should not be caught, it denotes a programming error and the code should be modified not to trigger it.

exception Failure of string

Exception raised by library functions to signal that they are undefined on the given arguments. The string is meant to give some information to the programmer; you must not pattern match on the string literal because it may change in future versions (use Failure _ instead).

exception Not_found

Exception raised by search functions when the desired object could not be found.

exception Out_of_memory

Exception raised by the garbage collector when there is insufficient memory to complete the computation. (Not reliable for allocations on the minor heap.)

exception Stack_overflow

Exception raised by the bytecode interpreter when the evaluation stack reaches its maximal size. This often indicates infinite or excessively deep recursion in the user's program.

Before 4.10, it was not fully implemented by the native-code compiler.

exception Sys_error of string

Exception raised by the input/output functions to report an operating system error. The string is meant to give some information to the programmer; you must not pattern match on the string literal because it may change in future versions (use Sys_error _ instead).

exception End_of_file

Exception raised by input functions to signal that the end of file has been reached.

exception Division_by_zero

Exception raised by integer division and remainder operations when their second argument is zero.

exception Sys_blocked_io

A special case of Sys_error raised when no I/O is possible on a non-blocking I/O channel.

exception Undefined_recursive_module of string * int * int

Exception raised when an ill-founded recursive module definition is evaluated. The arguments are the location of the definition in the source code (file name, line number, column number).

Polymorphic comparisons

Not including the impure (==) and (!=).

include sig ... end
val (=) : 'a -> 'a -> bool

e1 = e2 tests for structural equality of e1 and e2. Mutable structures (e.g. references and arrays) are equal if and only if their current contents are structurally equal, even if the two mutable objects are not the same physical object. Equality between functional values raises Invalid_argument. Equality between cyclic data structures may not terminate. Left-associative operator, see Ocaml_operators for more information.

val (<>) : 'a -> 'a -> bool

Negation of Stdlib.(=). Left-associative operator, see Ocaml_operators for more information.

val (<) : 'a -> 'a -> bool

See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

val (>) : 'a -> 'a -> bool

See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

val (<=) : 'a -> 'a -> bool

See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

val (>=) : 'a -> 'a -> bool

Structural ordering functions. These functions coincide with the usual orderings over integers, characters, strings, byte sequences and floating-point numbers, and extend them to a total ordering over all types. The ordering is compatible with ( = ). As in the case of ( = ), mutable structures are compared by contents. Comparison between functional values raises Invalid_argument. Comparison between cyclic structures may not terminate. Left-associative operator, see Ocaml_operators for more information.

val compare : 'a -> 'a -> int

compare x y returns 0 if x is equal to y, a negative integer if x is less than y, and a positive integer if x is greater than y. The ordering implemented by compare is compatible with the comparison predicates =, < and > defined above, with one difference on the treatment of the float value Stdlib.nan. Namely, the comparison predicates treat nan as different from any other float value, including itself; while compare treats nan as equal to itself and less than any other float value. This treatment of nan ensures that compare defines a total ordering relation.

compare applied to functional values may raise Invalid_argument. compare applied to cyclic structures may not terminate.

The compare function can be used as the comparison function required by the Set.Make and Map.Make functors, as well as the List.sort and Array.sort functions.

val min : 'a -> 'a -> 'a

Return the smaller of the two arguments. The result is unspecified if one of the arguments contains the float value nan.

val max : 'a -> 'a -> 'a

Return the greater of the two arguments. The result is unspecified if one of the arguments contains the float value nan.

Physical comparisons

The impure (==) and (!=)

include sig ... end
val (==) : 'a -> 'a -> bool

e1 == e2 tests for physical equality of e1 and e2. On mutable types such as references, arrays, byte sequences, records with mutable fields and objects with mutable instance variables, e1 == e2 is true if and only if physical modification of e1 also affects e2. On non-mutable types, the behavior of ( == ) is implementation-dependent; however, it is guaranteed that e1 == e2 implies compare e1 e2 = 0. Left-associative operator, see Ocaml_operators for more information.

  • alert physical_eq Physical comparisons are not permitted. Hint: did you mean = ?
val (!=) : 'a -> 'a -> bool

Negation of Stdlib.(==). Left-associative operator, see Ocaml_operators for more information.

  • alert physical_eq Physical comparisons are not permitted. Hint: did you mean <> ?

Boolean operations

include sig ... end
val not : bool -> bool

The boolean negation.

val (&&) : bool -> bool -> bool

The boolean 'and'. Evaluation is sequential, left-to-right: in e1 && e2, e1 is evaluated first, and if it returns false, e2 is not evaluated at all. Right-associative operator, see Ocaml_operators for more information.

val (||) : bool -> bool -> bool

The boolean 'or'. Evaluation is sequential, left-to-right: in e1 || e2, e1 is evaluated first, and if it returns true, e2 is not evaluated at all. Right-associative operator, see Ocaml_operators for more information.

Debugging macros

These are safe in the sense that referential transparency is preserved, if two uses of a macro at separate locations are considered separate occurrences.

include sig ... end
val __LOC__ : string

__LOC__ returns the location at which this expression appears in the file currently being parsed by the compiler, with the standard error format of OCaml: "File %S, line %d, characters %d-%d".

  • since 4.02
  • alert debug_macro Debugging macros are not permitted
val __FILE__ : string

__FILE__ returns the name of the file currently being parsed by the compiler.

  • since 4.02
  • alert debug_macro Debugging macros are not permitted
val __LINE__ : int

__LINE__ returns the line number at which this expression appears in the file currently being parsed by the compiler.

  • since 4.02
  • alert debug_macro Debugging macros are not permitted
val __MODULE__ : string

__MODULE__ returns the module name of the file being parsed by the compiler.

  • since 4.02
  • alert debug_macro Debugging macros are not permitted
val __POS__ : string * int * int * int

__POS__ returns a tuple (file,lnum,cnum,enum), corresponding to the location at which this expression appears in the file currently being parsed by the compiler. file is the current filename, lnum the line number, cnum the character position in the line and enum the last character position in the line.

  • since 4.02
  • alert debug_macro Debugging macros are not permitted
val __FUNCTION__ : string

__FUNCTION__ returns the name of the current function or method, including any enclosing modules or classes.

  • since 4.12
  • alert debug_macro Debugging macros are not permitted
val __LOC_OF__ : 'a -> string * 'a

__LOC_OF__ expr returns a pair (loc, expr) where loc is the location of expr in the file currently being parsed by the compiler, with the standard error format of OCaml: "File %S, line %d, characters %d-%d".

  • since 4.02
  • alert debug_macro Debugging macros are not permitted
val __LINE_OF__ : 'a -> int * 'a

__LINE_OF__ expr returns a pair (line, expr), where line is the line number at which the expression expr appears in the file currently being parsed by the compiler.

  • since 4.02
  • alert debug_macro Debugging macros are not permitted
val __POS_OF__ : 'a -> (string * int * int * int) * 'a

__POS_OF__ expr returns a pair (loc,expr), where loc is a tuple (file,lnum,cnum,enum) corresponding to the location at which the expression expr appears in the file currently being parsed by the compiler. file is the current filename, lnum the line number, cnum the character position in the line and enum the last character position in the line.

  • since 4.02
  • alert debug_macro Debugging macros are not permitted

Composition operators

include sig ... end
val (|>) : 'a -> ('a -> 'b) -> 'b

Reverse-application operator: x |> f |> g is exactly equivalent to g (f (x)). Left-associative operator, see Ocaml_operators for more information.

  • since 4.01
val (@@) : ('a -> 'b) -> 'a -> 'b

Application operator: g @@ f @@ x is exactly equivalent to g (f (x)). Right-associative operator, see Ocaml_operators for more information.

  • since 4.01

Integer operations

include sig ... end
val (~-) : int -> int

Unary negation. You can also write - e instead of ~- e. Unary operator, see Ocaml_operators for more information.

val (~+) : int -> int

Unary addition. You can also write + e instead of ~+ e. Unary operator, see Ocaml_operators for more information.

  • since 3.12
val succ : int -> int

succ x is x + 1.

val pred : int -> int

pred x is x - 1.

val (+) : int -> int -> int

Integer addition. Left-associative operator, see Ocaml_operators for more information.

val (-) : int -> int -> int

Integer subtraction. Left-associative operator, , see Ocaml_operators for more information.

val (*) : int -> int -> int

Integer multiplication. Left-associative operator, see Ocaml_operators for more information.

val (/) : int -> int -> int

Integer division. Integer division rounds the real quotient of its arguments towards zero. More precisely, if x >= 0 and y > 0, x / y is the greatest integer less than or equal to the real quotient of x by y. Moreover, (- x) / y = x / (- y) = - (x / y). Left-associative operator, see Ocaml_operators for more information.

val (mod) : int -> int -> int

Integer remainder. If y is not zero, the result of x mod y satisfies the following properties: x = (x / y) * y + x mod y and abs(x mod y) <= abs(y) - 1. If y = 0, x mod y raises Division_by_zero. Note that x mod y is negative only if x < 0. Left-associative operator, see Ocaml_operators for more information.

val abs : int -> int

abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

val (land) : int -> int -> int

Bitwise logical and. Left-associative operator, see Ocaml_operators for more information.

val (lor) : int -> int -> int

Bitwise logical or. Left-associative operator, see Ocaml_operators for more information.

val (lxor) : int -> int -> int

Bitwise logical exclusive or. Left-associative operator, see Ocaml_operators for more information.

val lnot : int -> int

Bitwise logical negation.

val (lsl) : int -> int -> int

n lsl m shifts n to the left by m bits. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

val (lsr) : int -> int -> int

n lsr m shifts n to the right by m bits. This is a logical shift: zeroes are inserted regardless of the sign of n. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

val (asr) : int -> int -> int

n asr m shifts n to the right by m bits. This is an arithmetic shift: the sign bit of n is replicated. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

val max_int : int

The greatest representable integer.

val min_int : int

The smallest representable integer.

Floating-point operations

include sig ... end
val (~-.) : float -> float

Unary negation. You can also write -. e instead of ~-. e. Unary operator, see Ocaml_operators for more information.

val (~+.) : float -> float

Unary addition. You can also write +. e instead of ~+. e. Unary operator, see Ocaml_operators for more information.

  • since 3.12
val (+.) : float -> float -> float

Floating-point addition. Left-associative operator, see Ocaml_operators for more information.

val (-.) : float -> float -> float

Floating-point subtraction. Left-associative operator, see Ocaml_operators for more information.

val (*.) : float -> float -> float

Floating-point multiplication. Left-associative operator, see Ocaml_operators for more information.

val (/.) : float -> float -> float

Floating-point division. Left-associative operator, see Ocaml_operators for more information.

val (**) : float -> float -> float

Exponentiation. Right-associative operator, see Ocaml_operators for more information.

val exp : float -> float

Exponential.

val expm1 : float -> float

expm1 x computes exp x -. 1.0, giving numerically-accurate results even if x is close to 0.0.

  • since 3.12
val acos : float -> float

Arc cosine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between 0.0 and pi.

val asin : float -> float

Arc sine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between -pi/2 and pi/2.

val atan : float -> float

Arc tangent. Result is in radians and is between -pi/2 and pi/2.

val atan2 : float -> float -> float

atan2 y x returns the arc tangent of y /. x. The signs of x and y are used to determine the quadrant of the result. Result is in radians and is between -pi and pi.

val hypot : float -> float -> float

hypot x y returns sqrt(x *. x + y *. y), that is, the length of the hypotenuse of a right-angled triangle with sides of length x and y, or, equivalently, the distance of the point (x,y) to origin. If one of x or y is infinite, returns infinity even if the other is nan.

  • since 4.00
val cos : float -> float

Cosine. Argument is in radians.

val cosh : float -> float

Hyperbolic cosine. Argument is in radians.

val acosh : float -> float

Hyperbolic arc cosine. The argument must fall within the range [1.0, inf]. Result is in radians and is between 0.0 and inf.

  • since 4.13
val log : float -> float

Natural logarithm.

val log10 : float -> float

Base 10 logarithm.

val log1p : float -> float

log1p x computes log(1.0 +. x) (natural logarithm), giving numerically-accurate results even if x is close to 0.0.

  • since 3.12
val sin : float -> float

Sine. Argument is in radians.

val sinh : float -> float

Hyperbolic sine. Argument is in radians.

val asinh : float -> float

Hyperbolic arc sine. The argument and result range over the entire real line. Result is in radians.

  • since 4.13
val sqrt : float -> float

Square root.

val tan : float -> float

Tangent. Argument is in radians.

val tanh : float -> float

Hyperbolic tangent. Argument is in radians.

val atanh : float -> float

Hyperbolic arc tangent. The argument must fall within the range [-1.0, 1.0]. Result is in radians and ranges over the entire real line.

  • since 4.13
val ceil : float -> float

Round above to an integer value. ceil f returns the least integer value greater than or equal to f. The result is returned as a float.

val floor : float -> float

Round below to an integer value. floor f returns the greatest integer value less than or equal to f. The result is returned as a float.

val abs_float : float -> float

abs_float f returns the absolute value of f.

val copysign : float -> float -> float

copysign x y returns a float whose absolute value is that of x and whose sign is that of y. If x is nan, returns nan. If y is nan, returns either x or -. x, but it is not specified which.

  • since 4.00
val mod_float : float -> float -> float

mod_float a b returns the remainder of a with respect to b. The returned value is a -. n *. b, where n is the quotient a /. b rounded towards zero to an integer.

val frexp : float -> float * int

frexp f returns the pair of the significant and the exponent of f. When f is zero, the significant x and the exponent n of f are equal to zero. When f is non-zero, they are defined by f = x *. 2 ** n and 0.5 <= x < 1.0.

val ldexp : float -> int -> float

ldexp x n returns x *. 2 ** n.

val modf : float -> float * float

modf f returns the pair of the fractional and integral part of f.

val float : int -> float
val float_of_int : int -> float

Convert an integer to floating-point.

val truncate : float -> int
val int_of_float : float -> int

Truncate the given floating-point number to an integer. The result is unspecified if the argument is nan or falls outside the range of representable integers.

val infinity : float

Positive infinity.

val neg_infinity : float

Negative infinity.

val nan : float

A special floating-point value denoting the result of an undefined operation such as 0.0 /. 0.0. Stands for 'not a number'. Any floating-point operation with nan as argument returns nan as result, unless otherwise specified in IEEE 754 standard. As for floating-point comparisons, =, <, <=, > and >= return false and <> returns true if one or both of their arguments is nan.

nan is a quiet NaN since 5.1; it was a signaling NaN before.

val max_float : float

The largest positive finite value of type float.

val min_float : float

The smallest positive, non-zero, non-denormalized value of type float.

val epsilon_float : float

The difference between 1.0 and the smallest exactly representable floating-point number greater than 1.0.

val classify_float : float -> Stdlib.fpclass

Return the class of the given floating-point number: normal, subnormal, zero, infinite, or not a number.

type fpclass = Stdlib.fpclass =
  1. | FP_normal
  2. | FP_subnormal
  3. | FP_zero
  4. | FP_infinite
  5. | FP_nan

String operations

More in Stdlib.String

include sig ... end
val (^) : string -> string -> string

String concatenation. Right-associative operator, see Ocaml_operators for more information.

  • raises Invalid_argument

    if the result is longer then than Sys.max_string_length bytes.

Character operations

More in Stdlib.Char

include sig ... end
val int_of_char : char -> int

Return the ASCII code of the argument.

val char_of_int : int -> char

Return the character with the given ASCII code.

Unit operations

include sig ... end
val ignore : 'a -> unit

Discard the value of its argument and return (). For instance, ignore(f x) discards the result of the side-effecting function f. It is equivalent to f x; (), except that the latter may generate a compiler warning; writing ignore(f x) instead avoids the warning.

String conversion functions

include sig ... end
val string_of_bool : bool -> string

Return the string representation of a boolean. As the returned values may be shared, the user should not modify them directly.

val bool_of_string_opt : string -> bool option

Convert the given string to a boolean.

Return None if the string is not "true" or "false".

  • since 4.05
val bool_of_string : string -> bool

Same as Stdlib.bool_of_string_opt, but raise Invalid_argument "bool_of_string" instead of returning None.

val string_of_int : int -> string

Return the string representation of an integer, in decimal.

val int_of_string_opt : string -> int option

Convert the given string to an integer. The string is read in decimal (by default, or if the string begins with 0u), in hexadecimal (if it begins with 0x or 0X), in octal (if it begins with 0o or 0O), or in binary (if it begins with 0b or 0B).

The 0u prefix reads the input as an unsigned integer in the range [0, 2*max_int+1]. If the input exceeds max_int it is converted to the signed integer min_int + input - max_int - 1.

The _ (underscore) character can appear anywhere in the string and is ignored.

Return None if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type int.

  • since 4.05
val int_of_string : string -> int

Same as Stdlib.int_of_string_opt, but raise Failure "int_of_string" instead of returning None.

val string_of_float : float -> string

Return a string representation of a floating-point number.

This conversion can involve a loss of precision. For greater control over the manner in which the number is printed, see Printf.

val float_of_string_opt : string -> float option

Convert the given string to a float. The string is read in decimal (by default) or in hexadecimal (marked by 0x or 0X).

The format of decimal floating-point numbers is [-] dd.ddd (e|E) [+|-] dd , where d stands for a decimal digit.

The format of hexadecimal floating-point numbers is [-] 0(x|X) hh.hhh (p|P) [+|-] dd , where h stands for an hexadecimal digit and d for a decimal digit.

In both cases, at least one of the integer and fractional parts must be given; the exponent part is optional.

The _ (underscore) character can appear anywhere in the string and is ignored.

Depending on the execution platforms, other representations of floating-point numbers can be accepted, but should not be relied upon.

Return None if the given string is not a valid representation of a float.

  • since 4.05
val float_of_string : string -> float

Same as Stdlib.float_of_string_opt, but raise Failure "float_of_string" instead of returning None.

Pair operations

include sig ... end
val fst : ('a * 'b) -> 'a

Return the first component of a pair.

val snd : ('a * 'b) -> 'b

Return the second component of a pair.

Character operations

More in Stdlib.List

include sig ... end
val (@) : 'a list -> 'a list -> 'a list

l0 @ l1 appends l1 to l0. Same function as List.append. Right-associative operator, see Ocaml_operators for more information.

  • since 5.1 this function is tail-recursive.
  • alert list_op List operations are not permitted

I/O operations

This is regular, unmocked, IO.

type in_channel = Stdlib.in_channel
  • alert input_output Input/output is not permitted
type out_channel = Stdlib.out_channel
  • alert input_output Input/output is not permitted
type open_flag = Stdlib.open_flag =
  1. | Open_rdonly
  2. | Open_wronly
  3. | Open_append
  4. | Open_creat
  5. | Open_trunc
  6. | Open_excl
  7. | Open_binary
  8. | Open_text
  9. | Open_nonblock
  • alert input_output Input/output is not permitted
include sig ... end
val stdin : in_channel

The standard input for the process.

  • alert input_output Input/output is not permitted
val stdout : out_channel

The standard output for the process.

  • alert input_output Input/output is not permitted
val stderr : out_channel

The standard error output for the process.

  • alert input_output Input/output is not permitted
val print_char : char -> unit

Print a character on standard output.

  • alert input_output Input/output is not permitted
val print_string : string -> unit

Print a string on standard output.

  • alert input_output Input/output is not permitted
val print_bytes : bytes -> unit

Print a byte sequence on standard output.

  • since 4.02
  • alert input_output Input/output is not permitted
val print_int : int -> unit

Print an integer, in decimal, on standard output.

  • alert input_output Input/output is not permitted
val print_float : float -> unit

Print a floating-point number, in decimal, on standard output.

The conversion of the number to a string uses string_of_float and can involve a loss of precision.

  • alert input_output Input/output is not permitted
val print_endline : string -> unit

Print a string, followed by a newline character, on standard output and flush standard output.

  • alert input_output Input/output is not permitted
val print_newline : unit -> unit

Print a newline character on standard output, and flush standard output. This can be used to simulate line buffering of standard output.

  • alert input_output Input/output is not permitted
val prerr_char : char -> unit

Print a character on standard error.

  • alert input_output Input/output is not permitted
val prerr_string : string -> unit

Print a string on standard error.

  • alert input_output Input/output is not permitted
val prerr_bytes : bytes -> unit

Print a byte sequence on standard error.

  • since 4.02
  • alert input_output Input/output is not permitted
val prerr_int : int -> unit

Print an integer, in decimal, on standard error.

  • alert input_output Input/output is not permitted
val prerr_float : float -> unit

Print a floating-point number, in decimal, on standard error.

The conversion of the number to a string uses string_of_float and can involve a loss of precision.

  • alert input_output Input/output is not permitted
val prerr_endline : string -> unit

Print a string, followed by a newline character on standard error and flush standard error.

  • alert input_output Input/output is not permitted
val prerr_newline : unit -> unit

Print a newline character on standard error, and flush standard error.

  • alert input_output Input/output is not permitted
val read_line : unit -> string

Flush standard output, then read characters from standard input until a newline character is encountered.

Return the string of all characters read, without the newline character at the end.

  • raises End_of_file

    if the end of the file is reached at the beginning of line.

  • alert input_output Input/output is not permitted
val read_int_opt : unit -> int option

Flush standard output, then read one line from standard input and convert it to an integer.

Return None if the line read is not a valid representation of an integer.

  • since 4.05
  • alert input_output Input/output is not permitted
val read_int : unit -> int

Same as Stdlib.read_int_opt, but raise Failure "int_of_string" instead of returning None.

  • alert input_output Input/output is not permitted
val read_float_opt : unit -> float option

Flush standard output, then read one line from standard input and convert it to a floating-point number.

Return None if the line read is not a valid representation of a floating-point number.

  • since 4.05
  • alert input_output Input/output is not permitted
val read_float : unit -> float

Same as Stdlib.read_float_opt, but raise Failure "float_of_string" instead of returning None.

  • alert input_output Input/output is not permitted
val open_out : string -> out_channel

Open the named file for writing, and return a new output channel on that file, positioned at the beginning of the file. The file is truncated to zero length if it already exists. It is created if it does not already exists.

  • alert input_output Input/output is not permitted
val open_out_bin : string -> out_channel

Same as Stdlib.open_out, but the file is opened in binary mode, so that no translation takes place during writes. On operating systems that do not distinguish between text mode and binary mode, this function behaves like Stdlib.open_out.

  • alert input_output Input/output is not permitted
val open_out_gen : open_flag list -> int -> string -> out_channel

open_out_gen mode perm filename opens the named file for writing, as described above. The extra argument mode specifies the opening mode. The extra argument perm specifies the file permissions, in case the file must be created. Stdlib.open_out and Stdlib.open_out_bin are special cases of this function.

  • alert input_output Input/output is not permitted
val flush : out_channel -> unit

Flush the buffer associated with the given output channel, performing all pending writes on that channel. Interactive programs must be careful about flushing standard output and standard error at the right time.

  • alert input_output Input/output is not permitted
val flush_all : unit -> unit

Flush all open output channels; ignore errors.

  • alert input_output Input/output is not permitted
val output_char : out_channel -> char -> unit

Write the character on the given output channel.

  • alert input_output Input/output is not permitted
val output_string : out_channel -> string -> unit

Write the string on the given output channel.

  • alert input_output Input/output is not permitted
val output_bytes : out_channel -> bytes -> unit

Write the byte sequence on the given output channel.

  • since 4.02
  • alert input_output Input/output is not permitted
val output : out_channel -> bytes -> int -> int -> unit

output oc buf pos len writes len characters from byte sequence buf, starting at offset pos, to the given output channel oc.

  • alert input_output Input/output is not permitted
val output_substring : out_channel -> string -> int -> int -> unit

Same as output but take a string as argument instead of a byte sequence.

  • since 4.02
  • alert input_output Input/output is not permitted
val output_byte : out_channel -> int -> unit

Write one 8-bit integer (as the single character with that code) on the given output channel. The given integer is taken modulo 256.

  • alert input_output Input/output is not permitted
val output_binary_int : out_channel -> int -> unit

Write one integer in binary format (4 bytes, big-endian) on the given output channel. The given integer is taken modulo 232. The only reliable way to read it back is through the Stdlib.input_binary_int function. The format is compatible across all machines for a given version of OCaml.

  • alert input_output Input/output is not permitted
val output_value : out_channel -> 'a -> unit

Write the representation of a structured value of any type to a channel. Circularities and sharing inside the value are detected and preserved. The object can be read back, by the function Stdlib.input_value. See the description of module Marshal for more information. Stdlib.output_value is equivalent to Marshal.to_channel with an empty list of flags.

  • alert input_output Input/output is not permitted
val seek_out : out_channel -> int -> unit

seek_out chan pos sets the current writing position to pos for channel chan. This works only for regular files. On files of other kinds (such as terminals, pipes and sockets), the behavior is unspecified.

  • alert input_output Input/output is not permitted
val pos_out : out_channel -> int

Return the current writing position for the given channel. Does not work on channels opened with the Open_append flag (returns unspecified results). For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos_out, then going back to this position using seek_out will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

  • alert input_output Input/output is not permitted
val out_channel_length : out_channel -> int

Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless.

  • alert input_output Input/output is not permitted
val close_out : out_channel -> unit

Close the given channel, flushing all buffered write operations. Output functions raise a Sys_error exception when they are applied to a closed output channel, except close_out and flush, which do nothing when applied to an already closed channel. Note that close_out may raise Sys_error if the operating system signals an error when flushing or closing.

  • alert input_output Input/output is not permitted
val close_out_noerr : out_channel -> unit

Same as close_out, but ignore all errors.

  • alert input_output Input/output is not permitted
val set_binary_mode_out : out_channel -> bool -> unit

set_binary_mode_out oc true sets the channel oc to binary mode: no translations take place during output. set_binary_mode_out oc false sets the channel oc to text mode: depending on the operating system, some translations may take place during output. For instance, under Windows, end-of-lines will be translated from \n to \r\n. This function has no effect under operating systems that do not distinguish between text mode and binary mode.

  • alert input_output Input/output is not permitted
val open_in : string -> in_channel

Open the named file for reading, and return a new input channel on that file, positioned at the beginning of the file.

  • alert input_output Input/output is not permitted
val open_in_bin : string -> in_channel

Same as Stdlib.open_in, but the file is opened in binary mode, so that no translation takes place during reads. On operating systems that do not distinguish between text mode and binary mode, this function behaves like Stdlib.open_in.

  • alert input_output Input/output is not permitted
val open_in_gen : open_flag list -> int -> string -> in_channel

open_in_gen mode perm filename opens the named file for reading, as described above. The extra arguments mode and perm specify the opening mode and file permissions. Stdlib.open_in and Stdlib.open_in_bin are special cases of this function.

  • alert input_output Input/output is not permitted
val input_char : in_channel -> char

Read one character from the given input channel.

  • raises End_of_file

    if there are no more characters to read.

  • alert input_output Input/output is not permitted
val input_line : in_channel -> string

Read characters from the given input channel, until a newline character is encountered. Return the string of all characters read, without the newline character at the end.

  • raises End_of_file

    if the end of the file is reached at the beginning of line.

  • alert input_output Input/output is not permitted
val input : in_channel -> bytes -> int -> int -> int

input ic buf pos len reads up to len characters from the given channel ic, storing them in byte sequence buf, starting at character number pos. It returns the actual number of characters read, between 0 and len (inclusive). A return value of 0 means that the end of file was reached. A return value between 0 and len exclusive means that not all requested len characters were read, either because no more characters were available at that time, or because the implementation found it convenient to do a partial read; input must be called again to read the remaining characters, if desired. (See also Stdlib.really_input for reading exactly len characters.) Exception Invalid_argument "input" is raised if pos and len do not designate a valid range of buf.

  • alert input_output Input/output is not permitted
val really_input : in_channel -> bytes -> int -> int -> unit

really_input ic buf pos len reads len characters from channel ic, storing them in byte sequence buf, starting at character number pos.

  • raises End_of_file

    if the end of file is reached before len characters have been read.

  • alert input_output Input/output is not permitted
val really_input_string : in_channel -> int -> string

really_input_string ic len reads len characters from channel ic and returns them in a new string.

  • raises End_of_file

    if the end of file is reached before len characters have been read.

  • since 4.02
  • alert input_output Input/output is not permitted
val input_byte : in_channel -> int

Same as Stdlib.input_char, but return the 8-bit integer representing the character.

  • alert input_output Input/output is not permitted
val input_binary_int : in_channel -> int

Read an integer encoded in binary format (4 bytes, big-endian) from the given input channel. See Stdlib.output_binary_int.

  • raises End_of_file

    if the end of file was reached while reading the integer.

  • alert input_output Input/output is not permitted
val input_value : in_channel -> 'a

Read the representation of a structured value, as produced by Stdlib.output_value, and return the corresponding value. This function is identical to Marshal.from_channel; see the description of module Marshal for more information, in particular concerning the lack of type safety.

  • alert input_output Input/output is not permitted
val seek_in : in_channel -> int -> unit

seek_in chan pos sets the current reading position to pos for channel chan. This works only for regular files. On files of other kinds, the behavior is unspecified.

  • alert input_output Input/output is not permitted
val pos_in : in_channel -> int

Return the current reading position for the given channel. For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos_in, then going back to this position using seek_in will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

  • alert input_output Input/output is not permitted
val in_channel_length : in_channel -> int

Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless. The returned size does not take into account the end-of-line translations that can be performed when reading from a channel opened in text mode.

  • alert input_output Input/output is not permitted
val close_in : in_channel -> unit

Close the given channel. Input functions raise a Sys_error exception when they are applied to a closed input channel, except close_in, which does nothing when applied to an already closed channel.

  • alert input_output Input/output is not permitted
val close_in_noerr : in_channel -> unit

Same as close_in, but ignore all errors.

  • alert input_output Input/output is not permitted
val set_binary_mode_in : in_channel -> bool -> unit

set_binary_mode_in ic true sets the channel ic to binary mode: no translations take place during input. set_binary_mode_out ic false sets the channel ic to text mode: depending on the operating system, some translations may take place during input. For instance, under Windows, end-of-lines will be translated from \r\n to \n. This function has no effect under operating systems that do not distinguish between text mode and binary mode.

  • alert input_output Input/output is not permitted

Operations on large files. This sub-module provides 64-bit variants of the channel functions that manipulate file positions and file sizes. By representing positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), these alternate functions allow operating on files whose sizes are greater than max_int.

References

type 'a ref = 'a Stdlib.ref
include sig ... end
val ref : 'a -> 'a ref

Return a fresh reference containing the given value.

  • alert impure References are not permitted
val (!) : 'a ref -> 'a

!r returns the current contents of reference r. Equivalent to fun r -> r.contents. Unary operator, see Ocaml_operators for more information.

  • alert impure References are not permitted
val (:=) : 'a ref -> 'a -> unit

r := a stores the value of a in reference r. Equivalent to fun r v -> r.contents <- v. Right-associative operator, see Ocaml_operators for more information.

  • alert impure References are not permitted
val incr : int ref -> unit

Increment the integer contained in the given reference. Equivalent to fun r -> r := succ !r.

  • alert impure References are not permitted
val decr : int ref -> unit

Decrement the integer contained in the given reference. Equivalent to fun r -> r := pred !r.

  • alert impure References are not permitted

Result type

More in Stdlib.Result

type ('a, 'b) result = ('a, 'b) Stdlib.result =
  1. | Ok of 'a
  2. | Error of 'b

Format strings

More in Stdlib.Scanf, Stdlib.Printf, and Stdlib.Format

include sig ... end
type ('a, 'b, 'c, 'd, 'e, 'f) format6 = +Stdlib_alerting (less-power.Std_overrides.Stdlib_alerting)

Module Std_overrides.Stdlib_alerting

Puts an alerting Stdlib into scope, from Stdlib_alerts.Stdlib_alerting.

include module type of struct include Stdlib_alerts.Stdlib_alerting end

Stdlib, but with the above module type.

raise primitives and standard exceptions

include sig ... end
val raise : exn -> 'a

Raise the given exception value

val raise_notrace : exn -> 'a

A faster version raise which does not record the backtrace.

  • since 4.02
val failwith : string -> 'a

Raise exception Failure with the given string.

val invalid_arg : string -> 'a

Raise exception Invalid_argument with the given string.

exception Exit

The Exit exception is not raised by any library function. It is provided for use in your programs.

exception Match_failure of string * int * int

Exception raised when none of the cases of a pattern-matching apply. The arguments are the location of the match keyword in the source code (file name, line number, column number).

exception Assert_failure of string * int * int

Exception raised when an assertion fails. The arguments are the location of the assert keyword in the source code (file name, line number, column number).

exception Invalid_argument of string

Exception raised by library functions to signal that the given arguments do not make sense. The string gives some information to the programmer. As a general rule, this exception should not be caught, it denotes a programming error and the code should be modified not to trigger it.

exception Failure of string

Exception raised by library functions to signal that they are undefined on the given arguments. The string is meant to give some information to the programmer; you must not pattern match on the string literal because it may change in future versions (use Failure _ instead).

exception Not_found

Exception raised by search functions when the desired object could not be found.

exception Out_of_memory

Exception raised by the garbage collector when there is insufficient memory to complete the computation. (Not reliable for allocations on the minor heap.)

exception Stack_overflow

Exception raised by the bytecode interpreter when the evaluation stack reaches its maximal size. This often indicates infinite or excessively deep recursion in the user's program.

Before 4.10, it was not fully implemented by the native-code compiler.

exception Sys_error of string

Exception raised by the input/output functions to report an operating system error. The string is meant to give some information to the programmer; you must not pattern match on the string literal because it may change in future versions (use Sys_error _ instead).

exception End_of_file

Exception raised by input functions to signal that the end of file has been reached.

exception Division_by_zero

Exception raised by integer division and remainder operations when their second argument is zero.

exception Sys_blocked_io

A special case of Sys_error raised when no I/O is possible on a non-blocking I/O channel.

exception Undefined_recursive_module of string * int * int

Exception raised when an ill-founded recursive module definition is evaluated. The arguments are the location of the definition in the source code (file name, line number, column number).

Polymorphic comparisons

Not including the impure (==) and (!=).

include sig ... end
val (=) : 'a -> 'a -> bool

e1 = e2 tests for structural equality of e1 and e2. Mutable structures (e.g. references and arrays) are equal if and only if their current contents are structurally equal, even if the two mutable objects are not the same physical object. Equality between functional values raises Invalid_argument. Equality between cyclic data structures may not terminate. Left-associative operator, see Ocaml_operators for more information.

val (<>) : 'a -> 'a -> bool

Negation of Stdlib.(=). Left-associative operator, see Ocaml_operators for more information.

val (<) : 'a -> 'a -> bool

See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

val (>) : 'a -> 'a -> bool

See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

val (<=) : 'a -> 'a -> bool

See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

val (>=) : 'a -> 'a -> bool

Structural ordering functions. These functions coincide with the usual orderings over integers, characters, strings, byte sequences and floating-point numbers, and extend them to a total ordering over all types. The ordering is compatible with ( = ). As in the case of ( = ), mutable structures are compared by contents. Comparison between functional values raises Invalid_argument. Comparison between cyclic structures may not terminate. Left-associative operator, see Ocaml_operators for more information.

val compare : 'a -> 'a -> int

compare x y returns 0 if x is equal to y, a negative integer if x is less than y, and a positive integer if x is greater than y. The ordering implemented by compare is compatible with the comparison predicates =, < and > defined above, with one difference on the treatment of the float value Stdlib.nan. Namely, the comparison predicates treat nan as different from any other float value, including itself; while compare treats nan as equal to itself and less than any other float value. This treatment of nan ensures that compare defines a total ordering relation.

compare applied to functional values may raise Invalid_argument. compare applied to cyclic structures may not terminate.

The compare function can be used as the comparison function required by the Set.Make and Map.Make functors, as well as the List.sort and Array.sort functions.

val min : 'a -> 'a -> 'a

Return the smaller of the two arguments. The result is unspecified if one of the arguments contains the float value nan.

val max : 'a -> 'a -> 'a

Return the greater of the two arguments. The result is unspecified if one of the arguments contains the float value nan.

Physical comparisons

The impure (==) and (!=)

include sig ... end
val (==) : 'a -> 'a -> bool

e1 == e2 tests for physical equality of e1 and e2. On mutable types such as references, arrays, byte sequences, records with mutable fields and objects with mutable instance variables, e1 == e2 is true if and only if physical modification of e1 also affects e2. On non-mutable types, the behavior of ( == ) is implementation-dependent; however, it is guaranteed that e1 == e2 implies compare e1 e2 = 0. Left-associative operator, see Ocaml_operators for more information.

  • alert physical_eq Physical comparisons are not permitted. Hint: did you mean = ?
val (!=) : 'a -> 'a -> bool

Negation of Stdlib.(==). Left-associative operator, see Ocaml_operators for more information.

  • alert physical_eq Physical comparisons are not permitted. Hint: did you mean <> ?

Boolean operations

include sig ... end
val not : bool -> bool

The boolean negation.

val (&&) : bool -> bool -> bool

The boolean 'and'. Evaluation is sequential, left-to-right: in e1 && e2, e1 is evaluated first, and if it returns false, e2 is not evaluated at all. Right-associative operator, see Ocaml_operators for more information.

val (||) : bool -> bool -> bool

The boolean 'or'. Evaluation is sequential, left-to-right: in e1 || e2, e1 is evaluated first, and if it returns true, e2 is not evaluated at all. Right-associative operator, see Ocaml_operators for more information.

Debugging macros

These are safe in the sense that referential transparency is preserved, if two uses of a macro at separate locations are considered separate occurrences.

include sig ... end
val __LOC__ : string

__LOC__ returns the location at which this expression appears in the file currently being parsed by the compiler, with the standard error format of OCaml: "File %S, line %d, characters %d-%d".

  • since 4.02
  • alert debug_macro Debugging macros are not permitted
val __FILE__ : string

__FILE__ returns the name of the file currently being parsed by the compiler.

  • since 4.02
  • alert debug_macro Debugging macros are not permitted
val __LINE__ : int

__LINE__ returns the line number at which this expression appears in the file currently being parsed by the compiler.

  • since 4.02
  • alert debug_macro Debugging macros are not permitted
val __MODULE__ : string

__MODULE__ returns the module name of the file being parsed by the compiler.

  • since 4.02
  • alert debug_macro Debugging macros are not permitted
val __POS__ : string * int * int * int

__POS__ returns a tuple (file,lnum,cnum,enum), corresponding to the location at which this expression appears in the file currently being parsed by the compiler. file is the current filename, lnum the line number, cnum the character position in the line and enum the last character position in the line.

  • since 4.02
  • alert debug_macro Debugging macros are not permitted
val __FUNCTION__ : string

__FUNCTION__ returns the name of the current function or method, including any enclosing modules or classes.

  • since 4.12
  • alert debug_macro Debugging macros are not permitted
val __LOC_OF__ : 'a -> string * 'a

__LOC_OF__ expr returns a pair (loc, expr) where loc is the location of expr in the file currently being parsed by the compiler, with the standard error format of OCaml: "File %S, line %d, characters %d-%d".

  • since 4.02
  • alert debug_macro Debugging macros are not permitted
val __LINE_OF__ : 'a -> int * 'a

__LINE_OF__ expr returns a pair (line, expr), where line is the line number at which the expression expr appears in the file currently being parsed by the compiler.

  • since 4.02
  • alert debug_macro Debugging macros are not permitted
val __POS_OF__ : 'a -> (string * int * int * int) * 'a

__POS_OF__ expr returns a pair (loc,expr), where loc is a tuple (file,lnum,cnum,enum) corresponding to the location at which the expression expr appears in the file currently being parsed by the compiler. file is the current filename, lnum the line number, cnum the character position in the line and enum the last character position in the line.

  • since 4.02
  • alert debug_macro Debugging macros are not permitted

Composition operators

include sig ... end
val (|>) : 'a -> ('a -> 'b) -> 'b

Reverse-application operator: x |> f |> g is exactly equivalent to g (f (x)). Left-associative operator, see Ocaml_operators for more information.

  • since 4.01
val (@@) : ('a -> 'b) -> 'a -> 'b

Application operator: g @@ f @@ x is exactly equivalent to g (f (x)). Right-associative operator, see Ocaml_operators for more information.

  • since 4.01

Integer operations

include sig ... end
val (~-) : int -> int

Unary negation. You can also write - e instead of ~- e. Unary operator, see Ocaml_operators for more information.

val (~+) : int -> int

Unary addition. You can also write + e instead of ~+ e. Unary operator, see Ocaml_operators for more information.

  • since 3.12
val succ : int -> int

succ x is x + 1.

val pred : int -> int

pred x is x - 1.

val (+) : int -> int -> int

Integer addition. Left-associative operator, see Ocaml_operators for more information.

val (-) : int -> int -> int

Integer subtraction. Left-associative operator, , see Ocaml_operators for more information.

val (*) : int -> int -> int

Integer multiplication. Left-associative operator, see Ocaml_operators for more information.

val (/) : int -> int -> int

Integer division. Integer division rounds the real quotient of its arguments towards zero. More precisely, if x >= 0 and y > 0, x / y is the greatest integer less than or equal to the real quotient of x by y. Moreover, (- x) / y = x / (- y) = - (x / y). Left-associative operator, see Ocaml_operators for more information.

val (mod) : int -> int -> int

Integer remainder. If y is not zero, the result of x mod y satisfies the following properties: x = (x / y) * y + x mod y and abs(x mod y) <= abs(y) - 1. If y = 0, x mod y raises Division_by_zero. Note that x mod y is negative only if x < 0. Left-associative operator, see Ocaml_operators for more information.

val abs : int -> int

abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

val (land) : int -> int -> int

Bitwise logical and. Left-associative operator, see Ocaml_operators for more information.

val (lor) : int -> int -> int

Bitwise logical or. Left-associative operator, see Ocaml_operators for more information.

val (lxor) : int -> int -> int

Bitwise logical exclusive or. Left-associative operator, see Ocaml_operators for more information.

val lnot : int -> int

Bitwise logical negation.

val (lsl) : int -> int -> int

n lsl m shifts n to the left by m bits. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

val (lsr) : int -> int -> int

n lsr m shifts n to the right by m bits. This is a logical shift: zeroes are inserted regardless of the sign of n. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

val (asr) : int -> int -> int

n asr m shifts n to the right by m bits. This is an arithmetic shift: the sign bit of n is replicated. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

val max_int : int

The greatest representable integer.

val min_int : int

The smallest representable integer.

Floating-point operations

include sig ... end
val (~-.) : float -> float

Unary negation. You can also write -. e instead of ~-. e. Unary operator, see Ocaml_operators for more information.

val (~+.) : float -> float

Unary addition. You can also write +. e instead of ~+. e. Unary operator, see Ocaml_operators for more information.

  • since 3.12
val (+.) : float -> float -> float

Floating-point addition. Left-associative operator, see Ocaml_operators for more information.

val (-.) : float -> float -> float

Floating-point subtraction. Left-associative operator, see Ocaml_operators for more information.

val (*.) : float -> float -> float

Floating-point multiplication. Left-associative operator, see Ocaml_operators for more information.

val (/.) : float -> float -> float

Floating-point division. Left-associative operator, see Ocaml_operators for more information.

val (**) : float -> float -> float

Exponentiation. Right-associative operator, see Ocaml_operators for more information.

val exp : float -> float

Exponential.

val expm1 : float -> float

expm1 x computes exp x -. 1.0, giving numerically-accurate results even if x is close to 0.0.

  • since 3.12
val acos : float -> float

Arc cosine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between 0.0 and pi.

val asin : float -> float

Arc sine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between -pi/2 and pi/2.

val atan : float -> float

Arc tangent. Result is in radians and is between -pi/2 and pi/2.

val atan2 : float -> float -> float

atan2 y x returns the arc tangent of y /. x. The signs of x and y are used to determine the quadrant of the result. Result is in radians and is between -pi and pi.

val hypot : float -> float -> float

hypot x y returns sqrt(x *. x + y *. y), that is, the length of the hypotenuse of a right-angled triangle with sides of length x and y, or, equivalently, the distance of the point (x,y) to origin. If one of x or y is infinite, returns infinity even if the other is nan.

  • since 4.00
val cos : float -> float

Cosine. Argument is in radians.

val cosh : float -> float

Hyperbolic cosine. Argument is in radians.

val acosh : float -> float

Hyperbolic arc cosine. The argument must fall within the range [1.0, inf]. Result is in radians and is between 0.0 and inf.

  • since 4.13
val log : float -> float

Natural logarithm.

val log10 : float -> float

Base 10 logarithm.

val log1p : float -> float

log1p x computes log(1.0 +. x) (natural logarithm), giving numerically-accurate results even if x is close to 0.0.

  • since 3.12
val sin : float -> float

Sine. Argument is in radians.

val sinh : float -> float

Hyperbolic sine. Argument is in radians.

val asinh : float -> float

Hyperbolic arc sine. The argument and result range over the entire real line. Result is in radians.

  • since 4.13
val sqrt : float -> float

Square root.

val tan : float -> float

Tangent. Argument is in radians.

val tanh : float -> float

Hyperbolic tangent. Argument is in radians.

val atanh : float -> float

Hyperbolic arc tangent. The argument must fall within the range [-1.0, 1.0]. Result is in radians and ranges over the entire real line.

  • since 4.13
val ceil : float -> float

Round above to an integer value. ceil f returns the least integer value greater than or equal to f. The result is returned as a float.

val floor : float -> float

Round below to an integer value. floor f returns the greatest integer value less than or equal to f. The result is returned as a float.

val abs_float : float -> float

abs_float f returns the absolute value of f.

val copysign : float -> float -> float

copysign x y returns a float whose absolute value is that of x and whose sign is that of y. If x is nan, returns nan. If y is nan, returns either x or -. x, but it is not specified which.

  • since 4.00
val mod_float : float -> float -> float

mod_float a b returns the remainder of a with respect to b. The returned value is a -. n *. b, where n is the quotient a /. b rounded towards zero to an integer.

val frexp : float -> float * int

frexp f returns the pair of the significant and the exponent of f. When f is zero, the significant x and the exponent n of f are equal to zero. When f is non-zero, they are defined by f = x *. 2 ** n and 0.5 <= x < 1.0.

val ldexp : float -> int -> float

ldexp x n returns x *. 2 ** n.

val modf : float -> float * float

modf f returns the pair of the fractional and integral part of f.

val float : int -> float
val float_of_int : int -> float

Convert an integer to floating-point.

val truncate : float -> int
val int_of_float : float -> int

Truncate the given floating-point number to an integer. The result is unspecified if the argument is nan or falls outside the range of representable integers.

val infinity : float

Positive infinity.

val neg_infinity : float

Negative infinity.

val nan : float

A special floating-point value denoting the result of an undefined operation such as 0.0 /. 0.0. Stands for 'not a number'. Any floating-point operation with nan as argument returns nan as result, unless otherwise specified in IEEE 754 standard. As for floating-point comparisons, =, <, <=, > and >= return false and <> returns true if one or both of their arguments is nan.

nan is a quiet NaN since 5.1; it was a signaling NaN before.

val max_float : float

The largest positive finite value of type float.

val min_float : float

The smallest positive, non-zero, non-denormalized value of type float.

val epsilon_float : float

The difference between 1.0 and the smallest exactly representable floating-point number greater than 1.0.

val classify_float : float -> Stdlib.fpclass

Return the class of the given floating-point number: normal, subnormal, zero, infinite, or not a number.

type fpclass = Stdlib.fpclass =
  1. | FP_normal
  2. | FP_subnormal
  3. | FP_zero
  4. | FP_infinite
  5. | FP_nan

String operations

More in Stdlib.String

include sig ... end
val (^) : string -> string -> string

String concatenation. Right-associative operator, see Ocaml_operators for more information.

  • raises Invalid_argument

    if the result is longer then than Sys.max_string_length bytes.

Character operations

More in Stdlib.Char

include sig ... end
val int_of_char : char -> int

Return the ASCII code of the argument.

val char_of_int : int -> char

Return the character with the given ASCII code.

Unit operations

include sig ... end
val ignore : 'a -> unit

Discard the value of its argument and return (). For instance, ignore(f x) discards the result of the side-effecting function f. It is equivalent to f x; (), except that the latter may generate a compiler warning; writing ignore(f x) instead avoids the warning.

String conversion functions

include sig ... end
val string_of_bool : bool -> string

Return the string representation of a boolean. As the returned values may be shared, the user should not modify them directly.

val bool_of_string_opt : string -> bool option

Convert the given string to a boolean.

Return None if the string is not "true" or "false".

  • since 4.05
val bool_of_string : string -> bool

Same as Stdlib.bool_of_string_opt, but raise Invalid_argument "bool_of_string" instead of returning None.

val string_of_int : int -> string

Return the string representation of an integer, in decimal.

val int_of_string_opt : string -> int option

Convert the given string to an integer. The string is read in decimal (by default, or if the string begins with 0u), in hexadecimal (if it begins with 0x or 0X), in octal (if it begins with 0o or 0O), or in binary (if it begins with 0b or 0B).

The 0u prefix reads the input as an unsigned integer in the range [0, 2*max_int+1]. If the input exceeds max_int it is converted to the signed integer min_int + input - max_int - 1.

The _ (underscore) character can appear anywhere in the string and is ignored.

Return None if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type int.

  • since 4.05
val int_of_string : string -> int

Same as Stdlib.int_of_string_opt, but raise Failure "int_of_string" instead of returning None.

val string_of_float : float -> string

Return a string representation of a floating-point number.

This conversion can involve a loss of precision. For greater control over the manner in which the number is printed, see Printf.

val float_of_string_opt : string -> float option

Convert the given string to a float. The string is read in decimal (by default) or in hexadecimal (marked by 0x or 0X).

The format of decimal floating-point numbers is [-] dd.ddd (e|E) [+|-] dd , where d stands for a decimal digit.

The format of hexadecimal floating-point numbers is [-] 0(x|X) hh.hhh (p|P) [+|-] dd , where h stands for an hexadecimal digit and d for a decimal digit.

In both cases, at least one of the integer and fractional parts must be given; the exponent part is optional.

The _ (underscore) character can appear anywhere in the string and is ignored.

Depending on the execution platforms, other representations of floating-point numbers can be accepted, but should not be relied upon.

Return None if the given string is not a valid representation of a float.

  • since 4.05
val float_of_string : string -> float

Same as Stdlib.float_of_string_opt, but raise Failure "float_of_string" instead of returning None.

Pair operations

include sig ... end
val fst : ('a * 'b) -> 'a

Return the first component of a pair.

val snd : ('a * 'b) -> 'b

Return the second component of a pair.

Character operations

More in Stdlib.List

include sig ... end
val (@) : 'a list -> 'a list -> 'a list

l0 @ l1 appends l1 to l0. Same function as List.append. Right-associative operator, see Ocaml_operators for more information.

  • since 5.1 this function is tail-recursive.
  • alert list_op List operations are not permitted

I/O operations

This is regular, unmocked, IO.

type in_channel = Stdlib.in_channel
  • alert input_output Input/output is not permitted
type out_channel = Stdlib.out_channel
  • alert input_output Input/output is not permitted
type open_flag = Stdlib.open_flag =
  1. | Open_rdonly
  2. | Open_wronly
  3. | Open_append
  4. | Open_creat
  5. | Open_trunc
  6. | Open_excl
  7. | Open_binary
  8. | Open_text
  9. | Open_nonblock
  • alert input_output Input/output is not permitted
include sig ... end
val stdin : in_channel

The standard input for the process.

  • alert input_output Input/output is not permitted
val stdout : out_channel

The standard output for the process.

  • alert input_output Input/output is not permitted
val stderr : out_channel

The standard error output for the process.

  • alert input_output Input/output is not permitted
val print_char : char -> unit

Print a character on standard output.

  • alert input_output Input/output is not permitted
val print_string : string -> unit

Print a string on standard output.

  • alert input_output Input/output is not permitted
val print_bytes : bytes -> unit

Print a byte sequence on standard output.

  • since 4.02
  • alert input_output Input/output is not permitted
val print_int : int -> unit

Print an integer, in decimal, on standard output.

  • alert input_output Input/output is not permitted
val print_float : float -> unit

Print a floating-point number, in decimal, on standard output.

The conversion of the number to a string uses string_of_float and can involve a loss of precision.

  • alert input_output Input/output is not permitted
val print_endline : string -> unit

Print a string, followed by a newline character, on standard output and flush standard output.

  • alert input_output Input/output is not permitted
val print_newline : unit -> unit

Print a newline character on standard output, and flush standard output. This can be used to simulate line buffering of standard output.

  • alert input_output Input/output is not permitted
val prerr_char : char -> unit

Print a character on standard error.

  • alert input_output Input/output is not permitted
val prerr_string : string -> unit

Print a string on standard error.

  • alert input_output Input/output is not permitted
val prerr_bytes : bytes -> unit

Print a byte sequence on standard error.

  • since 4.02
  • alert input_output Input/output is not permitted
val prerr_int : int -> unit

Print an integer, in decimal, on standard error.

  • alert input_output Input/output is not permitted
val prerr_float : float -> unit

Print a floating-point number, in decimal, on standard error.

The conversion of the number to a string uses string_of_float and can involve a loss of precision.

  • alert input_output Input/output is not permitted
val prerr_endline : string -> unit

Print a string, followed by a newline character on standard error and flush standard error.

  • alert input_output Input/output is not permitted
val prerr_newline : unit -> unit

Print a newline character on standard error, and flush standard error.

  • alert input_output Input/output is not permitted
val read_line : unit -> string

Flush standard output, then read characters from standard input until a newline character is encountered.

Return the string of all characters read, without the newline character at the end.

  • raises End_of_file

    if the end of the file is reached at the beginning of line.

  • alert input_output Input/output is not permitted
val read_int_opt : unit -> int option

Flush standard output, then read one line from standard input and convert it to an integer.

Return None if the line read is not a valid representation of an integer.

  • since 4.05
  • alert input_output Input/output is not permitted
val read_int : unit -> int

Same as Stdlib.read_int_opt, but raise Failure "int_of_string" instead of returning None.

  • alert input_output Input/output is not permitted
val read_float_opt : unit -> float option

Flush standard output, then read one line from standard input and convert it to a floating-point number.

Return None if the line read is not a valid representation of a floating-point number.

  • since 4.05
  • alert input_output Input/output is not permitted
val read_float : unit -> float

Same as Stdlib.read_float_opt, but raise Failure "float_of_string" instead of returning None.

  • alert input_output Input/output is not permitted
val open_out : string -> out_channel

Open the named file for writing, and return a new output channel on that file, positioned at the beginning of the file. The file is truncated to zero length if it already exists. It is created if it does not already exists.

  • alert input_output Input/output is not permitted
val open_out_bin : string -> out_channel

Same as Stdlib.open_out, but the file is opened in binary mode, so that no translation takes place during writes. On operating systems that do not distinguish between text mode and binary mode, this function behaves like Stdlib.open_out.

  • alert input_output Input/output is not permitted
val open_out_gen : open_flag list -> int -> string -> out_channel

open_out_gen mode perm filename opens the named file for writing, as described above. The extra argument mode specifies the opening mode. The extra argument perm specifies the file permissions, in case the file must be created. Stdlib.open_out and Stdlib.open_out_bin are special cases of this function.

  • alert input_output Input/output is not permitted
val flush : out_channel -> unit

Flush the buffer associated with the given output channel, performing all pending writes on that channel. Interactive programs must be careful about flushing standard output and standard error at the right time.

  • alert input_output Input/output is not permitted
val flush_all : unit -> unit

Flush all open output channels; ignore errors.

  • alert input_output Input/output is not permitted
val output_char : out_channel -> char -> unit

Write the character on the given output channel.

  • alert input_output Input/output is not permitted
val output_string : out_channel -> string -> unit

Write the string on the given output channel.

  • alert input_output Input/output is not permitted
val output_bytes : out_channel -> bytes -> unit

Write the byte sequence on the given output channel.

  • since 4.02
  • alert input_output Input/output is not permitted
val output : out_channel -> bytes -> int -> int -> unit

output oc buf pos len writes len characters from byte sequence buf, starting at offset pos, to the given output channel oc.

  • alert input_output Input/output is not permitted
val output_substring : out_channel -> string -> int -> int -> unit

Same as output but take a string as argument instead of a byte sequence.

  • since 4.02
  • alert input_output Input/output is not permitted
val output_byte : out_channel -> int -> unit

Write one 8-bit integer (as the single character with that code) on the given output channel. The given integer is taken modulo 256.

  • alert input_output Input/output is not permitted
val output_binary_int : out_channel -> int -> unit

Write one integer in binary format (4 bytes, big-endian) on the given output channel. The given integer is taken modulo 232. The only reliable way to read it back is through the Stdlib.input_binary_int function. The format is compatible across all machines for a given version of OCaml.

  • alert input_output Input/output is not permitted
val output_value : out_channel -> 'a -> unit

Write the representation of a structured value of any type to a channel. Circularities and sharing inside the value are detected and preserved. The object can be read back, by the function Stdlib.input_value. See the description of module Marshal for more information. Stdlib.output_value is equivalent to Marshal.to_channel with an empty list of flags.

  • alert input_output Input/output is not permitted
val seek_out : out_channel -> int -> unit

seek_out chan pos sets the current writing position to pos for channel chan. This works only for regular files. On files of other kinds (such as terminals, pipes and sockets), the behavior is unspecified.

  • alert input_output Input/output is not permitted
val pos_out : out_channel -> int

Return the current writing position for the given channel. Does not work on channels opened with the Open_append flag (returns unspecified results). For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos_out, then going back to this position using seek_out will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

  • alert input_output Input/output is not permitted
val out_channel_length : out_channel -> int

Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless.

  • alert input_output Input/output is not permitted
val close_out : out_channel -> unit

Close the given channel, flushing all buffered write operations. Output functions raise a Sys_error exception when they are applied to a closed output channel, except close_out and flush, which do nothing when applied to an already closed channel. Note that close_out may raise Sys_error if the operating system signals an error when flushing or closing.

  • alert input_output Input/output is not permitted
val close_out_noerr : out_channel -> unit

Same as close_out, but ignore all errors.

  • alert input_output Input/output is not permitted
val set_binary_mode_out : out_channel -> bool -> unit

set_binary_mode_out oc true sets the channel oc to binary mode: no translations take place during output. set_binary_mode_out oc false sets the channel oc to text mode: depending on the operating system, some translations may take place during output. For instance, under Windows, end-of-lines will be translated from \n to \r\n. This function has no effect under operating systems that do not distinguish between text mode and binary mode.

  • alert input_output Input/output is not permitted
val open_in : string -> in_channel

Open the named file for reading, and return a new input channel on that file, positioned at the beginning of the file.

  • alert input_output Input/output is not permitted
val open_in_bin : string -> in_channel

Same as Stdlib.open_in, but the file is opened in binary mode, so that no translation takes place during reads. On operating systems that do not distinguish between text mode and binary mode, this function behaves like Stdlib.open_in.

  • alert input_output Input/output is not permitted
val open_in_gen : open_flag list -> int -> string -> in_channel

open_in_gen mode perm filename opens the named file for reading, as described above. The extra arguments mode and perm specify the opening mode and file permissions. Stdlib.open_in and Stdlib.open_in_bin are special cases of this function.

  • alert input_output Input/output is not permitted
val input_char : in_channel -> char

Read one character from the given input channel.

  • raises End_of_file

    if there are no more characters to read.

  • alert input_output Input/output is not permitted
val input_line : in_channel -> string

Read characters from the given input channel, until a newline character is encountered. Return the string of all characters read, without the newline character at the end.

  • raises End_of_file

    if the end of the file is reached at the beginning of line.

  • alert input_output Input/output is not permitted
val input : in_channel -> bytes -> int -> int -> int

input ic buf pos len reads up to len characters from the given channel ic, storing them in byte sequence buf, starting at character number pos. It returns the actual number of characters read, between 0 and len (inclusive). A return value of 0 means that the end of file was reached. A return value between 0 and len exclusive means that not all requested len characters were read, either because no more characters were available at that time, or because the implementation found it convenient to do a partial read; input must be called again to read the remaining characters, if desired. (See also Stdlib.really_input for reading exactly len characters.) Exception Invalid_argument "input" is raised if pos and len do not designate a valid range of buf.

  • alert input_output Input/output is not permitted
val really_input : in_channel -> bytes -> int -> int -> unit

really_input ic buf pos len reads len characters from channel ic, storing them in byte sequence buf, starting at character number pos.

  • raises End_of_file

    if the end of file is reached before len characters have been read.

  • alert input_output Input/output is not permitted
val really_input_string : in_channel -> int -> string

really_input_string ic len reads len characters from channel ic and returns them in a new string.

  • raises End_of_file

    if the end of file is reached before len characters have been read.

  • since 4.02
  • alert input_output Input/output is not permitted
val input_byte : in_channel -> int

Same as Stdlib.input_char, but return the 8-bit integer representing the character.

  • alert input_output Input/output is not permitted
val input_binary_int : in_channel -> int

Read an integer encoded in binary format (4 bytes, big-endian) from the given input channel. See Stdlib.output_binary_int.

  • raises End_of_file

    if the end of file was reached while reading the integer.

  • alert input_output Input/output is not permitted
val input_value : in_channel -> 'a

Read the representation of a structured value, as produced by Stdlib.output_value, and return the corresponding value. This function is identical to Marshal.from_channel; see the description of module Marshal for more information, in particular concerning the lack of type safety.

  • alert input_output Input/output is not permitted
val seek_in : in_channel -> int -> unit

seek_in chan pos sets the current reading position to pos for channel chan. This works only for regular files. On files of other kinds, the behavior is unspecified.

  • alert input_output Input/output is not permitted
val pos_in : in_channel -> int

Return the current reading position for the given channel. For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos_in, then going back to this position using seek_in will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

  • alert input_output Input/output is not permitted
val in_channel_length : in_channel -> int

Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless. The returned size does not take into account the end-of-line translations that can be performed when reading from a channel opened in text mode.

  • alert input_output Input/output is not permitted
val close_in : in_channel -> unit

Close the given channel. Input functions raise a Sys_error exception when they are applied to a closed input channel, except close_in, which does nothing when applied to an already closed channel.

  • alert input_output Input/output is not permitted
val close_in_noerr : in_channel -> unit

Same as close_in, but ignore all errors.

  • alert input_output Input/output is not permitted
val set_binary_mode_in : in_channel -> bool -> unit

set_binary_mode_in ic true sets the channel ic to binary mode: no translations take place during input. set_binary_mode_out ic false sets the channel ic to text mode: depending on the operating system, some translations may take place during input. For instance, under Windows, end-of-lines will be translated from \r\n to \n. This function has no effect under operating systems that do not distinguish between text mode and binary mode.

  • alert input_output Input/output is not permitted

Operations on large files. This sub-module provides 64-bit variants of the channel functions that manipulate file positions and file sizes. By representing positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), these alternate functions allow operating on files whose sizes are greater than max_int.

References

type 'a ref = 'a Stdlib.ref
include sig ... end
val ref : 'a -> 'a ref

Return a fresh reference containing the given value.

  • alert impure References are not permitted
val (!) : 'a ref -> 'a

!r returns the current contents of reference r. Equivalent to fun r -> r.contents. Unary operator, see Ocaml_operators for more information.

  • alert impure References are not permitted
val (:=) : 'a ref -> 'a -> unit

r := a stores the value of a in reference r. Equivalent to fun r v -> r.contents <- v. Right-associative operator, see Ocaml_operators for more information.

  • alert impure References are not permitted
val incr : int ref -> unit

Increment the integer contained in the given reference. Equivalent to fun r -> r := succ !r.

  • alert impure References are not permitted
val decr : int ref -> unit

Decrement the integer contained in the given reference. Equivalent to fun r -> r := pred !r.

  • alert impure References are not permitted

Result type

More in Stdlib.Result

type ('a, 'b) result = ('a, 'b) Stdlib.result =
  1. | Ok of 'a
  2. | Error of 'b

Format strings

More in Stdlib.Scanf, Stdlib.Printf, and Stdlib.Format

include sig ... end
type ('a, 'b, 'c, 'd, 'e, 'f) format6 = ('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.format6
type ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'c, 'c, 'd) format6
type ('a, 'b, 'c) format = ('a, 'b, 'c, 'c) format4
val format_of_string : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> ('a, 'b, 'c, 'd, 'e, 'f) format6

format_of_string s returns a format string read from the string literal s. Note: format_of_string can not convert a string argument that is not a literal. If you need this functionality, use the more general Scanf.format_from_string function.

val (^^) : diff --git a/sig-builder-no-typ-dup/less-power/Std_overrides/Stdlib_safe/index.html b/sig-builder-no-typ-dup/less-power/Std_overrides/Stdlib_safe/index.html index 704b447..0888984 100644 --- a/sig-builder-no-typ-dup/less-power/Std_overrides/Stdlib_safe/index.html +++ b/sig-builder-no-typ-dup/less-power/Std_overrides/Stdlib_safe/index.html @@ -1,5 +1,5 @@ -Stdlib_safe (less-power.Std_overrides.Stdlib_safe)

Module Std_overrides.Stdlib_safe

Puts the safe parts of Stdlib into scope, from Stdlib_components.Stdlib_safe

include module type of struct include Stdlib_components.Stdlib_safe end
include module type of struct include Stdlib_components.Exceptions end
val raise : exn -> 'a
val raise_notrace : exn -> 'a
val failwith : string -> 'a
val invalid_arg : string -> 'a
exception Exit
exception Match_failure of string * int * int
exception Assert_failure of string * int * int
exception Invalid_argument of string
exception Failure of string
exception Not_found
exception Out_of_memory
exception Stack_overflow
exception Sys_error of string
exception End_of_file
exception Division_by_zero
exception Sys_blocked_io
exception Undefined_recursive_module of string * int * int
include module type of struct include Stdlib_components.Composition end
val (|>) : 'a -> ('a -> 'b) -> 'b
val (@@) : ('a -> 'b) -> 'a -> 'b
include module type of struct include Stdlib_components.Debugging end
val __LOC__ : string
val __FILE__ : string
val __LINE__ : int
val __MODULE__ : string
val __POS__ : string * int * int * int
val __FUNCTION__ : string
val __LOC_OF__ : 'a -> string * 'a
val __LINE_OF__ : 'a -> int * 'a
val __POS_OF__ : 'a -> (string * int * int * int) * 'a
include module type of struct include Stdlib_components.Comparisons end
val (=) : 'a -> 'a -> bool
val (<>) : 'a -> 'a -> bool
val (<) : 'a -> 'a -> bool
val (>) : 'a -> 'a -> bool
val (<=) : 'a -> 'a -> bool
val (>=) : 'a -> 'a -> bool
val compare : 'a -> 'a -> int
val min : 'a -> 'b -> 'c
val max : 'a -> 'b -> 'c
include module type of struct include Stdlib_components.BooleanOperations end
val not : bool -> bool
val (&&) : bool -> bool -> bool
val (||) : bool -> bool -> bool
include module type of struct include Stdlib_components.IntegerOperations end
val (~-) : int -> int
val (~+) : int -> int
val succ : int -> int
val pred : int -> int
val (+) : int -> int -> int
val (-) : int -> int -> int
val (*) : int -> int -> int
val (/) : int -> int -> int
val (mod) : int -> int -> int
val abs : int -> int
val (land) : int -> int -> int
val (lor) : int -> int -> int
val (lxor) : int -> int -> int
val lnot : int -> int
val (lsl) : int -> int -> int
val (lsr) : int -> int -> int
val (asr) : int -> int -> int
val max_int : int
val min_int : int
include module type of struct include Stdlib_components.FloatingPointOperations end
val (~-.) : float -> float
val (~+.) : float -> float
val (+.) : float -> float -> float
val (-.) : float -> float -> float
val (*.) : float -> float -> float
val (/.) : float -> float -> float
val (**) : float -> float -> float
val exp : float -> float
val expm1 : float -> float
val acos : float -> float
val asin : float -> float
val atan : float -> float
val atan2 : float -> float -> float
val hypot : float -> float -> float
val cos : float -> float
val cosh : float -> float
val acosh : float -> float
val log : float -> float
val log10 : float -> float
val log1p : float -> float
val sin : float -> float
val sinh : float -> float
val asinh : float -> float
val sqrt : float -> float
val tan : float -> float
val tanh : float -> float
val atanh : float -> float
val ceil : float -> float
val floor : float -> float
val abs_float : float -> float
val copysign : float -> float -> float
val mod_float : float -> float -> float
val frexp : float -> float * int
val ldexp : float -> int -> float
val modf : float -> float * float
val float : int -> float
val float_of_int : int -> float
val truncate : float -> int
val int_of_float : float -> int
val infinity : float
val neg_infinity : float
val nan : float
val max_float : float
val min_float : float
val epsilon_float : float
type fpclass = Stdlib.fpclass
val classify_float : float -> fpclass
include module type of struct include Stdlib_components.StringOperations end
val (^) : string -> string -> string
include module type of struct include Stdlib_components.CharOperations end
val int_of_char : char -> int
val char_of_int : int -> char
include module type of struct include Stdlib_components.UnitOperations end
val ignore : 'a -> unit
include module type of struct include Stdlib_components.PairOperations end
val fst : ('a * 'b) -> 'a
val snd : ('a * 'b) -> 'b
include module type of struct include Stdlib_components.Result end
type ('a, 'b) result = ('a, 'b) Stdlib.result
include module type of struct include Stdlib_components.StringConversion end
val string_of_bool : bool -> string
val bool_of_string : string -> bool
val bool_of_string_opt : string -> bool option
val string_of_int : int -> string
val int_of_string : string -> int
val int_of_string_opt : string -> int option
val valid_float_lexem : string -> string
val string_of_float : float -> string
val float_of_string : string -> float
val float_of_string_opt : string -> float option
include module type of struct include Stdlib_components.ListOperations end
val (@) : 'a list -> 'a list -> 'a list
include module type of struct include Stdlib_components.Formats end
type ('a, 'b, 'c, 'd, 'e, 'f) format6 = ('a, 'b, 'c, 'd, 'e, 'f) Stdlib.format6
type ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'd) Stdlib.format4
type ('a, 'b, 'c) format = ('a, 'b, 'c) Stdlib.format
val string_of_format : ('a, 'b, 'c, 'd, 'e, 'f) Stdlib.format6 -> string
val format_of_string : +Stdlib_safe (less-power.Std_overrides.Stdlib_safe)

Module Std_overrides.Stdlib_safe

Puts the safe parts of Stdlib into scope, from Stdlib_components.Stdlib_safe

include module type of struct include Stdlib_components.Stdlib_safe end
include module type of struct include Stdlib_components.Exceptions end
val raise : exn -> 'a
val raise_notrace : exn -> 'a
val failwith : string -> 'a
val invalid_arg : string -> 'a
exception Exit
exception Match_failure of string * int * int
exception Assert_failure of string * int * int
exception Invalid_argument of string
exception Failure of string
exception Not_found
exception Out_of_memory
exception Stack_overflow
exception Sys_error of string
exception End_of_file
exception Division_by_zero
exception Sys_blocked_io
exception Undefined_recursive_module of string * int * int
include module type of struct include Stdlib_components.Composition end
val (|>) : 'a -> ('a -> 'b) -> 'b
val (@@) : ('a -> 'b) -> 'a -> 'b
include module type of struct include Stdlib_components.Debugging end
val __LOC__ : string
val __FILE__ : string
val __LINE__ : int
val __MODULE__ : string
val __POS__ : string * int * int * int
val __FUNCTION__ : string
val __LOC_OF__ : 'a -> string * 'a
val __LINE_OF__ : 'a -> int * 'a
val __POS_OF__ : 'a -> (string * int * int * int) * 'a
include module type of struct include Stdlib_components.Comparisons end
val (=) : 'a -> 'a -> bool
val (<>) : 'a -> 'a -> bool
val (<) : 'a -> 'a -> bool
val (>) : 'a -> 'a -> bool
val (<=) : 'a -> 'a -> bool
val (>=) : 'a -> 'a -> bool
val compare : 'a -> 'a -> int
val min : 'a -> 'a -> 'a
val max : 'a -> 'a -> 'a
include module type of struct include Stdlib_components.BooleanOperations end
val not : bool -> bool
val (&&) : bool -> bool -> bool
val (||) : bool -> bool -> bool
include module type of struct include Stdlib_components.IntegerOperations end
val (~-) : int -> int
val (~+) : int -> int
val succ : int -> int
val pred : int -> int
val (+) : int -> int -> int
val (-) : int -> int -> int
val (*) : int -> int -> int
val (/) : int -> int -> int
val (mod) : int -> int -> int
val abs : int -> int
val (land) : int -> int -> int
val (lor) : int -> int -> int
val (lxor) : int -> int -> int
val lnot : int -> int
val (lsl) : int -> int -> int
val (lsr) : int -> int -> int
val (asr) : int -> int -> int
val max_int : int
val min_int : int
include module type of struct include Stdlib_components.FloatingPointOperations end
val (~-.) : float -> float
val (~+.) : float -> float
val (+.) : float -> float -> float
val (-.) : float -> float -> float
val (*.) : float -> float -> float
val (/.) : float -> float -> float
val (**) : float -> float -> float
val exp : float -> float
val expm1 : float -> float
val acos : float -> float
val asin : float -> float
val atan : float -> float
val atan2 : float -> float -> float
val hypot : float -> float -> float
val cos : float -> float
val cosh : float -> float
val acosh : float -> float
val log : float -> float
val log10 : float -> float
val log1p : float -> float
val sin : float -> float
val sinh : float -> float
val asinh : float -> float
val sqrt : float -> float
val tan : float -> float
val tanh : float -> float
val atanh : float -> float
val ceil : float -> float
val floor : float -> float
val abs_float : float -> float
val copysign : float -> float -> float
val mod_float : float -> float -> float
val frexp : float -> float * int
val ldexp : float -> int -> float
val modf : float -> float * float
val float : int -> float
val float_of_int : int -> float
val truncate : float -> int
val int_of_float : float -> int
val infinity : float
val neg_infinity : float
val nan : float
val max_float : float
val min_float : float
val epsilon_float : float
type fpclass = Stdlib.fpclass
val classify_float : float -> fpclass
include module type of struct include Stdlib_components.StringOperations end
val (^) : string -> string -> string
include module type of struct include Stdlib_components.CharOperations end
val int_of_char : char -> int
val char_of_int : int -> char
include module type of struct include Stdlib_components.UnitOperations end
val ignore : 'a -> unit
include module type of struct include Stdlib_components.PairOperations end
val fst : ('a * 'b) -> 'a
val snd : ('a * 'b) -> 'b
include module type of struct include Stdlib_components.Result end
type ('a, 'b) result = ('a, 'b) Stdlib.result
include module type of struct include Stdlib_components.StringConversion end
val string_of_bool : bool -> string
val bool_of_string : string -> bool
val bool_of_string_opt : string -> bool option
val string_of_int : int -> string
val int_of_string : string -> int
val int_of_string_opt : string -> int option
val valid_float_lexem : string -> string
val string_of_float : float -> string
val float_of_string : string -> float
val float_of_string_opt : string -> float option
include module type of struct include Stdlib_components.ListOperations end
val (@) : 'a list -> 'a list -> 'a list
include module type of struct include Stdlib_components.Formats end
type ('a, 'b, 'c, 'd, 'e, 'f) format6 = ('a, 'b, 'c, 'd, 'e, 'f) Stdlib.format6
type ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'd) Stdlib.format4
type ('a, 'b, 'c) format = ('a, 'b, 'c) Stdlib.format
val string_of_format : ('a, 'b, 'c, 'd, 'e, 'f) Stdlib.format6 -> string
val format_of_string : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> ('a, 'b, 'c, 'd, 'e, 'f) format6
val (^^) : ('a, 'b, 'c, 'd, 'e, 'f) Stdlib.format6 -> diff --git a/sig-builder-no-typ-dup/less-power/Std_overrides/index.html b/sig-builder-no-typ-dup/less-power/Std_overrides/index.html index c300905..6da03a7 100644 --- a/sig-builder-no-typ-dup/less-power/Std_overrides/index.html +++ b/sig-builder-no-typ-dup/less-power/Std_overrides/index.html @@ -1,2 +1,2 @@ -Std_overrides (less-power.Std_overrides)

Module Std_overrides

Ready-to-use modules for replacing the default pervasives, using -open.

module Hide_stdlib_variants : sig ... end

Prevent access to the full variant library. Intended to be opened at the top level to hide the Stdlib_variants module, and a couple others.

module Stdlib_safe : sig ... end

Puts the safe parts of Stdlib into scope, from Stdlib_components.Stdlib_safe

module Stdlib_alerting : sig ... end

Puts an alerting Stdlib into scope, from Stdlib_alerts.Stdlib_alerting.

+Std_overrides (less-power.Std_overrides)

Module Std_overrides

Ready-to-use modules for replacing the default pervasives, using -open.

module Hide_stdlib_variants : sig ... end

Prevent access to the full variant library. Intended to be opened at the top level to hide the Stdlib_variants module, and a couple others.

module Stdlib_safe : sig ... end

Puts the safe parts of Stdlib into scope, from Stdlib_components.Stdlib_safe

module Stdlib_alerting : sig ... end

Puts an alerting Stdlib into scope, from Stdlib_alerts.Stdlib_alerting.

diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Char/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Char/index.html index d65012c..7b31657 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Char/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Char/index.html @@ -1,2 +1,2 @@ -Char (less-power.Stdlib_alerts.Stdlib_alerting.Char)

Module Stdlib_alerting.Char

include sig ... end
val code : char -> int

Return the ASCII code of the argument.

val chr : int -> char

Return the character with the given ASCII code.

val escaped : char -> string

Return a string representing the given character, with special characters escaped following the lexical conventions of OCaml. All characters outside the ASCII printable range (32..126) are escaped, as well as backslash, double-quote, and single-quote.

val lowercase_ascii : char -> char

Convert the given character to its equivalent lowercase character, using the US-ASCII character set.

  • since 4.03
val uppercase_ascii : char -> char

Convert the given character to its equivalent uppercase character, using the US-ASCII character set.

  • since 4.03
type t = char

An alias for the type of characters.

val compare : t -> t -> int

The comparison function for characters, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Char to be passed as argument to the functors Set.Make and Map.Make.

val equal : t -> t -> bool

The equal function for chars.

  • since 4.03
val seeded_hash : int -> t -> int

A seeded hash function for characters, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

  • since 5.1
val hash : t -> int

An unseeded hash function for characters, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

  • since 5.1
+Char (less-power.Stdlib_alerts.Stdlib_alerting.Char)

Module Stdlib_alerting.Char

include sig ... end
val code : char -> int

Return the ASCII code of the argument.

val chr : int -> char

Return the character with the given ASCII code.

val escaped : char -> string

Return a string representing the given character, with special characters escaped following the lexical conventions of OCaml. All characters outside the ASCII printable range (32..126) are escaped, as well as backslash, double-quote, and single-quote.

val lowercase_ascii : char -> char

Convert the given character to its equivalent lowercase character, using the US-ASCII character set.

  • since 4.03
val uppercase_ascii : char -> char

Convert the given character to its equivalent uppercase character, using the US-ASCII character set.

  • since 4.03
type t = char

An alias for the type of characters.

val compare : t -> t -> int

The comparison function for characters, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Char to be passed as argument to the functors Set.Make and Map.Make.

val equal : t -> t -> bool

The equal function for chars.

  • since 4.03
val seeded_hash : int -> t -> int

A seeded hash function for characters, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

  • since 5.1
val hash : t -> int

An unseeded hash function for characters, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

  • since 5.1
diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Digest/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Digest/index.html index e273db7..3148c93 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Digest/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Digest/index.html @@ -1,2 +1,2 @@ -Digest (less-power.Stdlib_alerts.Stdlib_alerting.Digest)

Module Stdlib_alerting.Digest

include sig ... end
type t = string

The type of digests: 16-character strings.

val compare : t -> t -> int

The comparison function for 16-character digest, with the same specification as Stdlib.compare and the implementation shared with String.compare. Along with the type t, this function compare allows the module Digest to be passed as argument to the functors Set.Make and Map.Make.

  • since 4.00
val equal : t -> t -> bool

The equal function for 16-character digest.

  • since 4.03
val string : string -> t

Return the digest of the given string.

val substring : string -> int -> int -> t

Digest.substring s ofs len returns the digest of the substring of s starting at index ofs and containing len characters.

val to_hex : t -> string

Return the printable hexadecimal representation of the given digest.

val from_hex : string -> t

Convert a hexadecimal representation back into the corresponding digest.

  • raises Invalid_argument

    if the argument is not exactly 32 hexadecimal characters.

  • since 4.00
val bytes : bytes -> t

Return the digest of the given byte sequence.

  • since 4.02
  • alert impure Imperative programming is not permitted
val subbytes : bytes -> int -> int -> t

Digest.subbytes s ofs len returns the digest of the subsequence of s starting at index ofs and containing len bytes.

  • since 4.02
  • alert impure Imperative programming is not permitted
val channel : Stdlib.in_channel -> int -> t

If len is nonnegative, Digest.channel ic len reads len characters from channel ic and returns their digest, or raises End_of_file if end-of-file is reached before len characters are read. If len is negative, Digest.channel ic len reads all characters from ic until end-of-file is reached and return their digest.

  • alert input_output Input/output is not permitted
val file : string -> t

Return the digest of the file whose name is given.

  • alert input_output Input/output is not permitted
val output : Stdlib.out_channel -> t -> unit

Write a digest on the given output channel.

  • alert input_output Input/output is not permitted
val input : Stdlib.in_channel -> t

Read a digest from the given input channel.

  • alert input_output Input/output is not permitted
+Digest (less-power.Stdlib_alerts.Stdlib_alerting.Digest)

Module Stdlib_alerting.Digest

include sig ... end
type t = string

The type of digests: 16-character strings.

val compare : t -> t -> int

The comparison function for 16-character digest, with the same specification as Stdlib.compare and the implementation shared with String.compare. Along with the type t, this function compare allows the module Digest to be passed as argument to the functors Set.Make and Map.Make.

  • since 4.00
val equal : t -> t -> bool

The equal function for 16-character digest.

  • since 4.03
val string : string -> t

Return the digest of the given string.

val substring : string -> int -> int -> t

Digest.substring s ofs len returns the digest of the substring of s starting at index ofs and containing len characters.

val to_hex : t -> string

Return the printable hexadecimal representation of the given digest.

val from_hex : string -> t

Convert a hexadecimal representation back into the corresponding digest.

  • raises Invalid_argument

    if the argument is not exactly 32 hexadecimal characters.

  • since 4.00
val bytes : bytes -> t

Return the digest of the given byte sequence.

  • since 4.02
  • alert impure Imperative programming is not permitted
val subbytes : bytes -> int -> int -> t

Digest.subbytes s ofs len returns the digest of the subsequence of s starting at index ofs and containing len bytes.

  • since 4.02
  • alert impure Imperative programming is not permitted
val channel : Stdlib.in_channel -> int -> t

If len is nonnegative, Digest.channel ic len reads len characters from channel ic and returns their digest, or raises End_of_file if end-of-file is reached before len characters are read. If len is negative, Digest.channel ic len reads all characters from ic until end-of-file is reached and return their digest.

  • alert input_output Input/output is not permitted
val file : string -> t

Return the digest of the file whose name is given.

  • alert input_output Input/output is not permitted
val output : Stdlib.out_channel -> t -> unit

Write a digest on the given output channel.

  • alert input_output Input/output is not permitted
val input : Stdlib.in_channel -> t

Read a digest from the given input channel.

  • alert input_output Input/output is not permitted
diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Filename/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Filename/index.html index 1df8855..8fbdb46 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Filename/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Filename/index.html @@ -1,5 +1,5 @@ -Filename (less-power.Stdlib_alerts.Stdlib_alerting.Filename)

Module Stdlib_alerting.Filename

include sig ... end
val current_dir_name : string

The conventional name for the current directory (e.g. . in Unix).

val parent_dir_name : string

The conventional name for the parent of the current directory (e.g. .. in Unix).

val dir_sep : string

The directory separator (e.g. / in Unix).

  • since 3.11.2
val concat : string -> string -> string

concat dir file returns a file name that designates file file in directory dir.

val is_relative : string -> bool

Return true if the file name is relative to the current directory, false if it is absolute (i.e. in Unix, starts with /).

val is_implicit : string -> bool

Return true if the file name is relative and does not start with an explicit reference to the current directory (./ or ../ in Unix), false if it starts with an explicit reference to the root directory or the current directory.

val check_suffix : string -> string -> bool

check_suffix name suff returns true if the filename name ends with the suffix suff.

Under Windows ports (including Cygwin), comparison is case-insensitive, relying on String.lowercase_ascii. Note that this does not match exactly the interpretation of case-insensitive filename equivalence from Windows.

val chop_suffix : string -> string -> string

chop_suffix name suff removes the suffix suff from the filename name.

val chop_suffix_opt : suffix:string -> string -> string option

chop_suffix_opt ~suffix filename removes the suffix from the filename if possible, or returns None if the filename does not end with the suffix.

Under Windows ports (including Cygwin), comparison is case-insensitive, relying on String.lowercase_ascii. Note that this does not match exactly the interpretation of case-insensitive filename equivalence from Windows.

  • since 4.08
val extension : string -> string

extension name is the shortest suffix ext of name0 where:

  • name0 is the longest suffix of name that does not contain a directory separator;
  • ext starts with a period;
  • ext is preceded by at least one non-period character in name0.

If such a suffix does not exist, extension name is the empty string.

  • since 4.04
val remove_extension : string -> string

Return the given file name without its extension, as defined in Filename.extension. If the extension is empty, the function returns the given file name.

The following invariant holds for any file name s:

remove_extension s ^ extension s = s

  • since 4.04
val chop_extension : string -> string

Same as Filename.remove_extension, but raise Invalid_argument if the given name has an empty extension.

val basename : string -> string

Split a file name into directory name / base file name. If name is a valid file name, then concat (dirname name) (basename name) returns a file name which is equivalent to name. Moreover, after setting the current directory to dirname name (with Sys.chdir), references to basename name (which is a relative file name) designate the same file as name before the call to Sys.chdir.

This function conforms to the specification of POSIX.1-2008 for the basename utility.

val dirname : string -> string

See Filename.basename. This function conforms to the specification of POSIX.1-2008 for the dirname utility.

val null : string

null is "/dev/null" on POSIX and "NUL" on Windows. It represents a file on the OS that discards all writes and returns end of file on reads.

  • since 4.10
val quote : string -> string

Return a quoted version of a file name, suitable for use as one argument in a command line, escaping all meta-characters. Warning: under Windows, the output is only suitable for use with programs that follow the standard Windows quoting conventions.

val quote_command : +Filename (less-power.Stdlib_alerts.Stdlib_alerting.Filename)

Module Stdlib_alerting.Filename

include sig ... end
val current_dir_name : string

The conventional name for the current directory (e.g. . in Unix).

val parent_dir_name : string

The conventional name for the parent of the current directory (e.g. .. in Unix).

val dir_sep : string

The directory separator (e.g. / in Unix).

  • since 3.11.2
val concat : string -> string -> string

concat dir file returns a file name that designates file file in directory dir.

val is_relative : string -> bool

Return true if the file name is relative to the current directory, false if it is absolute (i.e. in Unix, starts with /).

val is_implicit : string -> bool

Return true if the file name is relative and does not start with an explicit reference to the current directory (./ or ../ in Unix), false if it starts with an explicit reference to the root directory or the current directory.

val check_suffix : string -> string -> bool

check_suffix name suff returns true if the filename name ends with the suffix suff.

Under Windows ports (including Cygwin), comparison is case-insensitive, relying on String.lowercase_ascii. Note that this does not match exactly the interpretation of case-insensitive filename equivalence from Windows.

val chop_suffix : string -> string -> string

chop_suffix name suff removes the suffix suff from the filename name.

val chop_suffix_opt : suffix:string -> string -> string option

chop_suffix_opt ~suffix filename removes the suffix from the filename if possible, or returns None if the filename does not end with the suffix.

Under Windows ports (including Cygwin), comparison is case-insensitive, relying on String.lowercase_ascii. Note that this does not match exactly the interpretation of case-insensitive filename equivalence from Windows.

  • since 4.08
val extension : string -> string

extension name is the shortest suffix ext of name0 where:

  • name0 is the longest suffix of name that does not contain a directory separator;
  • ext starts with a period;
  • ext is preceded by at least one non-period character in name0.

If such a suffix does not exist, extension name is the empty string.

  • since 4.04
val remove_extension : string -> string

Return the given file name without its extension, as defined in Filename.extension. If the extension is empty, the function returns the given file name.

The following invariant holds for any file name s:

remove_extension s ^ extension s = s

  • since 4.04
val chop_extension : string -> string

Same as Filename.remove_extension, but raise Invalid_argument if the given name has an empty extension.

val basename : string -> string

Split a file name into directory name / base file name. If name is a valid file name, then concat (dirname name) (basename name) returns a file name which is equivalent to name. Moreover, after setting the current directory to dirname name (with Sys.chdir), references to basename name (which is a relative file name) designate the same file as name before the call to Sys.chdir.

This function conforms to the specification of POSIX.1-2008 for the basename utility.

val dirname : string -> string

See Filename.basename. This function conforms to the specification of POSIX.1-2008 for the dirname utility.

val null : string

null is "/dev/null" on POSIX and "NUL" on Windows. It represents a file on the OS that discards all writes and returns end of file on reads.

  • since 4.10
val quote : string -> string

Return a quoted version of a file name, suitable for use as one argument in a command line, escaping all meta-characters. Warning: under Windows, the output is only suitable for use with programs that follow the standard Windows quoting conventions.

val quote_command : string -> ?stdin:string -> ?stdout:string -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Float/Array/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Float/Array/index.html index a0bba10..17e58ca 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Float/Array/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Float/Array/index.html @@ -1,5 +1,5 @@ -Array (less-power.Stdlib_alerts.Stdlib_alerting.Float.Array)

Module Float.Array

Float arrays with packed representation.

  • alert impure Arrays are not permitted
type t = floatarray

The type of float arrays with packed representation.

  • since 4.08
val length : t -> int

Return the length (number of elements) of the given floatarray.

val get : t -> int -> float

get a n returns the element number n of floatarray a.

val set : t -> int -> float -> unit

set a n x modifies floatarray a in place, replacing element number n with x.

val make : int -> float -> t

make n x returns a fresh floatarray of length n, initialized with x.

val create : int -> t

create n returns a fresh floatarray of length n, with uninitialized data.

val init : int -> (int -> float) -> t

init n f returns a fresh floatarray of length n, with element number i initialized to the result of f i. In other terms, init n f tabulates the results of f applied to the integers 0 to n-1.

val append : t -> t -> t

append v1 v2 returns a fresh floatarray containing the concatenation of the floatarrays v1 and v2.

val concat : t list -> t

Same as append, but concatenates a list of floatarrays.

val sub : t -> int -> int -> t

sub a pos len returns a fresh floatarray of length len, containing the elements number pos to pos + len - 1 of floatarray a.

  • raises Invalid_argument

    if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

val copy : t -> t

copy a returns a copy of a, that is, a fresh floatarray containing the same elements as a.

val fill : t -> int -> int -> float -> unit

fill a pos len x modifies the floatarray a in place, storing x in elements number pos to pos + len - 1.

val blit : t -> int -> t -> int -> int -> unit

blit src src_pos dst dst_pos len copies len elements from floatarray src, starting at element number src_pos, to floatarray dst, starting at element number dst_pos. It works correctly even if src and dst are the same floatarray, and the source and destination chunks overlap.

  • raises Invalid_argument

    if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

val to_list : t -> float list

to_list a returns the list of all the elements of a.

val of_list : float list -> t

of_list l returns a fresh floatarray containing the elements of l.

  • raises Invalid_argument

    if the length of l is greater than Sys.max_floatarray_length.

Iterators

val iter : (float -> unit) -> t -> unit

iter f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

val iteri : (int -> float -> unit) -> t -> unit

Same as iter, but the function is applied with the index of the element as first argument, and the element itself as second argument.

val map : (float -> float) -> t -> t

map f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

val map_inplace : (float -> float) -> t -> unit

map_inplace f a applies function f to all elements of a, and updates their values in place.

  • since 5.1
val mapi : (int -> float -> float) -> t -> t

Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

val mapi_inplace : (int -> float -> float) -> t -> unit

Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

  • since 5.1
val fold_left : ('acc -> float -> 'acc) -> 'acc -> t -> 'acc

fold_left f x init computes f (... (f (f x init.(0)) init.(1)) ...) init.(n-1), where n is the length of the floatarray init.

val fold_right : (float -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold_right f a init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the floatarray a.

Iterators on two arrays

val iter2 : (float -> float -> unit) -> t -> t -> unit

Array.iter2 f a b applies function f to all the elements of a and b.

val map2 : (float -> float -> float) -> t -> t -> t

map2 f a b applies function f to all the elements of a and b, and builds a floatarray with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

Array scanning

val for_all : (float -> bool) -> t -> bool

for_all f [|a1; ...; an|] checks if all elements of the floatarray satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

val exists : (float -> bool) -> t -> bool

exists f [|a1; ...; an|] checks if at least one element of the floatarray satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

val mem : float -> t -> bool

mem a set is true if and only if there is an element of set that is structurally equal to a, i.e. there is an x in set such that compare a x = 0.

val mem_ieee : float -> t -> bool

Same as mem, but uses IEEE equality instead of structural equality.

Array searching

val find_opt : (float -> bool) -> t -> float option
val find_index : (float -> bool) -> t -> int option

find_index f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

It returns None if there is no such element.

  • since 5.1
val find_map : (float -> 'a option) -> t -> 'a option
val find_mapi : (int -> float -> 'a option) -> t -> 'a option

Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 5.1

Sorting

val sort : (float -> float -> int) -> t -> unit

Sort a floatarray in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

The current implementation uses Heap Sort. It runs in constant stack space.

Specification of the comparison function: Let a be the floatarray and cmp the comparison function. The following must be true for all x, y, z in a :

  • cmp x y > 0 if and only if cmp y x < 0
  • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

  • cmp a.(i) a.(j) >= 0 if and only if i >= j
val stable_sort : (float -> float -> int) -> t -> unit

Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

The current implementation uses Merge Sort. It uses a temporary floatarray of length n/2, where n is the length of the floatarray. It is usually faster than the current implementation of sort.

val fast_sort : (float -> float -> int) -> t -> unit

Same as sort or stable_sort, whichever is faster on typical input.

Float arrays and Sequences

val to_seq : t -> float Stdlib.Seq.t

Iterate on the floatarray, in increasing order. Modifications of the floatarray during iteration will be reflected in the sequence.

val to_seqi : t -> (int * float) Stdlib.Seq.t

Iterate on the floatarray, in increasing order, yielding indices along elements. Modifications of the floatarray during iteration will be reflected in the sequence.

val of_seq : float Stdlib.Seq.t -> t

Create an array from the generator.

val map_to_array : (float -> 'a) -> t -> 'a array

map_to_array f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

val map_from_array : ('a -> float) -> 'a array -> t

map_from_array f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

Arrays and concurrency safety

Care must be taken when concurrently accessing float arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

Atomicity

Every float array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

For example, consider the following program:

let size = 100_000_000
+Array (less-power.Stdlib_alerts.Stdlib_alerting.Float.Array)

Module Float.Array

Float arrays with packed representation.

  • alert impure Arrays are not permitted
type t = floatarray

The type of float arrays with packed representation.

  • since 4.08
val length : t -> int

Return the length (number of elements) of the given floatarray.

val get : t -> int -> float

get a n returns the element number n of floatarray a.

val set : t -> int -> float -> unit

set a n x modifies floatarray a in place, replacing element number n with x.

val make : int -> float -> t

make n x returns a fresh floatarray of length n, initialized with x.

val create : int -> t

create n returns a fresh floatarray of length n, with uninitialized data.

val init : int -> (int -> float) -> t

init n f returns a fresh floatarray of length n, with element number i initialized to the result of f i. In other terms, init n f tabulates the results of f applied to the integers 0 to n-1.

val append : t -> t -> t

append v1 v2 returns a fresh floatarray containing the concatenation of the floatarrays v1 and v2.

val concat : t list -> t

Same as append, but concatenates a list of floatarrays.

val sub : t -> int -> int -> t

sub a pos len returns a fresh floatarray of length len, containing the elements number pos to pos + len - 1 of floatarray a.

  • raises Invalid_argument

    if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

val copy : t -> t

copy a returns a copy of a, that is, a fresh floatarray containing the same elements as a.

val fill : t -> int -> int -> float -> unit

fill a pos len x modifies the floatarray a in place, storing x in elements number pos to pos + len - 1.

val blit : t -> int -> t -> int -> int -> unit

blit src src_pos dst dst_pos len copies len elements from floatarray src, starting at element number src_pos, to floatarray dst, starting at element number dst_pos. It works correctly even if src and dst are the same floatarray, and the source and destination chunks overlap.

  • raises Invalid_argument

    if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

val to_list : t -> float list

to_list a returns the list of all the elements of a.

val of_list : float list -> t

of_list l returns a fresh floatarray containing the elements of l.

  • raises Invalid_argument

    if the length of l is greater than Sys.max_floatarray_length.

Iterators

val iter : (float -> unit) -> t -> unit

iter f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

val iteri : (int -> float -> unit) -> t -> unit

Same as iter, but the function is applied with the index of the element as first argument, and the element itself as second argument.

val map : (float -> float) -> t -> t

map f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

val map_inplace : (float -> float) -> t -> unit

map_inplace f a applies function f to all elements of a, and updates their values in place.

  • since 5.1
val mapi : (int -> float -> float) -> t -> t

Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

val mapi_inplace : (int -> float -> float) -> t -> unit

Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

  • since 5.1
val fold_left : ('acc -> float -> 'acc) -> 'acc -> t -> 'acc

fold_left f x init computes f (... (f (f x init.(0)) init.(1)) ...) init.(n-1), where n is the length of the floatarray init.

val fold_right : (float -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold_right f a init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the floatarray a.

Iterators on two arrays

val iter2 : (float -> float -> unit) -> t -> t -> unit

Array.iter2 f a b applies function f to all the elements of a and b.

val map2 : (float -> float -> float) -> t -> t -> t

map2 f a b applies function f to all the elements of a and b, and builds a floatarray with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

Array scanning

val for_all : (float -> bool) -> t -> bool

for_all f [|a1; ...; an|] checks if all elements of the floatarray satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

val exists : (float -> bool) -> t -> bool

exists f [|a1; ...; an|] checks if at least one element of the floatarray satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

val mem : float -> t -> bool

mem a set is true if and only if there is an element of set that is structurally equal to a, i.e. there is an x in set such that compare a x = 0.

val mem_ieee : float -> t -> bool

Same as mem, but uses IEEE equality instead of structural equality.

Array searching

val find_opt : (float -> bool) -> t -> float option
val find_index : (float -> bool) -> t -> int option

find_index f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

It returns None if there is no such element.

  • since 5.1
val find_map : (float -> 'a option) -> t -> 'a option
val find_mapi : (int -> float -> 'a option) -> t -> 'a option

Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 5.1

Sorting

val sort : (float -> float -> int) -> t -> unit

Sort a floatarray in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

The current implementation uses Heap Sort. It runs in constant stack space.

Specification of the comparison function: Let a be the floatarray and cmp the comparison function. The following must be true for all x, y, z in a :

  • cmp x y > 0 if and only if cmp y x < 0
  • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

  • cmp a.(i) a.(j) >= 0 if and only if i >= j
val stable_sort : (float -> float -> int) -> t -> unit

Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

The current implementation uses Merge Sort. It uses a temporary floatarray of length n/2, where n is the length of the floatarray. It is usually faster than the current implementation of sort.

val fast_sort : (float -> float -> int) -> t -> unit

Same as sort or stable_sort, whichever is faster on typical input.

Float arrays and Sequences

val to_seq : t -> float Stdlib.Seq.t

Iterate on the floatarray, in increasing order. Modifications of the floatarray during iteration will be reflected in the sequence.

val to_seqi : t -> (int * float) Stdlib.Seq.t

Iterate on the floatarray, in increasing order, yielding indices along elements. Modifications of the floatarray during iteration will be reflected in the sequence.

val of_seq : float Stdlib.Seq.t -> t

Create an array from the generator.

val map_to_array : (float -> 'a) -> t -> 'a array

map_to_array f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

val map_from_array : ('a -> float) -> 'a array -> t

map_from_array f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

Arrays and concurrency safety

Care must be taken when concurrently accessing float arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

Atomicity

Every float array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

For example, consider the following program:

let size = 100_000_000
 let a = Float.Array.make size 1.
 let update a f () =
    Float.Array.iteri (fun i x -> Float.Array.set a i (f x)) a
diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Float/ArrayLabels/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Float/ArrayLabels/index.html
index efa24bd..a088adb 100644
--- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Float/ArrayLabels/index.html
+++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Float/ArrayLabels/index.html
@@ -1,5 +1,5 @@
 
-ArrayLabels (less-power.Stdlib_alerts.Stdlib_alerting.Float.ArrayLabels)

Module Float.ArrayLabels

Float arrays with packed representation (labeled functions).

  • alert impure Arrays are not permitted
type t = floatarray

The type of float arrays with packed representation.

  • since 4.08
val length : t -> int

Return the length (number of elements) of the given floatarray.

val get : t -> int -> float

get a n returns the element number n of floatarray a.

val set : t -> int -> float -> unit

set a n x modifies floatarray a in place, replacing element number n with x.

val make : int -> float -> t

make n x returns a fresh floatarray of length n, initialized with x.

val create : int -> t

create n returns a fresh floatarray of length n, with uninitialized data.

val init : int -> f:(int -> float) -> t

init n ~f returns a fresh floatarray of length n, with element number i initialized to the result of f i. In other terms, init n ~f tabulates the results of f applied to the integers 0 to n-1.

val append : t -> t -> t

append v1 v2 returns a fresh floatarray containing the concatenation of the floatarrays v1 and v2.

val concat : t list -> t

Same as append, but concatenates a list of floatarrays.

val sub : t -> pos:int -> len:int -> t

sub a ~pos ~len returns a fresh floatarray of length len, containing the elements number pos to pos + len - 1 of floatarray a.

  • raises Invalid_argument

    if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

val copy : t -> t

copy a returns a copy of a, that is, a fresh floatarray containing the same elements as a.

val fill : t -> pos:int -> len:int -> float -> unit

fill a ~pos ~len x modifies the floatarray a in place, storing x in elements number pos to pos + len - 1.

val blit : src:t -> src_pos:int -> dst:t -> dst_pos:int -> len:int -> unit

blit ~src ~src_pos ~dst ~dst_pos ~len copies len elements from floatarray src, starting at element number src_pos, to floatarray dst, starting at element number dst_pos. It works correctly even if src and dst are the same floatarray, and the source and destination chunks overlap.

  • raises Invalid_argument

    if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

val to_list : t -> float list

to_list a returns the list of all the elements of a.

val of_list : float list -> t

of_list l returns a fresh floatarray containing the elements of l.

  • raises Invalid_argument

    if the length of l is greater than Sys.max_floatarray_length.

Iterators

val iter : f:(float -> unit) -> t -> unit

iter ~f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

val iteri : f:(int -> float -> unit) -> t -> unit

Same as iter, but the function is applied with the index of the element as first argument, and the element itself as second argument.

val map : f:(float -> float) -> t -> t

map ~f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

val map_inplace : f:(float -> float) -> t -> unit

map_inplace f a applies function f to all elements of a, and updates their values in place.

  • since 5.1
val mapi : f:(int -> float -> float) -> t -> t

Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

val mapi_inplace : f:(int -> float -> float) -> t -> unit

Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

  • since 5.1
val fold_left : f:('acc -> float -> 'acc) -> init:'acc -> t -> 'acc

fold_left ~f x ~init computes f (... (f (f x init.(0)) init.(1)) ...) init.(n-1), where n is the length of the floatarray init.

val fold_right : f:(float -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

fold_right f a init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the floatarray a.

Iterators on two arrays

val iter2 : f:(float -> float -> unit) -> t -> t -> unit

Array.iter2 ~f a b applies function f to all the elements of a and b.

val map2 : f:(float -> float -> float) -> t -> t -> t

map2 ~f a b applies function f to all the elements of a and b, and builds a floatarray with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

Array scanning

val for_all : f:(float -> bool) -> t -> bool

for_all ~f [|a1; ...; an|] checks if all elements of the floatarray satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

val exists : f:(float -> bool) -> t -> bool

exists f [|a1; ...; an|] checks if at least one element of the floatarray satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

val mem : float -> set:t -> bool

mem a ~set is true if and only if there is an element of set that is structurally equal to a, i.e. there is an x in set such that compare a x = 0.

val mem_ieee : float -> set:t -> bool

Same as mem, but uses IEEE equality instead of structural equality.

Array searching

val find_opt : f:(float -> bool) -> t -> float option
val find_index : f:(float -> bool) -> t -> int option

find_index ~f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

It returns None if there is no such element.

  • since 5.1
val find_map : f:(float -> 'a option) -> t -> 'a option
val find_mapi : f:(int -> float -> 'a option) -> t -> 'a option

Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 5.1

Sorting

val sort : cmp:(float -> float -> int) -> t -> unit

Sort a floatarray in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

The current implementation uses Heap Sort. It runs in constant stack space.

Specification of the comparison function: Let a be the floatarray and cmp the comparison function. The following must be true for all x, y, z in a :

  • cmp x y > 0 if and only if cmp y x < 0
  • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

  • cmp a.(i) a.(j) >= 0 if and only if i >= j
val stable_sort : cmp:(float -> float -> int) -> t -> unit

Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

The current implementation uses Merge Sort. It uses a temporary floatarray of length n/2, where n is the length of the floatarray. It is usually faster than the current implementation of sort.

val fast_sort : cmp:(float -> float -> int) -> t -> unit

Same as sort or stable_sort, whichever is faster on typical input.

Float arrays and Sequences

val to_seq : t -> float Stdlib.Seq.t

Iterate on the floatarray, in increasing order. Modifications of the floatarray during iteration will be reflected in the sequence.

val to_seqi : t -> (int * float) Stdlib.Seq.t

Iterate on the floatarray, in increasing order, yielding indices along elements. Modifications of the floatarray during iteration will be reflected in the sequence.

val of_seq : float Stdlib.Seq.t -> t

Create an array from the generator.

val map_to_array : f:(float -> 'a) -> t -> 'a array

map_to_array ~f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

val map_from_array : f:('a -> float) -> 'a array -> t

map_from_array ~f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

Arrays and concurrency safety

Care must be taken when concurrently accessing float arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

Atomicity

Every float array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

For example, consider the following program:

let size = 100_000_000
+ArrayLabels (less-power.Stdlib_alerts.Stdlib_alerting.Float.ArrayLabels)

Module Float.ArrayLabels

Float arrays with packed representation (labeled functions).

  • alert impure Arrays are not permitted
type t = floatarray

The type of float arrays with packed representation.

  • since 4.08
val length : t -> int

Return the length (number of elements) of the given floatarray.

val get : t -> int -> float

get a n returns the element number n of floatarray a.

val set : t -> int -> float -> unit

set a n x modifies floatarray a in place, replacing element number n with x.

val make : int -> float -> t

make n x returns a fresh floatarray of length n, initialized with x.

val create : int -> t

create n returns a fresh floatarray of length n, with uninitialized data.

val init : int -> f:(int -> float) -> t

init n ~f returns a fresh floatarray of length n, with element number i initialized to the result of f i. In other terms, init n ~f tabulates the results of f applied to the integers 0 to n-1.

val append : t -> t -> t

append v1 v2 returns a fresh floatarray containing the concatenation of the floatarrays v1 and v2.

val concat : t list -> t

Same as append, but concatenates a list of floatarrays.

val sub : t -> pos:int -> len:int -> t

sub a ~pos ~len returns a fresh floatarray of length len, containing the elements number pos to pos + len - 1 of floatarray a.

  • raises Invalid_argument

    if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

val copy : t -> t

copy a returns a copy of a, that is, a fresh floatarray containing the same elements as a.

val fill : t -> pos:int -> len:int -> float -> unit

fill a ~pos ~len x modifies the floatarray a in place, storing x in elements number pos to pos + len - 1.

val blit : src:t -> src_pos:int -> dst:t -> dst_pos:int -> len:int -> unit

blit ~src ~src_pos ~dst ~dst_pos ~len copies len elements from floatarray src, starting at element number src_pos, to floatarray dst, starting at element number dst_pos. It works correctly even if src and dst are the same floatarray, and the source and destination chunks overlap.

  • raises Invalid_argument

    if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

val to_list : t -> float list

to_list a returns the list of all the elements of a.

val of_list : float list -> t

of_list l returns a fresh floatarray containing the elements of l.

  • raises Invalid_argument

    if the length of l is greater than Sys.max_floatarray_length.

Iterators

val iter : f:(float -> unit) -> t -> unit

iter ~f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

val iteri : f:(int -> float -> unit) -> t -> unit

Same as iter, but the function is applied with the index of the element as first argument, and the element itself as second argument.

val map : f:(float -> float) -> t -> t

map ~f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

val map_inplace : f:(float -> float) -> t -> unit

map_inplace f a applies function f to all elements of a, and updates their values in place.

  • since 5.1
val mapi : f:(int -> float -> float) -> t -> t

Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

val mapi_inplace : f:(int -> float -> float) -> t -> unit

Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

  • since 5.1
val fold_left : f:('acc -> float -> 'acc) -> init:'acc -> t -> 'acc

fold_left ~f x ~init computes f (... (f (f x init.(0)) init.(1)) ...) init.(n-1), where n is the length of the floatarray init.

val fold_right : f:(float -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

fold_right f a init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the floatarray a.

Iterators on two arrays

val iter2 : f:(float -> float -> unit) -> t -> t -> unit

Array.iter2 ~f a b applies function f to all the elements of a and b.

val map2 : f:(float -> float -> float) -> t -> t -> t

map2 ~f a b applies function f to all the elements of a and b, and builds a floatarray with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

Array scanning

val for_all : f:(float -> bool) -> t -> bool

for_all ~f [|a1; ...; an|] checks if all elements of the floatarray satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

val exists : f:(float -> bool) -> t -> bool

exists f [|a1; ...; an|] checks if at least one element of the floatarray satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

val mem : float -> set:t -> bool

mem a ~set is true if and only if there is an element of set that is structurally equal to a, i.e. there is an x in set such that compare a x = 0.

val mem_ieee : float -> set:t -> bool

Same as mem, but uses IEEE equality instead of structural equality.

Array searching

val find_opt : f:(float -> bool) -> t -> float option
val find_index : f:(float -> bool) -> t -> int option

find_index ~f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

It returns None if there is no such element.

  • since 5.1
val find_map : f:(float -> 'a option) -> t -> 'a option
val find_mapi : f:(int -> float -> 'a option) -> t -> 'a option

Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 5.1

Sorting

val sort : cmp:(float -> float -> int) -> t -> unit

Sort a floatarray in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

The current implementation uses Heap Sort. It runs in constant stack space.

Specification of the comparison function: Let a be the floatarray and cmp the comparison function. The following must be true for all x, y, z in a :

  • cmp x y > 0 if and only if cmp y x < 0
  • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

  • cmp a.(i) a.(j) >= 0 if and only if i >= j
val stable_sort : cmp:(float -> float -> int) -> t -> unit

Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

The current implementation uses Merge Sort. It uses a temporary floatarray of length n/2, where n is the length of the floatarray. It is usually faster than the current implementation of sort.

val fast_sort : cmp:(float -> float -> int) -> t -> unit

Same as sort or stable_sort, whichever is faster on typical input.

Float arrays and Sequences

val to_seq : t -> float Stdlib.Seq.t

Iterate on the floatarray, in increasing order. Modifications of the floatarray during iteration will be reflected in the sequence.

val to_seqi : t -> (int * float) Stdlib.Seq.t

Iterate on the floatarray, in increasing order, yielding indices along elements. Modifications of the floatarray during iteration will be reflected in the sequence.

val of_seq : float Stdlib.Seq.t -> t

Create an array from the generator.

val map_to_array : f:(float -> 'a) -> t -> 'a array

map_to_array ~f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

val map_from_array : f:('a -> float) -> 'a array -> t

map_from_array ~f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

Arrays and concurrency safety

Care must be taken when concurrently accessing float arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

Atomicity

Every float array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

For example, consider the following program:

let size = 100_000_000
 let a = Float.ArrayLabels.make size 1.
 let update a f () =
    Float.ArrayLabels.iteri ~f:(fun i x -> Float.Array.set a i (f x)) a
diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Float/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Float/index.html
index e8c0320..dcd19d7 100644
--- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Float/index.html
+++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Float/index.html
@@ -1,2 +1,2 @@
 
-Float (less-power.Stdlib_alerts.Stdlib_alerting.Float)

Module Stdlib_alerting.Float

include sig ... end
val zero : float

The floating point 0.

  • since 4.08
val one : float

The floating-point 1.

  • since 4.08
val minus_one : float

The floating-point -1.

  • since 4.08
val neg : float -> float

Unary negation.

val add : float -> float -> float

Floating-point addition.

val sub : float -> float -> float

Floating-point subtraction.

val mul : float -> float -> float

Floating-point multiplication.

val div : float -> float -> float

Floating-point division.

val fma : float -> float -> float -> float

fma x y z returns x * y + z, with a best effort for computing this expression with a single rounding, using either hardware instructions (providing full IEEE compliance) or a software emulation.

On 64-bit Cygwin, 64-bit mingw-w64 and MSVC 2017 and earlier, this function may be emulated owing to known bugs on limitations on these platforms. Note: since software emulation of the fma is costly, make sure that you are using hardware fma support if performance matters.

  • since 4.08
val rem : float -> float -> float

rem a b returns the remainder of a with respect to b. The returned value is a -. n *. b, where n is the quotient a /. b rounded towards zero to an integer.

val succ : float -> float

succ x returns the floating point number right after x i.e., the smallest floating-point number greater than x. See also next_after.

  • since 4.08
val pred : float -> float

pred x returns the floating-point number right before x i.e., the greatest floating-point number smaller than x. See also next_after.

  • since 4.08
val abs : float -> float

abs f returns the absolute value of f.

val infinity : float

Positive infinity.

val neg_infinity : float

Negative infinity.

val nan : float

A special floating-point value denoting the result of an undefined operation such as 0.0 /. 0.0. Stands for 'not a number'. Any floating-point operation with nan as argument returns nan as result, unless otherwise specified in IEEE 754 standard. As for floating-point comparisons, =, <, <=, > and >= return false and <> returns true if one or both of their arguments is nan.

nan is quiet_nan since 5.1; it was a signaling NaN before.

val signaling_nan : float

Signaling NaN. The corresponding signals do not raise OCaml exception, but the value can be useful for interoperability with C libraries.

  • since 5.1
val quiet_nan : float

Quiet NaN.

  • since 5.1
val pi : float

The constant pi.

val max_float : float

The largest positive finite value of type float.

val min_float : float

The smallest positive, non-zero, non-denormalized value of type float.

val epsilon : float

The difference between 1.0 and the smallest exactly representable floating-point number greater than 1.0.

val is_finite : float -> bool

is_finite x is true if and only if x is finite i.e., not infinite and not nan.

  • since 4.08
val is_infinite : float -> bool

is_infinite x is true if and only if x is infinity or neg_infinity.

  • since 4.08
val is_nan : float -> bool

is_nan x is true if and only if x is not a number (see nan).

  • since 4.08
val is_integer : float -> bool

is_integer x is true if and only if x is an integer.

  • since 4.08
val of_int : int -> float

Convert an integer to floating-point.

val to_int : float -> int

Truncate the given floating-point number to an integer. The result is unspecified if the argument is nan or falls outside the range of representable integers.

val of_string : string -> float

Convert the given string to a float. The string is read in decimal (by default) or in hexadecimal (marked by 0x or 0X). The format of decimal floating-point numbers is [-] dd.ddd (e|E) [+|-] dd , where d stands for a decimal digit. The format of hexadecimal floating-point numbers is [-] 0(x|X) hh.hhh (p|P) [+|-] dd , where h stands for an hexadecimal digit and d for a decimal digit. In both cases, at least one of the integer and fractional parts must be given; the exponent part is optional. The _ (underscore) character can appear anywhere in the string and is ignored. Depending on the execution platforms, other representations of floating-point numbers can be accepted, but should not be relied upon.

  • raises Failure

    if the given string is not a valid representation of a float.

val of_string_opt : string -> float option

Same as of_string, but returns None instead of raising.

val to_string : float -> string

Return a string representation of a floating-point number.

This conversion can involve a loss of precision. For greater control over the manner in which the number is printed, see Printf.

This function is an alias for Stdlib.string_of_float.

type fpclass = Stdlib.fpclass =
  1. | FP_normal
    (*

    Normal number, none of the below

    *)
  2. | FP_subnormal
    (*

    Number very close to 0.0, has reduced precision

    *)
  3. | FP_zero
    (*

    Number is 0.0 or -0.0

    *)
  4. | FP_infinite
    (*

    Number is positive or negative infinity

    *)
  5. | FP_nan
    (*

    Not a number: result of an undefined operation

    *)

The five classes of floating-point numbers, as determined by the classify_float function.

val classify_float : float -> fpclass

Return the class of the given floating-point number: normal, subnormal, zero, infinite, or not a number.

val pow : float -> float -> float

Exponentiation.

val sqrt : float -> float

Square root.

val cbrt : float -> float

Cube root.

  • since 4.13
val exp : float -> float

Exponential.

val exp2 : float -> float

Base 2 exponential function.

  • since 4.13
val log : float -> float

Natural logarithm.

val log10 : float -> float

Base 10 logarithm.

val log2 : float -> float

Base 2 logarithm.

  • since 4.13
val expm1 : float -> float

expm1 x computes exp x -. 1.0, giving numerically-accurate results even if x is close to 0.0.

val log1p : float -> float

log1p x computes log(1.0 +. x) (natural logarithm), giving numerically-accurate results even if x is close to 0.0.

val cos : float -> float

Cosine. Argument is in radians.

val sin : float -> float

Sine. Argument is in radians.

val tan : float -> float

Tangent. Argument is in radians.

val acos : float -> float

Arc cosine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between 0.0 and pi.

val asin : float -> float

Arc sine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between -pi/2 and pi/2.

val atan : float -> float

Arc tangent. Result is in radians and is between -pi/2 and pi/2.

val atan2 : float -> float -> float

atan2 y x returns the arc tangent of y /. x. The signs of x and y are used to determine the quadrant of the result. Result is in radians and is between -pi and pi.

val hypot : float -> float -> float

hypot x y returns sqrt(x *. x +. y *. y), that is, the length of the hypotenuse of a right-angled triangle with sides of length x and y, or, equivalently, the distance of the point (x,y) to origin. If one of x or y is infinite, returns infinity even if the other is nan.

val cosh : float -> float

Hyperbolic cosine. Argument is in radians.

val sinh : float -> float

Hyperbolic sine. Argument is in radians.

val tanh : float -> float

Hyperbolic tangent. Argument is in radians.

val acosh : float -> float

Hyperbolic arc cosine. The argument must fall within the range [1.0, inf]. Result is in radians and is between 0.0 and inf.

  • since 4.13
val asinh : float -> float

Hyperbolic arc sine. The argument and result range over the entire real line. Result is in radians.

  • since 4.13
val atanh : float -> float

Hyperbolic arc tangent. The argument must fall within the range [-1.0, 1.0]. Result is in radians and ranges over the entire real line.

  • since 4.13
val erf : float -> float

Error function. The argument ranges over the entire real line. The result is always within [-1.0, 1.0].

  • since 4.13
val erfc : float -> float

Complementary error function (erfc x = 1 - erf x). The argument ranges over the entire real line. The result is always within [-1.0, 1.0].

  • since 4.13
val trunc : float -> float

trunc x rounds x to the nearest integer whose absolute value is less than or equal to x.

  • since 4.08
val round : float -> float

round x rounds x to the nearest integer with ties (fractional values of 0.5) rounded away from zero, regardless of the current rounding direction. If x is an integer, +0., -0., nan, or infinite, x itself is returned.

On 64-bit mingw-w64, this function may be emulated owing to a bug in the C runtime library (CRT) on this platform.

  • since 4.08
val ceil : float -> float

Round above to an integer value. ceil f returns the least integer value greater than or equal to f. The result is returned as a float.

val floor : float -> float

Round below to an integer value. floor f returns the greatest integer value less than or equal to f. The result is returned as a float.

val next_after : float -> float -> float

next_after x y returns the next representable floating-point value following x in the direction of y. More precisely, if y is greater (resp. less) than x, it returns the smallest (resp. largest) representable number greater (resp. less) than x. If x equals y, the function returns y. If x or y is nan, a nan is returned. Note that next_after max_float infinity = infinity and that next_after 0. infinity is the smallest denormalized positive number. If x is the smallest denormalized positive number, next_after x 0. = 0.

  • since 4.08
val copy_sign : float -> float -> float

copy_sign x y returns a float whose absolute value is that of x and whose sign is that of y. If x is nan, returns nan. If y is nan, returns either x or -. x, but it is not specified which.

val sign_bit : float -> bool

sign_bit x is true if and only if the sign bit of x is set. For example sign_bit 1. and signbit 0. are false while sign_bit (-1.) and sign_bit (-0.) are true.

  • since 4.08
val frexp : float -> float * int

frexp f returns the pair of the significant and the exponent of f. When f is zero, the significant x and the exponent n of f are equal to zero. When f is non-zero, they are defined by f = x *. 2 ** n and 0.5 <= x < 1.0.

val ldexp : float -> int -> float

ldexp x n returns x *. 2 ** n.

val modf : float -> float * float

modf f returns the pair of the fractional and integral part of f.

type t = float

An alias for the type of floating-point numbers.

val compare : t -> t -> int

compare x y returns 0 if x is equal to y, a negative integer if x is less than y, and a positive integer if x is greater than y. compare treats nan as equal to itself and less than any other float value. This treatment of nan ensures that compare defines a total ordering relation.

val equal : t -> t -> bool

The equal function for floating-point numbers, compared using compare.

val min : t -> t -> t

min x y returns the minimum of x and y. It returns nan when x or y is nan. Moreover min (-0.) (+0.) = -0.

  • since 4.08
val max : float -> float -> float

max x y returns the maximum of x and y. It returns nan when x or y is nan. Moreover max (-0.) (+0.) = +0.

  • since 4.08
val min_max : float -> float -> float * float

min_max x y is (min x y, max x y), just more efficient.

  • since 4.08
val min_num : t -> t -> t

min_num x y returns the minimum of x and y treating nan as missing values. If both x and y are nan, nan is returned. Moreover min_num (-0.) (+0.) = -0.

  • since 4.08
val max_num : t -> t -> t

max_num x y returns the maximum of x and y treating nan as missing values. If both x and y are nan nan is returned. Moreover max_num (-0.) (+0.) = +0.

  • since 4.08
val min_max_num : float -> float -> float * float

min_max_num x y is (min_num x y, max_num x y), just more efficient. Note that in particular min_max_num x nan = (x, x) and min_max_num nan y = (y, y).

  • since 4.08
val seeded_hash : int -> t -> int

A seeded hash function for floats, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

  • since 5.1
val hash : t -> int

An unseeded hash function for floats, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

module Array : sig ... end

Float arrays with packed representation.

module ArrayLabels : sig ... end

Float arrays with packed representation (labeled functions).

+Float (less-power.Stdlib_alerts.Stdlib_alerting.Float)

Module Stdlib_alerting.Float

include sig ... end
val zero : float

The floating point 0.

  • since 4.08
val one : float

The floating-point 1.

  • since 4.08
val minus_one : float

The floating-point -1.

  • since 4.08
val neg : float -> float

Unary negation.

val add : float -> float -> float

Floating-point addition.

val sub : float -> float -> float

Floating-point subtraction.

val mul : float -> float -> float

Floating-point multiplication.

val div : float -> float -> float

Floating-point division.

val fma : float -> float -> float -> float

fma x y z returns x * y + z, with a best effort for computing this expression with a single rounding, using either hardware instructions (providing full IEEE compliance) or a software emulation.

On 64-bit Cygwin, 64-bit mingw-w64 and MSVC 2017 and earlier, this function may be emulated owing to known bugs on limitations on these platforms. Note: since software emulation of the fma is costly, make sure that you are using hardware fma support if performance matters.

  • since 4.08
val rem : float -> float -> float

rem a b returns the remainder of a with respect to b. The returned value is a -. n *. b, where n is the quotient a /. b rounded towards zero to an integer.

val succ : float -> float

succ x returns the floating point number right after x i.e., the smallest floating-point number greater than x. See also next_after.

  • since 4.08
val pred : float -> float

pred x returns the floating-point number right before x i.e., the greatest floating-point number smaller than x. See also next_after.

  • since 4.08
val abs : float -> float

abs f returns the absolute value of f.

val infinity : float

Positive infinity.

val neg_infinity : float

Negative infinity.

val nan : float

A special floating-point value denoting the result of an undefined operation such as 0.0 /. 0.0. Stands for 'not a number'. Any floating-point operation with nan as argument returns nan as result, unless otherwise specified in IEEE 754 standard. As for floating-point comparisons, =, <, <=, > and >= return false and <> returns true if one or both of their arguments is nan.

nan is quiet_nan since 5.1; it was a signaling NaN before.

val signaling_nan : float

Signaling NaN. The corresponding signals do not raise OCaml exception, but the value can be useful for interoperability with C libraries.

  • since 5.1
val quiet_nan : float

Quiet NaN.

  • since 5.1
val pi : float

The constant pi.

val max_float : float

The largest positive finite value of type float.

val min_float : float

The smallest positive, non-zero, non-denormalized value of type float.

val epsilon : float

The difference between 1.0 and the smallest exactly representable floating-point number greater than 1.0.

val is_finite : float -> bool

is_finite x is true if and only if x is finite i.e., not infinite and not nan.

  • since 4.08
val is_infinite : float -> bool

is_infinite x is true if and only if x is infinity or neg_infinity.

  • since 4.08
val is_nan : float -> bool

is_nan x is true if and only if x is not a number (see nan).

  • since 4.08
val is_integer : float -> bool

is_integer x is true if and only if x is an integer.

  • since 4.08
val of_int : int -> float

Convert an integer to floating-point.

val to_int : float -> int

Truncate the given floating-point number to an integer. The result is unspecified if the argument is nan or falls outside the range of representable integers.

val of_string : string -> float

Convert the given string to a float. The string is read in decimal (by default) or in hexadecimal (marked by 0x or 0X). The format of decimal floating-point numbers is [-] dd.ddd (e|E) [+|-] dd , where d stands for a decimal digit. The format of hexadecimal floating-point numbers is [-] 0(x|X) hh.hhh (p|P) [+|-] dd , where h stands for an hexadecimal digit and d for a decimal digit. In both cases, at least one of the integer and fractional parts must be given; the exponent part is optional. The _ (underscore) character can appear anywhere in the string and is ignored. Depending on the execution platforms, other representations of floating-point numbers can be accepted, but should not be relied upon.

  • raises Failure

    if the given string is not a valid representation of a float.

val of_string_opt : string -> float option

Same as of_string, but returns None instead of raising.

val to_string : float -> string

Return a string representation of a floating-point number.

This conversion can involve a loss of precision. For greater control over the manner in which the number is printed, see Printf.

This function is an alias for Stdlib.string_of_float.

type fpclass = Stdlib.fpclass =
  1. | FP_normal
    (*

    Normal number, none of the below

    *)
  2. | FP_subnormal
    (*

    Number very close to 0.0, has reduced precision

    *)
  3. | FP_zero
    (*

    Number is 0.0 or -0.0

    *)
  4. | FP_infinite
    (*

    Number is positive or negative infinity

    *)
  5. | FP_nan
    (*

    Not a number: result of an undefined operation

    *)

The five classes of floating-point numbers, as determined by the classify_float function.

val classify_float : float -> fpclass

Return the class of the given floating-point number: normal, subnormal, zero, infinite, or not a number.

val pow : float -> float -> float

Exponentiation.

val sqrt : float -> float

Square root.

val cbrt : float -> float

Cube root.

  • since 4.13
val exp : float -> float

Exponential.

val exp2 : float -> float

Base 2 exponential function.

  • since 4.13
val log : float -> float

Natural logarithm.

val log10 : float -> float

Base 10 logarithm.

val log2 : float -> float

Base 2 logarithm.

  • since 4.13
val expm1 : float -> float

expm1 x computes exp x -. 1.0, giving numerically-accurate results even if x is close to 0.0.

val log1p : float -> float

log1p x computes log(1.0 +. x) (natural logarithm), giving numerically-accurate results even if x is close to 0.0.

val cos : float -> float

Cosine. Argument is in radians.

val sin : float -> float

Sine. Argument is in radians.

val tan : float -> float

Tangent. Argument is in radians.

val acos : float -> float

Arc cosine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between 0.0 and pi.

val asin : float -> float

Arc sine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between -pi/2 and pi/2.

val atan : float -> float

Arc tangent. Result is in radians and is between -pi/2 and pi/2.

val atan2 : float -> float -> float

atan2 y x returns the arc tangent of y /. x. The signs of x and y are used to determine the quadrant of the result. Result is in radians and is between -pi and pi.

val hypot : float -> float -> float

hypot x y returns sqrt(x *. x +. y *. y), that is, the length of the hypotenuse of a right-angled triangle with sides of length x and y, or, equivalently, the distance of the point (x,y) to origin. If one of x or y is infinite, returns infinity even if the other is nan.

val cosh : float -> float

Hyperbolic cosine. Argument is in radians.

val sinh : float -> float

Hyperbolic sine. Argument is in radians.

val tanh : float -> float

Hyperbolic tangent. Argument is in radians.

val acosh : float -> float

Hyperbolic arc cosine. The argument must fall within the range [1.0, inf]. Result is in radians and is between 0.0 and inf.

  • since 4.13
val asinh : float -> float

Hyperbolic arc sine. The argument and result range over the entire real line. Result is in radians.

  • since 4.13
val atanh : float -> float

Hyperbolic arc tangent. The argument must fall within the range [-1.0, 1.0]. Result is in radians and ranges over the entire real line.

  • since 4.13
val erf : float -> float

Error function. The argument ranges over the entire real line. The result is always within [-1.0, 1.0].

  • since 4.13
val erfc : float -> float

Complementary error function (erfc x = 1 - erf x). The argument ranges over the entire real line. The result is always within [-1.0, 1.0].

  • since 4.13
val trunc : float -> float

trunc x rounds x to the nearest integer whose absolute value is less than or equal to x.

  • since 4.08
val round : float -> float

round x rounds x to the nearest integer with ties (fractional values of 0.5) rounded away from zero, regardless of the current rounding direction. If x is an integer, +0., -0., nan, or infinite, x itself is returned.

On 64-bit mingw-w64, this function may be emulated owing to a bug in the C runtime library (CRT) on this platform.

  • since 4.08
val ceil : float -> float

Round above to an integer value. ceil f returns the least integer value greater than or equal to f. The result is returned as a float.

val floor : float -> float

Round below to an integer value. floor f returns the greatest integer value less than or equal to f. The result is returned as a float.

val next_after : float -> float -> float

next_after x y returns the next representable floating-point value following x in the direction of y. More precisely, if y is greater (resp. less) than x, it returns the smallest (resp. largest) representable number greater (resp. less) than x. If x equals y, the function returns y. If x or y is nan, a nan is returned. Note that next_after max_float infinity = infinity and that next_after 0. infinity is the smallest denormalized positive number. If x is the smallest denormalized positive number, next_after x 0. = 0.

  • since 4.08
val copy_sign : float -> float -> float

copy_sign x y returns a float whose absolute value is that of x and whose sign is that of y. If x is nan, returns nan. If y is nan, returns either x or -. x, but it is not specified which.

val sign_bit : float -> bool

sign_bit x is true if and only if the sign bit of x is set. For example sign_bit 1. and signbit 0. are false while sign_bit (-1.) and sign_bit (-0.) are true.

  • since 4.08
val frexp : float -> float * int

frexp f returns the pair of the significant and the exponent of f. When f is zero, the significant x and the exponent n of f are equal to zero. When f is non-zero, they are defined by f = x *. 2 ** n and 0.5 <= x < 1.0.

val ldexp : float -> int -> float

ldexp x n returns x *. 2 ** n.

val modf : float -> float * float

modf f returns the pair of the fractional and integral part of f.

type t = float

An alias for the type of floating-point numbers.

val compare : t -> t -> int

compare x y returns 0 if x is equal to y, a negative integer if x is less than y, and a positive integer if x is greater than y. compare treats nan as equal to itself and less than any other float value. This treatment of nan ensures that compare defines a total ordering relation.

val equal : t -> t -> bool

The equal function for floating-point numbers, compared using compare.

val min : t -> t -> t

min x y returns the minimum of x and y. It returns nan when x or y is nan. Moreover min (-0.) (+0.) = -0.

  • since 4.08
val max : float -> float -> float

max x y returns the maximum of x and y. It returns nan when x or y is nan. Moreover max (-0.) (+0.) = +0.

  • since 4.08
val min_max : float -> float -> float * float

min_max x y is (min x y, max x y), just more efficient.

  • since 4.08
val min_num : t -> t -> t

min_num x y returns the minimum of x and y treating nan as missing values. If both x and y are nan, nan is returned. Moreover min_num (-0.) (+0.) = -0.

  • since 4.08
val max_num : t -> t -> t

max_num x y returns the maximum of x and y treating nan as missing values. If both x and y are nan nan is returned. Moreover max_num (-0.) (+0.) = +0.

  • since 4.08
val min_max_num : float -> float -> float * float

min_max_num x y is (min_num x y, max_num x y), just more efficient. Note that in particular min_max_num x nan = (x, x) and min_max_num nan y = (y, y).

  • since 4.08
val seeded_hash : int -> t -> int

A seeded hash function for floats, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

  • since 5.1
val hash : t -> int

An unseeded hash function for floats, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

module Array : sig ... end

Float arrays with packed representation.

module ArrayLabels : sig ... end

Float arrays with packed representation (labeled functions).

diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/Make/argument-1-H/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/Make/argument-1-H/index.html index 0da9603..21ac5fd 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/Make/argument-1-H/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/Make/argument-1-H/index.html @@ -1,2 +1,2 @@ -H (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.Make.H)

Parameter Make.H

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
+H (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.Make.H)

Parameter Make.H

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/Make/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/Make/index.html index 4f4b930..6552d7e 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/Make/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/Make/index.html @@ -1,2 +1,2 @@ -Make (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.Make)

Module Hashtbl.Make

Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

  • alert impure Hash tables are not permitted

Parameters

module H : HashedType

Signature

type key = H.t
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Stdlib.Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
  • since 4.07
+Make (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.Make)

Module Hashtbl.Make

Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

  • alert impure Hash tables are not permitted

Parameters

module H : HashedType

Signature

type key = H.t
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Stdlib.Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
  • since 4.07
diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/MakeSeeded/argument-1-H/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/MakeSeeded/argument-1-H/index.html index 87da65f..82fc2f9 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/MakeSeeded/argument-1-H/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/MakeSeeded/argument-1-H/index.html @@ -1,2 +1,2 @@ -H (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.MakeSeeded.H)

Parameter MakeSeeded.H

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val seeded_hash : int -> t -> int

A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

+H (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.MakeSeeded.H)

Parameter MakeSeeded.H

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val seeded_hash : int -> t -> int

A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/MakeSeeded/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/MakeSeeded/index.html index 7a8b720..6cda401 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/MakeSeeded/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/MakeSeeded/index.html @@ -1,2 +1,2 @@ -MakeSeeded (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.MakeSeeded)

Module Hashtbl.MakeSeeded

Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

  • since 4.00
  • alert impure Hash tables are not permitted

Parameters

Signature

type key = H.t
type !'a t
val create : ?random:bool -> int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Stdlib.Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
  • since 4.07
+MakeSeeded (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.MakeSeeded)

Module Hashtbl.MakeSeeded

Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

  • since 4.00
  • alert impure Hash tables are not permitted

Parameters

Signature

type key = H.t
type !'a t
val create : ?random:bool -> int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Stdlib.Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
  • since 4.07
diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/index.html index 1412b7d..8d78537 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/index.html @@ -1,2 +1,2 @@ -Hashtbl (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl)

Module Stdlib_alerting.Hashtbl

type ('a, 'b) t = ('a, 'b) Stdlib.Hashtbl.t
  • alert impure Hash tables are not permitted
type statistics = Stdlib.Hashtbl.statistics = {
  1. num_bindings : int;
  2. num_buckets : int;
  3. max_bucket_length : int;
  4. bucket_histogram : int array;
}
  • alert impure Hash tables are not permitted
include sig ... end
val hash : 'a -> int

Hashtbl.hash x associates a nonnegative integer to any value of any type. It is guaranteed that if x = y or Stdlib.compare x y = 0, then hash x = hash y. Moreover, hash always terminates, even on cyclic structures.

val seeded_hash : int -> 'a -> int

A variant of hash that is further parameterized by an integer seed.

  • since 4.00
val hash_param : int -> int -> 'a -> int

Hashtbl.hash_param meaningful total x computes a hash value for x, with the same properties as for hash. The two extra integer parameters meaningful and total give more precise control over hashing. Hashing performs a breadth-first, left-to-right traversal of the structure x, stopping after meaningful meaningful nodes were encountered, or total nodes (meaningful or not) were encountered. If total as specified by the user exceeds a certain value, currently 256, then it is capped to that value. Meaningful nodes are: integers; floating-point numbers; strings; characters; booleans; and constant constructors. Larger values of meaningful and total means that more nodes are taken into account to compute the final hash value, and therefore collisions are less likely to happen. However, hashing takes longer. The parameters meaningful and total govern the tradeoff between accuracy and speed. As default choices, hash and seeded_hash take meaningful = 10 and total = 100.

val seeded_hash_param : int -> int -> int -> 'a -> int

A variant of hash_param that is further parameterized by an integer seed. Usage: Hashtbl.seeded_hash_param meaningful total seed x.

  • since 4.00
val create : ?random:bool -> int -> ('a, 'b) t

Hashtbl.create n creates a new, empty hash table, with initial size n. For best results, n should be on the order of the expected number of elements that will be in the table. The table grows as needed, so n is just an initial guess.

The optional ~random parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of Hashtbl.create or deterministic over all executions.

A hash table that is created with ~random set to false uses a fixed hash function (hash) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other security-sensitive applications, the deterministic collision patterns can be exploited by a malicious user to create a denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down.

A hash table that is created with ~random set to true uses the seeded hash function seeded_hash with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among 2^{30} different hash functions. All these hash functions have different collision patterns, rendering ineffective the denial-of-service attack described above. However, because of randomization, enumerating all elements of the hash table using fold or iter is no longer deterministic: elements are enumerated in different orders at different runs of the program.

If no ~random parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling randomize or by setting the R flag in the OCAMLRUNPARAM environment variable.

  • before 4.00

    the ~random parameter was not present and all hash tables were created in non-randomized mode.

  • alert impure Hash tables are not permitted
val clear : ('a, 'b) t -> unit

Empty a hash table. Use reset instead of clear to shrink the size of the bucket table to its initial size.

  • alert impure Hash tables are not permitted
val reset : ('a, 'b) t -> unit

Empty a hash table and shrink the size of the bucket table to its initial size.

  • since 4.00
  • alert impure Hash tables are not permitted
val copy : ('a, 'b) t -> ('a, 'b) t

Return a copy of the given hashtable.

  • alert impure Hash tables are not permitted
val add : ('a, 'b) t -> 'a -> 'b -> unit

Hashtbl.add tbl key data adds a binding of key to data in table tbl.

Warning: Previous bindings for key are not removed, but simply hidden. That is, after performing remove tbl key, the previous binding for key, if any, is restored. (Same behavior as with association lists.)

If you desire the classic behavior of replacing elements, see replace.

  • alert impure Hash tables are not permitted
val find : ('a, 'b) t -> 'a -> 'b

Hashtbl.find tbl x returns the current binding of x in tbl, or raises Not_found if no such binding exists.

  • alert impure Hash tables are not permitted
val find_opt : ('a, 'b) t -> 'a -> 'b option

Hashtbl.find_opt tbl x returns the current binding of x in tbl, or None if no such binding exists.

  • since 4.05
  • alert impure Hash tables are not permitted
val find_all : ('a, 'b) t -> 'a -> 'b list

Hashtbl.find_all tbl x returns the list of all data associated with x in tbl. The current binding is returned first, then the previous bindings, in reverse order of introduction in the table.

  • alert impure Hash tables are not permitted
val mem : ('a, 'b) t -> 'a -> bool

Hashtbl.mem tbl x checks if x is bound in tbl.

  • alert impure Hash tables are not permitted
val remove : ('a, 'b) t -> 'a -> unit

Hashtbl.remove tbl x removes the current binding of x in tbl, restoring the previous binding if it exists. It does nothing if x is not bound in tbl.

  • alert impure Hash tables are not permitted
val replace : ('a, 'b) t -> 'a -> 'b -> unit

Hashtbl.replace tbl key data replaces the current binding of key in tbl by a binding of key to data. If key is unbound in tbl, a binding of key to data is added to tbl. This is functionally equivalent to remove tbl key followed by add tbl key data.

  • alert impure Hash tables are not permitted
val iter : ('a -> 'b -> unit) -> ('a, 'b) t -> unit

Hashtbl.iter f tbl applies f to all bindings in table tbl. f receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to f.

The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

The behavior is not specified if the hash table is modified by f during the iteration.

  • alert impure Hash tables are not permitted
val filter_map_inplace : ('a -> 'b -> 'b option) -> ('a, 'b) t -> unit

Hashtbl.filter_map_inplace f tbl applies f to all bindings in table tbl and update each binding depending on the result of f. If f returns None, the binding is discarded. If it returns Some new_val, the binding is update to associate the key to new_val.

Other comments for iter apply as well.

  • since 4.03
  • alert impure Hash tables are not permitted
val fold : ('a -> 'b -> 'acc -> 'acc) -> ('a, 'b) t -> 'acc -> 'acc

Hashtbl.fold f tbl init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in tbl, and d1 ... dN are the associated values. Each binding is presented exactly once to f.

The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

The behavior is not specified if the hash table is modified by f during the iteration.

  • alert impure Hash tables are not permitted
val length : ('a, 'b) t -> int

Hashtbl.length tbl returns the number of bindings in tbl. It takes constant time. Multiple bindings are counted once each, so Hashtbl.length gives the number of times Hashtbl.iter calls its first argument.

  • alert impure Hash tables are not permitted
val randomize : unit -> unit

After a call to Hashtbl.randomize(), hash tables are created in randomized mode by default: create returns randomized hash tables, unless the ~random:false optional parameter is given. The same effect can be achieved by setting the R parameter in the OCAMLRUNPARAM environment variable.

It is recommended that applications or Web frameworks that need to protect themselves against the denial-of-service attack described in create call Hashtbl.randomize() at initialization time before any domains are created.

Note that once Hashtbl.randomize() was called, there is no way to revert to the non-randomized default behavior of create. This is intentional. Non-randomized hash tables can still be created using Hashtbl.create ~random:false.

  • since 4.00
  • alert impure Hash tables are not permitted
val is_randomized : unit -> bool

Return true if the tables are currently created in randomized mode by default, false otherwise.

  • since 4.03
  • alert impure Hash tables are not permitted
val rebuild : ?random:bool -> ('a, 'b) t -> ('a, 'b) t

Return a copy of the given hashtable. Unlike copy, rebuild h re-hashes all the (key, value) entries of the original table h. The returned hash table is randomized if h was randomized, or the optional random parameter is true, or if the default is to create randomized hash tables; see create for more information.

rebuild can safely be used to import a hash table built by an old version of the Hashtbl module, then marshaled to persistent storage. After unmarshaling, apply rebuild to produce a hash table for the current version of the Hashtbl module.

  • since 4.12
  • alert impure Hash tables are not permitted
val stats : ('a, 'b) t -> statistics

Hashtbl.stats tbl returns statistics about the table tbl: number of buckets, size of the biggest bucket, distribution of buckets by size.

  • since 4.00
  • alert impure Hash tables are not permitted
val to_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t

Iterate on the whole table. The order in which the bindings appear in the sequence is unspecified. However, if the table contains several bindings for the same key, they appear in reversed order of introduction, that is, the most recent binding appears first.

The behavior is not specified if the hash table is modified during the iteration.

  • since 4.07
  • alert impure Hash tables are not permitted
val to_seq_keys : ('a, _) t -> 'a Stdlib.Seq.t

Same as Seq.map fst (to_seq m)

  • since 4.07
  • alert impure Hash tables are not permitted
val to_seq_values : (_, 'b) t -> 'b Stdlib.Seq.t

Same as Seq.map snd (to_seq m)

  • since 4.07
  • alert impure Hash tables are not permitted
val add_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t -> unit

Add the given bindings to the table, using add

  • since 4.07
  • alert impure Hash tables are not permitted
val replace_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t -> unit

Add the given bindings to the table, using replace

  • since 4.07
  • alert impure Hash tables are not permitted
val of_seq : ('a * 'b) Stdlib.Seq.t -> ('a, 'b) t

Build a table from the given bindings. The bindings are added in the same order they appear in the sequence, using replace_seq, which means that if two pairs have the same key, only the latest one will appear in the table.

  • since 4.07
  • alert impure Hash tables are not permitted
module type HashedType = sig ... end

The input signature of the functor Make.

module type S = sig ... end

The output signature of the functor Make.

module Make (H : HashedType) : S with type key = H.t

Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

module type SeededHashedType = sig ... end

The input signature of the functor MakeSeeded.

module type SeededS = sig ... end

The output signature of the functor MakeSeeded.

module MakeSeeded (H : SeededHashedType) : SeededS with type key = H.t

Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

+Hashtbl (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl)

Module Stdlib_alerting.Hashtbl

type ('a, 'b) t = ('a, 'b) Stdlib.Hashtbl.t
  • alert impure Hash tables are not permitted
type statistics = Stdlib.Hashtbl.statistics = {
  1. num_bindings : int;
  2. num_buckets : int;
  3. max_bucket_length : int;
  4. bucket_histogram : int array;
}
  • alert impure Hash tables are not permitted
include sig ... end
val hash : 'a -> int

Hashtbl.hash x associates a nonnegative integer to any value of any type. It is guaranteed that if x = y or Stdlib.compare x y = 0, then hash x = hash y. Moreover, hash always terminates, even on cyclic structures.

val seeded_hash : int -> 'a -> int

A variant of hash that is further parameterized by an integer seed.

  • since 4.00
val hash_param : int -> int -> 'a -> int

Hashtbl.hash_param meaningful total x computes a hash value for x, with the same properties as for hash. The two extra integer parameters meaningful and total give more precise control over hashing. Hashing performs a breadth-first, left-to-right traversal of the structure x, stopping after meaningful meaningful nodes were encountered, or total nodes (meaningful or not) were encountered. If total as specified by the user exceeds a certain value, currently 256, then it is capped to that value. Meaningful nodes are: integers; floating-point numbers; strings; characters; booleans; and constant constructors. Larger values of meaningful and total means that more nodes are taken into account to compute the final hash value, and therefore collisions are less likely to happen. However, hashing takes longer. The parameters meaningful and total govern the tradeoff between accuracy and speed. As default choices, hash and seeded_hash take meaningful = 10 and total = 100.

val seeded_hash_param : int -> int -> int -> 'a -> int

A variant of hash_param that is further parameterized by an integer seed. Usage: Hashtbl.seeded_hash_param meaningful total seed x.

  • since 4.00
val create : ?random:bool -> int -> ('a, 'b) t

Hashtbl.create n creates a new, empty hash table, with initial size n. For best results, n should be on the order of the expected number of elements that will be in the table. The table grows as needed, so n is just an initial guess.

The optional ~random parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of Hashtbl.create or deterministic over all executions.

A hash table that is created with ~random set to false uses a fixed hash function (hash) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other security-sensitive applications, the deterministic collision patterns can be exploited by a malicious user to create a denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down.

A hash table that is created with ~random set to true uses the seeded hash function seeded_hash with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among 2^{30} different hash functions. All these hash functions have different collision patterns, rendering ineffective the denial-of-service attack described above. However, because of randomization, enumerating all elements of the hash table using fold or iter is no longer deterministic: elements are enumerated in different orders at different runs of the program.

If no ~random parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling randomize or by setting the R flag in the OCAMLRUNPARAM environment variable.

  • before 4.00

    the ~random parameter was not present and all hash tables were created in non-randomized mode.

  • alert impure Hash tables are not permitted
val clear : ('a, 'b) t -> unit

Empty a hash table. Use reset instead of clear to shrink the size of the bucket table to its initial size.

  • alert impure Hash tables are not permitted
val reset : ('a, 'b) t -> unit

Empty a hash table and shrink the size of the bucket table to its initial size.

  • since 4.00
  • alert impure Hash tables are not permitted
val copy : ('a, 'b) t -> ('a, 'b) t

Return a copy of the given hashtable.

  • alert impure Hash tables are not permitted
val add : ('a, 'b) t -> 'a -> 'b -> unit

Hashtbl.add tbl key data adds a binding of key to data in table tbl.

Warning: Previous bindings for key are not removed, but simply hidden. That is, after performing remove tbl key, the previous binding for key, if any, is restored. (Same behavior as with association lists.)

If you desire the classic behavior of replacing elements, see replace.

  • alert impure Hash tables are not permitted
val find : ('a, 'b) t -> 'a -> 'b

Hashtbl.find tbl x returns the current binding of x in tbl, or raises Not_found if no such binding exists.

  • alert impure Hash tables are not permitted
val find_opt : ('a, 'b) t -> 'a -> 'b option

Hashtbl.find_opt tbl x returns the current binding of x in tbl, or None if no such binding exists.

  • since 4.05
  • alert impure Hash tables are not permitted
val find_all : ('a, 'b) t -> 'a -> 'b list

Hashtbl.find_all tbl x returns the list of all data associated with x in tbl. The current binding is returned first, then the previous bindings, in reverse order of introduction in the table.

  • alert impure Hash tables are not permitted
val mem : ('a, 'b) t -> 'a -> bool

Hashtbl.mem tbl x checks if x is bound in tbl.

  • alert impure Hash tables are not permitted
val remove : ('a, 'b) t -> 'a -> unit

Hashtbl.remove tbl x removes the current binding of x in tbl, restoring the previous binding if it exists. It does nothing if x is not bound in tbl.

  • alert impure Hash tables are not permitted
val replace : ('a, 'b) t -> 'a -> 'b -> unit

Hashtbl.replace tbl key data replaces the current binding of key in tbl by a binding of key to data. If key is unbound in tbl, a binding of key to data is added to tbl. This is functionally equivalent to remove tbl key followed by add tbl key data.

  • alert impure Hash tables are not permitted
val iter : ('a -> 'b -> unit) -> ('a, 'b) t -> unit

Hashtbl.iter f tbl applies f to all bindings in table tbl. f receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to f.

The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

The behavior is not specified if the hash table is modified by f during the iteration.

  • alert impure Hash tables are not permitted
val filter_map_inplace : ('a -> 'b -> 'b option) -> ('a, 'b) t -> unit

Hashtbl.filter_map_inplace f tbl applies f to all bindings in table tbl and update each binding depending on the result of f. If f returns None, the binding is discarded. If it returns Some new_val, the binding is update to associate the key to new_val.

Other comments for iter apply as well.

  • since 4.03
  • alert impure Hash tables are not permitted
val fold : ('a -> 'b -> 'acc -> 'acc) -> ('a, 'b) t -> 'acc -> 'acc

Hashtbl.fold f tbl init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in tbl, and d1 ... dN are the associated values. Each binding is presented exactly once to f.

The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

The behavior is not specified if the hash table is modified by f during the iteration.

  • alert impure Hash tables are not permitted
val length : ('a, 'b) t -> int

Hashtbl.length tbl returns the number of bindings in tbl. It takes constant time. Multiple bindings are counted once each, so Hashtbl.length gives the number of times Hashtbl.iter calls its first argument.

  • alert impure Hash tables are not permitted
val randomize : unit -> unit

After a call to Hashtbl.randomize(), hash tables are created in randomized mode by default: create returns randomized hash tables, unless the ~random:false optional parameter is given. The same effect can be achieved by setting the R parameter in the OCAMLRUNPARAM environment variable.

It is recommended that applications or Web frameworks that need to protect themselves against the denial-of-service attack described in create call Hashtbl.randomize() at initialization time before any domains are created.

Note that once Hashtbl.randomize() was called, there is no way to revert to the non-randomized default behavior of create. This is intentional. Non-randomized hash tables can still be created using Hashtbl.create ~random:false.

  • since 4.00
  • alert impure Hash tables are not permitted
val is_randomized : unit -> bool

Return true if the tables are currently created in randomized mode by default, false otherwise.

  • since 4.03
  • alert impure Hash tables are not permitted
val rebuild : ?random:bool -> ('a, 'b) t -> ('a, 'b) t

Return a copy of the given hashtable. Unlike copy, rebuild h re-hashes all the (key, value) entries of the original table h. The returned hash table is randomized if h was randomized, or the optional random parameter is true, or if the default is to create randomized hash tables; see create for more information.

rebuild can safely be used to import a hash table built by an old version of the Hashtbl module, then marshaled to persistent storage. After unmarshaling, apply rebuild to produce a hash table for the current version of the Hashtbl module.

  • since 4.12
  • alert impure Hash tables are not permitted
val stats : ('a, 'b) t -> statistics

Hashtbl.stats tbl returns statistics about the table tbl: number of buckets, size of the biggest bucket, distribution of buckets by size.

  • since 4.00
  • alert impure Hash tables are not permitted
val to_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t

Iterate on the whole table. The order in which the bindings appear in the sequence is unspecified. However, if the table contains several bindings for the same key, they appear in reversed order of introduction, that is, the most recent binding appears first.

The behavior is not specified if the hash table is modified during the iteration.

  • since 4.07
  • alert impure Hash tables are not permitted
val to_seq_keys : ('a, _) t -> 'a Stdlib.Seq.t

Same as Seq.map fst (to_seq m)

  • since 4.07
  • alert impure Hash tables are not permitted
val to_seq_values : (_, 'b) t -> 'b Stdlib.Seq.t

Same as Seq.map snd (to_seq m)

  • since 4.07
  • alert impure Hash tables are not permitted
val add_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t -> unit

Add the given bindings to the table, using add

  • since 4.07
  • alert impure Hash tables are not permitted
val replace_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t -> unit

Add the given bindings to the table, using replace

  • since 4.07
  • alert impure Hash tables are not permitted
val of_seq : ('a * 'b) Stdlib.Seq.t -> ('a, 'b) t

Build a table from the given bindings. The bindings are added in the same order they appear in the sequence, using replace_seq, which means that if two pairs have the same key, only the latest one will appear in the table.

  • since 4.07
  • alert impure Hash tables are not permitted
module type HashedType = sig ... end

The input signature of the functor Make.

module type S = sig ... end

The output signature of the functor Make.

module Make (H : HashedType) : S with type key = H.t

Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

module type SeededHashedType = sig ... end

The input signature of the functor MakeSeeded.

module type SeededS = sig ... end

The output signature of the functor MakeSeeded.

module MakeSeeded (H : SeededHashedType) : SeededS with type key = H.t

Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/module-type-HashedType/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/module-type-HashedType/index.html index b153795..bdec07a 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/module-type-HashedType/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/module-type-HashedType/index.html @@ -1,2 +1,2 @@ -HashedType (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.HashedType)

Module type Hashtbl.HashedType

The input signature of the functor Make.

  • alert impure Hash tables are not permitted
type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
+HashedType (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.HashedType)

Module type Hashtbl.HashedType

The input signature of the functor Make.

  • alert impure Hash tables are not permitted
type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/module-type-S/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/module-type-S/index.html index 401d57b..622032d 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/module-type-S/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/module-type-S/index.html @@ -1,2 +1,2 @@ -S (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.S)

Module type Hashtbl.S

The output signature of the functor Make.

  • alert impure Hash tables are not permitted
type key
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Stdlib.Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
  • since 4.07
+S (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.S)

Module type Hashtbl.S

The output signature of the functor Make.

  • alert impure Hash tables are not permitted
type key
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Stdlib.Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
  • since 4.07
diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/module-type-SeededHashedType/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/module-type-SeededHashedType/index.html index f18a2d5..58be2ab 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/module-type-SeededHashedType/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/module-type-SeededHashedType/index.html @@ -1,2 +1,2 @@ -SeededHashedType (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.SeededHashedType)

Module type Hashtbl.SeededHashedType

The input signature of the functor MakeSeeded.

  • since 4.00
  • alert impure Hash tables are not permitted
type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val seeded_hash : int -> t -> int

A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

+SeededHashedType (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.SeededHashedType)

Module type Hashtbl.SeededHashedType

The input signature of the functor MakeSeeded.

  • since 4.00
  • alert impure Hash tables are not permitted
type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val seeded_hash : int -> t -> int

A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/module-type-SeededS/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/module-type-SeededS/index.html index 1c3216d..5ddb088 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/module-type-SeededS/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Hashtbl/module-type-SeededS/index.html @@ -1,2 +1,2 @@ -SeededS (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.SeededS)

Module type Hashtbl.SeededS

The output signature of the functor MakeSeeded.

  • since 4.00
  • alert impure Hash tables are not permitted
type key
type !'a t
val create : ?random:bool -> int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Stdlib.Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
  • since 4.07
+SeededS (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.SeededS)

Module type Hashtbl.SeededS

The output signature of the functor MakeSeeded.

  • since 4.00
  • alert impure Hash tables are not permitted
type key
type !'a t
val create : ?random:bool -> int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Stdlib.Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
  • since 4.07
diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/LargeFile/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/LargeFile/index.html index 3b539c1..150d3db 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/LargeFile/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/LargeFile/index.html @@ -1,2 +1,2 @@ -LargeFile (less-power.Stdlib_alerts.Stdlib_alerting.LargeFile)

Module Stdlib_alerting.LargeFile

Operations on large files. This sub-module provides 64-bit variants of the channel functions that manipulate file positions and file sizes. By representing positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), these alternate functions allow operating on files whose sizes are greater than max_int.

  • alert input_output Input/output is not permitted
val seek_out : out_channel -> int64 -> unit
val pos_out : out_channel -> int64
val out_channel_length : out_channel -> int64
val seek_in : in_channel -> int64 -> unit
val pos_in : in_channel -> int64
val in_channel_length : in_channel -> int64
+LargeFile (less-power.Stdlib_alerts.Stdlib_alerting.LargeFile)

Module Stdlib_alerting.LargeFile

Operations on large files. This sub-module provides 64-bit variants of the channel functions that manipulate file positions and file sizes. By representing positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), these alternate functions allow operating on files whose sizes are greater than max_int.

  • alert input_output Input/output is not permitted
val seek_out : out_channel -> int64 -> unit
val pos_out : out_channel -> int64
val out_channel_length : out_channel -> int64
val seek_in : in_channel -> int64 -> unit
val pos_in : in_channel -> int64
val in_channel_length : in_channel -> int64
diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/List/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/List/index.html index 4b92a83..4f790f7 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/List/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/List/index.html @@ -1,5 +1,5 @@ -List (less-power.Stdlib_alerts.Stdlib_alerting.List)

Module Stdlib_alerting.List

  • alert list_op List operations are not permitted
include sig ... end
type 'a t = 'a list =
  1. | []
  2. | :: of 'a * 'a list

An alias for the type of lists.

val length : 'a list -> int

Return the length (number of elements) of the given list.

val compare_lengths : 'a list -> 'b list -> int

Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

  • since 4.05
val compare_length_with : 'a list -> int -> int

Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

  • since 4.05
val is_empty : 'a list -> bool

is_empty l is true if and only if l has no elements. It is equivalent to compare_length_with l 0 = 0.

  • since 5.1
val cons : 'a -> 'a list -> 'a list

cons x xs is x :: xs

  • since 4.03 (4.05 in ListLabels)
val hd : 'a list -> 'a

Return the first element of the given list.

  • raises Failure

    if the list is empty.

val tl : 'a list -> 'a list

Return the given list without its first element.

  • raises Failure

    if the list is empty.

val nth : 'a list -> int -> 'a

Return the n-th element of the given list. The first element (head of the list) is at position 0.

  • raises Failure

    if the list is too short.

val nth_opt : 'a list -> int -> 'a option

Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

  • since 4.05
val rev : 'a list -> 'a list

List reversal.

val init : int -> (int -> 'a) -> 'a list

init len f is [f 0; f 1; ...; f (len-1)], evaluated left to right.

  • since 4.06
val append : 'a list -> 'a list -> 'a list

append l0 l1 appends l1 to l0. Same function as the infix operator @.

  • since 5.1 this function is tail-recursive.
val rev_append : 'a list -> 'a list -> 'a list

rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

val concat : 'a list list -> 'a list

Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).

val flatten : 'a list list -> 'a list

Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

val equal : ('a -> 'a -> bool) -> 'a list -> 'a list -> bool

equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

  • since 4.12
val compare : ('a -> 'a -> int) -> 'a list -> 'a list -> int

compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

  • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
  • the empty list [] is strictly smaller than non-empty lists

Note: the cmp function will be called even if the lists have different lengths.

  • since 4.12
val iter : ('a -> unit) -> 'a list -> unit

iter f [a1; ...; an] applies function f in turn to [a1; ...; an]. It is equivalent to f a1; f a2; ...; f an.

val iteri : (int -> 'a -> unit) -> 'a list -> unit

Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 4.00
val map : ('a -> 'b) -> 'a list -> 'b list

map f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1; ...; f an] with the results returned by f.

val mapi : (int -> 'a -> 'b) -> 'a list -> 'b list

Same as map, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 4.00
val rev_map : ('a -> 'b) -> 'a list -> 'b list

rev_map f l gives the same result as rev (map f l), but is more efficient.

val filter_map : ('a -> 'b option) -> 'a list -> 'b list

filter_map f l applies f to every element of l, filters out the None elements and returns the list of the arguments of the Some elements.

  • since 4.08
val concat_map : ('a -> 'b list) -> 'a list -> 'b list

concat_map f l gives the same result as concat (map f l). Tail-recursive.

  • since 4.10
val fold_left_map : +List (less-power.Stdlib_alerts.Stdlib_alerting.List)

Module Stdlib_alerting.List

  • alert list_op List operations are not permitted
include sig ... end
type 'a t = 'a list =
  1. | []
  2. | :: of 'a * 'a list

An alias for the type of lists.

val length : 'a list -> int

Return the length (number of elements) of the given list.

val compare_lengths : 'a list -> 'b list -> int

Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

  • since 4.05
val compare_length_with : 'a list -> int -> int

Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

  • since 4.05
val is_empty : 'a list -> bool

is_empty l is true if and only if l has no elements. It is equivalent to compare_length_with l 0 = 0.

  • since 5.1
val cons : 'a -> 'a list -> 'a list

cons x xs is x :: xs

  • since 4.03 (4.05 in ListLabels)
val hd : 'a list -> 'a

Return the first element of the given list.

  • raises Failure

    if the list is empty.

val tl : 'a list -> 'a list

Return the given list without its first element.

  • raises Failure

    if the list is empty.

val nth : 'a list -> int -> 'a

Return the n-th element of the given list. The first element (head of the list) is at position 0.

  • raises Failure

    if the list is too short.

val nth_opt : 'a list -> int -> 'a option

Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

  • since 4.05
val rev : 'a list -> 'a list

List reversal.

val init : int -> (int -> 'a) -> 'a list

init len f is [f 0; f 1; ...; f (len-1)], evaluated left to right.

  • since 4.06
val append : 'a list -> 'a list -> 'a list

append l0 l1 appends l1 to l0. Same function as the infix operator @.

  • since 5.1 this function is tail-recursive.
val rev_append : 'a list -> 'a list -> 'a list

rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

val concat : 'a list list -> 'a list

Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).

val flatten : 'a list list -> 'a list

Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

val equal : ('a -> 'a -> bool) -> 'a list -> 'a list -> bool

equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

  • since 4.12
val compare : ('a -> 'a -> int) -> 'a list -> 'a list -> int

compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

  • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
  • the empty list [] is strictly smaller than non-empty lists

Note: the cmp function will be called even if the lists have different lengths.

  • since 4.12
val iter : ('a -> unit) -> 'a list -> unit

iter f [a1; ...; an] applies function f in turn to [a1; ...; an]. It is equivalent to f a1; f a2; ...; f an.

val iteri : (int -> 'a -> unit) -> 'a list -> unit

Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 4.00
val map : ('a -> 'b) -> 'a list -> 'b list

map f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1; ...; f an] with the results returned by f.

val mapi : (int -> 'a -> 'b) -> 'a list -> 'b list

Same as map, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 4.00
val rev_map : ('a -> 'b) -> 'a list -> 'b list

rev_map f l gives the same result as rev (map f l), but is more efficient.

val filter_map : ('a -> 'b option) -> 'a list -> 'b list

filter_map f l applies f to every element of l, filters out the None elements and returns the list of the arguments of the Some elements.

  • since 4.08
val concat_map : ('a -> 'b list) -> 'a list -> 'b list

concat_map f l gives the same result as concat (map f l). Tail-recursive.

  • since 4.10
val fold_left_map : ('acc -> 'a -> 'acc * 'b) -> 'acc -> 'a list -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/ListLabels/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/ListLabels/index.html index 0ea1217..0c6f0fd 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/ListLabels/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/ListLabels/index.html @@ -1,5 +1,5 @@ -ListLabels (less-power.Stdlib_alerts.Stdlib_alerting.ListLabels)

Module Stdlib_alerting.ListLabels

  • alert list_op List operations are not permitted
include sig ... end
type 'a t = 'a list =
  1. | []
  2. | :: of 'a * 'a list

An alias for the type of lists.

val length : 'a list -> int

Return the length (number of elements) of the given list.

val compare_lengths : 'a list -> 'b list -> int

Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

  • since 4.05
val compare_length_with : 'a list -> len:int -> int

Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

  • since 4.05
val is_empty : 'a list -> bool

is_empty l is true if and only if l has no elements. It is equivalent to compare_length_with l 0 = 0.

  • since 5.1
val cons : 'a -> 'a list -> 'a list

cons x xs is x :: xs

  • since 4.03 (4.05 in ListLabels)
val hd : 'a list -> 'a

Return the first element of the given list.

  • raises Failure

    if the list is empty.

val tl : 'a list -> 'a list

Return the given list without its first element.

  • raises Failure

    if the list is empty.

val nth : 'a list -> int -> 'a

Return the n-th element of the given list. The first element (head of the list) is at position 0.

  • raises Failure

    if the list is too short.

val nth_opt : 'a list -> int -> 'a option

Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

  • since 4.05
val rev : 'a list -> 'a list

List reversal.

val init : len:int -> f:(int -> 'a) -> 'a list

init ~len ~f is [f 0; f 1; ...; f (len-1)], evaluated left to right.

  • since 4.06
val append : 'a list -> 'a list -> 'a list

append l0 l1 appends l1 to l0. Same function as the infix operator @.

  • since 5.1 this function is tail-recursive.
val rev_append : 'a list -> 'a list -> 'a list

rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

val concat : 'a list list -> 'a list

Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).

val flatten : 'a list list -> 'a list

Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

val equal : eq:('a -> 'a -> bool) -> 'a list -> 'a list -> bool

equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

  • since 4.12
val compare : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> int

compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

  • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
  • the empty list [] is strictly smaller than non-empty lists

Note: the cmp function will be called even if the lists have different lengths.

  • since 4.12
val iter : f:('a -> unit) -> 'a list -> unit

iter ~f [a1; ...; an] applies function f in turn to [a1; ...; an]. It is equivalent to f a1; f a2; ...; f an.

val iteri : f:(int -> 'a -> unit) -> 'a list -> unit

Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 4.00
val map : f:('a -> 'b) -> 'a list -> 'b list

map ~f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1; ...; f an] with the results returned by f.

val mapi : f:(int -> 'a -> 'b) -> 'a list -> 'b list

Same as map, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 4.00
val rev_map : f:('a -> 'b) -> 'a list -> 'b list

rev_map ~f l gives the same result as rev (map f l), but is more efficient.

val filter_map : f:('a -> 'b option) -> 'a list -> 'b list

filter_map ~f l applies f to every element of l, filters out the None elements and returns the list of the arguments of the Some elements.

  • since 4.08
val concat_map : f:('a -> 'b list) -> 'a list -> 'b list

concat_map ~f l gives the same result as concat (map f l). Tail-recursive.

  • since 4.10
val fold_left_map : +ListLabels (less-power.Stdlib_alerts.Stdlib_alerting.ListLabels)

Module Stdlib_alerting.ListLabels

  • alert list_op List operations are not permitted
include sig ... end
type 'a t = 'a list =
  1. | []
  2. | :: of 'a * 'a list

An alias for the type of lists.

val length : 'a list -> int

Return the length (number of elements) of the given list.

val compare_lengths : 'a list -> 'b list -> int

Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

  • since 4.05
val compare_length_with : 'a list -> len:int -> int

Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

  • since 4.05
val is_empty : 'a list -> bool

is_empty l is true if and only if l has no elements. It is equivalent to compare_length_with l 0 = 0.

  • since 5.1
val cons : 'a -> 'a list -> 'a list

cons x xs is x :: xs

  • since 4.03 (4.05 in ListLabels)
val hd : 'a list -> 'a

Return the first element of the given list.

  • raises Failure

    if the list is empty.

val tl : 'a list -> 'a list

Return the given list without its first element.

  • raises Failure

    if the list is empty.

val nth : 'a list -> int -> 'a

Return the n-th element of the given list. The first element (head of the list) is at position 0.

  • raises Failure

    if the list is too short.

val nth_opt : 'a list -> int -> 'a option

Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

  • since 4.05
val rev : 'a list -> 'a list

List reversal.

val init : len:int -> f:(int -> 'a) -> 'a list

init ~len ~f is [f 0; f 1; ...; f (len-1)], evaluated left to right.

  • since 4.06
val append : 'a list -> 'a list -> 'a list

append l0 l1 appends l1 to l0. Same function as the infix operator @.

  • since 5.1 this function is tail-recursive.
val rev_append : 'a list -> 'a list -> 'a list

rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

val concat : 'a list list -> 'a list

Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).

val flatten : 'a list list -> 'a list

Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

val equal : eq:('a -> 'a -> bool) -> 'a list -> 'a list -> bool

equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

  • since 4.12
val compare : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> int

compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

  • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
  • the empty list [] is strictly smaller than non-empty lists

Note: the cmp function will be called even if the lists have different lengths.

  • since 4.12
val iter : f:('a -> unit) -> 'a list -> unit

iter ~f [a1; ...; an] applies function f in turn to [a1; ...; an]. It is equivalent to f a1; f a2; ...; f an.

val iteri : f:(int -> 'a -> unit) -> 'a list -> unit

Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 4.00
val map : f:('a -> 'b) -> 'a list -> 'b list

map ~f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1; ...; f an] with the results returned by f.

val mapi : f:(int -> 'a -> 'b) -> 'a list -> 'b list

Same as map, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 4.00
val rev_map : f:('a -> 'b) -> 'a list -> 'b list

rev_map ~f l gives the same result as rev (map f l), but is more efficient.

val filter_map : f:('a -> 'b option) -> 'a list -> 'b list

filter_map ~f l applies f to every element of l, filters out the None elements and returns the list of the arguments of the Some elements.

  • since 4.08
val concat_map : f:('a -> 'b list) -> 'a list -> 'b list

concat_map ~f l gives the same result as concat (map f l). Tail-recursive.

  • since 4.10
val fold_left_map : f:('acc -> 'a -> 'acc * 'b) -> init:'acc -> 'a list -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/Make/argument-1-H/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/Make/argument-1-H/index.html index e7c83d9..82d5da3 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/Make/argument-1-H/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/Make/argument-1-H/index.html @@ -1,2 +1,2 @@ -H (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.Make.H)

Parameter Make.H

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
+H (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.Make.H)

Parameter Make.H

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/Make/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/Make/index.html index 21ed009..d6ddd45 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/Make/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/Make/index.html @@ -1,2 +1,2 @@ -Make (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.Make)

Module Hashtbl.Make

Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

Parameters

module H : HashedType

Signature

type key = H.t
type 'a t = 'a Stdlib.Hashtbl.Make(H).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key:key -> data:'a -> unit
val mem : 'a t -> key -> bool
val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Stdlib.Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
  • since 4.07
+Make (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.Make)

Module Hashtbl.Make

Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

Parameters

module H : HashedType

Signature

type key = H.t
type 'a t = 'a Stdlib.Hashtbl.Make(H).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key:key -> data:'a -> unit
val mem : 'a t -> key -> bool
val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Stdlib.Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
  • since 4.07
diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/MakeSeeded/argument-1-H/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/MakeSeeded/argument-1-H/index.html index 879cafe..1545802 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/MakeSeeded/argument-1-H/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/MakeSeeded/argument-1-H/index.html @@ -1,2 +1,2 @@ -H (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.MakeSeeded.H)

Parameter MakeSeeded.H

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val seeded_hash : int -> t -> int

A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

+H (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.MakeSeeded.H)

Parameter MakeSeeded.H

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val seeded_hash : int -> t -> int

A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/MakeSeeded/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/MakeSeeded/index.html index 26c16ff..10dc303 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/MakeSeeded/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/MakeSeeded/index.html @@ -1,2 +1,2 @@ -MakeSeeded (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.MakeSeeded)

Module Hashtbl.MakeSeeded

Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

  • since 4.00

Parameters

Signature

type key = H.t
type 'a t = 'a Stdlib.Hashtbl.MakeSeeded(H).t
val create : ?random:bool -> int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key:key -> data:'a -> unit
val mem : 'a t -> key -> bool
val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Stdlib.Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
  • since 4.07
+MakeSeeded (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.MakeSeeded)

Module Hashtbl.MakeSeeded

Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

  • since 4.00

Parameters

Signature

type key = H.t
type 'a t = 'a Stdlib.Hashtbl.MakeSeeded(H).t
val create : ?random:bool -> int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key:key -> data:'a -> unit
val mem : 'a t -> key -> bool
val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Stdlib.Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
  • since 4.07
diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/index.html index 6c56589..bbc22b0 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/index.html @@ -1,5 +1,5 @@ -Hashtbl (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl)

Module MoreLabels.Hashtbl

  • alert impure Hash tables are not permitted

Hash tables and hash functions.

Hash tables are hashed association tables, with in-place modification. Because most operations on a hash table modify their input, they're more commonly used in imperative code. The lookup of the value associated with a key (see find, find_opt) is normally very fast, often faster than the equivalent lookup in Map.

The functors Make and MakeSeeded can be used when performance or flexibility are key. The user provides custom equality and hash functions for the key type, and obtains a custom hash table type for this particular type of key.

Warning a hash table is only as good as the hash function. A bad hash function will turn the table into a degenerate association list, with linear time lookup instead of constant time lookup.

The polymorphic t hash table is useful in simpler cases or in interactive environments. It uses the polymorphic hash function defined in the OCaml runtime (at the time of writing, it's SipHash), as well as the polymorphic equality (=).

See the examples section.

Unsynchronized accesses

Unsynchronized accesses to a hash table may lead to an invalid hash table state. Thus, concurrent accesses to a hash tables must be synchronized (for instance with a Mutex.t).

Generic interface

type (!'a, !'b) t = ('a, 'b) Stdlib.Hashtbl.t

The type of hash tables from type 'a to type 'b.

val create : ?random:bool -> int -> ('a, 'b) t

Hashtbl.create n creates a new, empty hash table, with initial size n. For best results, n should be on the order of the expected number of elements that will be in the table. The table grows as needed, so n is just an initial guess.

The optional ~random parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of Hashtbl.create or deterministic over all executions.

A hash table that is created with ~random set to false uses a fixed hash function (hash) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other security-sensitive applications, the deterministic collision patterns can be exploited by a malicious user to create a denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down.

A hash table that is created with ~random set to true uses the seeded hash function seeded_hash with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among 2^{30} different hash functions. All these hash functions have different collision patterns, rendering ineffective the denial-of-service attack described above. However, because of randomization, enumerating all elements of the hash table using fold or iter is no longer deterministic: elements are enumerated in different orders at different runs of the program.

If no ~random parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling randomize or by setting the R flag in the OCAMLRUNPARAM environment variable.

  • before 4.00

    the ~random parameter was not present and all hash tables were created in non-randomized mode.

val clear : ('a, 'b) t -> unit

Empty a hash table. Use reset instead of clear to shrink the size of the bucket table to its initial size.

val reset : ('a, 'b) t -> unit

Empty a hash table and shrink the size of the bucket table to its initial size.

  • since 4.00
val copy : ('a, 'b) t -> ('a, 'b) t

Return a copy of the given hashtable.

val add : ('a, 'b) t -> key:'a -> data:'b -> unit

Hashtbl.add tbl ~key ~data adds a binding of key to data in table tbl.

Warning: Previous bindings for key are not removed, but simply hidden. That is, after performing remove tbl key, the previous binding for key, if any, is restored. (Same behavior as with association lists.)

If you desire the classic behavior of replacing elements, see replace.

val find : ('a, 'b) t -> 'a -> 'b

Hashtbl.find tbl x returns the current binding of x in tbl, or raises Not_found if no such binding exists.

val find_opt : ('a, 'b) t -> 'a -> 'b option

Hashtbl.find_opt tbl x returns the current binding of x in tbl, or None if no such binding exists.

  • since 4.05
val find_all : ('a, 'b) t -> 'a -> 'b list

Hashtbl.find_all tbl x returns the list of all data associated with x in tbl. The current binding is returned first, then the previous bindings, in reverse order of introduction in the table.

val mem : ('a, 'b) t -> 'a -> bool

Hashtbl.mem tbl x checks if x is bound in tbl.

val remove : ('a, 'b) t -> 'a -> unit

Hashtbl.remove tbl x removes the current binding of x in tbl, restoring the previous binding if it exists. It does nothing if x is not bound in tbl.

val replace : ('a, 'b) t -> key:'a -> data:'b -> unit

Hashtbl.replace tbl ~key ~data replaces the current binding of key in tbl by a binding of key to data. If key is unbound in tbl, a binding of key to data is added to tbl. This is functionally equivalent to remove tbl key followed by add tbl key data.

val iter : f:(key:'a -> data:'b -> unit) -> ('a, 'b) t -> unit

Hashtbl.iter ~f tbl applies f to all bindings in table tbl. f receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to f.

The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

The behavior is not specified if the hash table is modified by f during the iteration.

val filter_map_inplace : +Hashtbl (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl)

Module MoreLabels.Hashtbl

  • alert impure Hash tables are not permitted

Hash tables and hash functions.

Hash tables are hashed association tables, with in-place modification. Because most operations on a hash table modify their input, they're more commonly used in imperative code. The lookup of the value associated with a key (see find, find_opt) is normally very fast, often faster than the equivalent lookup in Map.

The functors Make and MakeSeeded can be used when performance or flexibility are key. The user provides custom equality and hash functions for the key type, and obtains a custom hash table type for this particular type of key.

Warning a hash table is only as good as the hash function. A bad hash function will turn the table into a degenerate association list, with linear time lookup instead of constant time lookup.

The polymorphic t hash table is useful in simpler cases or in interactive environments. It uses the polymorphic hash function defined in the OCaml runtime (at the time of writing, it's SipHash), as well as the polymorphic equality (=).

See the examples section.

Unsynchronized accesses

Unsynchronized accesses to a hash table may lead to an invalid hash table state. Thus, concurrent accesses to a hash tables must be synchronized (for instance with a Mutex.t).

Generic interface

type (!'a, !'b) t = ('a, 'b) Stdlib.Hashtbl.t

The type of hash tables from type 'a to type 'b.

val create : ?random:bool -> int -> ('a, 'b) t

Hashtbl.create n creates a new, empty hash table, with initial size n. For best results, n should be on the order of the expected number of elements that will be in the table. The table grows as needed, so n is just an initial guess.

The optional ~random parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of Hashtbl.create or deterministic over all executions.

A hash table that is created with ~random set to false uses a fixed hash function (hash) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other security-sensitive applications, the deterministic collision patterns can be exploited by a malicious user to create a denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down.

A hash table that is created with ~random set to true uses the seeded hash function seeded_hash with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among 2^{30} different hash functions. All these hash functions have different collision patterns, rendering ineffective the denial-of-service attack described above. However, because of randomization, enumerating all elements of the hash table using fold or iter is no longer deterministic: elements are enumerated in different orders at different runs of the program.

If no ~random parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling randomize or by setting the R flag in the OCAMLRUNPARAM environment variable.

  • before 4.00

    the ~random parameter was not present and all hash tables were created in non-randomized mode.

val clear : ('a, 'b) t -> unit

Empty a hash table. Use reset instead of clear to shrink the size of the bucket table to its initial size.

val reset : ('a, 'b) t -> unit

Empty a hash table and shrink the size of the bucket table to its initial size.

  • since 4.00
val copy : ('a, 'b) t -> ('a, 'b) t

Return a copy of the given hashtable.

val add : ('a, 'b) t -> key:'a -> data:'b -> unit

Hashtbl.add tbl ~key ~data adds a binding of key to data in table tbl.

Warning: Previous bindings for key are not removed, but simply hidden. That is, after performing remove tbl key, the previous binding for key, if any, is restored. (Same behavior as with association lists.)

If you desire the classic behavior of replacing elements, see replace.

val find : ('a, 'b) t -> 'a -> 'b

Hashtbl.find tbl x returns the current binding of x in tbl, or raises Not_found if no such binding exists.

val find_opt : ('a, 'b) t -> 'a -> 'b option

Hashtbl.find_opt tbl x returns the current binding of x in tbl, or None if no such binding exists.

  • since 4.05
val find_all : ('a, 'b) t -> 'a -> 'b list

Hashtbl.find_all tbl x returns the list of all data associated with x in tbl. The current binding is returned first, then the previous bindings, in reverse order of introduction in the table.

val mem : ('a, 'b) t -> 'a -> bool

Hashtbl.mem tbl x checks if x is bound in tbl.

val remove : ('a, 'b) t -> 'a -> unit

Hashtbl.remove tbl x removes the current binding of x in tbl, restoring the previous binding if it exists. It does nothing if x is not bound in tbl.

val replace : ('a, 'b) t -> key:'a -> data:'b -> unit

Hashtbl.replace tbl ~key ~data replaces the current binding of key in tbl by a binding of key to data. If key is unbound in tbl, a binding of key to data is added to tbl. This is functionally equivalent to remove tbl key followed by add tbl key data.

val iter : f:(key:'a -> data:'b -> unit) -> ('a, 'b) t -> unit

Hashtbl.iter ~f tbl applies f to all bindings in table tbl. f receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to f.

The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

The behavior is not specified if the hash table is modified by f during the iteration.

val filter_map_inplace : f:(key:'a -> data:'b -> 'b option) -> ('a, 'b) t -> unit

Hashtbl.filter_map_inplace ~f tbl applies f to all bindings in table tbl and update each binding depending on the result of f. If f returns None, the binding is discarded. If it returns Some new_val, the binding is update to associate the key to new_val.

Other comments for iter apply as well.

  • since 4.03
val fold : diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/module-type-HashedType/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/module-type-HashedType/index.html index ff24538..95e9c64 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/module-type-HashedType/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/module-type-HashedType/index.html @@ -1,2 +1,2 @@ -HashedType (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.HashedType)

Module type Hashtbl.HashedType

The input signature of the functor Make.

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
+HashedType (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.HashedType)

Module type Hashtbl.HashedType

The input signature of the functor Make.

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/module-type-S/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/module-type-S/index.html index d3fdb53..04bd6e0 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/module-type-S/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/module-type-S/index.html @@ -1,2 +1,2 @@ -S (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.S)

Module type Hashtbl.S

The output signature of the functor Make.

type key
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key:key -> data:'a -> unit
val mem : 'a t -> key -> bool
val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Stdlib.Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
  • since 4.07
+S (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.S)

Module type Hashtbl.S

The output signature of the functor Make.

type key
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key:key -> data:'a -> unit
val mem : 'a t -> key -> bool
val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Stdlib.Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
  • since 4.07
diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/module-type-SeededHashedType/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/module-type-SeededHashedType/index.html index 7f19e3a..bc9b832 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/module-type-SeededHashedType/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/module-type-SeededHashedType/index.html @@ -1,2 +1,2 @@ -SeededHashedType (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.SeededHashedType)

Module type Hashtbl.SeededHashedType

The input signature of the functor MakeSeeded.

  • since 4.00
type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val seeded_hash : int -> t -> int

A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

+SeededHashedType (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.SeededHashedType)

Module type Hashtbl.SeededHashedType

The input signature of the functor MakeSeeded.

  • since 4.00
type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val seeded_hash : int -> t -> int

A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/module-type-SeededS/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/module-type-SeededS/index.html index bef92e9..1f0c973 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/module-type-SeededS/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Hashtbl/module-type-SeededS/index.html @@ -1,2 +1,2 @@ -SeededS (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.SeededS)

Module type Hashtbl.SeededS

The output signature of the functor MakeSeeded.

  • since 4.00
type key
type !'a t
val create : ?random:bool -> int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key:key -> data:'a -> unit
val mem : 'a t -> key -> bool
val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Stdlib.Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
  • since 4.07
+SeededS (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.SeededS)

Module type Hashtbl.SeededS

The output signature of the functor MakeSeeded.

  • since 4.00
type key
type !'a t
val create : ?random:bool -> int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key:key -> data:'a -> unit
val mem : 'a t -> key -> bool
val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Stdlib.Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
  • since 4.07
diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Map/Make/argument-1-Ord/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Map/Make/argument-1-Ord/index.html index dbf500b..2c0a73e 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Map/Make/argument-1-Ord/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Map/Make/argument-1-Ord/index.html @@ -1,2 +1,2 @@ -Ord (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Map.Make.Ord)

Parameter Make.Ord

type t

The type of the map keys.

val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

+Ord (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Map.Make.Ord)

Parameter Make.Ord

type t

The type of the map keys.

val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Map/Make/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Map/Make/index.html index a183b72..4aa699d 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Map/Make/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Map/Make/index.html @@ -1,5 +1,5 @@ -Make (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Map.Make)

Module Map.Make

Functor building an implementation of the map structure given a totally ordered type.

Parameters

module Ord : OrderedType

Signature

Maps

type key = Ord.t

The type of the map keys.

type 'a t = 'a Stdlib.Map.Make(Ord).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key:key -> data:'a -> 'a t -> 'a t

add ~key ~data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key:key -> data:'a -> 'a list t -> 'a list t

add_to_list ~key ~data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key:key -> f:('a option -> 'a option) -> 'a t -> 'a t

update ~key ~f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : +Make (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Map.Make)

Module Map.Make

Functor building an implementation of the map structure given a totally ordered type.

Parameters

module Ord : OrderedType

Signature

Maps

type key = Ord.t

The type of the map keys.

type 'a t = 'a Stdlib.Map.Make(Ord).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key:key -> data:'a -> 'a t -> 'a t

add ~key ~data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key:key -> data:'a -> 'a list t -> 'a list t

add_to_list ~key ~data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key:key -> f:('a option -> 'a option) -> 'a t -> 'a t

update ~key ~f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : f:(key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Map/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Map/index.html index 3c38d0b..ba9136a 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Map/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Map/index.html @@ -1,5 +1,5 @@ -Map (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Map)

Module MoreLabels.Map

Association tables over ordered types.

This module implements applicative association tables, also known as finite maps or dictionaries, given a total ordering function over the keys. All operations over maps are purely applicative (no side-effects). The implementation uses balanced binary trees, and therefore searching and insertion take time logarithmic in the size of the map.

For instance:

module IntPairs =
+Map (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Map)

Module MoreLabels.Map

Association tables over ordered types.

This module implements applicative association tables, also known as finite maps or dictionaries, given a total ordering function over the keys. All operations over maps are purely applicative (no side-effects). The implementation uses balanced binary trees, and therefore searching and insertion take time logarithmic in the size of the map.

For instance:

module IntPairs =
   struct
     type t = int * int
     let compare (x0,y0) (x1,y1) =
diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Map/module-type-OrderedType/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Map/module-type-OrderedType/index.html
index a7531ba..0a96497 100644
--- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Map/module-type-OrderedType/index.html
+++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Map/module-type-OrderedType/index.html
@@ -1,2 +1,2 @@
 
-OrderedType (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Map.OrderedType)

Module type Map.OrderedType

Input signature of the functor Make.

type t

The type of the map keys.

val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

+OrderedType (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Map.OrderedType)

Module type Map.OrderedType

Input signature of the functor Make.

type t

The type of the map keys.

val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Map/module-type-S/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Map/module-type-S/index.html index a850367..ead58e5 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Map/module-type-S/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Map/module-type-S/index.html @@ -1,5 +1,5 @@ -S (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Map.S)

Module type Map.S

Output signature of the functor Make.

Maps

type key

The type of the map keys.

type !+'a t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key:key -> data:'a -> 'a t -> 'a t

add ~key ~data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key:key -> data:'a -> 'a list t -> 'a list t

add_to_list ~key ~data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key:key -> f:('a option -> 'a option) -> 'a t -> 'a t

update ~key ~f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : +S (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Map.S)

Module type Map.S

Output signature of the functor Make.

Maps

type key

The type of the map keys.

type !+'a t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key:key -> data:'a -> 'a t -> 'a t

add ~key ~data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key:key -> data:'a -> 'a list t -> 'a list t

add_to_list ~key ~data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key:key -> f:('a option -> 'a option) -> 'a t -> 'a t

update ~key ~f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : f:(key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Set/Make/argument-1-Ord/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Set/Make/argument-1-Ord/index.html index efd86b4..4df4937 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Set/Make/argument-1-Ord/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Set/Make/argument-1-Ord/index.html @@ -1,2 +1,2 @@ -Ord (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Set.Make.Ord)

Parameter Make.Ord

type t

The type of the set elements.

val compare : t -> t -> int

A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

+Ord (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Set.Make.Ord)

Parameter Make.Ord

type t

The type of the set elements.

val compare : t -> t -> int

A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Set/Make/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Set/Make/index.html index d4a8285..03f21dc 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Set/Make/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Set/Make/index.html @@ -1,3 +1,3 @@ -Make (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Set.Make)

Module Set.Make

Functor building an implementation of the set structure given a totally ordered type.

Parameters

module Ord : OrderedType

Signature

Sets

type elt = Ord.t

The type of the set elements.

type t = Stdlib.Set.Make(Ord).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : f:(elt -> bool) -> t -> elt

find_first ~f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : f:(elt -> bool) -> t -> elt option

find_first_opt ~f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : f:(elt -> bool) -> t -> elt

find_last ~f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : f:(elt -> bool) -> t -> elt option

find_last_opt ~f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : f:(elt -> unit) -> t -> unit

iter ~f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : f:(elt -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

fold ~f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val map : f:(elt -> elt) -> t -> t

map ~f s is the set whose elements are f a0,f a1... f +Make (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Set.Make)

Module Set.Make

Functor building an implementation of the set structure given a totally ordered type.

Parameters

module Ord : OrderedType

Signature

Sets

type elt = Ord.t

The type of the set elements.

type t = Stdlib.Set.Make(Ord).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : f:(elt -> bool) -> t -> elt

find_first ~f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : f:(elt -> bool) -> t -> elt option

find_first_opt ~f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : f:(elt -> bool) -> t -> elt

find_last ~f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : f:(elt -> bool) -> t -> elt option

find_last_opt ~f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : f:(elt -> unit) -> t -> unit

iter ~f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : f:(elt -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

fold ~f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val map : f:(elt -> elt) -> t -> t

map ~f s is the set whose elements are f a0,f a1... f aN, where a0,a1...aN are the elements of s.

The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

  • since 4.04
val filter : f:(elt -> bool) -> t -> t

filter ~f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : f:(elt -> elt option) -> t -> t

filter_map ~f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : f:(elt -> bool) -> t -> t * t

partition ~f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : f:(elt -> bool) -> t -> bool

for_all ~f s checks if all elements of the set satisfy the predicate f.

val exists : f:(elt -> bool) -> t -> bool

exists ~f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val of_list : elt list -> t

of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

  • since 4.02
val to_seq_from : elt -> t -> elt Stdlib.Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Stdlib.Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Stdlib.Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Stdlib.Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Stdlib.Seq.t -> t

Build a set from the given bindings

  • since 4.07
diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Set/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Set/index.html index d8ede0a..21e1593 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Set/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Set/index.html @@ -1,5 +1,5 @@ -Set (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Set)

Module MoreLabels.Set

Sets over ordered types.

This module implements the set data structure, given a total ordering function over the set elements. All operations over sets are purely applicative (no side-effects). The implementation uses balanced binary trees, and is therefore reasonably efficient: insertion and membership take time logarithmic in the size of the set, for instance.

The Make functor constructs implementations for any type, given a compare function. For instance:

module IntPairs =
+Set (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Set)

Module MoreLabels.Set

Sets over ordered types.

This module implements the set data structure, given a total ordering function over the set elements. All operations over sets are purely applicative (no side-effects). The implementation uses balanced binary trees, and is therefore reasonably efficient: insertion and membership take time logarithmic in the size of the set, for instance.

The Make functor constructs implementations for any type, given a compare function. For instance:

module IntPairs =
   struct
     type t = int * int
     let compare (x0,y0) (x1,y1) =
diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Set/module-type-OrderedType/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Set/module-type-OrderedType/index.html
index ba9b815..76c2df7 100644
--- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Set/module-type-OrderedType/index.html
+++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Set/module-type-OrderedType/index.html
@@ -1,2 +1,2 @@
 
-OrderedType (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Set.OrderedType)

Module type Set.OrderedType

Input signature of the functor Make.

type t

The type of the set elements.

val compare : t -> t -> int

A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

+OrderedType (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Set.OrderedType)

Module type Set.OrderedType

Input signature of the functor Make.

type t

The type of the set elements.

val compare : t -> t -> int

A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Set/module-type-S/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Set/module-type-S/index.html index f7f23f0..181d33a 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Set/module-type-S/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/Set/module-type-S/index.html @@ -1,3 +1,3 @@ -S (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Set.S)

Module type Set.S

Output signature of the functor Make.

Sets

type elt

The type of the set elements.

type t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : f:(elt -> bool) -> t -> elt

find_first ~f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : f:(elt -> bool) -> t -> elt option

find_first_opt ~f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : f:(elt -> bool) -> t -> elt

find_last ~f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : f:(elt -> bool) -> t -> elt option

find_last_opt ~f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : f:(elt -> unit) -> t -> unit

iter ~f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : f:(elt -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

fold ~f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val map : f:(elt -> elt) -> t -> t

map ~f s is the set whose elements are f a0,f a1... f +S (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Set.S)

Module type Set.S

Output signature of the functor Make.

Sets

type elt

The type of the set elements.

type t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : f:(elt -> bool) -> t -> elt

find_first ~f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : f:(elt -> bool) -> t -> elt option

find_first_opt ~f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : f:(elt -> bool) -> t -> elt

find_last ~f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : f:(elt -> bool) -> t -> elt option

find_last_opt ~f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : f:(elt -> unit) -> t -> unit

iter ~f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : f:(elt -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

fold ~f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val map : f:(elt -> elt) -> t -> t

map ~f s is the set whose elements are f a0,f a1... f aN, where a0,a1...aN are the elements of s.

The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

  • since 4.04
val filter : f:(elt -> bool) -> t -> t

filter ~f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : f:(elt -> elt option) -> t -> t

filter_map ~f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : f:(elt -> bool) -> t -> t * t

partition ~f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : f:(elt -> bool) -> t -> bool

for_all ~f s checks if all elements of the set satisfy the predicate f.

val exists : f:(elt -> bool) -> t -> bool

exists ~f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val of_list : elt list -> t

of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

  • since 4.02
val to_seq_from : elt -> t -> elt Stdlib.Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Stdlib.Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Stdlib.Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Stdlib.Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Stdlib.Seq.t -> t

Build a set from the given bindings

  • since 4.07
diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/index.html index 4e8c41b..3b49550 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/MoreLabels/index.html @@ -1,2 +1,2 @@ -MoreLabels (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels)

Module Stdlib_alerting.MoreLabels

include sig ... end
module Map : sig ... end

Association tables over ordered types.

module Set : sig ... end

Sets over ordered types.

module Hashtbl : sig ... end
+MoreLabels (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels)

Module Stdlib_alerting.MoreLabels

include sig ... end
module Map : sig ... end

Association tables over ordered types.

module Set : sig ... end

Sets over ordered types.

module Hashtbl : sig ... end
diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Printexc/Slot/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Printexc/Slot/index.html index 0106dc6..655b8e8 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Printexc/Slot/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Printexc/Slot/index.html @@ -1,2 +1,2 @@ -Slot (less-power.Stdlib_alerts.Stdlib_alerting.Printexc.Slot)

Module Printexc.Slot

  • since 4.02
  • alert unsafe This item is not permitted
val is_raise : t -> bool

is_raise slot is true when slot refers to a raising point in the code, and false when it comes from a simple function call.

  • since 4.02
val is_inline : t -> bool

is_inline slot is true when slot refers to a call that got inlined by the compiler, and false when it comes from any other context.

  • since 4.04
val location : t -> location option

location slot returns the location information of the slot, if available, and None otherwise.

Some possible reasons for failing to return a location are as follow:

  • the slot corresponds to a compiler-inserted raise
  • the slot corresponds to a part of the program that has not been compiled with debug information (-g)
  • since 4.02
val name : t -> string option

name slot returns the name of the function or definition enclosing the location referred to by the slot.

name slot returns None if the name is unavailable, which may happen for the same reasons as location returning None.

  • since 4.11
val format : int -> t -> string option

format pos slot returns the string representation of slot as raw_backtrace_to_string would format it, assuming it is the pos-th element of the backtrace: the 0-th element is pretty-printed differently than the others.

Whole-backtrace printing functions also skip some uninformative slots; in that case, format pos slot returns None.

  • since 4.02
+Slot (less-power.Stdlib_alerts.Stdlib_alerting.Printexc.Slot)

Module Printexc.Slot

  • since 4.02
  • alert unsafe This item is not permitted
val is_raise : t -> bool

is_raise slot is true when slot refers to a raising point in the code, and false when it comes from a simple function call.

  • since 4.02
val is_inline : t -> bool

is_inline slot is true when slot refers to a call that got inlined by the compiler, and false when it comes from any other context.

  • since 4.04
val location : t -> location option

location slot returns the location information of the slot, if available, and None otherwise.

Some possible reasons for failing to return a location are as follow:

  • the slot corresponds to a compiler-inserted raise
  • the slot corresponds to a part of the program that has not been compiled with debug information (-g)
  • since 4.02
val name : t -> string option

name slot returns the name of the function or definition enclosing the location referred to by the slot.

name slot returns None if the name is unavailable, which may happen for the same reasons as location returning None.

  • since 4.11
val format : int -> t -> string option

format pos slot returns the string representation of slot as raw_backtrace_to_string would format it, assuming it is the pos-th element of the backtrace: the 0-th element is pretty-printed differently than the others.

Whole-backtrace printing functions also skip some uninformative slots; in that case, format pos slot returns None.

  • since 4.02
diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Printexc/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Printexc/index.html index d035cd2..dc169f9 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Printexc/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Printexc/index.html @@ -1,5 +1,5 @@ -Printexc (less-power.Stdlib_alerts.Stdlib_alerting.Printexc)

Module Stdlib_alerting.Printexc

type raw_backtrace = Stdlib.Printexc.raw_backtrace
  • alert unsafe This item is not permitted
type raw_backtrace_slot = Stdlib.Printexc.raw_backtrace_slot
  • alert unsafe This item is not permitted
type backtrace_slot = Stdlib.Printexc.backtrace_slot
  • alert unsafe This item is not permitted
type location = Stdlib.Printexc.location = {
  1. filename : string;
  2. line_number : int;
  3. start_char : int;
  4. end_char : int;
}
  • alert unsafe This item is not permitted
include sig ... end
type t = exn = ..

The type of exception values.

val to_string_default : exn -> string

Printexc.to_string_default e returns a string representation of the exception e, ignoring all registered exception printers.

  • since 4.09
val to_string : exn -> string

Printexc.to_string e returns a string representation of the exception e.

  • alert unsafe This item is not permitted
val print : ('a -> 'b) -> 'a -> 'b

Printexc.print fn x applies fn to x and returns the result. If the evaluation of fn x raises any exception, the name of the exception is printed on standard error output, and the exception is raised again. The typical use is to catch and report exceptions that escape a function application.

  • alert unsafe This item is not permitted
val catch : ('a -> 'b) -> 'a -> 'b

Printexc.catch fn x is similar to Printexc.print, but aborts the program with exit code 2 after printing the uncaught exception. This function is deprecated: the runtime system is now able to print uncaught exceptions as precisely as Printexc.catch does. Moreover, calling Printexc.catch makes it harder to track the location of the exception using the debugger or the stack backtrace facility. So, do not use Printexc.catch in new code.

  • deprecated This function is no longer needed.
  • alert unsafe This item is not permitted
val print_backtrace : Stdlib.out_channel -> unit

Printexc.print_backtrace oc prints an exception backtrace on the output channel oc. The backtrace lists the program locations where the most-recently raised exception was raised and where it was propagated through function calls.

If the call is not inside an exception handler, the returned backtrace is unspecified. If the call is after some exception-catching code (before in the handler, or in a when-guard during the matching of the exception handler), the backtrace may correspond to a later exception than the handled one.

  • since 3.11
  • alert unsafe This item is not permitted
val get_backtrace : unit -> string

Printexc.get_backtrace () returns a string containing the same exception backtrace that Printexc.print_backtrace would print. Same restriction usage than print_backtrace.

  • since 3.11
  • alert unsafe This item is not permitted
val record_backtrace : bool -> unit

Printexc.record_backtrace b turns recording of exception backtraces on (if b = true) or off (if b = false). Initially, backtraces are not recorded, unless the b flag is given to the program through the OCAMLRUNPARAM variable.

  • since 3.11
  • alert unsafe This item is not permitted
val backtrace_status : unit -> bool

Printexc.backtrace_status() returns true if exception backtraces are currently recorded, false if not.

  • since 3.11
  • alert unsafe This item is not permitted
val register_printer : (exn -> string option) -> unit

Printexc.register_printer fn registers fn as an exception printer. The printer should return None or raise an exception if it does not know how to convert the passed exception, and Some +Printexc (less-power.Stdlib_alerts.Stdlib_alerting.Printexc)

Module Stdlib_alerting.Printexc

type raw_backtrace = Stdlib.Printexc.raw_backtrace
  • alert unsafe This item is not permitted
type raw_backtrace_slot = Stdlib.Printexc.raw_backtrace_slot
  • alert unsafe This item is not permitted
type backtrace_slot = Stdlib.Printexc.backtrace_slot
  • alert unsafe This item is not permitted
type location = Stdlib.Printexc.location = {
  1. filename : string;
  2. line_number : int;
  3. start_char : int;
  4. end_char : int;
}
  • alert unsafe This item is not permitted
include sig ... end
type t = exn = ..

The type of exception values.

val to_string_default : exn -> string

Printexc.to_string_default e returns a string representation of the exception e, ignoring all registered exception printers.

  • since 4.09
val to_string : exn -> string

Printexc.to_string e returns a string representation of the exception e.

  • alert unsafe This item is not permitted
val print : ('a -> 'b) -> 'a -> 'b

Printexc.print fn x applies fn to x and returns the result. If the evaluation of fn x raises any exception, the name of the exception is printed on standard error output, and the exception is raised again. The typical use is to catch and report exceptions that escape a function application.

  • alert unsafe This item is not permitted
val catch : ('a -> 'b) -> 'a -> 'b

Printexc.catch fn x is similar to Printexc.print, but aborts the program with exit code 2 after printing the uncaught exception. This function is deprecated: the runtime system is now able to print uncaught exceptions as precisely as Printexc.catch does. Moreover, calling Printexc.catch makes it harder to track the location of the exception using the debugger or the stack backtrace facility. So, do not use Printexc.catch in new code.

  • deprecated This function is no longer needed.
  • alert unsafe This item is not permitted
val print_backtrace : Stdlib.out_channel -> unit

Printexc.print_backtrace oc prints an exception backtrace on the output channel oc. The backtrace lists the program locations where the most-recently raised exception was raised and where it was propagated through function calls.

If the call is not inside an exception handler, the returned backtrace is unspecified. If the call is after some exception-catching code (before in the handler, or in a when-guard during the matching of the exception handler), the backtrace may correspond to a later exception than the handled one.

  • since 3.11
  • alert unsafe This item is not permitted
val get_backtrace : unit -> string

Printexc.get_backtrace () returns a string containing the same exception backtrace that Printexc.print_backtrace would print. Same restriction usage than print_backtrace.

  • since 3.11
  • alert unsafe This item is not permitted
val record_backtrace : bool -> unit

Printexc.record_backtrace b turns recording of exception backtraces on (if b = true) or off (if b = false). Initially, backtraces are not recorded, unless the b flag is given to the program through the OCAMLRUNPARAM variable.

  • since 3.11
  • alert unsafe This item is not permitted
val backtrace_status : unit -> bool

Printexc.backtrace_status() returns true if exception backtraces are currently recorded, false if not.

  • since 3.11
  • alert unsafe This item is not permitted
val register_printer : (exn -> string option) -> unit

Printexc.register_printer fn registers fn as an exception printer. The printer should return None or raise an exception if it does not know how to convert the passed exception, and Some s with s the resulting string if it can convert the passed exception. Exceptions raised by the printer are ignored.

When converting an exception into a string, the printers will be invoked in the reverse order of their registrations, until a printer returns a Some s value (if no such printer exists, the runtime will use a generic printer).

When using this mechanism, one should be aware that an exception backtrace is attached to the thread that saw it raised, rather than to the exception itself. Practically, it means that the code related to fn should not use the backtrace if it has itself raised an exception before.

  • since 3.11.2
  • alert unsafe This item is not permitted
val use_printers : exn -> string option

Printexc.use_printers e returns None if there are no registered printers and Some s with else as the resulting string otherwise.

  • since 4.09
  • alert unsafe This item is not permitted
type raw_backtrace_entry = private int

A raw_backtrace_entry is an element of a raw_backtrace.

Each raw_backtrace_entry is an opaque integer, whose value is not stable between different programs, or even between different runs of the same binary.

A raw_backtrace_entry can be converted to a usable form using backtrace_slots_of_raw_entry below. Note that, due to inlining, a single raw_backtrace_entry may convert to several backtrace_slots. Since the values of a raw_backtrace_entry are not stable, they cannot be marshalled. If they are to be converted, the conversion must be done by the process that generated them.

Again due to inlining, there may be multiple distinct raw_backtrace_entry values that convert to equal backtrace_slots. However, if two raw_backtrace_entrys are equal as integers, then they represent the same backtrace_slots.

  • since 4.12
  • alert unsafe This item is not permitted
val raw_backtrace_entries : raw_backtrace -> raw_backtrace_entry array
  • since 4.12
  • alert unsafe This item is not permitted
val get_raw_backtrace : unit -> raw_backtrace

Printexc.get_raw_backtrace () returns the same exception backtrace that Printexc.print_backtrace would print, but in a raw format. Same restriction usage than print_backtrace.

  • since 4.01
  • alert unsafe This item is not permitted
val print_raw_backtrace : Stdlib.out_channel -> raw_backtrace -> unit

Print a raw backtrace in the same format Printexc.print_backtrace uses.

  • since 4.01
  • alert unsafe This item is not permitted
val raw_backtrace_to_string : raw_backtrace -> string

Return a string from a raw backtrace, in the same format Printexc.get_backtrace uses.

  • since 4.01
  • alert unsafe This item is not permitted
val raise_with_backtrace : exn -> raw_backtrace -> 'a

Reraise the exception using the given raw_backtrace for the origin of the exception

  • since 4.05
  • alert unsafe This item is not permitted
val get_callstack : int -> raw_backtrace

Printexc.get_callstack n returns a description of the top of the call stack on the current program point (for the current thread), with at most n entries. (Note: this function is not related to exceptions at all, despite being part of the Printexc module.)

  • since 4.01
  • alert unsafe This item is not permitted
val default_uncaught_exception_handler : exn -> raw_backtrace -> unit

Printexc.default_uncaught_exception_handler prints the exception and backtrace on standard error output.

  • since 4.11
  • alert unsafe This item is not permitted
val set_uncaught_exception_handler : (exn -> raw_backtrace -> unit) -> unit

Printexc.set_uncaught_exception_handler fn registers fn as the handler for uncaught exceptions. The default handler is Printexc.default_uncaught_exception_handler.

Note that when fn is called all the functions registered with Stdlib.at_exit have already been called. Because of this you must make sure any output channel fn writes on is flushed.

Also note that exceptions raised by user code in the interactive toplevel are not passed to this function as they are caught by the toplevel itself.

If fn raises an exception, both the exceptions passed to fn and raised by fn will be printed with their respective backtrace.

  • since 4.02
  • alert unsafe This item is not permitted
val backtrace_slots : raw_backtrace -> backtrace_slot array option

Returns the slots of a raw backtrace, or None if none of them contain useful information.

In the return array, the slot at index 0 corresponds to the most recent function call, raise, or primitive get_backtrace call in the trace.

Some possible reasons for returning None are as follow:

  • none of the slots in the trace come from modules compiled with debug information (-g)
  • the program is a bytecode program that has not been linked with debug information enabled (ocamlc -g)
  • since 4.02
  • alert unsafe This item is not permitted
val backtrace_slots_of_raw_entry : raw_backtrace_entry -> backtrace_slot array option

Returns the slots of a single raw backtrace entry, or None if this entry lacks debug information.

Slots are returned in the same order as backtrace_slots: the slot at index 0 is the most recent call, raise, or primitive, and subsequent slots represent callers.

  • since 4.12
  • alert unsafe This item is not permitted
module Slot : sig ... end
val raw_backtrace_length : raw_backtrace -> int

raw_backtrace_length bckt returns the number of slots in the backtrace bckt.

  • since 4.02
  • alert unsafe This item is not permitted
val get_raw_backtrace_slot : raw_backtrace -> int -> raw_backtrace_slot

get_raw_backtrace_slot bckt pos returns the slot in position pos in the backtrace bckt.

  • since 4.02
  • alert unsafe This item is not permitted
val convert_raw_backtrace_slot : raw_backtrace_slot -> backtrace_slot

Extracts the user-friendly backtrace_slot from a low-level raw_backtrace_slot.

  • since 4.02
  • alert unsafe This item is not permitted
val get_raw_backtrace_next_slot : diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Printf/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Printf/index.html index 8b49f54..9f92a97 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Printf/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Printf/index.html @@ -1,5 +1,5 @@ -Printf (less-power.Stdlib_alerts.Stdlib_alerting.Printf)

Module Stdlib_alerting.Printf

include sig ... end
val sprintf : ('a, unit, string) Stdlib.format -> 'a

Same as Printf.fprintf, but instead of printing on an output channel, return a string containing the result of formatting the arguments.

val ksprintf : (string -> 'd) -> ('a, unit, string, 'd) Stdlib.format4 -> 'a

Same as sprintf above, but instead of returning the string, passes it to the first argument.

  • since 3.09
val fprintf : +Printf (less-power.Stdlib_alerts.Stdlib_alerting.Printf)

Module Stdlib_alerting.Printf

include sig ... end
val sprintf : ('a, unit, string) Stdlib.format -> 'a

Same as Printf.fprintf, but instead of printing on an output channel, return a string containing the result of formatting the arguments.

val ksprintf : (string -> 'd) -> ('a, unit, string, 'd) Stdlib.format4 -> 'a

Same as sprintf above, but instead of returning the string, passes it to the first argument.

  • since 3.09
val fprintf : Stdlib.out_channel -> ('a, Stdlib.out_channel, unit) Stdlib.format -> 'a

fprintf outchan format arg1 ... argN formats the arguments arg1 to argN according to the format string format, and outputs the resulting string on the channel outchan.

The format string is a character string which contains two types of objects: plain characters, which are simply copied to the output channel, and conversion specifications, each of which causes conversion and printing of arguments.

Conversion specifications have the following form:

% [flags] [width] [.precision] type

In short, a conversion specification consists in the % character, followed by optional modifiers and a type which is made of one or two characters.

The types and their meanings are:

  • d, i: convert an integer argument to signed decimal. The flag # adds underscores to large values for readability.
  • u, n, l, L, or N: convert an integer argument to unsigned decimal. Warning: n, l, L, and N are used for scanf, and should not be used for printf. The flag # adds underscores to large values for readability.
  • x: convert an integer argument to unsigned hexadecimal, using lowercase letters. The flag # adds a 0x prefix to non zero values.
  • X: convert an integer argument to unsigned hexadecimal, using uppercase letters. The flag # adds a 0X prefix to non zero values.
  • o: convert an integer argument to unsigned octal. The flag # adds a 0 prefix to non zero values.
  • s: insert a string argument.
  • S: convert a string argument to OCaml syntax (double quotes, escapes).
  • c: insert a character argument.
  • C: convert a character argument to OCaml syntax (single quotes, escapes).
  • f: convert a floating-point argument to decimal notation, in the style dddd.ddd.
  • F: convert a floating-point argument to OCaml syntax (dddd. or dddd.ddd or d.ddd e+-dd). Converts to hexadecimal with the # flag (see h).
  • e or E: convert a floating-point argument to decimal notation, in the style d.ddd e+-dd (mantissa and exponent).
  • g or G: convert a floating-point argument to decimal notation, in style f or e, E (whichever is more compact). Moreover, any trailing zeros are removed from the fractional part of the result and the decimal-point character is removed if there is no fractional part remaining.
  • h or H: convert a floating-point argument to hexadecimal notation, in the style 0xh.hhhh p+-dd (hexadecimal mantissa, exponent in decimal and denotes a power of 2).
  • B: convert a boolean argument to the string true or false
  • b: convert a boolean argument (deprecated; do not use in new programs).
  • ld, li, lu, lx, lX, lo: convert an int32 argument to the format specified by the second letter (decimal, hexadecimal, etc).
  • nd, ni, nu, nx, nX, no: convert a nativeint argument to the format specified by the second letter.
  • Ld, Li, Lu, Lx, LX, Lo: convert an int64 argument to the format specified by the second letter.
  • a: user-defined printer. Take two arguments and apply the first one to outchan (the current output channel) and to the second argument. The first argument must therefore have type out_channel -> 'b -> unit and the second 'b. The output produced by the function is inserted in the output of fprintf at the current point.
  • t: same as %a, but take only one argument (with type out_channel -> unit) and apply it to outchan.
  • \{ fmt %\}: convert a format string argument to its type digest. The argument must have the same type as the internal format string fmt.
  • ( fmt %): format string substitution. Take a format string argument and substitute it to the internal format string fmt to print following arguments. The argument must have the same type as the internal format string fmt.
  • !: take no argument and flush the output.
  • %: take no argument and output one % character.
  • \@: take no argument and output one \@ character.
  • ,: take no argument and output nothing: a no-op delimiter for conversion specifications.

The optional flags are:

  • -: left-justify the output (default is right justification).
  • 0: for numerical conversions, pad with zeroes instead of spaces.
  • +: for signed numerical conversions, prefix number with a + sign if positive.
  • space: for signed numerical conversions, prefix number with a space if positive.
  • #: request an alternate formatting style for the integer types and the floating-point type F.

The optional width is an integer indicating the minimal width of the result. For instance, %6d prints an integer, prefixing it with spaces to fill at least 6 characters.

The optional precision is a dot . followed by an integer indicating how many digits follow the decimal point in the %f, %e, %E, %h, and %H conversions or the maximum number of significant digits to appear for the %F, %g and %G conversions. For instance, %.4f prints a float with 4 fractional digits.

The integer in a width or precision can also be specified as *, in which case an extra integer argument is taken to specify the corresponding width or precision. This integer argument precedes immediately the argument to print. For instance, %.*f prints a float with as many fractional digits as the value of the argument given before the float.

  • alert input_output Input/output is not permitted
val printf : ('a, Stdlib.out_channel, unit) Stdlib.format -> 'a

Same as Printf.fprintf, but output on stdout.

  • alert input_output Input/output is not permitted
val eprintf : ('a, Stdlib.out_channel, unit) Stdlib.format -> 'a

Same as Printf.fprintf, but output on stderr.

  • alert input_output Input/output is not permitted
val ifprintf : 'b -> ('a, 'b, 'c, unit) Stdlib.format4 -> 'a

Same as Printf.fprintf, but does not print anything. Useful to ignore some material when conditionally printing.

  • since 3.10
  • alert input_output Input/output is not permitted
val kfprintf : diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Scanf/Scanning/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Scanf/Scanning/index.html index 22dc23e..8c0606f 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Scanf/Scanning/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Scanf/Scanning/index.html @@ -1,2 +1,2 @@ -Scanning (less-power.Stdlib_alerts.Stdlib_alerting.Scanf.Scanning)

Module Scanf.Scanning

type in_channel
type scanbuf
+Scanning (less-power.Stdlib_alerts.Stdlib_alerting.Scanf.Scanning)

Module Scanf.Scanning

type in_channel
type scanbuf
diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Scanf/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Scanf/index.html index 96c8dec..58ab3f0 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Scanf/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Scanf/index.html @@ -1,5 +1,5 @@ -Scanf (less-power.Stdlib_alerts.Stdlib_alerting.Scanf)

Module Stdlib_alerting.Scanf

module Scanning : sig ... end
include sig ... end
type ('a, 'b, 'c, 'd) scanner = +Scanf (less-power.Stdlib_alerts.Stdlib_alerting.Scanf)

Module Stdlib_alerting.Scanf

module Scanning : sig ... end
include sig ... end
type ('a, 'b, 'c, 'd) scanner = ('a, Scanning.in_channel, 'b, 'c, 'a -> 'd, 'd) Stdlib.format6 -> 'c

The type of formatted input scanners: ('a, 'b, 'c, 'd) scanner is the type of a formatted input function that reads from some formatted input channel according to some format string; more precisely, if scan is some formatted input function, then scan ic fmt f applies f to all the arguments specified by format string fmt, when scan has read those arguments from the Scanning.in_channel formatted input channel ic.

For instance, the Scanf.scanf function below has type ('a, 'b, 'c, 'd) scanner, since it is a formatted input function that reads from Scanning.stdin: scanf fmt f applies f to the arguments specified by fmt, reading those arguments from Stdlib.stdin as expected.

If the format fmt has some %r indications, the corresponding formatted input functions must be provided before receiver function f. For instance, if read_elem is an input function for values of type t, then bscanf ic "%r;" read_elem f reads a value v of type t followed by a ';' character, and returns f v.

  • since 3.10
type ('a, 'b, 'c, 'd) scanner_opt = diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Seq/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Seq/index.html index fb43ceb..6f77da0 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Seq/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Seq/index.html @@ -1,2 +1,2 @@ -Seq (less-power.Stdlib_alerts.Stdlib_alerting.Seq)

Module Stdlib_alerting.Seq

  • alert list_op List (and sequence) operations are not permitted
type 'a t = unit -> 'a node
and 'a node = 'a Stdlib.Seq.node =
  1. | Nil
  2. | Cons of 'a * 'a t
include sig ... end
val is_empty : 'a t -> bool

is_empty xs determines whether the sequence xs is empty.

It is recommended that the sequence xs be persistent. Indeed, is_empty xs demands the head of the sequence xs, so, if xs is ephemeral, it may be the case that xs cannot be used any more after this call has taken place.

  • since 4.14
val uncons : 'a t -> ('a * 'a t) option

If xs is empty, then uncons xs is None.

If xs is nonempty, then uncons xs is Some (x, ys) where x is the head of the sequence and ys its tail.

  • since 4.14
val length : 'a t -> int

length xs is the length of the sequence xs.

The sequence xs must be finite.

  • since 4.14
val iter : ('a -> unit) -> 'a t -> unit

iter f xs invokes f x successively for every element x of the sequence xs, from left to right.

It terminates only if the sequence xs is finite.

val fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

fold_left f _ xs invokes f _ x successively for every element x of the sequence xs, from left to right.

An accumulator of type 'a is threaded through the calls to f.

It terminates only if the sequence xs is finite.

val iteri : (int -> 'a -> unit) -> 'a t -> unit

iteri f xs invokes f i x successively for every element x located at index i in the sequence xs.

It terminates only if the sequence xs is finite.

iteri f xs is equivalent to iter (fun (i, x) -> f i x) (zip (ints 0) xs).

  • since 4.14
val fold_lefti : ('acc -> int -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

fold_lefti f _ xs invokes f _ i x successively for every element x located at index i of the sequence xs.

An accumulator of type 'b is threaded through the calls to f.

It terminates only if the sequence xs is finite.

fold_lefti f accu xs is equivalent to fold_left (fun accu (i, x) -> f accu i x) accu (zip (ints 0) xs).

  • since 4.14
val for_all : ('a -> bool) -> 'a t -> bool

for_all p xs determines whether all elements x of the sequence xs satisfy p x.

The sequence xs must be finite.

  • since 4.14
val exists : ('a -> bool) -> 'a t -> bool

exists xs p determines whether at least one element x of the sequence xs satisfies p x.

The sequence xs must be finite.

  • since 4.14
val find : ('a -> bool) -> 'a t -> 'a option

find p xs returns Some x, where x is the first element of the sequence xs that satisfies p x, if there is such an element.

It returns None if there is no such element.

The sequence xs must be finite.

  • since 4.14
val find_index : ('a -> bool) -> 'a t -> int option

find_index p xs returns Some i, where i is the index of the first element of the sequence xs that satisfies p x, if there is such an element.

It returns None if there is no such element.

The sequence xs must be finite.

  • since 5.1
val find_map : ('a -> 'b option) -> 'a t -> 'b option

find_map f xs returns Some y, where x is the first element of the sequence xs such that f x = Some _, if there is such an element, and where y is defined by f x = Some y.

It returns None if there is no such element.

The sequence xs must be finite.

  • since 4.14
val find_mapi : (int -> 'a -> 'b option) -> 'a t -> 'b option

Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

The sequence xs must be finite.

  • since 5.1
val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit

iter2 f xs ys invokes f x y successively for every pair (x, y) of elements drawn synchronously from the sequences xs and ys.

If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

Iteration terminates only if at least one of the sequences xs and ys is finite.

iter2 f xs ys is equivalent to iter (fun (x, y) -> f x y) (zip xs ys).

  • since 4.14
val fold_left2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc

fold_left2 f _ xs ys invokes f _ x y successively for every pair (x, y) of elements drawn synchronously from the sequences xs and ys.

An accumulator of type 'a is threaded through the calls to f.

If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

Iteration terminates only if at least one of the sequences xs and ys is finite.

fold_left2 f accu xs ys is equivalent to fold_left (fun accu (x, y) -> f accu x y) (zip xs ys).

  • since 4.14
val for_all2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

for_all2 p xs ys determines whether all pairs (x, y) of elements drawn synchronously from the sequences xs and ys satisfy p x y.

If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored. In particular, if xs or ys is empty, then for_all2 p xs ys is true. This is where for_all2 and equal differ: equal eq xs ys can be true only if xs and ys have the same length.

At least one of the sequences xs and ys must be finite.

for_all2 p xs ys is equivalent to for_all (fun b -> b) (map2 p xs ys).

  • since 4.14
val exists2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

exists2 p xs ys determines whether some pair (x, y) of elements drawn synchronously from the sequences xs and ys satisfies p x y.

If the sequences xs and ys have different lengths, then iteration must stop as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

At least one of the sequences xs and ys must be finite.

exists2 p xs ys is equivalent to exists (fun b -> b) (map2 p xs ys).

  • since 4.14
val equal : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

Provided the function eq defines an equality on elements, equal eq xs ys determines whether the sequences xs and ys are pointwise equal.

At least one of the sequences xs and ys must be finite.

  • since 4.14
val compare : ('a -> 'b -> int) -> 'a t -> 'b t -> int

Provided the function cmp defines a preorder on elements, compare cmp xs ys compares the sequences xs and ys according to the lexicographic preorder.

For more details on comparison functions, see Array.sort.

At least one of the sequences xs and ys must be finite.

  • since 4.14
val empty : 'a t

empty is the empty sequence. It has no elements. Its length is 0.

val return : 'a -> 'a t

return x is the sequence whose sole element is x. Its length is 1.

val cons : 'a -> 'a t -> 'a t

cons x xs is the sequence that begins with the element x, followed with the sequence xs.

Writing cons (f()) xs causes the function call f() to take place immediately. For this call to be delayed until the sequence is queried, one must instead write (fun () -> Cons(f(), xs)).

  • since 4.11
val init : int -> (int -> 'a) -> 'a t

init n f is the sequence f 0; f 1; ...; f (n-1).

n must be nonnegative.

If desired, the infinite sequence f 0; f 1; ... can be defined as map f (ints 0).

  • since 4.14
val unfold : ('b -> ('a * 'b) option) -> 'b -> 'a t

unfold constructs a sequence out of a step function and an initial state.

If f u is None then unfold f u is the empty sequence. If f u is Some (x, u') then unfold f u is the nonempty sequence cons x (unfold f u').

For example, unfold (function [] -> None | h :: t -> Some (h, t)) l is equivalent to List.to_seq l.

  • since 4.11
val repeat : 'a -> 'a t

repeat x is the infinite sequence where the element x is repeated indefinitely.

repeat x is equivalent to cycle (return x).

  • since 4.14
val forever : (unit -> 'a) -> 'a t

forever f is an infinite sequence where every element is produced (on demand) by the function call f().

For instance, forever Random.bool is an infinite sequence of random bits.

forever f is equivalent to map f (repeat ()).

  • since 4.14
val cycle : 'a t -> 'a t

cycle xs is the infinite sequence that consists of an infinite number of repetitions of the sequence xs.

If xs is an empty sequence, then cycle xs is empty as well.

Consuming (a prefix of) the sequence cycle xs once can cause the sequence xs to be consumed more than once. Therefore, xs must be persistent.

  • since 4.14
val iterate : ('a -> 'a) -> 'a -> 'a t

iterate f x is the infinite sequence whose elements are x, f x, f (f x), and so on.

In other words, it is the orbit of the function f, starting at x.

  • since 4.14
val map : ('a -> 'b) -> 'a t -> 'b t

map f xs is the image of the sequence xs through the transformation f.

If xs is the sequence x0; x1; ... then map f xs is the sequence f x0; f x1; ....

val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t

mapi is analogous to map, but applies the function f to an index and an element.

mapi f xs is equivalent to map2 f (ints 0) xs.

  • since 4.14
val filter : ('a -> bool) -> 'a t -> 'a t

filter p xs is the sequence of the elements x of xs that satisfy p x.

In other words, filter p xs is the sequence xs, deprived of the elements x such that p x is false.

val filter_map : ('a -> 'b option) -> 'a t -> 'b t

filter_map f xs is the sequence of the elements y such that f x = Some y, where x ranges over xs.

filter_map f xs is equivalent to map Option.get (filter Option.is_some (map f xs)).

val scan : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b t

If xs is a sequence [x0; x1; x2; ...], then scan f a0 xs is a sequence of accumulators [a0; a1; a2; ...] where a1 is f a0 x0, a2 is f a1 x1, and so on.

Thus, scan f a0 xs is conceptually related to fold_left f a0 xs. However, instead of performing an eager iteration and immediately returning the final accumulator, it returns a sequence of accumulators.

For instance, scan (+) 0 transforms a sequence of integers into the sequence of its partial sums.

If xs has length n then scan f a0 xs has length n+1.

  • since 4.14
val take : int -> 'a t -> 'a t

take n xs is the sequence of the first n elements of xs.

If xs has fewer than n elements, then take n xs is equivalent to xs.

n must be nonnegative.

  • since 4.14
val drop : int -> 'a t -> 'a t

drop n xs is the sequence xs, deprived of its first n elements.

If xs has fewer than n elements, then drop n xs is empty.

n must be nonnegative.

drop is lazy: the first n+1 elements of the sequence xs are demanded only when the first element of drop n xs is demanded. For this reason, drop 1 xs is not equivalent to tail xs, which queries xs immediately.

  • since 4.14
val take_while : ('a -> bool) -> 'a t -> 'a t

take_while p xs is the longest prefix of the sequence xs where every element x satisfies p x.

  • since 4.14
val drop_while : ('a -> bool) -> 'a t -> 'a t

drop_while p xs is the sequence xs, deprived of the prefix take_while p xs.

  • since 4.14
val group : ('a -> 'a -> bool) -> 'a t -> 'a t t

Provided the function eq defines an equality on elements, group eq xs is the sequence of the maximal runs of adjacent duplicate elements of the sequence xs.

Every element of group eq xs is a nonempty sequence of equal elements.

The concatenation concat (group eq xs) is equal to xs.

Consuming group eq xs, and consuming the sequences that it contains, can cause xs to be consumed more than once. Therefore, xs must be persistent.

  • since 4.14
val memoize : 'a t -> 'a t

The sequence memoize xs has the same elements as the sequence xs.

Regardless of whether xs is ephemeral or persistent, memoize xs is persistent: even if it is queried several times, xs is queried at most once.

The construction of the sequence memoize xs internally relies on suspensions provided by the module Lazy. These suspensions are not thread-safe. Therefore, the sequence memoize xs must not be queried by multiple threads concurrently.

  • since 4.14
val transpose : 'a t t -> 'a t t

If xss is a matrix (a sequence of rows), then transpose xss is the sequence of the columns of the matrix xss.

The rows of the matrix xss are not required to have the same length.

The matrix xss is not required to be finite (in either direction).

The matrix xss must be persistent.

  • since 4.14
val append : 'a t -> 'a t -> 'a t

append xs ys is the concatenation of the sequences xs and ys.

Its elements are the elements of xs, followed by the elements of ys.

  • since 4.11
val concat : 'a t t -> 'a t

If xss is a sequence of sequences, then concat xss is its concatenation.

If xss is the sequence xs0; xs1; ... then concat xss is the sequence xs0 @ xs1 @ ....

  • since 4.13
val flat_map : ('a -> 'b t) -> 'a t -> 'b t

flat_map f xs is equivalent to concat (map f xs).

val concat_map : ('a -> 'b t) -> 'a t -> 'b t

concat_map f xs is equivalent to concat (map f xs).

concat_map is an alias for flat_map.

  • since 4.13
val zip : 'a t -> 'b t -> ('a * 'b) t

zip xs ys is the sequence of pairs (x, y) drawn synchronously from the sequences xs and ys.

If the sequences xs and ys have different lengths, then the sequence ends as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

zip xs ys is equivalent to map2 (fun a b -> (a, b)) xs ys.

  • since 4.14
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

map2 f xs ys is the sequence of the elements f x y, where the pairs (x, y) are drawn synchronously from the sequences xs and ys.

If the sequences xs and ys have different lengths, then the sequence ends as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

map2 f xs ys is equivalent to map (fun (x, y) -> f x y) (zip xs ys).

  • since 4.14
val interleave : 'a t -> 'a t -> 'a t

interleave xs ys is the sequence that begins with the first element of xs, continues with the first element of ys, and so on.

When one of the sequences xs and ys is exhausted, interleave xs ys continues with the rest of the other sequence.

  • since 4.14
val sorted_merge : ('a -> 'a -> int) -> 'a t -> 'a t -> 'a t

If the sequences xs and ys are sorted according to the total preorder cmp, then sorted_merge cmp xs ys is the sorted sequence obtained by merging the sequences xs and ys.

For more details on comparison functions, see Array.sort.

  • since 4.14
val product : 'a t -> 'b t -> ('a * 'b) t

product xs ys is the Cartesian product of the sequences xs and ys.

For every element x of xs and for every element y of ys, the pair (x, y) appears once as an element of product xs ys.

The order in which the pairs appear is unspecified.

The sequences xs and ys are not required to be finite.

The sequences xs and ys must be persistent.

  • since 4.14
val map_product : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

The sequence map_product f xs ys is the image through f of the Cartesian product of the sequences xs and ys.

For every element x of xs and for every element y of ys, the element f x y appears once as an element of map_product f xs ys.

The order in which these elements appear is unspecified.

The sequences xs and ys are not required to be finite.

The sequences xs and ys must be persistent.

map_product f xs ys is equivalent to map (fun (x, y) -> f x y) (product xs ys).

  • since 4.14
val unzip : ('a * 'b) t -> 'a t * 'b t

unzip transforms a sequence of pairs into a pair of sequences.

unzip xs is equivalent to (map fst xs, map snd xs).

Querying either of the sequences returned by unzip xs causes xs to be queried. Therefore, querying both of them causes xs to be queried twice. Thus, xs must be persistent and cheap. If that is not the case, use unzip (memoize xs).

  • since 4.14
val split : ('a * 'b) t -> 'a t * 'b t

split is an alias for unzip.

  • since 4.14
val partition_map : ('a -> ('b, 'c) Stdlib.Either.t) -> 'a t -> 'b t * 'c t

partition_map f xs returns a pair of sequences (ys, zs), where:

  • ys is the sequence of the elements y such that f x = Left y, where x ranges over xs;
  • zs is the sequence of the elements z such that f x = Right z, where x ranges over xs.

partition_map f xs is equivalent to a pair of filter_map Either.find_left (map f xs) and filter_map Either.find_right (map f xs).

Querying either of the sequences returned by partition_map f xs causes xs to be queried. Therefore, querying both of them causes xs to be queried twice. Thus, xs must be persistent and cheap. If that is not the case, use partition_map f (memoize xs).

  • since 4.14
val partition : ('a -> bool) -> 'a t -> 'a t * 'a t

partition p xs returns a pair of the subsequence of the elements of xs that satisfy p and the subsequence of the elements of xs that do not satisfy p.

partition p xs is equivalent to filter p xs, filter (fun x -> not (p x)) xs.

Consuming both of the sequences returned by partition p xs causes xs to be consumed twice and causes the function f to be applied twice to each element of the list. Therefore, f should be pure and cheap. Furthermore, xs should be persistent and cheap. If that is not the case, use partition p (memoize xs).

  • since 4.14
val of_dispenser : (unit -> 'a option) -> 'a t

of_dispenser it is the sequence of the elements produced by the dispenser it. It is an ephemeral sequence: it can be consumed at most once. If a persistent sequence is needed, use memoize (of_dispenser it).

  • since 4.14
val ints : int -> int t

ints i is the infinite sequence of the integers beginning at i and counting up.

  • since 4.14
val once : 'a t -> 'a t

The sequence once xs has the same elements as the sequence xs.

Regardless of whether xs is ephemeral or persistent, once xs is an ephemeral sequence: it can be queried at most once. If it (or a suffix of it) is queried more than once, then the exception Forced_twice is raised. This can be useful, while debugging or testing, to ensure that a sequence is consumed at most once.

  • raises Forced_twice

    if once xs, or a suffix of it, is queried more than once.

  • since 4.14
  • alert impure This imperative programming item is not permitted
exception Forced_twice

This exception is raised when a sequence returned by once (or a suffix of it) is queried more than once.

  • since 4.14
  • alert impure This imperative programming item is not permitted
val to_dispenser : 'a t -> unit -> 'a option

to_dispenser xs is a fresh dispenser on the sequence xs.

This dispenser has mutable internal state, which is not protected by a lock; so, it must not be used by several threads concurrently.

  • since 4.14
  • alert impure This imperative programming item is not permitted
+Seq (less-power.Stdlib_alerts.Stdlib_alerting.Seq)

Module Stdlib_alerting.Seq

  • alert list_op List (and sequence) operations are not permitted
type 'a t = unit -> 'a node
and 'a node = 'a Stdlib.Seq.node =
  1. | Nil
  2. | Cons of 'a * 'a t
include sig ... end
val is_empty : 'a t -> bool

is_empty xs determines whether the sequence xs is empty.

It is recommended that the sequence xs be persistent. Indeed, is_empty xs demands the head of the sequence xs, so, if xs is ephemeral, it may be the case that xs cannot be used any more after this call has taken place.

  • since 4.14
val uncons : 'a t -> ('a * 'a t) option

If xs is empty, then uncons xs is None.

If xs is nonempty, then uncons xs is Some (x, ys) where x is the head of the sequence and ys its tail.

  • since 4.14
val length : 'a t -> int

length xs is the length of the sequence xs.

The sequence xs must be finite.

  • since 4.14
val iter : ('a -> unit) -> 'a t -> unit

iter f xs invokes f x successively for every element x of the sequence xs, from left to right.

It terminates only if the sequence xs is finite.

val fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

fold_left f _ xs invokes f _ x successively for every element x of the sequence xs, from left to right.

An accumulator of type 'a is threaded through the calls to f.

It terminates only if the sequence xs is finite.

val iteri : (int -> 'a -> unit) -> 'a t -> unit

iteri f xs invokes f i x successively for every element x located at index i in the sequence xs.

It terminates only if the sequence xs is finite.

iteri f xs is equivalent to iter (fun (i, x) -> f i x) (zip (ints 0) xs).

  • since 4.14
val fold_lefti : ('acc -> int -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

fold_lefti f _ xs invokes f _ i x successively for every element x located at index i of the sequence xs.

An accumulator of type 'b is threaded through the calls to f.

It terminates only if the sequence xs is finite.

fold_lefti f accu xs is equivalent to fold_left (fun accu (i, x) -> f accu i x) accu (zip (ints 0) xs).

  • since 4.14
val for_all : ('a -> bool) -> 'a t -> bool

for_all p xs determines whether all elements x of the sequence xs satisfy p x.

The sequence xs must be finite.

  • since 4.14
val exists : ('a -> bool) -> 'a t -> bool

exists xs p determines whether at least one element x of the sequence xs satisfies p x.

The sequence xs must be finite.

  • since 4.14
val find : ('a -> bool) -> 'a t -> 'a option

find p xs returns Some x, where x is the first element of the sequence xs that satisfies p x, if there is such an element.

It returns None if there is no such element.

The sequence xs must be finite.

  • since 4.14
val find_index : ('a -> bool) -> 'a t -> int option

find_index p xs returns Some i, where i is the index of the first element of the sequence xs that satisfies p x, if there is such an element.

It returns None if there is no such element.

The sequence xs must be finite.

  • since 5.1
val find_map : ('a -> 'b option) -> 'a t -> 'b option

find_map f xs returns Some y, where x is the first element of the sequence xs such that f x = Some _, if there is such an element, and where y is defined by f x = Some y.

It returns None if there is no such element.

The sequence xs must be finite.

  • since 4.14
val find_mapi : (int -> 'a -> 'b option) -> 'a t -> 'b option

Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

The sequence xs must be finite.

  • since 5.1
val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit

iter2 f xs ys invokes f x y successively for every pair (x, y) of elements drawn synchronously from the sequences xs and ys.

If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

Iteration terminates only if at least one of the sequences xs and ys is finite.

iter2 f xs ys is equivalent to iter (fun (x, y) -> f x y) (zip xs ys).

  • since 4.14
val fold_left2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc

fold_left2 f _ xs ys invokes f _ x y successively for every pair (x, y) of elements drawn synchronously from the sequences xs and ys.

An accumulator of type 'a is threaded through the calls to f.

If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

Iteration terminates only if at least one of the sequences xs and ys is finite.

fold_left2 f accu xs ys is equivalent to fold_left (fun accu (x, y) -> f accu x y) (zip xs ys).

  • since 4.14
val for_all2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

for_all2 p xs ys determines whether all pairs (x, y) of elements drawn synchronously from the sequences xs and ys satisfy p x y.

If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored. In particular, if xs or ys is empty, then for_all2 p xs ys is true. This is where for_all2 and equal differ: equal eq xs ys can be true only if xs and ys have the same length.

At least one of the sequences xs and ys must be finite.

for_all2 p xs ys is equivalent to for_all (fun b -> b) (map2 p xs ys).

  • since 4.14
val exists2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

exists2 p xs ys determines whether some pair (x, y) of elements drawn synchronously from the sequences xs and ys satisfies p x y.

If the sequences xs and ys have different lengths, then iteration must stop as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

At least one of the sequences xs and ys must be finite.

exists2 p xs ys is equivalent to exists (fun b -> b) (map2 p xs ys).

  • since 4.14
val equal : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

Provided the function eq defines an equality on elements, equal eq xs ys determines whether the sequences xs and ys are pointwise equal.

At least one of the sequences xs and ys must be finite.

  • since 4.14
val compare : ('a -> 'b -> int) -> 'a t -> 'b t -> int

Provided the function cmp defines a preorder on elements, compare cmp xs ys compares the sequences xs and ys according to the lexicographic preorder.

For more details on comparison functions, see Array.sort.

At least one of the sequences xs and ys must be finite.

  • since 4.14
val empty : 'a t

empty is the empty sequence. It has no elements. Its length is 0.

val return : 'a -> 'a t

return x is the sequence whose sole element is x. Its length is 1.

val cons : 'a -> 'a t -> 'a t

cons x xs is the sequence that begins with the element x, followed with the sequence xs.

Writing cons (f()) xs causes the function call f() to take place immediately. For this call to be delayed until the sequence is queried, one must instead write (fun () -> Cons(f(), xs)).

  • since 4.11
val init : int -> (int -> 'a) -> 'a t

init n f is the sequence f 0; f 1; ...; f (n-1).

n must be nonnegative.

If desired, the infinite sequence f 0; f 1; ... can be defined as map f (ints 0).

  • since 4.14
val unfold : ('b -> ('a * 'b) option) -> 'b -> 'a t

unfold constructs a sequence out of a step function and an initial state.

If f u is None then unfold f u is the empty sequence. If f u is Some (x, u') then unfold f u is the nonempty sequence cons x (unfold f u').

For example, unfold (function [] -> None | h :: t -> Some (h, t)) l is equivalent to List.to_seq l.

  • since 4.11
val repeat : 'a -> 'a t

repeat x is the infinite sequence where the element x is repeated indefinitely.

repeat x is equivalent to cycle (return x).

  • since 4.14
val forever : (unit -> 'a) -> 'a t

forever f is an infinite sequence where every element is produced (on demand) by the function call f().

For instance, forever Random.bool is an infinite sequence of random bits.

forever f is equivalent to map f (repeat ()).

  • since 4.14
val cycle : 'a t -> 'a t

cycle xs is the infinite sequence that consists of an infinite number of repetitions of the sequence xs.

If xs is an empty sequence, then cycle xs is empty as well.

Consuming (a prefix of) the sequence cycle xs once can cause the sequence xs to be consumed more than once. Therefore, xs must be persistent.

  • since 4.14
val iterate : ('a -> 'a) -> 'a -> 'a t

iterate f x is the infinite sequence whose elements are x, f x, f (f x), and so on.

In other words, it is the orbit of the function f, starting at x.

  • since 4.14
val map : ('a -> 'b) -> 'a t -> 'b t

map f xs is the image of the sequence xs through the transformation f.

If xs is the sequence x0; x1; ... then map f xs is the sequence f x0; f x1; ....

val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t

mapi is analogous to map, but applies the function f to an index and an element.

mapi f xs is equivalent to map2 f (ints 0) xs.

  • since 4.14
val filter : ('a -> bool) -> 'a t -> 'a t

filter p xs is the sequence of the elements x of xs that satisfy p x.

In other words, filter p xs is the sequence xs, deprived of the elements x such that p x is false.

val filter_map : ('a -> 'b option) -> 'a t -> 'b t

filter_map f xs is the sequence of the elements y such that f x = Some y, where x ranges over xs.

filter_map f xs is equivalent to map Option.get (filter Option.is_some (map f xs)).

val scan : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b t

If xs is a sequence [x0; x1; x2; ...], then scan f a0 xs is a sequence of accumulators [a0; a1; a2; ...] where a1 is f a0 x0, a2 is f a1 x1, and so on.

Thus, scan f a0 xs is conceptually related to fold_left f a0 xs. However, instead of performing an eager iteration and immediately returning the final accumulator, it returns a sequence of accumulators.

For instance, scan (+) 0 transforms a sequence of integers into the sequence of its partial sums.

If xs has length n then scan f a0 xs has length n+1.

  • since 4.14
val take : int -> 'a t -> 'a t

take n xs is the sequence of the first n elements of xs.

If xs has fewer than n elements, then take n xs is equivalent to xs.

n must be nonnegative.

  • since 4.14
val drop : int -> 'a t -> 'a t

drop n xs is the sequence xs, deprived of its first n elements.

If xs has fewer than n elements, then drop n xs is empty.

n must be nonnegative.

drop is lazy: the first n+1 elements of the sequence xs are demanded only when the first element of drop n xs is demanded. For this reason, drop 1 xs is not equivalent to tail xs, which queries xs immediately.

  • since 4.14
val take_while : ('a -> bool) -> 'a t -> 'a t

take_while p xs is the longest prefix of the sequence xs where every element x satisfies p x.

  • since 4.14
val drop_while : ('a -> bool) -> 'a t -> 'a t

drop_while p xs is the sequence xs, deprived of the prefix take_while p xs.

  • since 4.14
val group : ('a -> 'a -> bool) -> 'a t -> 'a t t

Provided the function eq defines an equality on elements, group eq xs is the sequence of the maximal runs of adjacent duplicate elements of the sequence xs.

Every element of group eq xs is a nonempty sequence of equal elements.

The concatenation concat (group eq xs) is equal to xs.

Consuming group eq xs, and consuming the sequences that it contains, can cause xs to be consumed more than once. Therefore, xs must be persistent.

  • since 4.14
val memoize : 'a t -> 'a t

The sequence memoize xs has the same elements as the sequence xs.

Regardless of whether xs is ephemeral or persistent, memoize xs is persistent: even if it is queried several times, xs is queried at most once.

The construction of the sequence memoize xs internally relies on suspensions provided by the module Lazy. These suspensions are not thread-safe. Therefore, the sequence memoize xs must not be queried by multiple threads concurrently.

  • since 4.14
val transpose : 'a t t -> 'a t t

If xss is a matrix (a sequence of rows), then transpose xss is the sequence of the columns of the matrix xss.

The rows of the matrix xss are not required to have the same length.

The matrix xss is not required to be finite (in either direction).

The matrix xss must be persistent.

  • since 4.14
val append : 'a t -> 'a t -> 'a t

append xs ys is the concatenation of the sequences xs and ys.

Its elements are the elements of xs, followed by the elements of ys.

  • since 4.11
val concat : 'a t t -> 'a t

If xss is a sequence of sequences, then concat xss is its concatenation.

If xss is the sequence xs0; xs1; ... then concat xss is the sequence xs0 @ xs1 @ ....

  • since 4.13
val flat_map : ('a -> 'b t) -> 'a t -> 'b t

flat_map f xs is equivalent to concat (map f xs).

val concat_map : ('a -> 'b t) -> 'a t -> 'b t

concat_map f xs is equivalent to concat (map f xs).

concat_map is an alias for flat_map.

  • since 4.13
val zip : 'a t -> 'b t -> ('a * 'b) t

zip xs ys is the sequence of pairs (x, y) drawn synchronously from the sequences xs and ys.

If the sequences xs and ys have different lengths, then the sequence ends as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

zip xs ys is equivalent to map2 (fun a b -> (a, b)) xs ys.

  • since 4.14
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

map2 f xs ys is the sequence of the elements f x y, where the pairs (x, y) are drawn synchronously from the sequences xs and ys.

If the sequences xs and ys have different lengths, then the sequence ends as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

map2 f xs ys is equivalent to map (fun (x, y) -> f x y) (zip xs ys).

  • since 4.14
val interleave : 'a t -> 'a t -> 'a t

interleave xs ys is the sequence that begins with the first element of xs, continues with the first element of ys, and so on.

When one of the sequences xs and ys is exhausted, interleave xs ys continues with the rest of the other sequence.

  • since 4.14
val sorted_merge : ('a -> 'a -> int) -> 'a t -> 'a t -> 'a t

If the sequences xs and ys are sorted according to the total preorder cmp, then sorted_merge cmp xs ys is the sorted sequence obtained by merging the sequences xs and ys.

For more details on comparison functions, see Array.sort.

  • since 4.14
val product : 'a t -> 'b t -> ('a * 'b) t

product xs ys is the Cartesian product of the sequences xs and ys.

For every element x of xs and for every element y of ys, the pair (x, y) appears once as an element of product xs ys.

The order in which the pairs appear is unspecified.

The sequences xs and ys are not required to be finite.

The sequences xs and ys must be persistent.

  • since 4.14
val map_product : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

The sequence map_product f xs ys is the image through f of the Cartesian product of the sequences xs and ys.

For every element x of xs and for every element y of ys, the element f x y appears once as an element of map_product f xs ys.

The order in which these elements appear is unspecified.

The sequences xs and ys are not required to be finite.

The sequences xs and ys must be persistent.

map_product f xs ys is equivalent to map (fun (x, y) -> f x y) (product xs ys).

  • since 4.14
val unzip : ('a * 'b) t -> 'a t * 'b t

unzip transforms a sequence of pairs into a pair of sequences.

unzip xs is equivalent to (map fst xs, map snd xs).

Querying either of the sequences returned by unzip xs causes xs to be queried. Therefore, querying both of them causes xs to be queried twice. Thus, xs must be persistent and cheap. If that is not the case, use unzip (memoize xs).

  • since 4.14
val split : ('a * 'b) t -> 'a t * 'b t

split is an alias for unzip.

  • since 4.14
val partition_map : ('a -> ('b, 'c) Stdlib.Either.t) -> 'a t -> 'b t * 'c t

partition_map f xs returns a pair of sequences (ys, zs), where:

  • ys is the sequence of the elements y such that f x = Left y, where x ranges over xs;
  • zs is the sequence of the elements z such that f x = Right z, where x ranges over xs.

partition_map f xs is equivalent to a pair of filter_map Either.find_left (map f xs) and filter_map Either.find_right (map f xs).

Querying either of the sequences returned by partition_map f xs causes xs to be queried. Therefore, querying both of them causes xs to be queried twice. Thus, xs must be persistent and cheap. If that is not the case, use partition_map f (memoize xs).

  • since 4.14
val partition : ('a -> bool) -> 'a t -> 'a t * 'a t

partition p xs returns a pair of the subsequence of the elements of xs that satisfy p and the subsequence of the elements of xs that do not satisfy p.

partition p xs is equivalent to filter p xs, filter (fun x -> not (p x)) xs.

Consuming both of the sequences returned by partition p xs causes xs to be consumed twice and causes the function f to be applied twice to each element of the list. Therefore, f should be pure and cheap. Furthermore, xs should be persistent and cheap. If that is not the case, use partition p (memoize xs).

  • since 4.14
val of_dispenser : (unit -> 'a option) -> 'a t

of_dispenser it is the sequence of the elements produced by the dispenser it. It is an ephemeral sequence: it can be consumed at most once. If a persistent sequence is needed, use memoize (of_dispenser it).

  • since 4.14
val ints : int -> int t

ints i is the infinite sequence of the integers beginning at i and counting up.

  • since 4.14
val once : 'a t -> 'a t

The sequence once xs has the same elements as the sequence xs.

Regardless of whether xs is ephemeral or persistent, once xs is an ephemeral sequence: it can be queried at most once. If it (or a suffix of it) is queried more than once, then the exception Forced_twice is raised. This can be useful, while debugging or testing, to ensure that a sequence is consumed at most once.

  • raises Forced_twice

    if once xs, or a suffix of it, is queried more than once.

  • since 4.14
  • alert impure This imperative programming item is not permitted
exception Forced_twice

This exception is raised when a sequence returned by once (or a suffix of it) is queried more than once.

  • since 4.14
  • alert impure This imperative programming item is not permitted
val to_dispenser : 'a t -> unit -> 'a option

to_dispenser xs is a fresh dispenser on the sequence xs.

This dispenser has mutable internal state, which is not protected by a lock; so, it must not be used by several threads concurrently.

  • since 4.14
  • alert impure This imperative programming item is not permitted
diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/StdLabels/List/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/StdLabels/List/index.html index 31b142d..0675566 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/StdLabels/List/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/StdLabels/List/index.html @@ -1,5 +1,5 @@ -List (less-power.Stdlib_alerts.Stdlib_alerting.StdLabels.List)

Module StdLabels.List

  • alert list_op List operations are not permitted
include sig ... end
type 'a t = 'a list =
  1. | []
  2. | :: of 'a * 'a list

An alias for the type of lists.

val length : 'a list -> int

Return the length (number of elements) of the given list.

val compare_lengths : 'a list -> 'b list -> int

Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

  • since 4.05
val compare_length_with : 'a list -> len:int -> int

Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

  • since 4.05
val is_empty : 'a list -> bool

is_empty l is true if and only if l has no elements. It is equivalent to compare_length_with l 0 = 0.

  • since 5.1
val cons : 'a -> 'a list -> 'a list

cons x xs is x :: xs

  • since 4.03 (4.05 in ListLabels)
val hd : 'a list -> 'a

Return the first element of the given list.

  • raises Failure

    if the list is empty.

val tl : 'a list -> 'a list

Return the given list without its first element.

  • raises Failure

    if the list is empty.

val nth : 'a list -> int -> 'a

Return the n-th element of the given list. The first element (head of the list) is at position 0.

  • raises Failure

    if the list is too short.

val nth_opt : 'a list -> int -> 'a option

Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

  • since 4.05
val rev : 'a list -> 'a list

List reversal.

val init : len:int -> f:(int -> 'a) -> 'a list

init ~len ~f is [f 0; f 1; ...; f (len-1)], evaluated left to right.

  • since 4.06
val append : 'a list -> 'a list -> 'a list

append l0 l1 appends l1 to l0. Same function as the infix operator @.

  • since 5.1 this function is tail-recursive.
val rev_append : 'a list -> 'a list -> 'a list

rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

val concat : 'a list list -> 'a list

Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).

val flatten : 'a list list -> 'a list

Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

val equal : eq:('a -> 'a -> bool) -> 'a list -> 'a list -> bool

equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

  • since 4.12
val compare : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> int

compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

  • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
  • the empty list [] is strictly smaller than non-empty lists

Note: the cmp function will be called even if the lists have different lengths.

  • since 4.12
val iter : f:('a -> unit) -> 'a list -> unit

iter ~f [a1; ...; an] applies function f in turn to [a1; ...; an]. It is equivalent to f a1; f a2; ...; f an.

val iteri : f:(int -> 'a -> unit) -> 'a list -> unit

Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 4.00
val map : f:('a -> 'b) -> 'a list -> 'b list

map ~f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1; ...; f an] with the results returned by f.

val mapi : f:(int -> 'a -> 'b) -> 'a list -> 'b list

Same as map, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 4.00
val rev_map : f:('a -> 'b) -> 'a list -> 'b list

rev_map ~f l gives the same result as rev (map f l), but is more efficient.

val filter_map : f:('a -> 'b option) -> 'a list -> 'b list

filter_map ~f l applies f to every element of l, filters out the None elements and returns the list of the arguments of the Some elements.

  • since 4.08
val concat_map : f:('a -> 'b list) -> 'a list -> 'b list

concat_map ~f l gives the same result as concat (map f l). Tail-recursive.

  • since 4.10
val fold_left_map : +List (less-power.Stdlib_alerts.Stdlib_alerting.StdLabels.List)

Module StdLabels.List

  • alert list_op List operations are not permitted
include sig ... end
type 'a t = 'a list =
  1. | []
  2. | :: of 'a * 'a list

An alias for the type of lists.

val length : 'a list -> int

Return the length (number of elements) of the given list.

val compare_lengths : 'a list -> 'b list -> int

Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

  • since 4.05
val compare_length_with : 'a list -> len:int -> int

Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

  • since 4.05
val is_empty : 'a list -> bool

is_empty l is true if and only if l has no elements. It is equivalent to compare_length_with l 0 = 0.

  • since 5.1
val cons : 'a -> 'a list -> 'a list

cons x xs is x :: xs

  • since 4.03 (4.05 in ListLabels)
val hd : 'a list -> 'a

Return the first element of the given list.

  • raises Failure

    if the list is empty.

val tl : 'a list -> 'a list

Return the given list without its first element.

  • raises Failure

    if the list is empty.

val nth : 'a list -> int -> 'a

Return the n-th element of the given list. The first element (head of the list) is at position 0.

  • raises Failure

    if the list is too short.

val nth_opt : 'a list -> int -> 'a option

Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

  • since 4.05
val rev : 'a list -> 'a list

List reversal.

val init : len:int -> f:(int -> 'a) -> 'a list

init ~len ~f is [f 0; f 1; ...; f (len-1)], evaluated left to right.

  • since 4.06
val append : 'a list -> 'a list -> 'a list

append l0 l1 appends l1 to l0. Same function as the infix operator @.

  • since 5.1 this function is tail-recursive.
val rev_append : 'a list -> 'a list -> 'a list

rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

val concat : 'a list list -> 'a list

Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).

val flatten : 'a list list -> 'a list

Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

val equal : eq:('a -> 'a -> bool) -> 'a list -> 'a list -> bool

equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

  • since 4.12
val compare : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> int

compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

  • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
  • the empty list [] is strictly smaller than non-empty lists

Note: the cmp function will be called even if the lists have different lengths.

  • since 4.12
val iter : f:('a -> unit) -> 'a list -> unit

iter ~f [a1; ...; an] applies function f in turn to [a1; ...; an]. It is equivalent to f a1; f a2; ...; f an.

val iteri : f:(int -> 'a -> unit) -> 'a list -> unit

Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 4.00
val map : f:('a -> 'b) -> 'a list -> 'b list

map ~f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1; ...; f an] with the results returned by f.

val mapi : f:(int -> 'a -> 'b) -> 'a list -> 'b list

Same as map, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 4.00
val rev_map : f:('a -> 'b) -> 'a list -> 'b list

rev_map ~f l gives the same result as rev (map f l), but is more efficient.

val filter_map : f:('a -> 'b option) -> 'a list -> 'b list

filter_map ~f l applies f to every element of l, filters out the None elements and returns the list of the arguments of the Some elements.

  • since 4.08
val concat_map : f:('a -> 'b list) -> 'a list -> 'b list

concat_map ~f l gives the same result as concat (map f l). Tail-recursive.

  • since 4.10
val fold_left_map : f:('acc -> 'a -> 'acc * 'b) -> init:'acc -> 'a list -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/StdLabels/String/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/StdLabels/String/index.html index d201730..8d3c493 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/StdLabels/String/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/StdLabels/String/index.html @@ -1,5 +1,5 @@ -String (less-power.Stdlib_alerts.Stdlib_alerting.StdLabels.String)

Module StdLabels.String

include sig ... end
type t = string

The type for strings.

val make : int -> char -> string

make n c is a string of length n with each index holding the character c.

val init : int -> f:(int -> char) -> string

init n ~f is a string of length n with index i holding the character f i (called in increasing index order).

  • since 4.02
val empty : string

The empty string.

  • since 4.13
val length : string -> int

length s is the length (number of bytes/characters) of s.

val get : string -> int -> char

get s i is the character at index i in s. This is the same as writing s.[i].

val concat : sep:string -> string list -> string

concat ~sep ss concatenates the list of strings ss, inserting the separator string sep between each.

  • raises Invalid_argument

    if the result is longer than Sys.max_string_length bytes.

val cat : string -> string -> string

cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

  • raises Invalid_argument

    if the result is longer than Sys.max_string_length bytes.

  • since 4.13
val equal : t -> t -> bool

equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

  • since 4.03 (4.05 in StringLabels)
val compare : t -> t -> int

compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

val starts_with : prefix:string -> string -> bool

starts_with ~prefix s is true if and only if s starts with prefix.

  • since 4.13
val ends_with : suffix:string -> string -> bool

ends_with ~suffix s is true if and only if s ends with suffix.

  • since 4.13
val contains_from : string -> int -> char -> bool

contains_from s start c is true if and only if c appears in s after position start.

val rcontains_from : string -> int -> char -> bool

rcontains_from s stop c is true if and only if c appears in s before position stop+1.

val contains : string -> char -> bool

contains s c is String.contains_from s 0 c.

val sub : string -> pos:int -> len:int -> string

sub s ~pos ~len is a string of length len, containing the substring of s that starts at position pos and has length len.

val split_on_char : sep:char -> string -> string list

split_on_char ~sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

The function's result is specified by the following invariants:

  • The list is not empty.
  • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) +String (less-power.Stdlib_alerts.Stdlib_alerting.StdLabels.String)

    Module StdLabels.String

    include sig ... end
    type t = string

    The type for strings.

    val make : int -> char -> string

    make n c is a string of length n with each index holding the character c.

    val init : int -> f:(int -> char) -> string

    init n ~f is a string of length n with index i holding the character f i (called in increasing index order).

    • since 4.02
    val empty : string

    The empty string.

    • since 4.13
    val length : string -> int

    length s is the length (number of bytes/characters) of s.

    val get : string -> int -> char

    get s i is the character at index i in s. This is the same as writing s.[i].

    val concat : sep:string -> string list -> string

    concat ~sep ss concatenates the list of strings ss, inserting the separator string sep between each.

    • raises Invalid_argument

      if the result is longer than Sys.max_string_length bytes.

    val cat : string -> string -> string

    cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

    • raises Invalid_argument

      if the result is longer than Sys.max_string_length bytes.

    • since 4.13
    val equal : t -> t -> bool

    equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

    • since 4.03 (4.05 in StringLabels)
    val compare : t -> t -> int

    compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

    val starts_with : prefix:string -> string -> bool

    starts_with ~prefix s is true if and only if s starts with prefix.

    • since 4.13
    val ends_with : suffix:string -> string -> bool

    ends_with ~suffix s is true if and only if s ends with suffix.

    • since 4.13
    val contains_from : string -> int -> char -> bool

    contains_from s start c is true if and only if c appears in s after position start.

    val rcontains_from : string -> int -> char -> bool

    rcontains_from s stop c is true if and only if c appears in s before position stop+1.

    val contains : string -> char -> bool

    contains s c is String.contains_from s 0 c.

    val sub : string -> pos:int -> len:int -> string

    sub s ~pos ~len is a string of length len, containing the substring of s that starts at position pos and has length len.

    val split_on_char : sep:char -> string -> string list

    split_on_char ~sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

    The function's result is specified by the following invariants:

    • The list is not empty.
    • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) (split_on_char sep s) = s).
    • No string in the result contains the sep character.
    • since 4.04 (4.05 in StringLabels)
    val map : f:(char -> char) -> string -> string

    map f s is the string resulting from applying f to all the characters of s in increasing order.

    • since 4.00
    val mapi : f:(int -> char -> char) -> string -> string

    mapi ~f s is like map but the index of the character is also passed to f.

    • since 4.02
    val fold_left : f:('acc -> char -> 'acc) -> init:'acc -> string -> 'acc

    fold_left f x s computes f (... (f (f x s.[0]) s.[1]) ...) s.[n-1], where n is the length of the string s.

    • since 4.13
    val fold_right : f:(char -> 'acc -> 'acc) -> string -> init:'acc -> 'acc

    fold_right f s x computes f s.[0] (f s.[1] ( ... (f s.[n-1] x) ...)), where n is the length of the string s.

    • since 4.13
    val for_all : f:(char -> bool) -> string -> bool

    for_all p s checks if all characters in s satisfy the predicate p.

    • since 4.13
    val exists : f:(char -> bool) -> string -> bool

    exists p s checks if at least one character of s satisfies the predicate p.

    • since 4.13
    val trim : string -> string

    trim s is s without leading and trailing whitespace. Whitespace characters are: ' ', '\x0C' (form feed), '\n', '\r', and '\t'.

    • since 4.00
    val escaped : string -> string

    escaped s is s with special characters represented by escape sequences, following the lexical conventions of OCaml.

    All characters outside the US-ASCII printable range [0x20;0x7E] are escaped, as well as backslash (0x2F) and double-quote (0x22).

    The function Scanf.unescaped is a left inverse of escaped, i.e. Scanf.unescaped (escaped s) = s for any string s (unless escaped s fails).

    • raises Invalid_argument

      if the result is longer than Sys.max_string_length bytes.

    val uppercase_ascii : string -> string

    uppercase_ascii s is s with all lowercase letters translated to uppercase, using the US-ASCII character set.

    • since 4.03 (4.05 in StringLabels)
    val lowercase_ascii : string -> string

    lowercase_ascii s is s with all uppercase letters translated to lowercase, using the US-ASCII character set.

    • since 4.03 (4.05 in StringLabels)
    val capitalize_ascii : string -> string

    capitalize_ascii s is s with the first character set to uppercase, using the US-ASCII character set.

    • since 4.03 (4.05 in StringLabels)
    val uncapitalize_ascii : string -> string

    uncapitalize_ascii s is s with the first character set to lowercase, using the US-ASCII character set.

    • since 4.03 (4.05 in StringLabels)
    val iter : f:(char -> unit) -> string -> unit

    iter ~f s applies function f in turn to all the characters of s. It is equivalent to f s.[0]; f s.[1]; ...; f s.[length s - 1]; ().

    val iteri : f:(int -> char -> unit) -> string -> unit

    iteri is like iter, but the function is also given the corresponding character index.

    • since 4.00
    val index_from : string -> int -> char -> int

    index_from s i c is the index of the first occurrence of c in s after position i.

    • raises Not_found

      if c does not occur in s after position i.

    val index_from_opt : string -> int -> char -> int option

    index_from_opt s i c is the index of the first occurrence of c in s after position i (if any).

    • since 4.05
    val rindex_from : string -> int -> char -> int

    rindex_from s i c is the index of the last occurrence of c in s before position i+1.

    • raises Not_found

      if c does not occur in s before position i+1.

    val rindex_from_opt : string -> int -> char -> int option

    rindex_from_opt s i c is the index of the last occurrence of c in s before position i+1 (if any).

    • since 4.05
    val index : string -> char -> int

    index s c is String.index_from s 0 c.

    val index_opt : string -> char -> int option

    index_opt s c is String.index_from_opt s 0 c.

    • since 4.05
    val rindex : string -> char -> int

    rindex s c is String.rindex_from s (length s - 1) c.

    val rindex_opt : string -> char -> int option

    rindex_opt s c is String.rindex_from_opt s (length s - 1) c.

    • since 4.05
    val to_seq : t -> char Stdlib.Seq.t

    to_seq s is a sequence made of the string's characters in increasing order. In "unsafe-string" mode, modifications of the string during iteration will be reflected in the sequence.

    • since 4.07
    val to_seqi : t -> (int * char) Stdlib.Seq.t

    to_seqi s is like to_seq but also tuples the corresponding index.

    • since 4.07
    val of_seq : char Stdlib.Seq.t -> t

    of_seq s is a string made of the sequence's characters.

    • since 4.07
    val get_utf_8_uchar : t -> int -> Stdlib.Uchar.utf_decode

    get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

    val is_valid_utf_8 : t -> bool

    is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

    val get_utf_16be_uchar : t -> int -> Stdlib.Uchar.utf_decode

    get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

    val is_valid_utf_16be : t -> bool

    is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

    val get_utf_16le_uchar : t -> int -> Stdlib.Uchar.utf_decode

    get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

    val is_valid_utf_16le : t -> bool

    is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

    val get_uint8 : string -> int -> int

    get_uint8 b i is b's unsigned 8-bit integer starting at character index i.

    • since 4.13
    val get_int8 : string -> int -> int

    get_int8 b i is b's signed 8-bit integer starting at character index i.

    • since 4.13
    val get_uint16_ne : string -> int -> int

    get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_uint16_be : string -> int -> int

    get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_uint16_le : string -> int -> int

    get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_ne : string -> int -> int

    get_int16_ne b i is b's native-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_be : string -> int -> int

    get_int16_be b i is b's big-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_le : string -> int -> int

    get_int16_le b i is b's little-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int32_ne : string -> int -> int32

    get_int32_ne b i is b's native-endian 32-bit integer starting at character index i.

    • since 4.13
    val hash : t -> int

    An unseeded hash function for strings, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    • since 5.0
    val seeded_hash : int -> t -> int

    A seeded hash function for strings, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.0
    val get_int32_be : string -> int -> int32

    get_int32_be b i is b's big-endian 32-bit integer starting at character index i.

    • since 4.13
    val get_int32_le : string -> int -> int32

    get_int32_le b i is b's little-endian 32-bit integer starting at character index i.

    • since 4.13
    val get_int64_ne : string -> int -> int64

    get_int64_ne b i is b's native-endian 64-bit integer starting at character index i.

    • since 4.13
    val get_int64_be : string -> int -> int64

    get_int64_be b i is b's big-endian 64-bit integer starting at character index i.

    • since 4.13
    val get_int64_le : string -> int -> int64

    get_int64_le b i is b's little-endian 64-bit integer starting at character index i.

    • since 4.13
    val of_bytes : bytes -> string

    Return a new string that contains the same bytes as the given byte sequence.

    • since 4.13
    • alert impure This imperative programming item is not permitted
    val to_bytes : string -> bytes

    Return a new byte sequence that contains the same bytes as the given string.

    • since 4.13
    • alert impure This imperative programming item is not permitted
    val blit : src:string -> src_pos:int -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/StdLabels/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/StdLabels/index.html index 2ff224f..d8850f7 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/StdLabels/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/StdLabels/index.html @@ -1,2 +1,2 @@ -StdLabels (less-power.Stdlib_alerts.Stdlib_alerting.StdLabels)

    Module Stdlib_alerting.StdLabels

    include sig ... end
    module Array = Stdlib.ArrayLabels
    module Bytes = Stdlib.BytesLabels
    +StdLabels (less-power.Stdlib_alerts.Stdlib_alerting.StdLabels)

    Module Stdlib_alerting.StdLabels

    include sig ... end
    module Array = Stdlib.ArrayLabels
    module Bytes = Stdlib.BytesLabels
    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/String/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/String/index.html index 0af67dc..76594d3 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/String/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/String/index.html @@ -1,3 +1,3 @@ -String (less-power.Stdlib_alerts.Stdlib_alerting.String)

    Module Stdlib_alerting.String

    include sig ... end
    type t = string

    The type for strings.

    val make : int -> char -> string

    make n c is a string of length n with each index holding the character c.

    val init : int -> (int -> char) -> string

    init n f is a string of length n with index i holding the character f i (called in increasing index order).

    • since 4.02
    val empty : string

    The empty string.

    • since 4.13
    val length : string -> int

    length s is the length (number of bytes/characters) of s.

    val get : string -> int -> char

    get s i is the character at index i in s. This is the same as writing s.[i].

    val concat : string -> string list -> string

    concat sep ss concatenates the list of strings ss, inserting the separator string sep between each.

    • raises Invalid_argument

      if the result is longer than Sys.max_string_length bytes.

    val cat : string -> string -> string

    cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

    • raises Invalid_argument

      if the result is longer than Sys.max_string_length bytes.

    • since 4.13
    val equal : t -> t -> bool

    equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

    • since 4.03 (4.05 in StringLabels)
    val compare : t -> t -> int

    compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

    val starts_with : prefix:string -> string -> bool

    starts_with ~prefix s is true if and only if s starts with prefix.

    • since 4.13
    val ends_with : suffix:string -> string -> bool

    ends_with ~suffix s is true if and only if s ends with suffix.

    • since 4.13
    val contains_from : string -> int -> char -> bool

    contains_from s start c is true if and only if c appears in s after position start.

    val rcontains_from : string -> int -> char -> bool

    rcontains_from s stop c is true if and only if c appears in s before position stop+1.

    val contains : string -> char -> bool

    contains s c is String.contains_from s 0 c.

    val sub : string -> int -> int -> string

    sub s pos len is a string of length len, containing the substring of s that starts at position pos and has length len.

    val split_on_char : char -> string -> string list

    split_on_char sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

    The function's result is specified by the following invariants:

    • The list is not empty.
    • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) +String (less-power.Stdlib_alerts.Stdlib_alerting.String)

      Module Stdlib_alerting.String

      include sig ... end
      type t = string

      The type for strings.

      val make : int -> char -> string

      make n c is a string of length n with each index holding the character c.

      val init : int -> (int -> char) -> string

      init n f is a string of length n with index i holding the character f i (called in increasing index order).

      • since 4.02
      val empty : string

      The empty string.

      • since 4.13
      val length : string -> int

      length s is the length (number of bytes/characters) of s.

      val get : string -> int -> char

      get s i is the character at index i in s. This is the same as writing s.[i].

      val concat : string -> string list -> string

      concat sep ss concatenates the list of strings ss, inserting the separator string sep between each.

      • raises Invalid_argument

        if the result is longer than Sys.max_string_length bytes.

      val cat : string -> string -> string

      cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

      • raises Invalid_argument

        if the result is longer than Sys.max_string_length bytes.

      • since 4.13
      val equal : t -> t -> bool

      equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

      • since 4.03 (4.05 in StringLabels)
      val compare : t -> t -> int

      compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

      val starts_with : prefix:string -> string -> bool

      starts_with ~prefix s is true if and only if s starts with prefix.

      • since 4.13
      val ends_with : suffix:string -> string -> bool

      ends_with ~suffix s is true if and only if s ends with suffix.

      • since 4.13
      val contains_from : string -> int -> char -> bool

      contains_from s start c is true if and only if c appears in s after position start.

      val rcontains_from : string -> int -> char -> bool

      rcontains_from s stop c is true if and only if c appears in s before position stop+1.

      val contains : string -> char -> bool

      contains s c is String.contains_from s 0 c.

      val sub : string -> int -> int -> string

      sub s pos len is a string of length len, containing the substring of s that starts at position pos and has length len.

      val split_on_char : char -> string -> string list

      split_on_char sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

      The function's result is specified by the following invariants:

      • The list is not empty.
      • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) (split_on_char sep s) = s).
      • No string in the result contains the sep character.
      • since 4.04 (4.05 in StringLabels)
      val map : (char -> char) -> string -> string

      map f s is the string resulting from applying f to all the characters of s in increasing order.

      • since 4.00
      val mapi : (int -> char -> char) -> string -> string

      mapi f s is like map but the index of the character is also passed to f.

      • since 4.02
      val fold_left : ('acc -> char -> 'acc) -> 'acc -> string -> 'acc

      fold_left f x s computes f (... (f (f x s.[0]) s.[1]) ...) s.[n-1], where n is the length of the string s.

      • since 4.13
      val fold_right : (char -> 'acc -> 'acc) -> string -> 'acc -> 'acc

      fold_right f s x computes f s.[0] (f s.[1] ( ... (f s.[n-1] x) ...)), where n is the length of the string s.

      • since 4.13
      val for_all : (char -> bool) -> string -> bool

      for_all p s checks if all characters in s satisfy the predicate p.

      • since 4.13
      val exists : (char -> bool) -> string -> bool

      exists p s checks if at least one character of s satisfies the predicate p.

      • since 4.13
      val trim : string -> string

      trim s is s without leading and trailing whitespace. Whitespace characters are: ' ', '\x0C' (form feed), '\n', '\r', and '\t'.

      • since 4.00
      val escaped : string -> string

      escaped s is s with special characters represented by escape sequences, following the lexical conventions of OCaml.

      All characters outside the US-ASCII printable range [0x20;0x7E] are escaped, as well as backslash (0x2F) and double-quote (0x22).

      The function Scanf.unescaped is a left inverse of escaped, i.e. Scanf.unescaped (escaped s) = s for any string s (unless escaped s fails).

      • raises Invalid_argument

        if the result is longer than Sys.max_string_length bytes.

      val uppercase_ascii : string -> string

      uppercase_ascii s is s with all lowercase letters translated to uppercase, using the US-ASCII character set.

      • since 4.03 (4.05 in StringLabels)
      val lowercase_ascii : string -> string

      lowercase_ascii s is s with all uppercase letters translated to lowercase, using the US-ASCII character set.

      • since 4.03 (4.05 in StringLabels)
      val capitalize_ascii : string -> string

      capitalize_ascii s is s with the first character set to uppercase, using the US-ASCII character set.

      • since 4.03 (4.05 in StringLabels)
      val uncapitalize_ascii : string -> string

      uncapitalize_ascii s is s with the first character set to lowercase, using the US-ASCII character set.

      • since 4.03 (4.05 in StringLabels)
      val iter : (char -> unit) -> string -> unit

      iter f s applies function f in turn to all the characters of s. It is equivalent to f s.[0]; f s.[1]; ...; f s.[length s - 1]; ().

      val iteri : (int -> char -> unit) -> string -> unit

      iteri is like iter, but the function is also given the corresponding character index.

      • since 4.00
      val index_from : string -> int -> char -> int

      index_from s i c is the index of the first occurrence of c in s after position i.

      • raises Not_found

        if c does not occur in s after position i.

      val index_from_opt : string -> int -> char -> int option

      index_from_opt s i c is the index of the first occurrence of c in s after position i (if any).

      • since 4.05
      val rindex_from : string -> int -> char -> int

      rindex_from s i c is the index of the last occurrence of c in s before position i+1.

      • raises Not_found

        if c does not occur in s before position i+1.

      val rindex_from_opt : string -> int -> char -> int option

      rindex_from_opt s i c is the index of the last occurrence of c in s before position i+1 (if any).

      • since 4.05
      val index : string -> char -> int

      index s c is String.index_from s 0 c.

      val index_opt : string -> char -> int option

      index_opt s c is String.index_from_opt s 0 c.

      • since 4.05
      val rindex : string -> char -> int

      rindex s c is String.rindex_from s (length s - 1) c.

      val rindex_opt : string -> char -> int option

      rindex_opt s c is String.rindex_from_opt s (length s - 1) c.

      • since 4.05
      val to_seq : t -> char Stdlib.Seq.t

      to_seq s is a sequence made of the string's characters in increasing order. In "unsafe-string" mode, modifications of the string during iteration will be reflected in the sequence.

      • since 4.07
      val to_seqi : t -> (int * char) Stdlib.Seq.t

      to_seqi s is like to_seq but also tuples the corresponding index.

      • since 4.07
      val of_seq : char Stdlib.Seq.t -> t

      of_seq s is a string made of the sequence's characters.

      • since 4.07
      val get_utf_8_uchar : t -> int -> Stdlib.Uchar.utf_decode

      get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

      val is_valid_utf_8 : t -> bool

      is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

      val get_utf_16be_uchar : t -> int -> Stdlib.Uchar.utf_decode

      get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

      val is_valid_utf_16be : t -> bool

      is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

      val get_utf_16le_uchar : t -> int -> Stdlib.Uchar.utf_decode

      get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

      val is_valid_utf_16le : t -> bool

      is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

      val get_uint8 : string -> int -> int

      get_uint8 b i is b's unsigned 8-bit integer starting at character index i.

      • since 4.13
      val get_int8 : string -> int -> int

      get_int8 b i is b's signed 8-bit integer starting at character index i.

      • since 4.13
      val get_uint16_ne : string -> int -> int

      get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at character index i.

      • since 4.13
      val get_uint16_be : string -> int -> int

      get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at character index i.

      • since 4.13
      val get_uint16_le : string -> int -> int

      get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at character index i.

      • since 4.13
      val get_int16_ne : string -> int -> int

      get_int16_ne b i is b's native-endian signed 16-bit integer starting at character index i.

      • since 4.13
      val get_int16_be : string -> int -> int

      get_int16_be b i is b's big-endian signed 16-bit integer starting at character index i.

      • since 4.13
      val get_int16_le : string -> int -> int

      get_int16_le b i is b's little-endian signed 16-bit integer starting at character index i.

      • since 4.13
      val get_int32_ne : string -> int -> int32

      get_int32_ne b i is b's native-endian 32-bit integer starting at character index i.

      • since 4.13
      val hash : t -> int

      An unseeded hash function for strings, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

      • since 5.0
      val seeded_hash : int -> t -> int

      A seeded hash function for strings, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

      • since 5.0
      val get_int32_be : string -> int -> int32

      get_int32_be b i is b's big-endian 32-bit integer starting at character index i.

      • since 4.13
      val get_int32_le : string -> int -> int32

      get_int32_le b i is b's little-endian 32-bit integer starting at character index i.

      • since 4.13
      val get_int64_ne : string -> int -> int64

      get_int64_ne b i is b's native-endian 64-bit integer starting at character index i.

      • since 4.13
      val get_int64_be : string -> int -> int64

      get_int64_be b i is b's big-endian 64-bit integer starting at character index i.

      • since 4.13
      val get_int64_le : string -> int -> int64

      get_int64_le b i is b's little-endian 64-bit integer starting at character index i.

      • since 4.13
      val of_bytes : bytes -> string

      Return a new string that contains the same bytes as the given byte sequence.

      • since 4.13
      • alert impure This imperative programming item is not permitted
      val to_bytes : string -> bytes

      Return a new byte sequence that contains the same bytes as the given string.

      • since 4.13
      • alert impure This imperative programming item is not permitted
      val blit : string -> int -> bytes -> int -> int -> unit

      Same as Bytes.blit_string which should be preferred.

      • alert impure This imperative programming item is not permitted
      diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/StringLabels/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/StringLabels/index.html index 02601d3..10b25af 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/StringLabels/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/StringLabels/index.html @@ -1,5 +1,5 @@ -StringLabels (less-power.Stdlib_alerts.Stdlib_alerting.StringLabels)

      Module Stdlib_alerting.StringLabels

      include sig ... end
      type t = string

      The type for strings.

      val make : int -> char -> string

      make n c is a string of length n with each index holding the character c.

      val init : int -> f:(int -> char) -> string

      init n ~f is a string of length n with index i holding the character f i (called in increasing index order).

      • since 4.02
      val empty : string

      The empty string.

      • since 4.13
      val length : string -> int

      length s is the length (number of bytes/characters) of s.

      val get : string -> int -> char

      get s i is the character at index i in s. This is the same as writing s.[i].

      val concat : sep:string -> string list -> string

      concat ~sep ss concatenates the list of strings ss, inserting the separator string sep between each.

      • raises Invalid_argument

        if the result is longer than Sys.max_string_length bytes.

      val cat : string -> string -> string

      cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

      • raises Invalid_argument

        if the result is longer than Sys.max_string_length bytes.

      • since 4.13
      val equal : t -> t -> bool

      equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

      • since 4.03 (4.05 in StringLabels)
      val compare : t -> t -> int

      compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

      val starts_with : prefix:string -> string -> bool

      starts_with ~prefix s is true if and only if s starts with prefix.

      • since 4.13
      val ends_with : suffix:string -> string -> bool

      ends_with ~suffix s is true if and only if s ends with suffix.

      • since 4.13
      val contains_from : string -> int -> char -> bool

      contains_from s start c is true if and only if c appears in s after position start.

      val rcontains_from : string -> int -> char -> bool

      rcontains_from s stop c is true if and only if c appears in s before position stop+1.

      val contains : string -> char -> bool

      contains s c is String.contains_from s 0 c.

      val sub : string -> pos:int -> len:int -> string

      sub s ~pos ~len is a string of length len, containing the substring of s that starts at position pos and has length len.

      val split_on_char : sep:char -> string -> string list

      split_on_char ~sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

      The function's result is specified by the following invariants:

      • The list is not empty.
      • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) +StringLabels (less-power.Stdlib_alerts.Stdlib_alerting.StringLabels)

        Module Stdlib_alerting.StringLabels

        include sig ... end
        type t = string

        The type for strings.

        val make : int -> char -> string

        make n c is a string of length n with each index holding the character c.

        val init : int -> f:(int -> char) -> string

        init n ~f is a string of length n with index i holding the character f i (called in increasing index order).

        • since 4.02
        val empty : string

        The empty string.

        • since 4.13
        val length : string -> int

        length s is the length (number of bytes/characters) of s.

        val get : string -> int -> char

        get s i is the character at index i in s. This is the same as writing s.[i].

        val concat : sep:string -> string list -> string

        concat ~sep ss concatenates the list of strings ss, inserting the separator string sep between each.

        • raises Invalid_argument

          if the result is longer than Sys.max_string_length bytes.

        val cat : string -> string -> string

        cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

        • raises Invalid_argument

          if the result is longer than Sys.max_string_length bytes.

        • since 4.13
        val equal : t -> t -> bool

        equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

        • since 4.03 (4.05 in StringLabels)
        val compare : t -> t -> int

        compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

        val starts_with : prefix:string -> string -> bool

        starts_with ~prefix s is true if and only if s starts with prefix.

        • since 4.13
        val ends_with : suffix:string -> string -> bool

        ends_with ~suffix s is true if and only if s ends with suffix.

        • since 4.13
        val contains_from : string -> int -> char -> bool

        contains_from s start c is true if and only if c appears in s after position start.

        val rcontains_from : string -> int -> char -> bool

        rcontains_from s stop c is true if and only if c appears in s before position stop+1.

        val contains : string -> char -> bool

        contains s c is String.contains_from s 0 c.

        val sub : string -> pos:int -> len:int -> string

        sub s ~pos ~len is a string of length len, containing the substring of s that starts at position pos and has length len.

        val split_on_char : sep:char -> string -> string list

        split_on_char ~sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

        The function's result is specified by the following invariants:

        • The list is not empty.
        • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) (split_on_char sep s) = s).
        • No string in the result contains the sep character.
        • since 4.04 (4.05 in StringLabels)
        val map : f:(char -> char) -> string -> string

        map f s is the string resulting from applying f to all the characters of s in increasing order.

        • since 4.00
        val mapi : f:(int -> char -> char) -> string -> string

        mapi ~f s is like map but the index of the character is also passed to f.

        • since 4.02
        val fold_left : f:('acc -> char -> 'acc) -> init:'acc -> string -> 'acc

        fold_left f x s computes f (... (f (f x s.[0]) s.[1]) ...) s.[n-1], where n is the length of the string s.

        • since 4.13
        val fold_right : f:(char -> 'acc -> 'acc) -> string -> init:'acc -> 'acc

        fold_right f s x computes f s.[0] (f s.[1] ( ... (f s.[n-1] x) ...)), where n is the length of the string s.

        • since 4.13
        val for_all : f:(char -> bool) -> string -> bool

        for_all p s checks if all characters in s satisfy the predicate p.

        • since 4.13
        val exists : f:(char -> bool) -> string -> bool

        exists p s checks if at least one character of s satisfies the predicate p.

        • since 4.13
        val trim : string -> string

        trim s is s without leading and trailing whitespace. Whitespace characters are: ' ', '\x0C' (form feed), '\n', '\r', and '\t'.

        • since 4.00
        val escaped : string -> string

        escaped s is s with special characters represented by escape sequences, following the lexical conventions of OCaml.

        All characters outside the US-ASCII printable range [0x20;0x7E] are escaped, as well as backslash (0x2F) and double-quote (0x22).

        The function Scanf.unescaped is a left inverse of escaped, i.e. Scanf.unescaped (escaped s) = s for any string s (unless escaped s fails).

        • raises Invalid_argument

          if the result is longer than Sys.max_string_length bytes.

        val uppercase_ascii : string -> string

        uppercase_ascii s is s with all lowercase letters translated to uppercase, using the US-ASCII character set.

        • since 4.03 (4.05 in StringLabels)
        val lowercase_ascii : string -> string

        lowercase_ascii s is s with all uppercase letters translated to lowercase, using the US-ASCII character set.

        • since 4.03 (4.05 in StringLabels)
        val capitalize_ascii : string -> string

        capitalize_ascii s is s with the first character set to uppercase, using the US-ASCII character set.

        • since 4.03 (4.05 in StringLabels)
        val uncapitalize_ascii : string -> string

        uncapitalize_ascii s is s with the first character set to lowercase, using the US-ASCII character set.

        • since 4.03 (4.05 in StringLabels)
        val iter : f:(char -> unit) -> string -> unit

        iter ~f s applies function f in turn to all the characters of s. It is equivalent to f s.[0]; f s.[1]; ...; f s.[length s - 1]; ().

        val iteri : f:(int -> char -> unit) -> string -> unit

        iteri is like iter, but the function is also given the corresponding character index.

        • since 4.00
        val index_from : string -> int -> char -> int

        index_from s i c is the index of the first occurrence of c in s after position i.

        • raises Not_found

          if c does not occur in s after position i.

        val index_from_opt : string -> int -> char -> int option

        index_from_opt s i c is the index of the first occurrence of c in s after position i (if any).

        • since 4.05
        val rindex_from : string -> int -> char -> int

        rindex_from s i c is the index of the last occurrence of c in s before position i+1.

        • raises Not_found

          if c does not occur in s before position i+1.

        val rindex_from_opt : string -> int -> char -> int option

        rindex_from_opt s i c is the index of the last occurrence of c in s before position i+1 (if any).

        • since 4.05
        val index : string -> char -> int

        index s c is String.index_from s 0 c.

        val index_opt : string -> char -> int option

        index_opt s c is String.index_from_opt s 0 c.

        • since 4.05
        val rindex : string -> char -> int

        rindex s c is String.rindex_from s (length s - 1) c.

        val rindex_opt : string -> char -> int option

        rindex_opt s c is String.rindex_from_opt s (length s - 1) c.

        • since 4.05
        val to_seq : t -> char Stdlib.Seq.t

        to_seq s is a sequence made of the string's characters in increasing order. In "unsafe-string" mode, modifications of the string during iteration will be reflected in the sequence.

        • since 4.07
        val to_seqi : t -> (int * char) Stdlib.Seq.t

        to_seqi s is like to_seq but also tuples the corresponding index.

        • since 4.07
        val of_seq : char Stdlib.Seq.t -> t

        of_seq s is a string made of the sequence's characters.

        • since 4.07
        val get_utf_8_uchar : t -> int -> Stdlib.Uchar.utf_decode

        get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

        val is_valid_utf_8 : t -> bool

        is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

        val get_utf_16be_uchar : t -> int -> Stdlib.Uchar.utf_decode

        get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

        val is_valid_utf_16be : t -> bool

        is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

        val get_utf_16le_uchar : t -> int -> Stdlib.Uchar.utf_decode

        get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

        val is_valid_utf_16le : t -> bool

        is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

        val get_uint8 : string -> int -> int

        get_uint8 b i is b's unsigned 8-bit integer starting at character index i.

        • since 4.13
        val get_int8 : string -> int -> int

        get_int8 b i is b's signed 8-bit integer starting at character index i.

        • since 4.13
        val get_uint16_ne : string -> int -> int

        get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at character index i.

        • since 4.13
        val get_uint16_be : string -> int -> int

        get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at character index i.

        • since 4.13
        val get_uint16_le : string -> int -> int

        get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at character index i.

        • since 4.13
        val get_int16_ne : string -> int -> int

        get_int16_ne b i is b's native-endian signed 16-bit integer starting at character index i.

        • since 4.13
        val get_int16_be : string -> int -> int

        get_int16_be b i is b's big-endian signed 16-bit integer starting at character index i.

        • since 4.13
        val get_int16_le : string -> int -> int

        get_int16_le b i is b's little-endian signed 16-bit integer starting at character index i.

        • since 4.13
        val get_int32_ne : string -> int -> int32

        get_int32_ne b i is b's native-endian 32-bit integer starting at character index i.

        • since 4.13
        val hash : t -> int

        An unseeded hash function for strings, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

        • since 5.0
        val seeded_hash : int -> t -> int

        A seeded hash function for strings, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

        • since 5.0
        val get_int32_be : string -> int -> int32

        get_int32_be b i is b's big-endian 32-bit integer starting at character index i.

        • since 4.13
        val get_int32_le : string -> int -> int32

        get_int32_le b i is b's little-endian 32-bit integer starting at character index i.

        • since 4.13
        val get_int64_ne : string -> int -> int64

        get_int64_ne b i is b's native-endian 64-bit integer starting at character index i.

        • since 4.13
        val get_int64_be : string -> int -> int64

        get_int64_be b i is b's big-endian 64-bit integer starting at character index i.

        • since 4.13
        val get_int64_le : string -> int -> int64

        get_int64_le b i is b's little-endian 64-bit integer starting at character index i.

        • since 4.13
        val of_bytes : bytes -> string

        Return a new string that contains the same bytes as the given byte sequence.

        • since 4.13
        • alert impure This imperative programming item is not permitted
        val to_bytes : string -> bytes

        Return a new byte sequence that contains the same bytes as the given string.

        • since 4.13
        • alert impure This imperative programming item is not permitted
        val blit : src:string -> src_pos:int -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Uchar/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Uchar/index.html index eba8381..e7e1f4c 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Uchar/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/Uchar/index.html @@ -1,2 +1,2 @@ -Uchar (less-power.Stdlib_alerts.Stdlib_alerting.Uchar)

        Module Stdlib_alerting.Uchar

        type t = Stdlib.Uchar.t
        type utf_decode = Stdlib.Uchar.utf_decode
        include sig ... end
        val min : t

        min is U+0000.

        val max : t

        max is U+10FFFF.

        val bom : t

        bom is U+FEFF, the byte order mark (BOM) character.

        • since 4.06
        val rep : t

        rep is U+FFFD, the replacement character.

        • since 4.06
        val succ : t -> t

        succ u is the scalar value after u in the set of Unicode scalar values.

        val pred : t -> t

        pred u is the scalar value before u in the set of Unicode scalar values.

        val is_valid : int -> bool

        is_valid n is true if and only if n is a Unicode scalar value (i.e. in the ranges 0x0000...0xD7FF or 0xE000...0x10FFFF).

        val of_int : int -> t

        of_int i is i as a Unicode character.

        val to_int : t -> int

        to_int u is u as an integer.

        val is_char : t -> bool

        is_char u is true if and only if u is a latin1 OCaml character.

        val of_char : char -> t

        of_char c is c as a Unicode character.

        val to_char : t -> char

        to_char u is u as an OCaml latin1 character.

        val equal : t -> t -> bool

        equal u u' is u = u'.

        val compare : t -> t -> int

        compare u u' is Stdlib.compare u u'.

        val hash : t -> int

        hash u associates a non-negative integer to u.

        val utf_decode_is_valid : utf_decode -> bool

        utf_decode_is_valid d is true if and only if d holds a valid decode.

        val utf_decode_uchar : utf_decode -> t

        utf_decode_uchar d is the Unicode character decoded by d if utf_decode_is_valid d is true and Uchar.rep otherwise.

        val utf_decode_length : utf_decode -> int

        utf_decode_length d is the number of elements from the source that were consumed by the decode d. This is always strictly positive and smaller or equal to 4. The kind of source elements depends on the actual decoder; for the decoders of the standard library this function always returns a length in bytes.

        val utf_decode : int -> t -> utf_decode

        utf_decode n u is a valid UTF decode for u that consumed n elements from the source for decoding. n must be positive and smaller or equal to 4 (this is not checked by the module).

        val utf_decode_invalid : int -> utf_decode

        utf_decode_invalid n is an invalid UTF decode that consumed n elements from the source to error. n must be positive and smaller or equal to 4 (this is not checked by the module). The resulting decode has rep as the decoded Unicode character.

        val utf_8_byte_length : t -> int

        utf_8_byte_length u is the number of bytes needed to encode u in UTF-8.

        val utf_16_byte_length : t -> int

        utf_16_byte_length u is the number of bytes needed to encode u in UTF-16.

        +Uchar (less-power.Stdlib_alerts.Stdlib_alerting.Uchar)

        Module Stdlib_alerting.Uchar

        type t = Stdlib.Uchar.t
        type utf_decode = Stdlib.Uchar.utf_decode
        include sig ... end
        val min : t

        min is U+0000.

        val max : t

        max is U+10FFFF.

        val bom : t

        bom is U+FEFF, the byte order mark (BOM) character.

        • since 4.06
        val rep : t

        rep is U+FFFD, the replacement character.

        • since 4.06
        val succ : t -> t

        succ u is the scalar value after u in the set of Unicode scalar values.

        val pred : t -> t

        pred u is the scalar value before u in the set of Unicode scalar values.

        val is_valid : int -> bool

        is_valid n is true if and only if n is a Unicode scalar value (i.e. in the ranges 0x0000...0xD7FF or 0xE000...0x10FFFF).

        val of_int : int -> t

        of_int i is i as a Unicode character.

        val to_int : t -> int

        to_int u is u as an integer.

        val is_char : t -> bool

        is_char u is true if and only if u is a latin1 OCaml character.

        val of_char : char -> t

        of_char c is c as a Unicode character.

        val to_char : t -> char

        to_char u is u as an OCaml latin1 character.

        val equal : t -> t -> bool

        equal u u' is u = u'.

        val compare : t -> t -> int

        compare u u' is Stdlib.compare u u'.

        val hash : t -> int

        hash u associates a non-negative integer to u.

        val utf_decode_is_valid : utf_decode -> bool

        utf_decode_is_valid d is true if and only if d holds a valid decode.

        val utf_decode_uchar : utf_decode -> t

        utf_decode_uchar d is the Unicode character decoded by d if utf_decode_is_valid d is true and Uchar.rep otherwise.

        val utf_decode_length : utf_decode -> int

        utf_decode_length d is the number of elements from the source that were consumed by the decode d. This is always strictly positive and smaller or equal to 4. The kind of source elements depends on the actual decoder; for the decoders of the standard library this function always returns a length in bytes.

        val utf_decode : int -> t -> utf_decode

        utf_decode n u is a valid UTF decode for u that consumed n elements from the source for decoding. n must be positive and smaller or equal to 4 (this is not checked by the module).

        val utf_decode_invalid : int -> utf_decode

        utf_decode_invalid n is an invalid UTF decode that consumed n elements from the source to error. n must be positive and smaller or equal to 4 (this is not checked by the module). The resulting decode has rep as the decoded Unicode character.

        val utf_8_byte_length : t -> int

        utf_8_byte_length u is the number of bytes needed to encode u in UTF-8.

        val utf_16_byte_length : t -> int

        utf_16_byte_length u is the number of bytes needed to encode u in UTF-16.

        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/index.html index d73a5ae..0b52ac6 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/Stdlib_alerting/index.html @@ -1,5 +1,5 @@ -Stdlib_alerting (less-power.Stdlib_alerts.Stdlib_alerting)

        Module Stdlib_alerts.Stdlib_alerting

        Stdlib, but with the above module type.

        Derived from Stdlib, but with items that can be restricted annotated with alerts.

        Things that can be restricted are marked with an ⚠️ Alert. Not everything marked here is disabled by default though. See Stdlib_alerts for the defaults.

        raise primitives and standard exceptions

        include sig ... end
        val raise : exn -> 'a

        Raise the given exception value

        val raise_notrace : exn -> 'a

        A faster version raise which does not record the backtrace.

        • since 4.02
        val failwith : string -> 'a

        Raise exception Failure with the given string.

        val invalid_arg : string -> 'a

        Raise exception Invalid_argument with the given string.

        exception Exit

        The Exit exception is not raised by any library function. It is provided for use in your programs.

        exception Match_failure of string * int * int

        Exception raised when none of the cases of a pattern-matching apply. The arguments are the location of the match keyword in the source code (file name, line number, column number).

        exception Assert_failure of string * int * int

        Exception raised when an assertion fails. The arguments are the location of the assert keyword in the source code (file name, line number, column number).

        exception Invalid_argument of string

        Exception raised by library functions to signal that the given arguments do not make sense. The string gives some information to the programmer. As a general rule, this exception should not be caught, it denotes a programming error and the code should be modified not to trigger it.

        exception Failure of string

        Exception raised by library functions to signal that they are undefined on the given arguments. The string is meant to give some information to the programmer; you must not pattern match on the string literal because it may change in future versions (use Failure _ instead).

        exception Not_found

        Exception raised by search functions when the desired object could not be found.

        exception Out_of_memory

        Exception raised by the garbage collector when there is insufficient memory to complete the computation. (Not reliable for allocations on the minor heap.)

        exception Stack_overflow

        Exception raised by the bytecode interpreter when the evaluation stack reaches its maximal size. This often indicates infinite or excessively deep recursion in the user's program.

        Before 4.10, it was not fully implemented by the native-code compiler.

        exception Sys_error of string

        Exception raised by the input/output functions to report an operating system error. The string is meant to give some information to the programmer; you must not pattern match on the string literal because it may change in future versions (use Sys_error _ instead).

        exception End_of_file

        Exception raised by input functions to signal that the end of file has been reached.

        exception Division_by_zero

        Exception raised by integer division and remainder operations when their second argument is zero.

        exception Sys_blocked_io

        A special case of Sys_error raised when no I/O is possible on a non-blocking I/O channel.

        exception Undefined_recursive_module of string * int * int

        Exception raised when an ill-founded recursive module definition is evaluated. The arguments are the location of the definition in the source code (file name, line number, column number).

        Polymorphic comparisons

        Not including the impure (==) and (!=).

        include sig ... end
        val (=) : 'a -> 'a -> bool

        e1 = e2 tests for structural equality of e1 and e2. Mutable structures (e.g. references and arrays) are equal if and only if their current contents are structurally equal, even if the two mutable objects are not the same physical object. Equality between functional values raises Invalid_argument. Equality between cyclic data structures may not terminate. Left-associative operator, see Ocaml_operators for more information.

        val (<>) : 'a -> 'a -> bool

        Negation of Stdlib.(=). Left-associative operator, see Ocaml_operators for more information.

        val (<) : 'a -> 'a -> bool

        See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

        val (>) : 'a -> 'a -> bool

        See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

        val (<=) : 'a -> 'a -> bool

        See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

        val (>=) : 'a -> 'a -> bool

        Structural ordering functions. These functions coincide with the usual orderings over integers, characters, strings, byte sequences and floating-point numbers, and extend them to a total ordering over all types. The ordering is compatible with ( = ). As in the case of ( = ), mutable structures are compared by contents. Comparison between functional values raises Invalid_argument. Comparison between cyclic structures may not terminate. Left-associative operator, see Ocaml_operators for more information.

        val compare : 'a -> 'a -> int

        compare x y returns 0 if x is equal to y, a negative integer if x is less than y, and a positive integer if x is greater than y. The ordering implemented by compare is compatible with the comparison predicates =, < and > defined above, with one difference on the treatment of the float value Stdlib.nan. Namely, the comparison predicates treat nan as different from any other float value, including itself; while compare treats nan as equal to itself and less than any other float value. This treatment of nan ensures that compare defines a total ordering relation.

        compare applied to functional values may raise Invalid_argument. compare applied to cyclic structures may not terminate.

        The compare function can be used as the comparison function required by the Set.Make and Map.Make functors, as well as the List.sort and Array.sort functions.

        val min : 'a -> 'a -> 'a

        Return the smaller of the two arguments. The result is unspecified if one of the arguments contains the float value nan.

        val max : 'a -> 'a -> 'a

        Return the greater of the two arguments. The result is unspecified if one of the arguments contains the float value nan.

        Physical comparisons

        The impure (==) and (!=)

        include sig ... end
        val (==) : 'a -> 'a -> bool

        e1 == e2 tests for physical equality of e1 and e2. On mutable types such as references, arrays, byte sequences, records with mutable fields and objects with mutable instance variables, e1 == e2 is true if and only if physical modification of e1 also affects e2. On non-mutable types, the behavior of ( == ) is implementation-dependent; however, it is guaranteed that e1 == e2 implies compare e1 e2 = 0. Left-associative operator, see Ocaml_operators for more information.

        • alert physical_eq Physical comparisons are not permitted. Hint: did you mean = ?
        val (!=) : 'a -> 'a -> bool

        Negation of Stdlib.(==). Left-associative operator, see Ocaml_operators for more information.

        • alert physical_eq Physical comparisons are not permitted. Hint: did you mean <> ?

        Boolean operations

        include sig ... end
        val not : bool -> bool

        The boolean negation.

        val (&&) : bool -> bool -> bool

        The boolean 'and'. Evaluation is sequential, left-to-right: in e1 && e2, e1 is evaluated first, and if it returns false, e2 is not evaluated at all. Right-associative operator, see Ocaml_operators for more information.

        val (||) : bool -> bool -> bool

        The boolean 'or'. Evaluation is sequential, left-to-right: in e1 || e2, e1 is evaluated first, and if it returns true, e2 is not evaluated at all. Right-associative operator, see Ocaml_operators for more information.

        Debugging macros

        These are safe in the sense that referential transparency is preserved, if two uses of a macro at separate locations are considered separate occurrences.

        include sig ... end
        val __LOC__ : string

        __LOC__ returns the location at which this expression appears in the file currently being parsed by the compiler, with the standard error format of OCaml: "File %S, line %d, characters %d-%d".

        • since 4.02
        • alert debug_macro Debugging macros are not permitted
        val __FILE__ : string

        __FILE__ returns the name of the file currently being parsed by the compiler.

        • since 4.02
        • alert debug_macro Debugging macros are not permitted
        val __LINE__ : int

        __LINE__ returns the line number at which this expression appears in the file currently being parsed by the compiler.

        • since 4.02
        • alert debug_macro Debugging macros are not permitted
        val __MODULE__ : string

        __MODULE__ returns the module name of the file being parsed by the compiler.

        • since 4.02
        • alert debug_macro Debugging macros are not permitted
        val __POS__ : string * int * int * int

        __POS__ returns a tuple (file,lnum,cnum,enum), corresponding to the location at which this expression appears in the file currently being parsed by the compiler. file is the current filename, lnum the line number, cnum the character position in the line and enum the last character position in the line.

        • since 4.02
        • alert debug_macro Debugging macros are not permitted
        val __FUNCTION__ : string

        __FUNCTION__ returns the name of the current function or method, including any enclosing modules or classes.

        • since 4.12
        • alert debug_macro Debugging macros are not permitted
        val __LOC_OF__ : 'a -> string * 'a

        __LOC_OF__ expr returns a pair (loc, expr) where loc is the location of expr in the file currently being parsed by the compiler, with the standard error format of OCaml: "File %S, line %d, characters %d-%d".

        • since 4.02
        • alert debug_macro Debugging macros are not permitted
        val __LINE_OF__ : 'a -> int * 'a

        __LINE_OF__ expr returns a pair (line, expr), where line is the line number at which the expression expr appears in the file currently being parsed by the compiler.

        • since 4.02
        • alert debug_macro Debugging macros are not permitted
        val __POS_OF__ : 'a -> (string * int * int * int) * 'a

        __POS_OF__ expr returns a pair (loc,expr), where loc is a tuple (file,lnum,cnum,enum) corresponding to the location at which the expression expr appears in the file currently being parsed by the compiler. file is the current filename, lnum the line number, cnum the character position in the line and enum the last character position in the line.

        • since 4.02
        • alert debug_macro Debugging macros are not permitted

        Composition operators

        include sig ... end
        val (|>) : 'a -> ('a -> 'b) -> 'b

        Reverse-application operator: x |> f |> g is exactly equivalent to g (f (x)). Left-associative operator, see Ocaml_operators for more information.

        • since 4.01
        val (@@) : ('a -> 'b) -> 'a -> 'b

        Application operator: g @@ f @@ x is exactly equivalent to g (f (x)). Right-associative operator, see Ocaml_operators for more information.

        • since 4.01

        Integer operations

        include sig ... end
        val (~-) : int -> int

        Unary negation. You can also write - e instead of ~- e. Unary operator, see Ocaml_operators for more information.

        val (~+) : int -> int

        Unary addition. You can also write + e instead of ~+ e. Unary operator, see Ocaml_operators for more information.

        • since 3.12
        val succ : int -> int

        succ x is x + 1.

        val pred : int -> int

        pred x is x - 1.

        val (+) : int -> int -> int

        Integer addition. Left-associative operator, see Ocaml_operators for more information.

        val (-) : int -> int -> int

        Integer subtraction. Left-associative operator, , see Ocaml_operators for more information.

        val (*) : int -> int -> int

        Integer multiplication. Left-associative operator, see Ocaml_operators for more information.

        val (/) : int -> int -> int

        Integer division. Integer division rounds the real quotient of its arguments towards zero. More precisely, if x >= 0 and y > 0, x / y is the greatest integer less than or equal to the real quotient of x by y. Moreover, (- x) / y = x / (- y) = - (x / y). Left-associative operator, see Ocaml_operators for more information.

        val (mod) : int -> int -> int

        Integer remainder. If y is not zero, the result of x mod y satisfies the following properties: x = (x / y) * y + x mod y and abs(x mod y) <= abs(y) - 1. If y = 0, x mod y raises Division_by_zero. Note that x mod y is negative only if x < 0. Left-associative operator, see Ocaml_operators for more information.

        val abs : int -> int

        abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

        val (land) : int -> int -> int

        Bitwise logical and. Left-associative operator, see Ocaml_operators for more information.

        val (lor) : int -> int -> int

        Bitwise logical or. Left-associative operator, see Ocaml_operators for more information.

        val (lxor) : int -> int -> int

        Bitwise logical exclusive or. Left-associative operator, see Ocaml_operators for more information.

        val lnot : int -> int

        Bitwise logical negation.

        val (lsl) : int -> int -> int

        n lsl m shifts n to the left by m bits. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

        val (lsr) : int -> int -> int

        n lsr m shifts n to the right by m bits. This is a logical shift: zeroes are inserted regardless of the sign of n. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

        val (asr) : int -> int -> int

        n asr m shifts n to the right by m bits. This is an arithmetic shift: the sign bit of n is replicated. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

        val max_int : int

        The greatest representable integer.

        val min_int : int

        The smallest representable integer.

        Floating-point operations

        include sig ... end
        val (~-.) : float -> float

        Unary negation. You can also write -. e instead of ~-. e. Unary operator, see Ocaml_operators for more information.

        val (~+.) : float -> float

        Unary addition. You can also write +. e instead of ~+. e. Unary operator, see Ocaml_operators for more information.

        • since 3.12
        val (+.) : float -> float -> float

        Floating-point addition. Left-associative operator, see Ocaml_operators for more information.

        val (-.) : float -> float -> float

        Floating-point subtraction. Left-associative operator, see Ocaml_operators for more information.

        val (*.) : float -> float -> float

        Floating-point multiplication. Left-associative operator, see Ocaml_operators for more information.

        val (/.) : float -> float -> float

        Floating-point division. Left-associative operator, see Ocaml_operators for more information.

        val (**) : float -> float -> float

        Exponentiation. Right-associative operator, see Ocaml_operators for more information.

        val exp : float -> float

        Exponential.

        val expm1 : float -> float

        expm1 x computes exp x -. 1.0, giving numerically-accurate results even if x is close to 0.0.

        • since 3.12
        val acos : float -> float

        Arc cosine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between 0.0 and pi.

        val asin : float -> float

        Arc sine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between -pi/2 and pi/2.

        val atan : float -> float

        Arc tangent. Result is in radians and is between -pi/2 and pi/2.

        val atan2 : float -> float -> float

        atan2 y x returns the arc tangent of y /. x. The signs of x and y are used to determine the quadrant of the result. Result is in radians and is between -pi and pi.

        val hypot : float -> float -> float

        hypot x y returns sqrt(x *. x + y *. y), that is, the length of the hypotenuse of a right-angled triangle with sides of length x and y, or, equivalently, the distance of the point (x,y) to origin. If one of x or y is infinite, returns infinity even if the other is nan.

        • since 4.00
        val cos : float -> float

        Cosine. Argument is in radians.

        val cosh : float -> float

        Hyperbolic cosine. Argument is in radians.

        val acosh : float -> float

        Hyperbolic arc cosine. The argument must fall within the range [1.0, inf]. Result is in radians and is between 0.0 and inf.

        • since 4.13
        val log : float -> float

        Natural logarithm.

        val log10 : float -> float

        Base 10 logarithm.

        val log1p : float -> float

        log1p x computes log(1.0 +. x) (natural logarithm), giving numerically-accurate results even if x is close to 0.0.

        • since 3.12
        val sin : float -> float

        Sine. Argument is in radians.

        val sinh : float -> float

        Hyperbolic sine. Argument is in radians.

        val asinh : float -> float

        Hyperbolic arc sine. The argument and result range over the entire real line. Result is in radians.

        • since 4.13
        val sqrt : float -> float

        Square root.

        val tan : float -> float

        Tangent. Argument is in radians.

        val tanh : float -> float

        Hyperbolic tangent. Argument is in radians.

        val atanh : float -> float

        Hyperbolic arc tangent. The argument must fall within the range [-1.0, 1.0]. Result is in radians and ranges over the entire real line.

        • since 4.13
        val ceil : float -> float

        Round above to an integer value. ceil f returns the least integer value greater than or equal to f. The result is returned as a float.

        val floor : float -> float

        Round below to an integer value. floor f returns the greatest integer value less than or equal to f. The result is returned as a float.

        val abs_float : float -> float

        abs_float f returns the absolute value of f.

        val copysign : float -> float -> float

        copysign x y returns a float whose absolute value is that of x and whose sign is that of y. If x is nan, returns nan. If y is nan, returns either x or -. x, but it is not specified which.

        • since 4.00
        val mod_float : float -> float -> float

        mod_float a b returns the remainder of a with respect to b. The returned value is a -. n *. b, where n is the quotient a /. b rounded towards zero to an integer.

        val frexp : float -> float * int

        frexp f returns the pair of the significant and the exponent of f. When f is zero, the significant x and the exponent n of f are equal to zero. When f is non-zero, they are defined by f = x *. 2 ** n and 0.5 <= x < 1.0.

        val ldexp : float -> int -> float

        ldexp x n returns x *. 2 ** n.

        val modf : float -> float * float

        modf f returns the pair of the fractional and integral part of f.

        val float : int -> float

        Same as Stdlib.float_of_int.

        val float_of_int : int -> float

        Convert an integer to floating-point.

        val truncate : float -> int

        Same as Stdlib.int_of_float.

        val int_of_float : float -> int

        Truncate the given floating-point number to an integer. The result is unspecified if the argument is nan or falls outside the range of representable integers.

        val infinity : float

        Positive infinity.

        val neg_infinity : float

        Negative infinity.

        val nan : float

        A special floating-point value denoting the result of an undefined operation such as 0.0 /. 0.0. Stands for 'not a number'. Any floating-point operation with nan as argument returns nan as result, unless otherwise specified in IEEE 754 standard. As for floating-point comparisons, =, <, <=, > and >= return false and <> returns true if one or both of their arguments is nan.

        nan is a quiet NaN since 5.1; it was a signaling NaN before.

        val max_float : float

        The largest positive finite value of type float.

        val min_float : float

        The smallest positive, non-zero, non-denormalized value of type float.

        val epsilon_float : float

        The difference between 1.0 and the smallest exactly representable floating-point number greater than 1.0.

        val classify_float : float -> Stdlib.fpclass

        Return the class of the given floating-point number: normal, subnormal, zero, infinite, or not a number.

        type fpclass = Stdlib.fpclass =
        1. | FP_normal
        2. | FP_subnormal
        3. | FP_zero
        4. | FP_infinite
        5. | FP_nan

        String operations

        More in Stdlib.String

        include sig ... end
        val (^) : string -> string -> string

        String concatenation. Right-associative operator, see Ocaml_operators for more information.

        • raises Invalid_argument

          if the result is longer then than Sys.max_string_length bytes.

        Character operations

        More in Stdlib.Char

        include sig ... end
        val int_of_char : char -> int

        Return the ASCII code of the argument.

        val char_of_int : int -> char

        Return the character with the given ASCII code.

        Unit operations

        include sig ... end
        val ignore : 'a -> unit

        Discard the value of its argument and return (). For instance, ignore(f x) discards the result of the side-effecting function f. It is equivalent to f x; (), except that the latter may generate a compiler warning; writing ignore(f x) instead avoids the warning.

        String conversion functions

        include sig ... end
        val string_of_bool : bool -> string

        Return the string representation of a boolean. As the returned values may be shared, the user should not modify them directly.

        val bool_of_string_opt : string -> bool option

        Convert the given string to a boolean.

        Return None if the string is not "true" or "false".

        • since 4.05
        val bool_of_string : string -> bool

        Same as Stdlib.bool_of_string_opt, but raise Invalid_argument "bool_of_string" instead of returning None.

        val string_of_int : int -> string

        Return the string representation of an integer, in decimal.

        val int_of_string_opt : string -> int option

        Convert the given string to an integer. The string is read in decimal (by default, or if the string begins with 0u), in hexadecimal (if it begins with 0x or 0X), in octal (if it begins with 0o or 0O), or in binary (if it begins with 0b or 0B).

        The 0u prefix reads the input as an unsigned integer in the range [0, 2*max_int+1]. If the input exceeds max_int it is converted to the signed integer min_int + input - max_int - 1.

        The _ (underscore) character can appear anywhere in the string and is ignored.

        Return None if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type int.

        • since 4.05
        val int_of_string : string -> int

        Same as Stdlib.int_of_string_opt, but raise Failure "int_of_string" instead of returning None.

        val string_of_float : float -> string

        Return a string representation of a floating-point number.

        This conversion can involve a loss of precision. For greater control over the manner in which the number is printed, see Printf.

        val float_of_string_opt : string -> float option

        Convert the given string to a float. The string is read in decimal (by default) or in hexadecimal (marked by 0x or 0X).

        The format of decimal floating-point numbers is [-] dd.ddd (e|E) [+|-] dd , where d stands for a decimal digit.

        The format of hexadecimal floating-point numbers is [-] 0(x|X) hh.hhh (p|P) [+|-] dd , where h stands for an hexadecimal digit and d for a decimal digit.

        In both cases, at least one of the integer and fractional parts must be given; the exponent part is optional.

        The _ (underscore) character can appear anywhere in the string and is ignored.

        Depending on the execution platforms, other representations of floating-point numbers can be accepted, but should not be relied upon.

        Return None if the given string is not a valid representation of a float.

        • since 4.05
        val float_of_string : string -> float

        Same as Stdlib.float_of_string_opt, but raise Failure "float_of_string" instead of returning None.

        Pair operations

        include sig ... end
        val fst : ('a * 'b) -> 'a

        Return the first component of a pair.

        val snd : ('a * 'b) -> 'b

        Return the second component of a pair.

        Character operations

        More in Stdlib.List

        include sig ... end
        val (@) : 'a list -> 'a list -> 'a list

        l0 @ l1 appends l1 to l0. Same function as List.append. Right-associative operator, see Ocaml_operators for more information.

        • since 5.1 this function is tail-recursive.
        • alert list_op List operations are not permitted

        I/O operations

        This is regular, unmocked, IO.

        type in_channel = Stdlib.in_channel
        • alert input_output Input/output is not permitted
        type out_channel = Stdlib.out_channel
        • alert input_output Input/output is not permitted
        type open_flag = Stdlib.open_flag =
        1. | Open_rdonly
        2. | Open_wronly
        3. | Open_append
        4. | Open_creat
        5. | Open_trunc
        6. | Open_excl
        7. | Open_binary
        8. | Open_text
        9. | Open_nonblock
        • alert input_output Input/output is not permitted
        include sig ... end
        val stdin : in_channel

        The standard input for the process.

        • alert input_output Input/output is not permitted
        val stdout : out_channel

        The standard output for the process.

        • alert input_output Input/output is not permitted
        val stderr : out_channel

        The standard error output for the process.

        • alert input_output Input/output is not permitted
        val print_char : char -> unit

        Print a character on standard output.

        • alert input_output Input/output is not permitted
        val print_string : string -> unit

        Print a string on standard output.

        • alert input_output Input/output is not permitted
        val print_bytes : bytes -> unit

        Print a byte sequence on standard output.

        • since 4.02
        • alert input_output Input/output is not permitted
        val print_int : int -> unit

        Print an integer, in decimal, on standard output.

        • alert input_output Input/output is not permitted
        val print_float : float -> unit

        Print a floating-point number, in decimal, on standard output.

        The conversion of the number to a string uses string_of_float and can involve a loss of precision.

        • alert input_output Input/output is not permitted
        val print_endline : string -> unit

        Print a string, followed by a newline character, on standard output and flush standard output.

        • alert input_output Input/output is not permitted
        val print_newline : unit -> unit

        Print a newline character on standard output, and flush standard output. This can be used to simulate line buffering of standard output.

        • alert input_output Input/output is not permitted
        val prerr_char : char -> unit

        Print a character on standard error.

        • alert input_output Input/output is not permitted
        val prerr_string : string -> unit

        Print a string on standard error.

        • alert input_output Input/output is not permitted
        val prerr_bytes : bytes -> unit

        Print a byte sequence on standard error.

        • since 4.02
        • alert input_output Input/output is not permitted
        val prerr_int : int -> unit

        Print an integer, in decimal, on standard error.

        • alert input_output Input/output is not permitted
        val prerr_float : float -> unit

        Print a floating-point number, in decimal, on standard error.

        The conversion of the number to a string uses string_of_float and can involve a loss of precision.

        • alert input_output Input/output is not permitted
        val prerr_endline : string -> unit

        Print a string, followed by a newline character on standard error and flush standard error.

        • alert input_output Input/output is not permitted
        val prerr_newline : unit -> unit

        Print a newline character on standard error, and flush standard error.

        • alert input_output Input/output is not permitted
        val read_line : unit -> string

        Flush standard output, then read characters from standard input until a newline character is encountered.

        Return the string of all characters read, without the newline character at the end.

        • raises End_of_file

          if the end of the file is reached at the beginning of line.

        • alert input_output Input/output is not permitted
        val read_int_opt : unit -> int option

        Flush standard output, then read one line from standard input and convert it to an integer.

        Return None if the line read is not a valid representation of an integer.

        • since 4.05
        • alert input_output Input/output is not permitted
        val read_int : unit -> int

        Same as Stdlib.read_int_opt, but raise Failure "int_of_string" instead of returning None.

        • alert input_output Input/output is not permitted
        val read_float_opt : unit -> float option

        Flush standard output, then read one line from standard input and convert it to a floating-point number.

        Return None if the line read is not a valid representation of a floating-point number.

        • since 4.05
        • alert input_output Input/output is not permitted
        val read_float : unit -> float

        Same as Stdlib.read_float_opt, but raise Failure "float_of_string" instead of returning None.

        • alert input_output Input/output is not permitted
        val open_out : string -> out_channel

        Open the named file for writing, and return a new output channel on that file, positioned at the beginning of the file. The file is truncated to zero length if it already exists. It is created if it does not already exists.

        • alert input_output Input/output is not permitted
        val open_out_bin : string -> out_channel

        Same as Stdlib.open_out, but the file is opened in binary mode, so that no translation takes place during writes. On operating systems that do not distinguish between text mode and binary mode, this function behaves like Stdlib.open_out.

        • alert input_output Input/output is not permitted
        val open_out_gen : open_flag list -> int -> string -> out_channel

        open_out_gen mode perm filename opens the named file for writing, as described above. The extra argument mode specifies the opening mode. The extra argument perm specifies the file permissions, in case the file must be created. Stdlib.open_out and Stdlib.open_out_bin are special cases of this function.

        • alert input_output Input/output is not permitted
        val flush : out_channel -> unit

        Flush the buffer associated with the given output channel, performing all pending writes on that channel. Interactive programs must be careful about flushing standard output and standard error at the right time.

        • alert input_output Input/output is not permitted
        val flush_all : unit -> unit

        Flush all open output channels; ignore errors.

        • alert input_output Input/output is not permitted
        val output_char : out_channel -> char -> unit

        Write the character on the given output channel.

        • alert input_output Input/output is not permitted
        val output_string : out_channel -> string -> unit

        Write the string on the given output channel.

        • alert input_output Input/output is not permitted
        val output_bytes : out_channel -> bytes -> unit

        Write the byte sequence on the given output channel.

        • since 4.02
        • alert input_output Input/output is not permitted
        val output : out_channel -> bytes -> int -> int -> unit

        output oc buf pos len writes len characters from byte sequence buf, starting at offset pos, to the given output channel oc.

        • alert input_output Input/output is not permitted
        val output_substring : out_channel -> string -> int -> int -> unit

        Same as output but take a string as argument instead of a byte sequence.

        • since 4.02
        • alert input_output Input/output is not permitted
        val output_byte : out_channel -> int -> unit

        Write one 8-bit integer (as the single character with that code) on the given output channel. The given integer is taken modulo 256.

        • alert input_output Input/output is not permitted
        val output_binary_int : out_channel -> int -> unit

        Write one integer in binary format (4 bytes, big-endian) on the given output channel. The given integer is taken modulo 232. The only reliable way to read it back is through the Stdlib.input_binary_int function. The format is compatible across all machines for a given version of OCaml.

        • alert input_output Input/output is not permitted
        val output_value : out_channel -> 'a -> unit

        Write the representation of a structured value of any type to a channel. Circularities and sharing inside the value are detected and preserved. The object can be read back, by the function Stdlib.input_value. See the description of module Marshal for more information. Stdlib.output_value is equivalent to Marshal.to_channel with an empty list of flags.

        • alert input_output Input/output is not permitted
        val seek_out : out_channel -> int -> unit

        seek_out chan pos sets the current writing position to pos for channel chan. This works only for regular files. On files of other kinds (such as terminals, pipes and sockets), the behavior is unspecified.

        • alert input_output Input/output is not permitted
        val pos_out : out_channel -> int

        Return the current writing position for the given channel. Does not work on channels opened with the Open_append flag (returns unspecified results). For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos_out, then going back to this position using seek_out will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

        • alert input_output Input/output is not permitted
        val out_channel_length : out_channel -> int

        Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless.

        • alert input_output Input/output is not permitted
        val close_out : out_channel -> unit

        Close the given channel, flushing all buffered write operations. Output functions raise a Sys_error exception when they are applied to a closed output channel, except close_out and flush, which do nothing when applied to an already closed channel. Note that close_out may raise Sys_error if the operating system signals an error when flushing or closing.

        • alert input_output Input/output is not permitted
        val close_out_noerr : out_channel -> unit

        Same as close_out, but ignore all errors.

        • alert input_output Input/output is not permitted
        val set_binary_mode_out : out_channel -> bool -> unit

        set_binary_mode_out oc true sets the channel oc to binary mode: no translations take place during output. set_binary_mode_out oc false sets the channel oc to text mode: depending on the operating system, some translations may take place during output. For instance, under Windows, end-of-lines will be translated from \n to \r\n. This function has no effect under operating systems that do not distinguish between text mode and binary mode.

        • alert input_output Input/output is not permitted
        val open_in : string -> in_channel

        Open the named file for reading, and return a new input channel on that file, positioned at the beginning of the file.

        • alert input_output Input/output is not permitted
        val open_in_bin : string -> in_channel

        Same as Stdlib.open_in, but the file is opened in binary mode, so that no translation takes place during reads. On operating systems that do not distinguish between text mode and binary mode, this function behaves like Stdlib.open_in.

        • alert input_output Input/output is not permitted
        val open_in_gen : open_flag list -> int -> string -> in_channel

        open_in_gen mode perm filename opens the named file for reading, as described above. The extra arguments mode and perm specify the opening mode and file permissions. Stdlib.open_in and Stdlib.open_in_bin are special cases of this function.

        • alert input_output Input/output is not permitted
        val input_char : in_channel -> char

        Read one character from the given input channel.

        • raises End_of_file

          if there are no more characters to read.

        • alert input_output Input/output is not permitted
        val input_line : in_channel -> string

        Read characters from the given input channel, until a newline character is encountered. Return the string of all characters read, without the newline character at the end.

        • raises End_of_file

          if the end of the file is reached at the beginning of line.

        • alert input_output Input/output is not permitted
        val input : in_channel -> bytes -> int -> int -> int

        input ic buf pos len reads up to len characters from the given channel ic, storing them in byte sequence buf, starting at character number pos. It returns the actual number of characters read, between 0 and len (inclusive). A return value of 0 means that the end of file was reached. A return value between 0 and len exclusive means that not all requested len characters were read, either because no more characters were available at that time, or because the implementation found it convenient to do a partial read; input must be called again to read the remaining characters, if desired. (See also Stdlib.really_input for reading exactly len characters.) Exception Invalid_argument "input" is raised if pos and len do not designate a valid range of buf.

        • alert input_output Input/output is not permitted
        val really_input : in_channel -> bytes -> int -> int -> unit

        really_input ic buf pos len reads len characters from channel ic, storing them in byte sequence buf, starting at character number pos.

        • raises End_of_file

          if the end of file is reached before len characters have been read.

        • alert input_output Input/output is not permitted
        val really_input_string : in_channel -> int -> string

        really_input_string ic len reads len characters from channel ic and returns them in a new string.

        • raises End_of_file

          if the end of file is reached before len characters have been read.

        • since 4.02
        • alert input_output Input/output is not permitted
        val input_byte : in_channel -> int

        Same as Stdlib.input_char, but return the 8-bit integer representing the character.

        • alert input_output Input/output is not permitted
        val input_binary_int : in_channel -> int

        Read an integer encoded in binary format (4 bytes, big-endian) from the given input channel. See Stdlib.output_binary_int.

        • raises End_of_file

          if the end of file was reached while reading the integer.

        • alert input_output Input/output is not permitted
        val input_value : in_channel -> 'a

        Read the representation of a structured value, as produced by Stdlib.output_value, and return the corresponding value. This function is identical to Marshal.from_channel; see the description of module Marshal for more information, in particular concerning the lack of type safety.

        • alert input_output Input/output is not permitted
        val seek_in : in_channel -> int -> unit

        seek_in chan pos sets the current reading position to pos for channel chan. This works only for regular files. On files of other kinds, the behavior is unspecified.

        • alert input_output Input/output is not permitted
        val pos_in : in_channel -> int

        Return the current reading position for the given channel. For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos_in, then going back to this position using seek_in will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

        • alert input_output Input/output is not permitted
        val in_channel_length : in_channel -> int

        Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless. The returned size does not take into account the end-of-line translations that can be performed when reading from a channel opened in text mode.

        • alert input_output Input/output is not permitted
        val close_in : in_channel -> unit

        Close the given channel. Input functions raise a Sys_error exception when they are applied to a closed input channel, except close_in, which does nothing when applied to an already closed channel.

        • alert input_output Input/output is not permitted
        val close_in_noerr : in_channel -> unit

        Same as close_in, but ignore all errors.

        • alert input_output Input/output is not permitted
        val set_binary_mode_in : in_channel -> bool -> unit

        set_binary_mode_in ic true sets the channel ic to binary mode: no translations take place during input. set_binary_mode_out ic false sets the channel ic to text mode: depending on the operating system, some translations may take place during input. For instance, under Windows, end-of-lines will be translated from \r\n to \n. This function has no effect under operating systems that do not distinguish between text mode and binary mode.

        • alert input_output Input/output is not permitted
        module LargeFile : sig ... end

        Operations on large files. This sub-module provides 64-bit variants of the channel functions that manipulate file positions and file sizes. By representing positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), these alternate functions allow operating on files whose sizes are greater than max_int.

        References

        type 'a ref = 'a Stdlib.ref
        include sig ... end
        val ref : 'a -> 'a ref

        Return a fresh reference containing the given value.

        • alert impure References are not permitted
        val (!) : 'a ref -> 'a

        !r returns the current contents of reference r. Equivalent to fun r -> r.contents. Unary operator, see Ocaml_operators for more information.

        • alert impure References are not permitted
        val (:=) : 'a ref -> 'a -> unit

        r := a stores the value of a in reference r. Equivalent to fun r v -> r.contents <- v. Right-associative operator, see Ocaml_operators for more information.

        • alert impure References are not permitted
        val incr : int ref -> unit

        Increment the integer contained in the given reference. Equivalent to fun r -> r := succ !r.

        • alert impure References are not permitted
        val decr : int ref -> unit

        Decrement the integer contained in the given reference. Equivalent to fun r -> r := pred !r.

        • alert impure References are not permitted

        Result type

        More in Stdlib.Result

        type ('a, 'b) result = ('a, 'b) Stdlib.result =
        1. | Ok of 'a
        2. | Error of 'b

        Format strings

        More in Stdlib.Scanf, Stdlib.Printf, and Stdlib.Format

        include sig ... end
        type ('a, 'b, 'c, 'd, 'e, 'f) format6 = +Stdlib_alerting (less-power.Stdlib_alerts.Stdlib_alerting)

        Module Stdlib_alerts.Stdlib_alerting

        Stdlib, but with the above module type.

        Derived from Stdlib, but with items that can be restricted annotated with alerts.

        Things that can be restricted are marked with an ⚠️ Alert. Not everything marked here is disabled by default though. See Stdlib_alerts for the defaults.

        raise primitives and standard exceptions

        include sig ... end
        val raise : exn -> 'a

        Raise the given exception value

        val raise_notrace : exn -> 'a

        A faster version raise which does not record the backtrace.

        • since 4.02
        val failwith : string -> 'a

        Raise exception Failure with the given string.

        val invalid_arg : string -> 'a

        Raise exception Invalid_argument with the given string.

        exception Exit

        The Exit exception is not raised by any library function. It is provided for use in your programs.

        exception Match_failure of string * int * int

        Exception raised when none of the cases of a pattern-matching apply. The arguments are the location of the match keyword in the source code (file name, line number, column number).

        exception Assert_failure of string * int * int

        Exception raised when an assertion fails. The arguments are the location of the assert keyword in the source code (file name, line number, column number).

        exception Invalid_argument of string

        Exception raised by library functions to signal that the given arguments do not make sense. The string gives some information to the programmer. As a general rule, this exception should not be caught, it denotes a programming error and the code should be modified not to trigger it.

        exception Failure of string

        Exception raised by library functions to signal that they are undefined on the given arguments. The string is meant to give some information to the programmer; you must not pattern match on the string literal because it may change in future versions (use Failure _ instead).

        exception Not_found

        Exception raised by search functions when the desired object could not be found.

        exception Out_of_memory

        Exception raised by the garbage collector when there is insufficient memory to complete the computation. (Not reliable for allocations on the minor heap.)

        exception Stack_overflow

        Exception raised by the bytecode interpreter when the evaluation stack reaches its maximal size. This often indicates infinite or excessively deep recursion in the user's program.

        Before 4.10, it was not fully implemented by the native-code compiler.

        exception Sys_error of string

        Exception raised by the input/output functions to report an operating system error. The string is meant to give some information to the programmer; you must not pattern match on the string literal because it may change in future versions (use Sys_error _ instead).

        exception End_of_file

        Exception raised by input functions to signal that the end of file has been reached.

        exception Division_by_zero

        Exception raised by integer division and remainder operations when their second argument is zero.

        exception Sys_blocked_io

        A special case of Sys_error raised when no I/O is possible on a non-blocking I/O channel.

        exception Undefined_recursive_module of string * int * int

        Exception raised when an ill-founded recursive module definition is evaluated. The arguments are the location of the definition in the source code (file name, line number, column number).

        Polymorphic comparisons

        Not including the impure (==) and (!=).

        include sig ... end
        val (=) : 'a -> 'a -> bool

        e1 = e2 tests for structural equality of e1 and e2. Mutable structures (e.g. references and arrays) are equal if and only if their current contents are structurally equal, even if the two mutable objects are not the same physical object. Equality between functional values raises Invalid_argument. Equality between cyclic data structures may not terminate. Left-associative operator, see Ocaml_operators for more information.

        val (<>) : 'a -> 'a -> bool

        Negation of Stdlib.(=). Left-associative operator, see Ocaml_operators for more information.

        val (<) : 'a -> 'a -> bool

        See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

        val (>) : 'a -> 'a -> bool

        See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

        val (<=) : 'a -> 'a -> bool

        See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

        val (>=) : 'a -> 'a -> bool

        Structural ordering functions. These functions coincide with the usual orderings over integers, characters, strings, byte sequences and floating-point numbers, and extend them to a total ordering over all types. The ordering is compatible with ( = ). As in the case of ( = ), mutable structures are compared by contents. Comparison between functional values raises Invalid_argument. Comparison between cyclic structures may not terminate. Left-associative operator, see Ocaml_operators for more information.

        val compare : 'a -> 'a -> int

        compare x y returns 0 if x is equal to y, a negative integer if x is less than y, and a positive integer if x is greater than y. The ordering implemented by compare is compatible with the comparison predicates =, < and > defined above, with one difference on the treatment of the float value Stdlib.nan. Namely, the comparison predicates treat nan as different from any other float value, including itself; while compare treats nan as equal to itself and less than any other float value. This treatment of nan ensures that compare defines a total ordering relation.

        compare applied to functional values may raise Invalid_argument. compare applied to cyclic structures may not terminate.

        The compare function can be used as the comparison function required by the Set.Make and Map.Make functors, as well as the List.sort and Array.sort functions.

        val min : 'a -> 'a -> 'a

        Return the smaller of the two arguments. The result is unspecified if one of the arguments contains the float value nan.

        val max : 'a -> 'a -> 'a

        Return the greater of the two arguments. The result is unspecified if one of the arguments contains the float value nan.

        Physical comparisons

        The impure (==) and (!=)

        include sig ... end
        val (==) : 'a -> 'a -> bool

        e1 == e2 tests for physical equality of e1 and e2. On mutable types such as references, arrays, byte sequences, records with mutable fields and objects with mutable instance variables, e1 == e2 is true if and only if physical modification of e1 also affects e2. On non-mutable types, the behavior of ( == ) is implementation-dependent; however, it is guaranteed that e1 == e2 implies compare e1 e2 = 0. Left-associative operator, see Ocaml_operators for more information.

        • alert physical_eq Physical comparisons are not permitted. Hint: did you mean = ?
        val (!=) : 'a -> 'a -> bool

        Negation of Stdlib.(==). Left-associative operator, see Ocaml_operators for more information.

        • alert physical_eq Physical comparisons are not permitted. Hint: did you mean <> ?

        Boolean operations

        include sig ... end
        val not : bool -> bool

        The boolean negation.

        val (&&) : bool -> bool -> bool

        The boolean 'and'. Evaluation is sequential, left-to-right: in e1 && e2, e1 is evaluated first, and if it returns false, e2 is not evaluated at all. Right-associative operator, see Ocaml_operators for more information.

        val (||) : bool -> bool -> bool

        The boolean 'or'. Evaluation is sequential, left-to-right: in e1 || e2, e1 is evaluated first, and if it returns true, e2 is not evaluated at all. Right-associative operator, see Ocaml_operators for more information.

        Debugging macros

        These are safe in the sense that referential transparency is preserved, if two uses of a macro at separate locations are considered separate occurrences.

        include sig ... end
        val __LOC__ : string

        __LOC__ returns the location at which this expression appears in the file currently being parsed by the compiler, with the standard error format of OCaml: "File %S, line %d, characters %d-%d".

        • since 4.02
        • alert debug_macro Debugging macros are not permitted
        val __FILE__ : string

        __FILE__ returns the name of the file currently being parsed by the compiler.

        • since 4.02
        • alert debug_macro Debugging macros are not permitted
        val __LINE__ : int

        __LINE__ returns the line number at which this expression appears in the file currently being parsed by the compiler.

        • since 4.02
        • alert debug_macro Debugging macros are not permitted
        val __MODULE__ : string

        __MODULE__ returns the module name of the file being parsed by the compiler.

        • since 4.02
        • alert debug_macro Debugging macros are not permitted
        val __POS__ : string * int * int * int

        __POS__ returns a tuple (file,lnum,cnum,enum), corresponding to the location at which this expression appears in the file currently being parsed by the compiler. file is the current filename, lnum the line number, cnum the character position in the line and enum the last character position in the line.

        • since 4.02
        • alert debug_macro Debugging macros are not permitted
        val __FUNCTION__ : string

        __FUNCTION__ returns the name of the current function or method, including any enclosing modules or classes.

        • since 4.12
        • alert debug_macro Debugging macros are not permitted
        val __LOC_OF__ : 'a -> string * 'a

        __LOC_OF__ expr returns a pair (loc, expr) where loc is the location of expr in the file currently being parsed by the compiler, with the standard error format of OCaml: "File %S, line %d, characters %d-%d".

        • since 4.02
        • alert debug_macro Debugging macros are not permitted
        val __LINE_OF__ : 'a -> int * 'a

        __LINE_OF__ expr returns a pair (line, expr), where line is the line number at which the expression expr appears in the file currently being parsed by the compiler.

        • since 4.02
        • alert debug_macro Debugging macros are not permitted
        val __POS_OF__ : 'a -> (string * int * int * int) * 'a

        __POS_OF__ expr returns a pair (loc,expr), where loc is a tuple (file,lnum,cnum,enum) corresponding to the location at which the expression expr appears in the file currently being parsed by the compiler. file is the current filename, lnum the line number, cnum the character position in the line and enum the last character position in the line.

        • since 4.02
        • alert debug_macro Debugging macros are not permitted

        Composition operators

        include sig ... end
        val (|>) : 'a -> ('a -> 'b) -> 'b

        Reverse-application operator: x |> f |> g is exactly equivalent to g (f (x)). Left-associative operator, see Ocaml_operators for more information.

        • since 4.01
        val (@@) : ('a -> 'b) -> 'a -> 'b

        Application operator: g @@ f @@ x is exactly equivalent to g (f (x)). Right-associative operator, see Ocaml_operators for more information.

        • since 4.01

        Integer operations

        include sig ... end
        val (~-) : int -> int

        Unary negation. You can also write - e instead of ~- e. Unary operator, see Ocaml_operators for more information.

        val (~+) : int -> int

        Unary addition. You can also write + e instead of ~+ e. Unary operator, see Ocaml_operators for more information.

        • since 3.12
        val succ : int -> int

        succ x is x + 1.

        val pred : int -> int

        pred x is x - 1.

        val (+) : int -> int -> int

        Integer addition. Left-associative operator, see Ocaml_operators for more information.

        val (-) : int -> int -> int

        Integer subtraction. Left-associative operator, , see Ocaml_operators for more information.

        val (*) : int -> int -> int

        Integer multiplication. Left-associative operator, see Ocaml_operators for more information.

        val (/) : int -> int -> int

        Integer division. Integer division rounds the real quotient of its arguments towards zero. More precisely, if x >= 0 and y > 0, x / y is the greatest integer less than or equal to the real quotient of x by y. Moreover, (- x) / y = x / (- y) = - (x / y). Left-associative operator, see Ocaml_operators for more information.

        val (mod) : int -> int -> int

        Integer remainder. If y is not zero, the result of x mod y satisfies the following properties: x = (x / y) * y + x mod y and abs(x mod y) <= abs(y) - 1. If y = 0, x mod y raises Division_by_zero. Note that x mod y is negative only if x < 0. Left-associative operator, see Ocaml_operators for more information.

        val abs : int -> int

        abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

        val (land) : int -> int -> int

        Bitwise logical and. Left-associative operator, see Ocaml_operators for more information.

        val (lor) : int -> int -> int

        Bitwise logical or. Left-associative operator, see Ocaml_operators for more information.

        val (lxor) : int -> int -> int

        Bitwise logical exclusive or. Left-associative operator, see Ocaml_operators for more information.

        val lnot : int -> int

        Bitwise logical negation.

        val (lsl) : int -> int -> int

        n lsl m shifts n to the left by m bits. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

        val (lsr) : int -> int -> int

        n lsr m shifts n to the right by m bits. This is a logical shift: zeroes are inserted regardless of the sign of n. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

        val (asr) : int -> int -> int

        n asr m shifts n to the right by m bits. This is an arithmetic shift: the sign bit of n is replicated. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

        val max_int : int

        The greatest representable integer.

        val min_int : int

        The smallest representable integer.

        Floating-point operations

        include sig ... end
        val (~-.) : float -> float

        Unary negation. You can also write -. e instead of ~-. e. Unary operator, see Ocaml_operators for more information.

        val (~+.) : float -> float

        Unary addition. You can also write +. e instead of ~+. e. Unary operator, see Ocaml_operators for more information.

        • since 3.12
        val (+.) : float -> float -> float

        Floating-point addition. Left-associative operator, see Ocaml_operators for more information.

        val (-.) : float -> float -> float

        Floating-point subtraction. Left-associative operator, see Ocaml_operators for more information.

        val (*.) : float -> float -> float

        Floating-point multiplication. Left-associative operator, see Ocaml_operators for more information.

        val (/.) : float -> float -> float

        Floating-point division. Left-associative operator, see Ocaml_operators for more information.

        val (**) : float -> float -> float

        Exponentiation. Right-associative operator, see Ocaml_operators for more information.

        val exp : float -> float

        Exponential.

        val expm1 : float -> float

        expm1 x computes exp x -. 1.0, giving numerically-accurate results even if x is close to 0.0.

        • since 3.12
        val acos : float -> float

        Arc cosine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between 0.0 and pi.

        val asin : float -> float

        Arc sine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between -pi/2 and pi/2.

        val atan : float -> float

        Arc tangent. Result is in radians and is between -pi/2 and pi/2.

        val atan2 : float -> float -> float

        atan2 y x returns the arc tangent of y /. x. The signs of x and y are used to determine the quadrant of the result. Result is in radians and is between -pi and pi.

        val hypot : float -> float -> float

        hypot x y returns sqrt(x *. x + y *. y), that is, the length of the hypotenuse of a right-angled triangle with sides of length x and y, or, equivalently, the distance of the point (x,y) to origin. If one of x or y is infinite, returns infinity even if the other is nan.

        • since 4.00
        val cos : float -> float

        Cosine. Argument is in radians.

        val cosh : float -> float

        Hyperbolic cosine. Argument is in radians.

        val acosh : float -> float

        Hyperbolic arc cosine. The argument must fall within the range [1.0, inf]. Result is in radians and is between 0.0 and inf.

        • since 4.13
        val log : float -> float

        Natural logarithm.

        val log10 : float -> float

        Base 10 logarithm.

        val log1p : float -> float

        log1p x computes log(1.0 +. x) (natural logarithm), giving numerically-accurate results even if x is close to 0.0.

        • since 3.12
        val sin : float -> float

        Sine. Argument is in radians.

        val sinh : float -> float

        Hyperbolic sine. Argument is in radians.

        val asinh : float -> float

        Hyperbolic arc sine. The argument and result range over the entire real line. Result is in radians.

        • since 4.13
        val sqrt : float -> float

        Square root.

        val tan : float -> float

        Tangent. Argument is in radians.

        val tanh : float -> float

        Hyperbolic tangent. Argument is in radians.

        val atanh : float -> float

        Hyperbolic arc tangent. The argument must fall within the range [-1.0, 1.0]. Result is in radians and ranges over the entire real line.

        • since 4.13
        val ceil : float -> float

        Round above to an integer value. ceil f returns the least integer value greater than or equal to f. The result is returned as a float.

        val floor : float -> float

        Round below to an integer value. floor f returns the greatest integer value less than or equal to f. The result is returned as a float.

        val abs_float : float -> float

        abs_float f returns the absolute value of f.

        val copysign : float -> float -> float

        copysign x y returns a float whose absolute value is that of x and whose sign is that of y. If x is nan, returns nan. If y is nan, returns either x or -. x, but it is not specified which.

        • since 4.00
        val mod_float : float -> float -> float

        mod_float a b returns the remainder of a with respect to b. The returned value is a -. n *. b, where n is the quotient a /. b rounded towards zero to an integer.

        val frexp : float -> float * int

        frexp f returns the pair of the significant and the exponent of f. When f is zero, the significant x and the exponent n of f are equal to zero. When f is non-zero, they are defined by f = x *. 2 ** n and 0.5 <= x < 1.0.

        val ldexp : float -> int -> float

        ldexp x n returns x *. 2 ** n.

        val modf : float -> float * float

        modf f returns the pair of the fractional and integral part of f.

        val float : int -> float

        Same as Stdlib.float_of_int.

        val float_of_int : int -> float

        Convert an integer to floating-point.

        val truncate : float -> int

        Same as Stdlib.int_of_float.

        val int_of_float : float -> int

        Truncate the given floating-point number to an integer. The result is unspecified if the argument is nan or falls outside the range of representable integers.

        val infinity : float

        Positive infinity.

        val neg_infinity : float

        Negative infinity.

        val nan : float

        A special floating-point value denoting the result of an undefined operation such as 0.0 /. 0.0. Stands for 'not a number'. Any floating-point operation with nan as argument returns nan as result, unless otherwise specified in IEEE 754 standard. As for floating-point comparisons, =, <, <=, > and >= return false and <> returns true if one or both of their arguments is nan.

        nan is a quiet NaN since 5.1; it was a signaling NaN before.

        val max_float : float

        The largest positive finite value of type float.

        val min_float : float

        The smallest positive, non-zero, non-denormalized value of type float.

        val epsilon_float : float

        The difference between 1.0 and the smallest exactly representable floating-point number greater than 1.0.

        val classify_float : float -> Stdlib.fpclass

        Return the class of the given floating-point number: normal, subnormal, zero, infinite, or not a number.

        type fpclass = Stdlib.fpclass =
        1. | FP_normal
        2. | FP_subnormal
        3. | FP_zero
        4. | FP_infinite
        5. | FP_nan

        String operations

        More in Stdlib.String

        include sig ... end
        val (^) : string -> string -> string

        String concatenation. Right-associative operator, see Ocaml_operators for more information.

        • raises Invalid_argument

          if the result is longer then than Sys.max_string_length bytes.

        Character operations

        More in Stdlib.Char

        include sig ... end
        val int_of_char : char -> int

        Return the ASCII code of the argument.

        val char_of_int : int -> char

        Return the character with the given ASCII code.

        Unit operations

        include sig ... end
        val ignore : 'a -> unit

        Discard the value of its argument and return (). For instance, ignore(f x) discards the result of the side-effecting function f. It is equivalent to f x; (), except that the latter may generate a compiler warning; writing ignore(f x) instead avoids the warning.

        String conversion functions

        include sig ... end
        val string_of_bool : bool -> string

        Return the string representation of a boolean. As the returned values may be shared, the user should not modify them directly.

        val bool_of_string_opt : string -> bool option

        Convert the given string to a boolean.

        Return None if the string is not "true" or "false".

        • since 4.05
        val bool_of_string : string -> bool

        Same as Stdlib.bool_of_string_opt, but raise Invalid_argument "bool_of_string" instead of returning None.

        val string_of_int : int -> string

        Return the string representation of an integer, in decimal.

        val int_of_string_opt : string -> int option

        Convert the given string to an integer. The string is read in decimal (by default, or if the string begins with 0u), in hexadecimal (if it begins with 0x or 0X), in octal (if it begins with 0o or 0O), or in binary (if it begins with 0b or 0B).

        The 0u prefix reads the input as an unsigned integer in the range [0, 2*max_int+1]. If the input exceeds max_int it is converted to the signed integer min_int + input - max_int - 1.

        The _ (underscore) character can appear anywhere in the string and is ignored.

        Return None if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type int.

        • since 4.05
        val int_of_string : string -> int

        Same as Stdlib.int_of_string_opt, but raise Failure "int_of_string" instead of returning None.

        val string_of_float : float -> string

        Return a string representation of a floating-point number.

        This conversion can involve a loss of precision. For greater control over the manner in which the number is printed, see Printf.

        val float_of_string_opt : string -> float option

        Convert the given string to a float. The string is read in decimal (by default) or in hexadecimal (marked by 0x or 0X).

        The format of decimal floating-point numbers is [-] dd.ddd (e|E) [+|-] dd , where d stands for a decimal digit.

        The format of hexadecimal floating-point numbers is [-] 0(x|X) hh.hhh (p|P) [+|-] dd , where h stands for an hexadecimal digit and d for a decimal digit.

        In both cases, at least one of the integer and fractional parts must be given; the exponent part is optional.

        The _ (underscore) character can appear anywhere in the string and is ignored.

        Depending on the execution platforms, other representations of floating-point numbers can be accepted, but should not be relied upon.

        Return None if the given string is not a valid representation of a float.

        • since 4.05
        val float_of_string : string -> float

        Same as Stdlib.float_of_string_opt, but raise Failure "float_of_string" instead of returning None.

        Pair operations

        include sig ... end
        val fst : ('a * 'b) -> 'a

        Return the first component of a pair.

        val snd : ('a * 'b) -> 'b

        Return the second component of a pair.

        Character operations

        More in Stdlib.List

        include sig ... end
        val (@) : 'a list -> 'a list -> 'a list

        l0 @ l1 appends l1 to l0. Same function as List.append. Right-associative operator, see Ocaml_operators for more information.

        • since 5.1 this function is tail-recursive.
        • alert list_op List operations are not permitted

        I/O operations

        This is regular, unmocked, IO.

        type in_channel = Stdlib.in_channel
        • alert input_output Input/output is not permitted
        type out_channel = Stdlib.out_channel
        • alert input_output Input/output is not permitted
        type open_flag = Stdlib.open_flag =
        1. | Open_rdonly
        2. | Open_wronly
        3. | Open_append
        4. | Open_creat
        5. | Open_trunc
        6. | Open_excl
        7. | Open_binary
        8. | Open_text
        9. | Open_nonblock
        • alert input_output Input/output is not permitted
        include sig ... end
        val stdin : in_channel

        The standard input for the process.

        • alert input_output Input/output is not permitted
        val stdout : out_channel

        The standard output for the process.

        • alert input_output Input/output is not permitted
        val stderr : out_channel

        The standard error output for the process.

        • alert input_output Input/output is not permitted
        val print_char : char -> unit

        Print a character on standard output.

        • alert input_output Input/output is not permitted
        val print_string : string -> unit

        Print a string on standard output.

        • alert input_output Input/output is not permitted
        val print_bytes : bytes -> unit

        Print a byte sequence on standard output.

        • since 4.02
        • alert input_output Input/output is not permitted
        val print_int : int -> unit

        Print an integer, in decimal, on standard output.

        • alert input_output Input/output is not permitted
        val print_float : float -> unit

        Print a floating-point number, in decimal, on standard output.

        The conversion of the number to a string uses string_of_float and can involve a loss of precision.

        • alert input_output Input/output is not permitted
        val print_endline : string -> unit

        Print a string, followed by a newline character, on standard output and flush standard output.

        • alert input_output Input/output is not permitted
        val print_newline : unit -> unit

        Print a newline character on standard output, and flush standard output. This can be used to simulate line buffering of standard output.

        • alert input_output Input/output is not permitted
        val prerr_char : char -> unit

        Print a character on standard error.

        • alert input_output Input/output is not permitted
        val prerr_string : string -> unit

        Print a string on standard error.

        • alert input_output Input/output is not permitted
        val prerr_bytes : bytes -> unit

        Print a byte sequence on standard error.

        • since 4.02
        • alert input_output Input/output is not permitted
        val prerr_int : int -> unit

        Print an integer, in decimal, on standard error.

        • alert input_output Input/output is not permitted
        val prerr_float : float -> unit

        Print a floating-point number, in decimal, on standard error.

        The conversion of the number to a string uses string_of_float and can involve a loss of precision.

        • alert input_output Input/output is not permitted
        val prerr_endline : string -> unit

        Print a string, followed by a newline character on standard error and flush standard error.

        • alert input_output Input/output is not permitted
        val prerr_newline : unit -> unit

        Print a newline character on standard error, and flush standard error.

        • alert input_output Input/output is not permitted
        val read_line : unit -> string

        Flush standard output, then read characters from standard input until a newline character is encountered.

        Return the string of all characters read, without the newline character at the end.

        • raises End_of_file

          if the end of the file is reached at the beginning of line.

        • alert input_output Input/output is not permitted
        val read_int_opt : unit -> int option

        Flush standard output, then read one line from standard input and convert it to an integer.

        Return None if the line read is not a valid representation of an integer.

        • since 4.05
        • alert input_output Input/output is not permitted
        val read_int : unit -> int

        Same as Stdlib.read_int_opt, but raise Failure "int_of_string" instead of returning None.

        • alert input_output Input/output is not permitted
        val read_float_opt : unit -> float option

        Flush standard output, then read one line from standard input and convert it to a floating-point number.

        Return None if the line read is not a valid representation of a floating-point number.

        • since 4.05
        • alert input_output Input/output is not permitted
        val read_float : unit -> float

        Same as Stdlib.read_float_opt, but raise Failure "float_of_string" instead of returning None.

        • alert input_output Input/output is not permitted
        val open_out : string -> out_channel

        Open the named file for writing, and return a new output channel on that file, positioned at the beginning of the file. The file is truncated to zero length if it already exists. It is created if it does not already exists.

        • alert input_output Input/output is not permitted
        val open_out_bin : string -> out_channel

        Same as Stdlib.open_out, but the file is opened in binary mode, so that no translation takes place during writes. On operating systems that do not distinguish between text mode and binary mode, this function behaves like Stdlib.open_out.

        • alert input_output Input/output is not permitted
        val open_out_gen : open_flag list -> int -> string -> out_channel

        open_out_gen mode perm filename opens the named file for writing, as described above. The extra argument mode specifies the opening mode. The extra argument perm specifies the file permissions, in case the file must be created. Stdlib.open_out and Stdlib.open_out_bin are special cases of this function.

        • alert input_output Input/output is not permitted
        val flush : out_channel -> unit

        Flush the buffer associated with the given output channel, performing all pending writes on that channel. Interactive programs must be careful about flushing standard output and standard error at the right time.

        • alert input_output Input/output is not permitted
        val flush_all : unit -> unit

        Flush all open output channels; ignore errors.

        • alert input_output Input/output is not permitted
        val output_char : out_channel -> char -> unit

        Write the character on the given output channel.

        • alert input_output Input/output is not permitted
        val output_string : out_channel -> string -> unit

        Write the string on the given output channel.

        • alert input_output Input/output is not permitted
        val output_bytes : out_channel -> bytes -> unit

        Write the byte sequence on the given output channel.

        • since 4.02
        • alert input_output Input/output is not permitted
        val output : out_channel -> bytes -> int -> int -> unit

        output oc buf pos len writes len characters from byte sequence buf, starting at offset pos, to the given output channel oc.

        • alert input_output Input/output is not permitted
        val output_substring : out_channel -> string -> int -> int -> unit

        Same as output but take a string as argument instead of a byte sequence.

        • since 4.02
        • alert input_output Input/output is not permitted
        val output_byte : out_channel -> int -> unit

        Write one 8-bit integer (as the single character with that code) on the given output channel. The given integer is taken modulo 256.

        • alert input_output Input/output is not permitted
        val output_binary_int : out_channel -> int -> unit

        Write one integer in binary format (4 bytes, big-endian) on the given output channel. The given integer is taken modulo 232. The only reliable way to read it back is through the Stdlib.input_binary_int function. The format is compatible across all machines for a given version of OCaml.

        • alert input_output Input/output is not permitted
        val output_value : out_channel -> 'a -> unit

        Write the representation of a structured value of any type to a channel. Circularities and sharing inside the value are detected and preserved. The object can be read back, by the function Stdlib.input_value. See the description of module Marshal for more information. Stdlib.output_value is equivalent to Marshal.to_channel with an empty list of flags.

        • alert input_output Input/output is not permitted
        val seek_out : out_channel -> int -> unit

        seek_out chan pos sets the current writing position to pos for channel chan. This works only for regular files. On files of other kinds (such as terminals, pipes and sockets), the behavior is unspecified.

        • alert input_output Input/output is not permitted
        val pos_out : out_channel -> int

        Return the current writing position for the given channel. Does not work on channels opened with the Open_append flag (returns unspecified results). For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos_out, then going back to this position using seek_out will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

        • alert input_output Input/output is not permitted
        val out_channel_length : out_channel -> int

        Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless.

        • alert input_output Input/output is not permitted
        val close_out : out_channel -> unit

        Close the given channel, flushing all buffered write operations. Output functions raise a Sys_error exception when they are applied to a closed output channel, except close_out and flush, which do nothing when applied to an already closed channel. Note that close_out may raise Sys_error if the operating system signals an error when flushing or closing.

        • alert input_output Input/output is not permitted
        val close_out_noerr : out_channel -> unit

        Same as close_out, but ignore all errors.

        • alert input_output Input/output is not permitted
        val set_binary_mode_out : out_channel -> bool -> unit

        set_binary_mode_out oc true sets the channel oc to binary mode: no translations take place during output. set_binary_mode_out oc false sets the channel oc to text mode: depending on the operating system, some translations may take place during output. For instance, under Windows, end-of-lines will be translated from \n to \r\n. This function has no effect under operating systems that do not distinguish between text mode and binary mode.

        • alert input_output Input/output is not permitted
        val open_in : string -> in_channel

        Open the named file for reading, and return a new input channel on that file, positioned at the beginning of the file.

        • alert input_output Input/output is not permitted
        val open_in_bin : string -> in_channel

        Same as Stdlib.open_in, but the file is opened in binary mode, so that no translation takes place during reads. On operating systems that do not distinguish between text mode and binary mode, this function behaves like Stdlib.open_in.

        • alert input_output Input/output is not permitted
        val open_in_gen : open_flag list -> int -> string -> in_channel

        open_in_gen mode perm filename opens the named file for reading, as described above. The extra arguments mode and perm specify the opening mode and file permissions. Stdlib.open_in and Stdlib.open_in_bin are special cases of this function.

        • alert input_output Input/output is not permitted
        val input_char : in_channel -> char

        Read one character from the given input channel.

        • raises End_of_file

          if there are no more characters to read.

        • alert input_output Input/output is not permitted
        val input_line : in_channel -> string

        Read characters from the given input channel, until a newline character is encountered. Return the string of all characters read, without the newline character at the end.

        • raises End_of_file

          if the end of the file is reached at the beginning of line.

        • alert input_output Input/output is not permitted
        val input : in_channel -> bytes -> int -> int -> int

        input ic buf pos len reads up to len characters from the given channel ic, storing them in byte sequence buf, starting at character number pos. It returns the actual number of characters read, between 0 and len (inclusive). A return value of 0 means that the end of file was reached. A return value between 0 and len exclusive means that not all requested len characters were read, either because no more characters were available at that time, or because the implementation found it convenient to do a partial read; input must be called again to read the remaining characters, if desired. (See also Stdlib.really_input for reading exactly len characters.) Exception Invalid_argument "input" is raised if pos and len do not designate a valid range of buf.

        • alert input_output Input/output is not permitted
        val really_input : in_channel -> bytes -> int -> int -> unit

        really_input ic buf pos len reads len characters from channel ic, storing them in byte sequence buf, starting at character number pos.

        • raises End_of_file

          if the end of file is reached before len characters have been read.

        • alert input_output Input/output is not permitted
        val really_input_string : in_channel -> int -> string

        really_input_string ic len reads len characters from channel ic and returns them in a new string.

        • raises End_of_file

          if the end of file is reached before len characters have been read.

        • since 4.02
        • alert input_output Input/output is not permitted
        val input_byte : in_channel -> int

        Same as Stdlib.input_char, but return the 8-bit integer representing the character.

        • alert input_output Input/output is not permitted
        val input_binary_int : in_channel -> int

        Read an integer encoded in binary format (4 bytes, big-endian) from the given input channel. See Stdlib.output_binary_int.

        • raises End_of_file

          if the end of file was reached while reading the integer.

        • alert input_output Input/output is not permitted
        val input_value : in_channel -> 'a

        Read the representation of a structured value, as produced by Stdlib.output_value, and return the corresponding value. This function is identical to Marshal.from_channel; see the description of module Marshal for more information, in particular concerning the lack of type safety.

        • alert input_output Input/output is not permitted
        val seek_in : in_channel -> int -> unit

        seek_in chan pos sets the current reading position to pos for channel chan. This works only for regular files. On files of other kinds, the behavior is unspecified.

        • alert input_output Input/output is not permitted
        val pos_in : in_channel -> int

        Return the current reading position for the given channel. For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos_in, then going back to this position using seek_in will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

        • alert input_output Input/output is not permitted
        val in_channel_length : in_channel -> int

        Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless. The returned size does not take into account the end-of-line translations that can be performed when reading from a channel opened in text mode.

        • alert input_output Input/output is not permitted
        val close_in : in_channel -> unit

        Close the given channel. Input functions raise a Sys_error exception when they are applied to a closed input channel, except close_in, which does nothing when applied to an already closed channel.

        • alert input_output Input/output is not permitted
        val close_in_noerr : in_channel -> unit

        Same as close_in, but ignore all errors.

        • alert input_output Input/output is not permitted
        val set_binary_mode_in : in_channel -> bool -> unit

        set_binary_mode_in ic true sets the channel ic to binary mode: no translations take place during input. set_binary_mode_out ic false sets the channel ic to text mode: depending on the operating system, some translations may take place during input. For instance, under Windows, end-of-lines will be translated from \r\n to \n. This function has no effect under operating systems that do not distinguish between text mode and binary mode.

        • alert input_output Input/output is not permitted
        module LargeFile : sig ... end

        Operations on large files. This sub-module provides 64-bit variants of the channel functions that manipulate file positions and file sizes. By representing positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), these alternate functions allow operating on files whose sizes are greater than max_int.

        References

        type 'a ref = 'a Stdlib.ref
        include sig ... end
        val ref : 'a -> 'a ref

        Return a fresh reference containing the given value.

        • alert impure References are not permitted
        val (!) : 'a ref -> 'a

        !r returns the current contents of reference r. Equivalent to fun r -> r.contents. Unary operator, see Ocaml_operators for more information.

        • alert impure References are not permitted
        val (:=) : 'a ref -> 'a -> unit

        r := a stores the value of a in reference r. Equivalent to fun r v -> r.contents <- v. Right-associative operator, see Ocaml_operators for more information.

        • alert impure References are not permitted
        val incr : int ref -> unit

        Increment the integer contained in the given reference. Equivalent to fun r -> r := succ !r.

        • alert impure References are not permitted
        val decr : int ref -> unit

        Decrement the integer contained in the given reference. Equivalent to fun r -> r := pred !r.

        • alert impure References are not permitted

        Result type

        More in Stdlib.Result

        type ('a, 'b) result = ('a, 'b) Stdlib.result =
        1. | Ok of 'a
        2. | Error of 'b

        Format strings

        More in Stdlib.Scanf, Stdlib.Printf, and Stdlib.Format

        include sig ... end
        type ('a, 'b, 'c, 'd, 'e, 'f) format6 = ('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.format6
        type ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'c, 'c, 'd) format6
        type ('a, 'b, 'c) format = ('a, 'b, 'c, 'c) format4
        val format_of_string : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> ('a, 'b, 'c, 'd, 'e, 'f) format6

        format_of_string s returns a format string read from the string literal s. Note: format_of_string can not convert a string argument that is not a literal. If you need this functionality, use the more general Scanf.format_from_string function.

        val (^^) : diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/index.html index 7eca7be..9e4c970 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/index.html @@ -1,2 +1,2 @@ -Stdlib_alerts (less-power.Stdlib_alerts)

        Module Stdlib_alerts

        Variants of Stdlib, but with signature items that can be restricted annotated with alerts.

        There is one "variant" of the Stdlib interface implemented, namely Stdlib_alerting. Alerts are placed on signature items (types, values, and modules) so that those items can be restricted.

        The following alerts are used:

        • physical_eq: all kinds of physical comparisons
        • debug_macro: macros like __LOC__
        • list_op: operations on lists
        • input_output: all kinds of real IO
        • impure: references, arrays, and other imperative programming constructs
        • unsafe: generally unsafe operations

        By default, for a "safe" sandbox environment, the following alerts should be enabled: physical_eq, input_output, impure, unsafe. The remaining alerts are intended for specific situtations and exercises where more needs to be restricted.

        Similar modules for Thread and Event are in Threads_alerts to avoid unnecessary dependencies.

        module type Char_alerting = sig ... end
        module type Digest_alerting = sig ... end
        module type Filename_alerting = sig ... end
        module type Float_alerting = sig ... end
        module type Hashtbl_alerting = sig ... end
        module type List_alerting = sig ... end
        module type ListLabels_alerting = sig ... end
        module type MoreLabels_alerting = sig ... end
        module type Printexc_alerting = sig ... end
        module type Printf_alerting = sig ... end
        module type Scanf_alerting = sig ... end
        module type Seq_alerting = sig ... end
        module type StringLabels_alerting = sig ... end
        module type StdLabels_alerting = sig ... end
        module type String_alerting = sig ... end
        module type Uchar_alerting = sig ... end
        module type Stdlib_alerting = sig ... end

        Derived from Stdlib, but with items that can be restricted annotated with alerts.

        Stdlib, but with the above module type.

        +Stdlib_alerts (less-power.Stdlib_alerts)

        Module Stdlib_alerts

        Variants of Stdlib, but with signature items that can be restricted annotated with alerts.

        There is one "variant" of the Stdlib interface implemented, namely Stdlib_alerting. Alerts are placed on signature items (types, values, and modules) so that those items can be restricted.

        The following alerts are used:

        • physical_eq: all kinds of physical comparisons
        • debug_macro: macros like __LOC__
        • list_op: operations on lists
        • input_output: all kinds of real IO
        • impure: references, arrays, and other imperative programming constructs
        • unsafe: generally unsafe operations

        By default, for a "safe" sandbox environment, the following alerts should be enabled: physical_eq, input_output, impure, unsafe. The remaining alerts are intended for specific situtations and exercises where more needs to be restricted.

        Similar modules for Thread and Event are in Threads_alerts to avoid unnecessary dependencies.

        module type Char_alerting = sig ... end
        module type Digest_alerting = sig ... end
        module type Filename_alerting = sig ... end
        module type Float_alerting = sig ... end
        module type Hashtbl_alerting = sig ... end
        module type List_alerting = sig ... end
        module type ListLabels_alerting = sig ... end
        module type MoreLabels_alerting = sig ... end
        module type Printexc_alerting = sig ... end
        module type Printf_alerting = sig ... end
        module type Scanf_alerting = sig ... end
        module type Seq_alerting = sig ... end
        module type StringLabels_alerting = sig ... end
        module type StdLabels_alerting = sig ... end
        module type String_alerting = sig ... end
        module type Uchar_alerting = sig ... end
        module type Stdlib_alerting = sig ... end

        Derived from Stdlib, but with items that can be restricted annotated with alerts.

        Stdlib, but with the above module type.

        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Char_alerting/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Char_alerting/index.html index 873062c..b964813 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Char_alerting/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Char_alerting/index.html @@ -1,2 +1,2 @@ -Char_alerting (less-power.Stdlib_alerts.Char_alerting)

        Module type Stdlib_alerts.Char_alerting

        include sig ... end
        val code : char -> int

        Return the ASCII code of the argument.

        val chr : int -> char

        Return the character with the given ASCII code.

        • raises Invalid_argument

          if the argument is outside the range 0--255.

        val escaped : char -> string

        Return a string representing the given character, with special characters escaped following the lexical conventions of OCaml. All characters outside the ASCII printable range (32..126) are escaped, as well as backslash, double-quote, and single-quote.

        val lowercase_ascii : char -> char

        Convert the given character to its equivalent lowercase character, using the US-ASCII character set.

        • since 4.03
        val uppercase_ascii : char -> char

        Convert the given character to its equivalent uppercase character, using the US-ASCII character set.

        • since 4.03
        type t = char

        An alias for the type of characters.

        val compare : t -> t -> int

        The comparison function for characters, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Char to be passed as argument to the functors Set.Make and Map.Make.

        val equal : t -> t -> bool

        The equal function for chars.

        • since 4.03
        val seeded_hash : int -> t -> int

        A seeded hash function for characters, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

        • since 5.1
        val hash : t -> int

        An unseeded hash function for characters, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

        • since 5.1
        +Char_alerting (less-power.Stdlib_alerts.Char_alerting)

        Module type Stdlib_alerts.Char_alerting

        include sig ... end
        val code : char -> int

        Return the ASCII code of the argument.

        val chr : int -> char

        Return the character with the given ASCII code.

        • raises Invalid_argument

          if the argument is outside the range 0--255.

        val escaped : char -> string

        Return a string representing the given character, with special characters escaped following the lexical conventions of OCaml. All characters outside the ASCII printable range (32..126) are escaped, as well as backslash, double-quote, and single-quote.

        val lowercase_ascii : char -> char

        Convert the given character to its equivalent lowercase character, using the US-ASCII character set.

        • since 4.03
        val uppercase_ascii : char -> char

        Convert the given character to its equivalent uppercase character, using the US-ASCII character set.

        • since 4.03
        type t = char

        An alias for the type of characters.

        val compare : t -> t -> int

        The comparison function for characters, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Char to be passed as argument to the functors Set.Make and Map.Make.

        val equal : t -> t -> bool

        The equal function for chars.

        • since 4.03
        val seeded_hash : int -> t -> int

        A seeded hash function for characters, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

        • since 5.1
        val hash : t -> int

        An unseeded hash function for characters, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

        • since 5.1
        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Digest_alerting/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Digest_alerting/index.html index edc4657..10f5726 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Digest_alerting/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Digest_alerting/index.html @@ -1,2 +1,2 @@ -Digest_alerting (less-power.Stdlib_alerts.Digest_alerting)

        Module type Stdlib_alerts.Digest_alerting

        include sig ... end
        type t = string

        The type of digests: 16-character strings.

        val compare : t -> t -> int

        The comparison function for 16-character digest, with the same specification as Stdlib.compare and the implementation shared with String.compare. Along with the type t, this function compare allows the module Digest to be passed as argument to the functors Set.Make and Map.Make.

        • since 4.00
        val equal : t -> t -> bool

        The equal function for 16-character digest.

        • since 4.03
        val string : string -> t

        Return the digest of the given string.

        val substring : string -> int -> int -> t

        Digest.substring s ofs len returns the digest of the substring of s starting at index ofs and containing len characters.

        val to_hex : t -> string

        Return the printable hexadecimal representation of the given digest.

        • raises Invalid_argument

          if the argument is not exactly 16 bytes.

        val from_hex : string -> t

        Convert a hexadecimal representation back into the corresponding digest.

        • raises Invalid_argument

          if the argument is not exactly 32 hexadecimal characters.

        • since 4.00
        val bytes : bytes -> t

        Return the digest of the given byte sequence.

        • since 4.02
        • alert impure Imperative programming is not permitted
        val subbytes : bytes -> int -> int -> t

        Digest.subbytes s ofs len returns the digest of the subsequence of s starting at index ofs and containing len bytes.

        • since 4.02
        • alert impure Imperative programming is not permitted
        val channel : Stdlib.in_channel -> int -> t

        If len is nonnegative, Digest.channel ic len reads len characters from channel ic and returns their digest, or raises End_of_file if end-of-file is reached before len characters are read. If len is negative, Digest.channel ic len reads all characters from ic until end-of-file is reached and return their digest.

        • alert input_output Input/output is not permitted
        val file : string -> t

        Return the digest of the file whose name is given.

        • alert input_output Input/output is not permitted
        val output : Stdlib.out_channel -> t -> unit

        Write a digest on the given output channel.

        • alert input_output Input/output is not permitted
        val input : Stdlib.in_channel -> t

        Read a digest from the given input channel.

        • alert input_output Input/output is not permitted
        +Digest_alerting (less-power.Stdlib_alerts.Digest_alerting)

        Module type Stdlib_alerts.Digest_alerting

        include sig ... end
        type t = string

        The type of digests: 16-character strings.

        val compare : t -> t -> int

        The comparison function for 16-character digest, with the same specification as Stdlib.compare and the implementation shared with String.compare. Along with the type t, this function compare allows the module Digest to be passed as argument to the functors Set.Make and Map.Make.

        • since 4.00
        val equal : t -> t -> bool

        The equal function for 16-character digest.

        • since 4.03
        val string : string -> t

        Return the digest of the given string.

        val substring : string -> int -> int -> t

        Digest.substring s ofs len returns the digest of the substring of s starting at index ofs and containing len characters.

        val to_hex : t -> string

        Return the printable hexadecimal representation of the given digest.

        • raises Invalid_argument

          if the argument is not exactly 16 bytes.

        val from_hex : string -> t

        Convert a hexadecimal representation back into the corresponding digest.

        • raises Invalid_argument

          if the argument is not exactly 32 hexadecimal characters.

        • since 4.00
        val bytes : bytes -> t

        Return the digest of the given byte sequence.

        • since 4.02
        • alert impure Imperative programming is not permitted
        val subbytes : bytes -> int -> int -> t

        Digest.subbytes s ofs len returns the digest of the subsequence of s starting at index ofs and containing len bytes.

        • since 4.02
        • alert impure Imperative programming is not permitted
        val channel : Stdlib.in_channel -> int -> t

        If len is nonnegative, Digest.channel ic len reads len characters from channel ic and returns their digest, or raises End_of_file if end-of-file is reached before len characters are read. If len is negative, Digest.channel ic len reads all characters from ic until end-of-file is reached and return their digest.

        • alert input_output Input/output is not permitted
        val file : string -> t

        Return the digest of the file whose name is given.

        • alert input_output Input/output is not permitted
        val output : Stdlib.out_channel -> t -> unit

        Write a digest on the given output channel.

        • alert input_output Input/output is not permitted
        val input : Stdlib.in_channel -> t

        Read a digest from the given input channel.

        • alert input_output Input/output is not permitted
        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Filename_alerting/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Filename_alerting/index.html index 34ab414..de42bb1 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Filename_alerting/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Filename_alerting/index.html @@ -1,5 +1,5 @@ -Filename_alerting (less-power.Stdlib_alerts.Filename_alerting)

        Module type Stdlib_alerts.Filename_alerting

        include sig ... end
        val current_dir_name : string

        The conventional name for the current directory (e.g. . in Unix).

        val parent_dir_name : string

        The conventional name for the parent of the current directory (e.g. .. in Unix).

        val dir_sep : string

        The directory separator (e.g. / in Unix).

        • since 3.11.2
        val concat : string -> string -> string

        concat dir file returns a file name that designates file file in directory dir.

        val is_relative : string -> bool

        Return true if the file name is relative to the current directory, false if it is absolute (i.e. in Unix, starts with /).

        val is_implicit : string -> bool

        Return true if the file name is relative and does not start with an explicit reference to the current directory (./ or ../ in Unix), false if it starts with an explicit reference to the root directory or the current directory.

        val check_suffix : string -> string -> bool

        check_suffix name suff returns true if the filename name ends with the suffix suff.

        Under Windows ports (including Cygwin), comparison is case-insensitive, relying on String.lowercase_ascii. Note that this does not match exactly the interpretation of case-insensitive filename equivalence from Windows.

        val chop_suffix : string -> string -> string

        chop_suffix name suff removes the suffix suff from the filename name.

        • raises Invalid_argument

          if name does not end with the suffix suff.

        val chop_suffix_opt : suffix:string -> string -> string option

        chop_suffix_opt ~suffix filename removes the suffix from the filename if possible, or returns None if the filename does not end with the suffix.

        Under Windows ports (including Cygwin), comparison is case-insensitive, relying on String.lowercase_ascii. Note that this does not match exactly the interpretation of case-insensitive filename equivalence from Windows.

        • since 4.08
        val extension : string -> string

        extension name is the shortest suffix ext of name0 where:

        • name0 is the longest suffix of name that does not contain a directory separator;
        • ext starts with a period;
        • ext is preceded by at least one non-period character in name0.

        If such a suffix does not exist, extension name is the empty string.

        • since 4.04
        val remove_extension : string -> string

        Return the given file name without its extension, as defined in Filename.extension. If the extension is empty, the function returns the given file name.

        The following invariant holds for any file name s:

        remove_extension s ^ extension s = s

        • since 4.04
        val chop_extension : string -> string

        Same as Filename.remove_extension, but raise Invalid_argument if the given name has an empty extension.

        val basename : string -> string

        Split a file name into directory name / base file name. If name is a valid file name, then concat (dirname name) (basename name) returns a file name which is equivalent to name. Moreover, after setting the current directory to dirname name (with Sys.chdir), references to basename name (which is a relative file name) designate the same file as name before the call to Sys.chdir.

        This function conforms to the specification of POSIX.1-2008 for the basename utility.

        val dirname : string -> string

        See Filename.basename. This function conforms to the specification of POSIX.1-2008 for the dirname utility.

        val null : string

        null is "/dev/null" on POSIX and "NUL" on Windows. It represents a file on the OS that discards all writes and returns end of file on reads.

        • since 4.10
        val quote : string -> string

        Return a quoted version of a file name, suitable for use as one argument in a command line, escaping all meta-characters. Warning: under Windows, the output is only suitable for use with programs that follow the standard Windows quoting conventions.

        val quote_command : +Filename_alerting (less-power.Stdlib_alerts.Filename_alerting)

        Module type Stdlib_alerts.Filename_alerting

        include sig ... end
        val current_dir_name : string

        The conventional name for the current directory (e.g. . in Unix).

        val parent_dir_name : string

        The conventional name for the parent of the current directory (e.g. .. in Unix).

        val dir_sep : string

        The directory separator (e.g. / in Unix).

        • since 3.11.2
        val concat : string -> string -> string

        concat dir file returns a file name that designates file file in directory dir.

        val is_relative : string -> bool

        Return true if the file name is relative to the current directory, false if it is absolute (i.e. in Unix, starts with /).

        val is_implicit : string -> bool

        Return true if the file name is relative and does not start with an explicit reference to the current directory (./ or ../ in Unix), false if it starts with an explicit reference to the root directory or the current directory.

        val check_suffix : string -> string -> bool

        check_suffix name suff returns true if the filename name ends with the suffix suff.

        Under Windows ports (including Cygwin), comparison is case-insensitive, relying on String.lowercase_ascii. Note that this does not match exactly the interpretation of case-insensitive filename equivalence from Windows.

        val chop_suffix : string -> string -> string

        chop_suffix name suff removes the suffix suff from the filename name.

        • raises Invalid_argument

          if name does not end with the suffix suff.

        val chop_suffix_opt : suffix:string -> string -> string option

        chop_suffix_opt ~suffix filename removes the suffix from the filename if possible, or returns None if the filename does not end with the suffix.

        Under Windows ports (including Cygwin), comparison is case-insensitive, relying on String.lowercase_ascii. Note that this does not match exactly the interpretation of case-insensitive filename equivalence from Windows.

        • since 4.08
        val extension : string -> string

        extension name is the shortest suffix ext of name0 where:

        • name0 is the longest suffix of name that does not contain a directory separator;
        • ext starts with a period;
        • ext is preceded by at least one non-period character in name0.

        If such a suffix does not exist, extension name is the empty string.

        • since 4.04
        val remove_extension : string -> string

        Return the given file name without its extension, as defined in Filename.extension. If the extension is empty, the function returns the given file name.

        The following invariant holds for any file name s:

        remove_extension s ^ extension s = s

        • since 4.04
        val chop_extension : string -> string

        Same as Filename.remove_extension, but raise Invalid_argument if the given name has an empty extension.

        val basename : string -> string

        Split a file name into directory name / base file name. If name is a valid file name, then concat (dirname name) (basename name) returns a file name which is equivalent to name. Moreover, after setting the current directory to dirname name (with Sys.chdir), references to basename name (which is a relative file name) designate the same file as name before the call to Sys.chdir.

        This function conforms to the specification of POSIX.1-2008 for the basename utility.

        val dirname : string -> string

        See Filename.basename. This function conforms to the specification of POSIX.1-2008 for the dirname utility.

        val null : string

        null is "/dev/null" on POSIX and "NUL" on Windows. It represents a file on the OS that discards all writes and returns end of file on reads.

        • since 4.10
        val quote : string -> string

        Return a quoted version of a file name, suitable for use as one argument in a command line, escaping all meta-characters. Warning: under Windows, the output is only suitable for use with programs that follow the standard Windows quoting conventions.

        val quote_command : string -> ?stdin:string -> ?stdout:string -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Float_alerting/Array/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Float_alerting/Array/index.html index f5ec543..2889b6a 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Float_alerting/Array/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Float_alerting/Array/index.html @@ -1,5 +1,5 @@ -Array (less-power.Stdlib_alerts.Float_alerting.Array)

        Module Float_alerting.Array

        Float arrays with packed representation.

        • alert impure Arrays are not permitted
        type t = floatarray

        The type of float arrays with packed representation.

        • since 4.08
        val length : t -> int

        Return the length (number of elements) of the given floatarray.

        val get : t -> int -> float

        get a n returns the element number n of floatarray a.

        • raises Invalid_argument

          if n is outside the range 0 to (length a - 1).

        val set : t -> int -> float -> unit

        set a n x modifies floatarray a in place, replacing element number n with x.

        • raises Invalid_argument

          if n is outside the range 0 to (length a - 1).

        val make : int -> float -> t

        make n x returns a fresh floatarray of length n, initialized with x.

        • raises Invalid_argument

          if n < 0 or n > Sys.max_floatarray_length.

        val create : int -> t

        create n returns a fresh floatarray of length n, with uninitialized data.

        • raises Invalid_argument

          if n < 0 or n > Sys.max_floatarray_length.

        val init : int -> (int -> float) -> t

        init n f returns a fresh floatarray of length n, with element number i initialized to the result of f i. In other terms, init n f tabulates the results of f applied to the integers 0 to n-1.

        • raises Invalid_argument

          if n < 0 or n > Sys.max_floatarray_length.

        val append : t -> t -> t

        append v1 v2 returns a fresh floatarray containing the concatenation of the floatarrays v1 and v2.

        • raises Invalid_argument

          if length v1 + length v2 > Sys.max_floatarray_length.

        val concat : t list -> t

        Same as append, but concatenates a list of floatarrays.

        val sub : t -> int -> int -> t

        sub a pos len returns a fresh floatarray of length len, containing the elements number pos to pos + len - 1 of floatarray a.

        • raises Invalid_argument

          if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

        val copy : t -> t

        copy a returns a copy of a, that is, a fresh floatarray containing the same elements as a.

        val fill : t -> int -> int -> float -> unit

        fill a pos len x modifies the floatarray a in place, storing x in elements number pos to pos + len - 1.

        • raises Invalid_argument

          if pos and len do not designate a valid subarray of a.

        val blit : t -> int -> t -> int -> int -> unit

        blit src src_pos dst dst_pos len copies len elements from floatarray src, starting at element number src_pos, to floatarray dst, starting at element number dst_pos. It works correctly even if src and dst are the same floatarray, and the source and destination chunks overlap.

        • raises Invalid_argument

          if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

        val to_list : t -> float list

        to_list a returns the list of all the elements of a.

        val of_list : float list -> t

        of_list l returns a fresh floatarray containing the elements of l.

        • raises Invalid_argument

          if the length of l is greater than Sys.max_floatarray_length.

        Iterators

        val iter : (float -> unit) -> t -> unit

        iter f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

        val iteri : (int -> float -> unit) -> t -> unit

        Same as iter, but the function is applied with the index of the element as first argument, and the element itself as second argument.

        val map : (float -> float) -> t -> t

        map f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

        val map_inplace : (float -> float) -> t -> unit

        map_inplace f a applies function f to all elements of a, and updates their values in place.

        • since 5.1
        val mapi : (int -> float -> float) -> t -> t

        Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

        val mapi_inplace : (int -> float -> float) -> t -> unit

        Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

        • since 5.1
        val fold_left : ('acc -> float -> 'acc) -> 'acc -> t -> 'acc

        fold_left f x init computes f (... (f (f x init.(0)) init.(1)) ...) init.(n-1), where n is the length of the floatarray init.

        val fold_right : (float -> 'acc -> 'acc) -> t -> 'acc -> 'acc

        fold_right f a init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the floatarray a.

        Iterators on two arrays

        val iter2 : (float -> float -> unit) -> t -> t -> unit

        Array.iter2 f a b applies function f to all the elements of a and b.

        • raises Invalid_argument

          if the floatarrays are not the same size.

        val map2 : (float -> float -> float) -> t -> t -> t

        map2 f a b applies function f to all the elements of a and b, and builds a floatarray with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

        • raises Invalid_argument

          if the floatarrays are not the same size.

        Array scanning

        val for_all : (float -> bool) -> t -> bool

        for_all f [|a1; ...; an|] checks if all elements of the floatarray satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

        val exists : (float -> bool) -> t -> bool

        exists f [|a1; ...; an|] checks if at least one element of the floatarray satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

        val mem : float -> t -> bool

        mem a set is true if and only if there is an element of set that is structurally equal to a, i.e. there is an x in set such that compare a x = 0.

        val mem_ieee : float -> t -> bool

        Same as mem, but uses IEEE equality instead of structural equality.

        Array searching

        val find_opt : (float -> bool) -> t -> float option
        val find_index : (float -> bool) -> t -> int option

        find_index f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

        It returns None if there is no such element.

        • since 5.1
        val find_map : (float -> 'a option) -> t -> 'a option
        val find_mapi : (int -> float -> 'a option) -> t -> 'a option

        Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

        • since 5.1

        Sorting

        val sort : (float -> float -> int) -> t -> unit

        Sort a floatarray in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

        The current implementation uses Heap Sort. It runs in constant stack space.

        Specification of the comparison function: Let a be the floatarray and cmp the comparison function. The following must be true for all x, y, z in a :

        • cmp x y > 0 if and only if cmp y x < 0
        • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

        When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

        • cmp a.(i) a.(j) >= 0 if and only if i >= j
        val stable_sort : (float -> float -> int) -> t -> unit

        Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

        The current implementation uses Merge Sort. It uses a temporary floatarray of length n/2, where n is the length of the floatarray. It is usually faster than the current implementation of sort.

        val fast_sort : (float -> float -> int) -> t -> unit

        Same as sort or stable_sort, whichever is faster on typical input.

        Float arrays and Sequences

        val to_seq : t -> float Stdlib.Seq.t

        Iterate on the floatarray, in increasing order. Modifications of the floatarray during iteration will be reflected in the sequence.

        val to_seqi : t -> (int * float) Stdlib.Seq.t

        Iterate on the floatarray, in increasing order, yielding indices along elements. Modifications of the floatarray during iteration will be reflected in the sequence.

        val of_seq : float Stdlib.Seq.t -> t

        Create an array from the generator.

        val map_to_array : (float -> 'a) -> t -> 'a array

        map_to_array f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

        val map_from_array : ('a -> float) -> 'a array -> t

        map_from_array f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

        Arrays and concurrency safety

        Care must be taken when concurrently accessing float arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

        Atomicity

        Every float array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

        For example, consider the following program:

        let size = 100_000_000
        +Array (less-power.Stdlib_alerts.Float_alerting.Array)

        Module Float_alerting.Array

        Float arrays with packed representation.

        • alert impure Arrays are not permitted
        type t = floatarray

        The type of float arrays with packed representation.

        • since 4.08
        val length : t -> int

        Return the length (number of elements) of the given floatarray.

        val get : t -> int -> float

        get a n returns the element number n of floatarray a.

        • raises Invalid_argument

          if n is outside the range 0 to (length a - 1).

        val set : t -> int -> float -> unit

        set a n x modifies floatarray a in place, replacing element number n with x.

        • raises Invalid_argument

          if n is outside the range 0 to (length a - 1).

        val make : int -> float -> t

        make n x returns a fresh floatarray of length n, initialized with x.

        • raises Invalid_argument

          if n < 0 or n > Sys.max_floatarray_length.

        val create : int -> t

        create n returns a fresh floatarray of length n, with uninitialized data.

        • raises Invalid_argument

          if n < 0 or n > Sys.max_floatarray_length.

        val init : int -> (int -> float) -> t

        init n f returns a fresh floatarray of length n, with element number i initialized to the result of f i. In other terms, init n f tabulates the results of f applied to the integers 0 to n-1.

        • raises Invalid_argument

          if n < 0 or n > Sys.max_floatarray_length.

        val append : t -> t -> t

        append v1 v2 returns a fresh floatarray containing the concatenation of the floatarrays v1 and v2.

        • raises Invalid_argument

          if length v1 + length v2 > Sys.max_floatarray_length.

        val concat : t list -> t

        Same as append, but concatenates a list of floatarrays.

        val sub : t -> int -> int -> t

        sub a pos len returns a fresh floatarray of length len, containing the elements number pos to pos + len - 1 of floatarray a.

        • raises Invalid_argument

          if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

        val copy : t -> t

        copy a returns a copy of a, that is, a fresh floatarray containing the same elements as a.

        val fill : t -> int -> int -> float -> unit

        fill a pos len x modifies the floatarray a in place, storing x in elements number pos to pos + len - 1.

        • raises Invalid_argument

          if pos and len do not designate a valid subarray of a.

        val blit : t -> int -> t -> int -> int -> unit

        blit src src_pos dst dst_pos len copies len elements from floatarray src, starting at element number src_pos, to floatarray dst, starting at element number dst_pos. It works correctly even if src and dst are the same floatarray, and the source and destination chunks overlap.

        • raises Invalid_argument

          if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

        val to_list : t -> float list

        to_list a returns the list of all the elements of a.

        val of_list : float list -> t

        of_list l returns a fresh floatarray containing the elements of l.

        • raises Invalid_argument

          if the length of l is greater than Sys.max_floatarray_length.

        Iterators

        val iter : (float -> unit) -> t -> unit

        iter f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

        val iteri : (int -> float -> unit) -> t -> unit

        Same as iter, but the function is applied with the index of the element as first argument, and the element itself as second argument.

        val map : (float -> float) -> t -> t

        map f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

        val map_inplace : (float -> float) -> t -> unit

        map_inplace f a applies function f to all elements of a, and updates their values in place.

        • since 5.1
        val mapi : (int -> float -> float) -> t -> t

        Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

        val mapi_inplace : (int -> float -> float) -> t -> unit

        Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

        • since 5.1
        val fold_left : ('acc -> float -> 'acc) -> 'acc -> t -> 'acc

        fold_left f x init computes f (... (f (f x init.(0)) init.(1)) ...) init.(n-1), where n is the length of the floatarray init.

        val fold_right : (float -> 'acc -> 'acc) -> t -> 'acc -> 'acc

        fold_right f a init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the floatarray a.

        Iterators on two arrays

        val iter2 : (float -> float -> unit) -> t -> t -> unit

        Array.iter2 f a b applies function f to all the elements of a and b.

        • raises Invalid_argument

          if the floatarrays are not the same size.

        val map2 : (float -> float -> float) -> t -> t -> t

        map2 f a b applies function f to all the elements of a and b, and builds a floatarray with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

        • raises Invalid_argument

          if the floatarrays are not the same size.

        Array scanning

        val for_all : (float -> bool) -> t -> bool

        for_all f [|a1; ...; an|] checks if all elements of the floatarray satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

        val exists : (float -> bool) -> t -> bool

        exists f [|a1; ...; an|] checks if at least one element of the floatarray satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

        val mem : float -> t -> bool

        mem a set is true if and only if there is an element of set that is structurally equal to a, i.e. there is an x in set such that compare a x = 0.

        val mem_ieee : float -> t -> bool

        Same as mem, but uses IEEE equality instead of structural equality.

        Array searching

        val find_opt : (float -> bool) -> t -> float option
        val find_index : (float -> bool) -> t -> int option

        find_index f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

        It returns None if there is no such element.

        • since 5.1
        val find_map : (float -> 'a option) -> t -> 'a option
        val find_mapi : (int -> float -> 'a option) -> t -> 'a option

        Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

        • since 5.1

        Sorting

        val sort : (float -> float -> int) -> t -> unit

        Sort a floatarray in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

        The current implementation uses Heap Sort. It runs in constant stack space.

        Specification of the comparison function: Let a be the floatarray and cmp the comparison function. The following must be true for all x, y, z in a :

        • cmp x y > 0 if and only if cmp y x < 0
        • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

        When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

        • cmp a.(i) a.(j) >= 0 if and only if i >= j
        val stable_sort : (float -> float -> int) -> t -> unit

        Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

        The current implementation uses Merge Sort. It uses a temporary floatarray of length n/2, where n is the length of the floatarray. It is usually faster than the current implementation of sort.

        val fast_sort : (float -> float -> int) -> t -> unit

        Same as sort or stable_sort, whichever is faster on typical input.

        Float arrays and Sequences

        val to_seq : t -> float Stdlib.Seq.t

        Iterate on the floatarray, in increasing order. Modifications of the floatarray during iteration will be reflected in the sequence.

        val to_seqi : t -> (int * float) Stdlib.Seq.t

        Iterate on the floatarray, in increasing order, yielding indices along elements. Modifications of the floatarray during iteration will be reflected in the sequence.

        val of_seq : float Stdlib.Seq.t -> t

        Create an array from the generator.

        val map_to_array : (float -> 'a) -> t -> 'a array

        map_to_array f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

        val map_from_array : ('a -> float) -> 'a array -> t

        map_from_array f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

        Arrays and concurrency safety

        Care must be taken when concurrently accessing float arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

        Atomicity

        Every float array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

        For example, consider the following program:

        let size = 100_000_000
         let a = Float.Array.make size 1.
         let update a f () =
            Float.Array.iteri (fun i x -> Float.Array.set a i (f x)) a
        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Float_alerting/ArrayLabels/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Float_alerting/ArrayLabels/index.html
        index f70d306..e583f1b 100644
        --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Float_alerting/ArrayLabels/index.html
        +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Float_alerting/ArrayLabels/index.html
        @@ -1,5 +1,5 @@
         
        -ArrayLabels (less-power.Stdlib_alerts.Float_alerting.ArrayLabels)

        Module Float_alerting.ArrayLabels

        Float arrays with packed representation (labeled functions).

        • alert impure Arrays are not permitted
        type t = floatarray

        The type of float arrays with packed representation.

        • since 4.08
        val length : t -> int

        Return the length (number of elements) of the given floatarray.

        val get : t -> int -> float

        get a n returns the element number n of floatarray a.

        • raises Invalid_argument

          if n is outside the range 0 to (length a - 1).

        val set : t -> int -> float -> unit

        set a n x modifies floatarray a in place, replacing element number n with x.

        • raises Invalid_argument

          if n is outside the range 0 to (length a - 1).

        val make : int -> float -> t

        make n x returns a fresh floatarray of length n, initialized with x.

        • raises Invalid_argument

          if n < 0 or n > Sys.max_floatarray_length.

        val create : int -> t

        create n returns a fresh floatarray of length n, with uninitialized data.

        • raises Invalid_argument

          if n < 0 or n > Sys.max_floatarray_length.

        val init : int -> f:(int -> float) -> t

        init n ~f returns a fresh floatarray of length n, with element number i initialized to the result of f i. In other terms, init n ~f tabulates the results of f applied to the integers 0 to n-1.

        • raises Invalid_argument

          if n < 0 or n > Sys.max_floatarray_length.

        val append : t -> t -> t

        append v1 v2 returns a fresh floatarray containing the concatenation of the floatarrays v1 and v2.

        • raises Invalid_argument

          if length v1 + length v2 > Sys.max_floatarray_length.

        val concat : t list -> t

        Same as append, but concatenates a list of floatarrays.

        val sub : t -> pos:int -> len:int -> t

        sub a ~pos ~len returns a fresh floatarray of length len, containing the elements number pos to pos + len - 1 of floatarray a.

        • raises Invalid_argument

          if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

        val copy : t -> t

        copy a returns a copy of a, that is, a fresh floatarray containing the same elements as a.

        val fill : t -> pos:int -> len:int -> float -> unit

        fill a ~pos ~len x modifies the floatarray a in place, storing x in elements number pos to pos + len - 1.

        • raises Invalid_argument

          if pos and len do not designate a valid subarray of a.

        val blit : src:t -> src_pos:int -> dst:t -> dst_pos:int -> len:int -> unit

        blit ~src ~src_pos ~dst ~dst_pos ~len copies len elements from floatarray src, starting at element number src_pos, to floatarray dst, starting at element number dst_pos. It works correctly even if src and dst are the same floatarray, and the source and destination chunks overlap.

        • raises Invalid_argument

          if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

        val to_list : t -> float list

        to_list a returns the list of all the elements of a.

        val of_list : float list -> t

        of_list l returns a fresh floatarray containing the elements of l.

        • raises Invalid_argument

          if the length of l is greater than Sys.max_floatarray_length.

        Iterators

        val iter : f:(float -> unit) -> t -> unit

        iter ~f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

        val iteri : f:(int -> float -> unit) -> t -> unit

        Same as iter, but the function is applied with the index of the element as first argument, and the element itself as second argument.

        val map : f:(float -> float) -> t -> t

        map ~f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

        val map_inplace : f:(float -> float) -> t -> unit

        map_inplace f a applies function f to all elements of a, and updates their values in place.

        • since 5.1
        val mapi : f:(int -> float -> float) -> t -> t

        Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

        val mapi_inplace : f:(int -> float -> float) -> t -> unit

        Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

        • since 5.1
        val fold_left : f:('acc -> float -> 'acc) -> init:'acc -> t -> 'acc

        fold_left ~f x ~init computes f (... (f (f x init.(0)) init.(1)) ...) init.(n-1), where n is the length of the floatarray init.

        val fold_right : f:(float -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

        fold_right f a init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the floatarray a.

        Iterators on two arrays

        val iter2 : f:(float -> float -> unit) -> t -> t -> unit

        Array.iter2 ~f a b applies function f to all the elements of a and b.

        • raises Invalid_argument

          if the floatarrays are not the same size.

        val map2 : f:(float -> float -> float) -> t -> t -> t

        map2 ~f a b applies function f to all the elements of a and b, and builds a floatarray with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

        • raises Invalid_argument

          if the floatarrays are not the same size.

        Array scanning

        val for_all : f:(float -> bool) -> t -> bool

        for_all ~f [|a1; ...; an|] checks if all elements of the floatarray satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

        val exists : f:(float -> bool) -> t -> bool

        exists f [|a1; ...; an|] checks if at least one element of the floatarray satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

        val mem : float -> set:t -> bool

        mem a ~set is true if and only if there is an element of set that is structurally equal to a, i.e. there is an x in set such that compare a x = 0.

        val mem_ieee : float -> set:t -> bool

        Same as mem, but uses IEEE equality instead of structural equality.

        Array searching

        val find_opt : f:(float -> bool) -> t -> float option
        val find_index : f:(float -> bool) -> t -> int option

        find_index ~f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

        It returns None if there is no such element.

        • since 5.1
        val find_map : f:(float -> 'a option) -> t -> 'a option
        val find_mapi : f:(int -> float -> 'a option) -> t -> 'a option

        Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

        • since 5.1

        Sorting

        val sort : cmp:(float -> float -> int) -> t -> unit

        Sort a floatarray in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

        The current implementation uses Heap Sort. It runs in constant stack space.

        Specification of the comparison function: Let a be the floatarray and cmp the comparison function. The following must be true for all x, y, z in a :

        • cmp x y > 0 if and only if cmp y x < 0
        • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

        When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

        • cmp a.(i) a.(j) >= 0 if and only if i >= j
        val stable_sort : cmp:(float -> float -> int) -> t -> unit

        Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

        The current implementation uses Merge Sort. It uses a temporary floatarray of length n/2, where n is the length of the floatarray. It is usually faster than the current implementation of sort.

        val fast_sort : cmp:(float -> float -> int) -> t -> unit

        Same as sort or stable_sort, whichever is faster on typical input.

        Float arrays and Sequences

        val to_seq : t -> float Stdlib.Seq.t

        Iterate on the floatarray, in increasing order. Modifications of the floatarray during iteration will be reflected in the sequence.

        val to_seqi : t -> (int * float) Stdlib.Seq.t

        Iterate on the floatarray, in increasing order, yielding indices along elements. Modifications of the floatarray during iteration will be reflected in the sequence.

        val of_seq : float Stdlib.Seq.t -> t

        Create an array from the generator.

        val map_to_array : f:(float -> 'a) -> t -> 'a array

        map_to_array ~f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

        val map_from_array : f:('a -> float) -> 'a array -> t

        map_from_array ~f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

        Arrays and concurrency safety

        Care must be taken when concurrently accessing float arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

        Atomicity

        Every float array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

        For example, consider the following program:

        let size = 100_000_000
        +ArrayLabels (less-power.Stdlib_alerts.Float_alerting.ArrayLabels)

        Module Float_alerting.ArrayLabels

        Float arrays with packed representation (labeled functions).

        • alert impure Arrays are not permitted
        type t = floatarray

        The type of float arrays with packed representation.

        • since 4.08
        val length : t -> int

        Return the length (number of elements) of the given floatarray.

        val get : t -> int -> float

        get a n returns the element number n of floatarray a.

        • raises Invalid_argument

          if n is outside the range 0 to (length a - 1).

        val set : t -> int -> float -> unit

        set a n x modifies floatarray a in place, replacing element number n with x.

        • raises Invalid_argument

          if n is outside the range 0 to (length a - 1).

        val make : int -> float -> t

        make n x returns a fresh floatarray of length n, initialized with x.

        • raises Invalid_argument

          if n < 0 or n > Sys.max_floatarray_length.

        val create : int -> t

        create n returns a fresh floatarray of length n, with uninitialized data.

        • raises Invalid_argument

          if n < 0 or n > Sys.max_floatarray_length.

        val init : int -> f:(int -> float) -> t

        init n ~f returns a fresh floatarray of length n, with element number i initialized to the result of f i. In other terms, init n ~f tabulates the results of f applied to the integers 0 to n-1.

        • raises Invalid_argument

          if n < 0 or n > Sys.max_floatarray_length.

        val append : t -> t -> t

        append v1 v2 returns a fresh floatarray containing the concatenation of the floatarrays v1 and v2.

        • raises Invalid_argument

          if length v1 + length v2 > Sys.max_floatarray_length.

        val concat : t list -> t

        Same as append, but concatenates a list of floatarrays.

        val sub : t -> pos:int -> len:int -> t

        sub a ~pos ~len returns a fresh floatarray of length len, containing the elements number pos to pos + len - 1 of floatarray a.

        • raises Invalid_argument

          if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

        val copy : t -> t

        copy a returns a copy of a, that is, a fresh floatarray containing the same elements as a.

        val fill : t -> pos:int -> len:int -> float -> unit

        fill a ~pos ~len x modifies the floatarray a in place, storing x in elements number pos to pos + len - 1.

        • raises Invalid_argument

          if pos and len do not designate a valid subarray of a.

        val blit : src:t -> src_pos:int -> dst:t -> dst_pos:int -> len:int -> unit

        blit ~src ~src_pos ~dst ~dst_pos ~len copies len elements from floatarray src, starting at element number src_pos, to floatarray dst, starting at element number dst_pos. It works correctly even if src and dst are the same floatarray, and the source and destination chunks overlap.

        • raises Invalid_argument

          if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

        val to_list : t -> float list

        to_list a returns the list of all the elements of a.

        val of_list : float list -> t

        of_list l returns a fresh floatarray containing the elements of l.

        • raises Invalid_argument

          if the length of l is greater than Sys.max_floatarray_length.

        Iterators

        val iter : f:(float -> unit) -> t -> unit

        iter ~f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

        val iteri : f:(int -> float -> unit) -> t -> unit

        Same as iter, but the function is applied with the index of the element as first argument, and the element itself as second argument.

        val map : f:(float -> float) -> t -> t

        map ~f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

        val map_inplace : f:(float -> float) -> t -> unit

        map_inplace f a applies function f to all elements of a, and updates their values in place.

        • since 5.1
        val mapi : f:(int -> float -> float) -> t -> t

        Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

        val mapi_inplace : f:(int -> float -> float) -> t -> unit

        Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

        • since 5.1
        val fold_left : f:('acc -> float -> 'acc) -> init:'acc -> t -> 'acc

        fold_left ~f x ~init computes f (... (f (f x init.(0)) init.(1)) ...) init.(n-1), where n is the length of the floatarray init.

        val fold_right : f:(float -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

        fold_right f a init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the floatarray a.

        Iterators on two arrays

        val iter2 : f:(float -> float -> unit) -> t -> t -> unit

        Array.iter2 ~f a b applies function f to all the elements of a and b.

        • raises Invalid_argument

          if the floatarrays are not the same size.

        val map2 : f:(float -> float -> float) -> t -> t -> t

        map2 ~f a b applies function f to all the elements of a and b, and builds a floatarray with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

        • raises Invalid_argument

          if the floatarrays are not the same size.

        Array scanning

        val for_all : f:(float -> bool) -> t -> bool

        for_all ~f [|a1; ...; an|] checks if all elements of the floatarray satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

        val exists : f:(float -> bool) -> t -> bool

        exists f [|a1; ...; an|] checks if at least one element of the floatarray satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

        val mem : float -> set:t -> bool

        mem a ~set is true if and only if there is an element of set that is structurally equal to a, i.e. there is an x in set such that compare a x = 0.

        val mem_ieee : float -> set:t -> bool

        Same as mem, but uses IEEE equality instead of structural equality.

        Array searching

        val find_opt : f:(float -> bool) -> t -> float option
        val find_index : f:(float -> bool) -> t -> int option

        find_index ~f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

        It returns None if there is no such element.

        • since 5.1
        val find_map : f:(float -> 'a option) -> t -> 'a option
        val find_mapi : f:(int -> float -> 'a option) -> t -> 'a option

        Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

        • since 5.1

        Sorting

        val sort : cmp:(float -> float -> int) -> t -> unit

        Sort a floatarray in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

        The current implementation uses Heap Sort. It runs in constant stack space.

        Specification of the comparison function: Let a be the floatarray and cmp the comparison function. The following must be true for all x, y, z in a :

        • cmp x y > 0 if and only if cmp y x < 0
        • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

        When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

        • cmp a.(i) a.(j) >= 0 if and only if i >= j
        val stable_sort : cmp:(float -> float -> int) -> t -> unit

        Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

        The current implementation uses Merge Sort. It uses a temporary floatarray of length n/2, where n is the length of the floatarray. It is usually faster than the current implementation of sort.

        val fast_sort : cmp:(float -> float -> int) -> t -> unit

        Same as sort or stable_sort, whichever is faster on typical input.

        Float arrays and Sequences

        val to_seq : t -> float Stdlib.Seq.t

        Iterate on the floatarray, in increasing order. Modifications of the floatarray during iteration will be reflected in the sequence.

        val to_seqi : t -> (int * float) Stdlib.Seq.t

        Iterate on the floatarray, in increasing order, yielding indices along elements. Modifications of the floatarray during iteration will be reflected in the sequence.

        val of_seq : float Stdlib.Seq.t -> t

        Create an array from the generator.

        val map_to_array : f:(float -> 'a) -> t -> 'a array

        map_to_array ~f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

        val map_from_array : f:('a -> float) -> 'a array -> t

        map_from_array ~f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

        Arrays and concurrency safety

        Care must be taken when concurrently accessing float arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

        Atomicity

        Every float array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

        For example, consider the following program:

        let size = 100_000_000
         let a = Float.ArrayLabels.make size 1.
         let update a f () =
            Float.ArrayLabels.iteri ~f:(fun i x -> Float.Array.set a i (f x)) a
        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Float_alerting/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Float_alerting/index.html
        index 93cebb6..386d00b 100644
        --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Float_alerting/index.html
        +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Float_alerting/index.html
        @@ -1,2 +1,2 @@
         
        -Float_alerting (less-power.Stdlib_alerts.Float_alerting)

        Module type Stdlib_alerts.Float_alerting

        include sig ... end
        val zero : float

        The floating point 0.

        • since 4.08
        val one : float

        The floating-point 1.

        • since 4.08
        val minus_one : float

        The floating-point -1.

        • since 4.08
        val neg : float -> float

        Unary negation.

        val add : float -> float -> float

        Floating-point addition.

        val sub : float -> float -> float

        Floating-point subtraction.

        val mul : float -> float -> float

        Floating-point multiplication.

        val div : float -> float -> float

        Floating-point division.

        val fma : float -> float -> float -> float

        fma x y z returns x * y + z, with a best effort for computing this expression with a single rounding, using either hardware instructions (providing full IEEE compliance) or a software emulation.

        On 64-bit Cygwin, 64-bit mingw-w64 and MSVC 2017 and earlier, this function may be emulated owing to known bugs on limitations on these platforms. Note: since software emulation of the fma is costly, make sure that you are using hardware fma support if performance matters.

        • since 4.08
        val rem : float -> float -> float

        rem a b returns the remainder of a with respect to b. The returned value is a -. n *. b, where n is the quotient a /. b rounded towards zero to an integer.

        val succ : float -> float

        succ x returns the floating point number right after x i.e., the smallest floating-point number greater than x. See also next_after.

        • since 4.08
        val pred : float -> float

        pred x returns the floating-point number right before x i.e., the greatest floating-point number smaller than x. See also next_after.

        • since 4.08
        val abs : float -> float

        abs f returns the absolute value of f.

        val infinity : float

        Positive infinity.

        val neg_infinity : float

        Negative infinity.

        val nan : float

        A special floating-point value denoting the result of an undefined operation such as 0.0 /. 0.0. Stands for 'not a number'. Any floating-point operation with nan as argument returns nan as result, unless otherwise specified in IEEE 754 standard. As for floating-point comparisons, =, <, <=, > and >= return false and <> returns true if one or both of their arguments is nan.

        nan is quiet_nan since 5.1; it was a signaling NaN before.

        val signaling_nan : float

        Signaling NaN. The corresponding signals do not raise OCaml exception, but the value can be useful for interoperability with C libraries.

        • since 5.1
        val quiet_nan : float

        Quiet NaN.

        • since 5.1
        val pi : float

        The constant pi.

        val max_float : float

        The largest positive finite value of type float.

        val min_float : float

        The smallest positive, non-zero, non-denormalized value of type float.

        val epsilon : float

        The difference between 1.0 and the smallest exactly representable floating-point number greater than 1.0.

        val is_finite : float -> bool

        is_finite x is true if and only if x is finite i.e., not infinite and not nan.

        • since 4.08
        val is_infinite : float -> bool

        is_infinite x is true if and only if x is infinity or neg_infinity.

        • since 4.08
        val is_nan : float -> bool

        is_nan x is true if and only if x is not a number (see nan).

        • since 4.08
        val is_integer : float -> bool

        is_integer x is true if and only if x is an integer.

        • since 4.08
        val of_int : int -> float

        Convert an integer to floating-point.

        val to_int : float -> int

        Truncate the given floating-point number to an integer. The result is unspecified if the argument is nan or falls outside the range of representable integers.

        val of_string : string -> float

        Convert the given string to a float. The string is read in decimal (by default) or in hexadecimal (marked by 0x or 0X). The format of decimal floating-point numbers is [-] dd.ddd (e|E) [+|-] dd , where d stands for a decimal digit. The format of hexadecimal floating-point numbers is [-] 0(x|X) hh.hhh (p|P) [+|-] dd , where h stands for an hexadecimal digit and d for a decimal digit. In both cases, at least one of the integer and fractional parts must be given; the exponent part is optional. The _ (underscore) character can appear anywhere in the string and is ignored. Depending on the execution platforms, other representations of floating-point numbers can be accepted, but should not be relied upon.

        • raises Failure

          if the given string is not a valid representation of a float.

        val of_string_opt : string -> float option

        Same as of_string, but returns None instead of raising.

        val to_string : float -> string

        Return a string representation of a floating-point number.

        This conversion can involve a loss of precision. For greater control over the manner in which the number is printed, see Printf.

        This function is an alias for Stdlib.string_of_float.

        type fpclass = Stdlib.fpclass =
        1. | FP_normal
          (*

          Normal number, none of the below

          *)
        2. | FP_subnormal
          (*

          Number very close to 0.0, has reduced precision

          *)
        3. | FP_zero
          (*

          Number is 0.0 or -0.0

          *)
        4. | FP_infinite
          (*

          Number is positive or negative infinity

          *)
        5. | FP_nan
          (*

          Not a number: result of an undefined operation

          *)

        The five classes of floating-point numbers, as determined by the classify_float function.

        val classify_float : float -> fpclass

        Return the class of the given floating-point number: normal, subnormal, zero, infinite, or not a number.

        val pow : float -> float -> float

        Exponentiation.

        val sqrt : float -> float

        Square root.

        val cbrt : float -> float

        Cube root.

        • since 4.13
        val exp : float -> float

        Exponential.

        val exp2 : float -> float

        Base 2 exponential function.

        • since 4.13
        val log : float -> float

        Natural logarithm.

        val log10 : float -> float

        Base 10 logarithm.

        val log2 : float -> float

        Base 2 logarithm.

        • since 4.13
        val expm1 : float -> float

        expm1 x computes exp x -. 1.0, giving numerically-accurate results even if x is close to 0.0.

        val log1p : float -> float

        log1p x computes log(1.0 +. x) (natural logarithm), giving numerically-accurate results even if x is close to 0.0.

        val cos : float -> float

        Cosine. Argument is in radians.

        val sin : float -> float

        Sine. Argument is in radians.

        val tan : float -> float

        Tangent. Argument is in radians.

        val acos : float -> float

        Arc cosine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between 0.0 and pi.

        val asin : float -> float

        Arc sine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between -pi/2 and pi/2.

        val atan : float -> float

        Arc tangent. Result is in radians and is between -pi/2 and pi/2.

        val atan2 : float -> float -> float

        atan2 y x returns the arc tangent of y /. x. The signs of x and y are used to determine the quadrant of the result. Result is in radians and is between -pi and pi.

        val hypot : float -> float -> float

        hypot x y returns sqrt(x *. x +. y *. y), that is, the length of the hypotenuse of a right-angled triangle with sides of length x and y, or, equivalently, the distance of the point (x,y) to origin. If one of x or y is infinite, returns infinity even if the other is nan.

        val cosh : float -> float

        Hyperbolic cosine. Argument is in radians.

        val sinh : float -> float

        Hyperbolic sine. Argument is in radians.

        val tanh : float -> float

        Hyperbolic tangent. Argument is in radians.

        val acosh : float -> float

        Hyperbolic arc cosine. The argument must fall within the range [1.0, inf]. Result is in radians and is between 0.0 and inf.

        • since 4.13
        val asinh : float -> float

        Hyperbolic arc sine. The argument and result range over the entire real line. Result is in radians.

        • since 4.13
        val atanh : float -> float

        Hyperbolic arc tangent. The argument must fall within the range [-1.0, 1.0]. Result is in radians and ranges over the entire real line.

        • since 4.13
        val erf : float -> float

        Error function. The argument ranges over the entire real line. The result is always within [-1.0, 1.0].

        • since 4.13
        val erfc : float -> float

        Complementary error function (erfc x = 1 - erf x). The argument ranges over the entire real line. The result is always within [-1.0, 1.0].

        • since 4.13
        val trunc : float -> float

        trunc x rounds x to the nearest integer whose absolute value is less than or equal to x.

        • since 4.08
        val round : float -> float

        round x rounds x to the nearest integer with ties (fractional values of 0.5) rounded away from zero, regardless of the current rounding direction. If x is an integer, +0., -0., nan, or infinite, x itself is returned.

        On 64-bit mingw-w64, this function may be emulated owing to a bug in the C runtime library (CRT) on this platform.

        • since 4.08
        val ceil : float -> float

        Round above to an integer value. ceil f returns the least integer value greater than or equal to f. The result is returned as a float.

        val floor : float -> float

        Round below to an integer value. floor f returns the greatest integer value less than or equal to f. The result is returned as a float.

        val next_after : float -> float -> float

        next_after x y returns the next representable floating-point value following x in the direction of y. More precisely, if y is greater (resp. less) than x, it returns the smallest (resp. largest) representable number greater (resp. less) than x. If x equals y, the function returns y. If x or y is nan, a nan is returned. Note that next_after max_float infinity = infinity and that next_after 0. infinity is the smallest denormalized positive number. If x is the smallest denormalized positive number, next_after x 0. = 0.

        • since 4.08
        val copy_sign : float -> float -> float

        copy_sign x y returns a float whose absolute value is that of x and whose sign is that of y. If x is nan, returns nan. If y is nan, returns either x or -. x, but it is not specified which.

        val sign_bit : float -> bool

        sign_bit x is true if and only if the sign bit of x is set. For example sign_bit 1. and signbit 0. are false while sign_bit (-1.) and sign_bit (-0.) are true.

        • since 4.08
        val frexp : float -> float * int

        frexp f returns the pair of the significant and the exponent of f. When f is zero, the significant x and the exponent n of f are equal to zero. When f is non-zero, they are defined by f = x *. 2 ** n and 0.5 <= x < 1.0.

        val ldexp : float -> int -> float

        ldexp x n returns x *. 2 ** n.

        val modf : float -> float * float

        modf f returns the pair of the fractional and integral part of f.

        type t = float

        An alias for the type of floating-point numbers.

        val compare : t -> t -> int

        compare x y returns 0 if x is equal to y, a negative integer if x is less than y, and a positive integer if x is greater than y. compare treats nan as equal to itself and less than any other float value. This treatment of nan ensures that compare defines a total ordering relation.

        val equal : t -> t -> bool

        The equal function for floating-point numbers, compared using compare.

        val min : t -> t -> t

        min x y returns the minimum of x and y. It returns nan when x or y is nan. Moreover min (-0.) (+0.) = -0.

        • since 4.08
        val max : float -> float -> float

        max x y returns the maximum of x and y. It returns nan when x or y is nan. Moreover max (-0.) (+0.) = +0.

        • since 4.08
        val min_max : float -> float -> float * float

        min_max x y is (min x y, max x y), just more efficient.

        • since 4.08
        val min_num : t -> t -> t

        min_num x y returns the minimum of x and y treating nan as missing values. If both x and y are nan, nan is returned. Moreover min_num (-0.) (+0.) = -0.

        • since 4.08
        val max_num : t -> t -> t

        max_num x y returns the maximum of x and y treating nan as missing values. If both x and y are nan nan is returned. Moreover max_num (-0.) (+0.) = +0.

        • since 4.08
        val min_max_num : float -> float -> float * float

        min_max_num x y is (min_num x y, max_num x y), just more efficient. Note that in particular min_max_num x nan = (x, x) and min_max_num nan y = (y, y).

        • since 4.08
        val seeded_hash : int -> t -> int

        A seeded hash function for floats, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

        • since 5.1
        val hash : t -> int

        An unseeded hash function for floats, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

        module Array : sig ... end

        Float arrays with packed representation.

        module ArrayLabels : sig ... end

        Float arrays with packed representation (labeled functions).

        +Float_alerting (less-power.Stdlib_alerts.Float_alerting)

        Module type Stdlib_alerts.Float_alerting

        include sig ... end
        val zero : float

        The floating point 0.

        • since 4.08
        val one : float

        The floating-point 1.

        • since 4.08
        val minus_one : float

        The floating-point -1.

        • since 4.08
        val neg : float -> float

        Unary negation.

        val add : float -> float -> float

        Floating-point addition.

        val sub : float -> float -> float

        Floating-point subtraction.

        val mul : float -> float -> float

        Floating-point multiplication.

        val div : float -> float -> float

        Floating-point division.

        val fma : float -> float -> float -> float

        fma x y z returns x * y + z, with a best effort for computing this expression with a single rounding, using either hardware instructions (providing full IEEE compliance) or a software emulation.

        On 64-bit Cygwin, 64-bit mingw-w64 and MSVC 2017 and earlier, this function may be emulated owing to known bugs on limitations on these platforms. Note: since software emulation of the fma is costly, make sure that you are using hardware fma support if performance matters.

        • since 4.08
        val rem : float -> float -> float

        rem a b returns the remainder of a with respect to b. The returned value is a -. n *. b, where n is the quotient a /. b rounded towards zero to an integer.

        val succ : float -> float

        succ x returns the floating point number right after x i.e., the smallest floating-point number greater than x. See also next_after.

        • since 4.08
        val pred : float -> float

        pred x returns the floating-point number right before x i.e., the greatest floating-point number smaller than x. See also next_after.

        • since 4.08
        val abs : float -> float

        abs f returns the absolute value of f.

        val infinity : float

        Positive infinity.

        val neg_infinity : float

        Negative infinity.

        val nan : float

        A special floating-point value denoting the result of an undefined operation such as 0.0 /. 0.0. Stands for 'not a number'. Any floating-point operation with nan as argument returns nan as result, unless otherwise specified in IEEE 754 standard. As for floating-point comparisons, =, <, <=, > and >= return false and <> returns true if one or both of their arguments is nan.

        nan is quiet_nan since 5.1; it was a signaling NaN before.

        val signaling_nan : float

        Signaling NaN. The corresponding signals do not raise OCaml exception, but the value can be useful for interoperability with C libraries.

        • since 5.1
        val quiet_nan : float

        Quiet NaN.

        • since 5.1
        val pi : float

        The constant pi.

        val max_float : float

        The largest positive finite value of type float.

        val min_float : float

        The smallest positive, non-zero, non-denormalized value of type float.

        val epsilon : float

        The difference between 1.0 and the smallest exactly representable floating-point number greater than 1.0.

        val is_finite : float -> bool

        is_finite x is true if and only if x is finite i.e., not infinite and not nan.

        • since 4.08
        val is_infinite : float -> bool

        is_infinite x is true if and only if x is infinity or neg_infinity.

        • since 4.08
        val is_nan : float -> bool

        is_nan x is true if and only if x is not a number (see nan).

        • since 4.08
        val is_integer : float -> bool

        is_integer x is true if and only if x is an integer.

        • since 4.08
        val of_int : int -> float

        Convert an integer to floating-point.

        val to_int : float -> int

        Truncate the given floating-point number to an integer. The result is unspecified if the argument is nan or falls outside the range of representable integers.

        val of_string : string -> float

        Convert the given string to a float. The string is read in decimal (by default) or in hexadecimal (marked by 0x or 0X). The format of decimal floating-point numbers is [-] dd.ddd (e|E) [+|-] dd , where d stands for a decimal digit. The format of hexadecimal floating-point numbers is [-] 0(x|X) hh.hhh (p|P) [+|-] dd , where h stands for an hexadecimal digit and d for a decimal digit. In both cases, at least one of the integer and fractional parts must be given; the exponent part is optional. The _ (underscore) character can appear anywhere in the string and is ignored. Depending on the execution platforms, other representations of floating-point numbers can be accepted, but should not be relied upon.

        • raises Failure

          if the given string is not a valid representation of a float.

        val of_string_opt : string -> float option

        Same as of_string, but returns None instead of raising.

        val to_string : float -> string

        Return a string representation of a floating-point number.

        This conversion can involve a loss of precision. For greater control over the manner in which the number is printed, see Printf.

        This function is an alias for Stdlib.string_of_float.

        type fpclass = Stdlib.fpclass =
        1. | FP_normal
          (*

          Normal number, none of the below

          *)
        2. | FP_subnormal
          (*

          Number very close to 0.0, has reduced precision

          *)
        3. | FP_zero
          (*

          Number is 0.0 or -0.0

          *)
        4. | FP_infinite
          (*

          Number is positive or negative infinity

          *)
        5. | FP_nan
          (*

          Not a number: result of an undefined operation

          *)

        The five classes of floating-point numbers, as determined by the classify_float function.

        val classify_float : float -> fpclass

        Return the class of the given floating-point number: normal, subnormal, zero, infinite, or not a number.

        val pow : float -> float -> float

        Exponentiation.

        val sqrt : float -> float

        Square root.

        val cbrt : float -> float

        Cube root.

        • since 4.13
        val exp : float -> float

        Exponential.

        val exp2 : float -> float

        Base 2 exponential function.

        • since 4.13
        val log : float -> float

        Natural logarithm.

        val log10 : float -> float

        Base 10 logarithm.

        val log2 : float -> float

        Base 2 logarithm.

        • since 4.13
        val expm1 : float -> float

        expm1 x computes exp x -. 1.0, giving numerically-accurate results even if x is close to 0.0.

        val log1p : float -> float

        log1p x computes log(1.0 +. x) (natural logarithm), giving numerically-accurate results even if x is close to 0.0.

        val cos : float -> float

        Cosine. Argument is in radians.

        val sin : float -> float

        Sine. Argument is in radians.

        val tan : float -> float

        Tangent. Argument is in radians.

        val acos : float -> float

        Arc cosine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between 0.0 and pi.

        val asin : float -> float

        Arc sine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between -pi/2 and pi/2.

        val atan : float -> float

        Arc tangent. Result is in radians and is between -pi/2 and pi/2.

        val atan2 : float -> float -> float

        atan2 y x returns the arc tangent of y /. x. The signs of x and y are used to determine the quadrant of the result. Result is in radians and is between -pi and pi.

        val hypot : float -> float -> float

        hypot x y returns sqrt(x *. x +. y *. y), that is, the length of the hypotenuse of a right-angled triangle with sides of length x and y, or, equivalently, the distance of the point (x,y) to origin. If one of x or y is infinite, returns infinity even if the other is nan.

        val cosh : float -> float

        Hyperbolic cosine. Argument is in radians.

        val sinh : float -> float

        Hyperbolic sine. Argument is in radians.

        val tanh : float -> float

        Hyperbolic tangent. Argument is in radians.

        val acosh : float -> float

        Hyperbolic arc cosine. The argument must fall within the range [1.0, inf]. Result is in radians and is between 0.0 and inf.

        • since 4.13
        val asinh : float -> float

        Hyperbolic arc sine. The argument and result range over the entire real line. Result is in radians.

        • since 4.13
        val atanh : float -> float

        Hyperbolic arc tangent. The argument must fall within the range [-1.0, 1.0]. Result is in radians and ranges over the entire real line.

        • since 4.13
        val erf : float -> float

        Error function. The argument ranges over the entire real line. The result is always within [-1.0, 1.0].

        • since 4.13
        val erfc : float -> float

        Complementary error function (erfc x = 1 - erf x). The argument ranges over the entire real line. The result is always within [-1.0, 1.0].

        • since 4.13
        val trunc : float -> float

        trunc x rounds x to the nearest integer whose absolute value is less than or equal to x.

        • since 4.08
        val round : float -> float

        round x rounds x to the nearest integer with ties (fractional values of 0.5) rounded away from zero, regardless of the current rounding direction. If x is an integer, +0., -0., nan, or infinite, x itself is returned.

        On 64-bit mingw-w64, this function may be emulated owing to a bug in the C runtime library (CRT) on this platform.

        • since 4.08
        val ceil : float -> float

        Round above to an integer value. ceil f returns the least integer value greater than or equal to f. The result is returned as a float.

        val floor : float -> float

        Round below to an integer value. floor f returns the greatest integer value less than or equal to f. The result is returned as a float.

        val next_after : float -> float -> float

        next_after x y returns the next representable floating-point value following x in the direction of y. More precisely, if y is greater (resp. less) than x, it returns the smallest (resp. largest) representable number greater (resp. less) than x. If x equals y, the function returns y. If x or y is nan, a nan is returned. Note that next_after max_float infinity = infinity and that next_after 0. infinity is the smallest denormalized positive number. If x is the smallest denormalized positive number, next_after x 0. = 0.

        • since 4.08
        val copy_sign : float -> float -> float

        copy_sign x y returns a float whose absolute value is that of x and whose sign is that of y. If x is nan, returns nan. If y is nan, returns either x or -. x, but it is not specified which.

        val sign_bit : float -> bool

        sign_bit x is true if and only if the sign bit of x is set. For example sign_bit 1. and signbit 0. are false while sign_bit (-1.) and sign_bit (-0.) are true.

        • since 4.08
        val frexp : float -> float * int

        frexp f returns the pair of the significant and the exponent of f. When f is zero, the significant x and the exponent n of f are equal to zero. When f is non-zero, they are defined by f = x *. 2 ** n and 0.5 <= x < 1.0.

        val ldexp : float -> int -> float

        ldexp x n returns x *. 2 ** n.

        val modf : float -> float * float

        modf f returns the pair of the fractional and integral part of f.

        type t = float

        An alias for the type of floating-point numbers.

        val compare : t -> t -> int

        compare x y returns 0 if x is equal to y, a negative integer if x is less than y, and a positive integer if x is greater than y. compare treats nan as equal to itself and less than any other float value. This treatment of nan ensures that compare defines a total ordering relation.

        val equal : t -> t -> bool

        The equal function for floating-point numbers, compared using compare.

        val min : t -> t -> t

        min x y returns the minimum of x and y. It returns nan when x or y is nan. Moreover min (-0.) (+0.) = -0.

        • since 4.08
        val max : float -> float -> float

        max x y returns the maximum of x and y. It returns nan when x or y is nan. Moreover max (-0.) (+0.) = +0.

        • since 4.08
        val min_max : float -> float -> float * float

        min_max x y is (min x y, max x y), just more efficient.

        • since 4.08
        val min_num : t -> t -> t

        min_num x y returns the minimum of x and y treating nan as missing values. If both x and y are nan, nan is returned. Moreover min_num (-0.) (+0.) = -0.

        • since 4.08
        val max_num : t -> t -> t

        max_num x y returns the maximum of x and y treating nan as missing values. If both x and y are nan nan is returned. Moreover max_num (-0.) (+0.) = +0.

        • since 4.08
        val min_max_num : float -> float -> float * float

        min_max_num x y is (min_num x y, max_num x y), just more efficient. Note that in particular min_max_num x nan = (x, x) and min_max_num nan y = (y, y).

        • since 4.08
        val seeded_hash : int -> t -> int

        A seeded hash function for floats, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

        • since 5.1
        val hash : t -> int

        An unseeded hash function for floats, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

        module Array : sig ... end

        Float arrays with packed representation.

        module ArrayLabels : sig ... end

        Float arrays with packed representation (labeled functions).

        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/Make/argument-1-H/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/Make/argument-1-H/index.html index 7bdc563..0ee1793 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/Make/argument-1-H/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/Make/argument-1-H/index.html @@ -1,2 +1,2 @@ -H (less-power.Stdlib_alerts.Hashtbl_alerting.Make.H)

        Parameter Make.H

        type t

        The type of the hashtable keys.

        val equal : t -> t -> bool

        The equality predicate used to compare keys.

        val hash : t -> int

        A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

        • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
        • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
        • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
        +H (less-power.Stdlib_alerts.Hashtbl_alerting.Make.H)

        Parameter Make.H

        type t

        The type of the hashtable keys.

        val equal : t -> t -> bool

        The equality predicate used to compare keys.

        val hash : t -> int

        A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

        • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
        • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
        • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/Make/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/Make/index.html index 6afe005..faa45ab 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/Make/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/Make/index.html @@ -1,2 +1,2 @@ -Make (less-power.Stdlib_alerts.Hashtbl_alerting.Make)

        Module Hashtbl_alerting.Make

        Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

        • alert impure Hash tables are not permitted

        Parameters

        module H : HashedType

        Signature

        type key = H.t
        type !'a t
        val create : int -> 'a t
        val clear : 'a t -> unit
        val reset : 'a t -> unit
        • since 4.00
        val copy : 'a t -> 'a t
        val add : 'a t -> key -> 'a -> unit
        val remove : 'a t -> key -> unit
        val find : 'a t -> key -> 'a
        val find_opt : 'a t -> key -> 'a option
        • since 4.05
        val find_all : 'a t -> key -> 'a list
        val replace : 'a t -> key -> 'a -> unit
        val mem : 'a t -> key -> bool
        val iter : (key -> 'a -> unit) -> 'a t -> unit
        val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
        • since 4.03
        val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
        val length : 'a t -> int
        val stats : 'a t -> statistics
        • since 4.00
        val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
        • since 4.07
        val to_seq_keys : _ t -> key Stdlib.Seq.t
        • since 4.07
        val to_seq_values : 'a t -> 'a Stdlib.Seq.t
        • since 4.07
        val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
        • since 4.07
        +Make (less-power.Stdlib_alerts.Hashtbl_alerting.Make)

        Module Hashtbl_alerting.Make

        Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

        • alert impure Hash tables are not permitted

        Parameters

        module H : HashedType

        Signature

        type key = H.t
        type !'a t
        val create : int -> 'a t
        val clear : 'a t -> unit
        val reset : 'a t -> unit
        • since 4.00
        val copy : 'a t -> 'a t
        val add : 'a t -> key -> 'a -> unit
        val remove : 'a t -> key -> unit
        val find : 'a t -> key -> 'a
        val find_opt : 'a t -> key -> 'a option
        • since 4.05
        val find_all : 'a t -> key -> 'a list
        val replace : 'a t -> key -> 'a -> unit
        val mem : 'a t -> key -> bool
        val iter : (key -> 'a -> unit) -> 'a t -> unit
        val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
        • since 4.03
        val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
        val length : 'a t -> int
        val stats : 'a t -> statistics
        • since 4.00
        val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
        • since 4.07
        val to_seq_keys : _ t -> key Stdlib.Seq.t
        • since 4.07
        val to_seq_values : 'a t -> 'a Stdlib.Seq.t
        • since 4.07
        val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
        • since 4.07
        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/MakeSeeded/argument-1-H/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/MakeSeeded/argument-1-H/index.html index ea2fa6e..a132bdb 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/MakeSeeded/argument-1-H/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/MakeSeeded/argument-1-H/index.html @@ -1,2 +1,2 @@ -H (less-power.Stdlib_alerts.Hashtbl_alerting.MakeSeeded.H)

        Parameter MakeSeeded.H

        type t

        The type of the hashtable keys.

        val equal : t -> t -> bool

        The equality predicate used to compare keys.

        val seeded_hash : int -> t -> int

        A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

        +H (less-power.Stdlib_alerts.Hashtbl_alerting.MakeSeeded.H)

        Parameter MakeSeeded.H

        type t

        The type of the hashtable keys.

        val equal : t -> t -> bool

        The equality predicate used to compare keys.

        val seeded_hash : int -> t -> int

        A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/MakeSeeded/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/MakeSeeded/index.html index 45914fb..d71dc65 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/MakeSeeded/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/MakeSeeded/index.html @@ -1,2 +1,2 @@ -MakeSeeded (less-power.Stdlib_alerts.Hashtbl_alerting.MakeSeeded)

        Module Hashtbl_alerting.MakeSeeded

        Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

        • since 4.00
        • alert impure Hash tables are not permitted

        Parameters

        Signature

        type key = H.t
        type !'a t
        val create : ?random:bool -> int -> 'a t
        val clear : 'a t -> unit
        val reset : 'a t -> unit
        val copy : 'a t -> 'a t
        val add : 'a t -> key -> 'a -> unit
        val remove : 'a t -> key -> unit
        val find : 'a t -> key -> 'a
        val find_opt : 'a t -> key -> 'a option
        • since 4.05
        val find_all : 'a t -> key -> 'a list
        val replace : 'a t -> key -> 'a -> unit
        val mem : 'a t -> key -> bool
        val iter : (key -> 'a -> unit) -> 'a t -> unit
        val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
        • since 4.03
        val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
        val length : 'a t -> int
        val stats : 'a t -> statistics
        val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
        • since 4.07
        val to_seq_keys : _ t -> key Stdlib.Seq.t
        • since 4.07
        val to_seq_values : 'a t -> 'a Stdlib.Seq.t
        • since 4.07
        val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
        • since 4.07
        +MakeSeeded (less-power.Stdlib_alerts.Hashtbl_alerting.MakeSeeded)

        Module Hashtbl_alerting.MakeSeeded

        Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

        • since 4.00
        • alert impure Hash tables are not permitted

        Parameters

        Signature

        type key = H.t
        type !'a t
        val create : ?random:bool -> int -> 'a t
        val clear : 'a t -> unit
        val reset : 'a t -> unit
        val copy : 'a t -> 'a t
        val add : 'a t -> key -> 'a -> unit
        val remove : 'a t -> key -> unit
        val find : 'a t -> key -> 'a
        val find_opt : 'a t -> key -> 'a option
        • since 4.05
        val find_all : 'a t -> key -> 'a list
        val replace : 'a t -> key -> 'a -> unit
        val mem : 'a t -> key -> bool
        val iter : (key -> 'a -> unit) -> 'a t -> unit
        val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
        • since 4.03
        val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
        val length : 'a t -> int
        val stats : 'a t -> statistics
        val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
        • since 4.07
        val to_seq_keys : _ t -> key Stdlib.Seq.t
        • since 4.07
        val to_seq_values : 'a t -> 'a Stdlib.Seq.t
        • since 4.07
        val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
        • since 4.07
        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/index.html index 4c58249..b201915 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/index.html @@ -1,2 +1,2 @@ -Hashtbl_alerting (less-power.Stdlib_alerts.Hashtbl_alerting)

        Module type Stdlib_alerts.Hashtbl_alerting

        type ('a, 'b) t = ('a, 'b) Stdlib.Hashtbl.t
        • alert impure Hash tables are not permitted
        type statistics = Stdlib.Hashtbl.statistics = {
        1. num_bindings : int;
        2. num_buckets : int;
        3. max_bucket_length : int;
        4. bucket_histogram : int array;
        }
        • alert impure Hash tables are not permitted
        include sig ... end
        val hash : 'a -> int

        Hashtbl.hash x associates a nonnegative integer to any value of any type. It is guaranteed that if x = y or Stdlib.compare x y = 0, then hash x = hash y. Moreover, hash always terminates, even on cyclic structures.

        val seeded_hash : int -> 'a -> int

        A variant of hash that is further parameterized by an integer seed.

        • since 4.00
        val hash_param : int -> int -> 'a -> int

        Hashtbl.hash_param meaningful total x computes a hash value for x, with the same properties as for hash. The two extra integer parameters meaningful and total give more precise control over hashing. Hashing performs a breadth-first, left-to-right traversal of the structure x, stopping after meaningful meaningful nodes were encountered, or total nodes (meaningful or not) were encountered. If total as specified by the user exceeds a certain value, currently 256, then it is capped to that value. Meaningful nodes are: integers; floating-point numbers; strings; characters; booleans; and constant constructors. Larger values of meaningful and total means that more nodes are taken into account to compute the final hash value, and therefore collisions are less likely to happen. However, hashing takes longer. The parameters meaningful and total govern the tradeoff between accuracy and speed. As default choices, hash and seeded_hash take meaningful = 10 and total = 100.

        val seeded_hash_param : int -> int -> int -> 'a -> int

        A variant of hash_param that is further parameterized by an integer seed. Usage: Hashtbl.seeded_hash_param meaningful total seed x.

        • since 4.00
        val create : ?random:bool -> int -> ('a, 'b) t

        Hashtbl.create n creates a new, empty hash table, with initial size n. For best results, n should be on the order of the expected number of elements that will be in the table. The table grows as needed, so n is just an initial guess.

        The optional ~random parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of Hashtbl.create or deterministic over all executions.

        A hash table that is created with ~random set to false uses a fixed hash function (hash) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other security-sensitive applications, the deterministic collision patterns can be exploited by a malicious user to create a denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down.

        A hash table that is created with ~random set to true uses the seeded hash function seeded_hash with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among 2^{30} different hash functions. All these hash functions have different collision patterns, rendering ineffective the denial-of-service attack described above. However, because of randomization, enumerating all elements of the hash table using fold or iter is no longer deterministic: elements are enumerated in different orders at different runs of the program.

        If no ~random parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling randomize or by setting the R flag in the OCAMLRUNPARAM environment variable.

        • before 4.00

          the ~random parameter was not present and all hash tables were created in non-randomized mode.

        • alert impure Hash tables are not permitted
        val clear : ('a, 'b) t -> unit

        Empty a hash table. Use reset instead of clear to shrink the size of the bucket table to its initial size.

        • alert impure Hash tables are not permitted
        val reset : ('a, 'b) t -> unit

        Empty a hash table and shrink the size of the bucket table to its initial size.

        • since 4.00
        • alert impure Hash tables are not permitted
        val copy : ('a, 'b) t -> ('a, 'b) t

        Return a copy of the given hashtable.

        • alert impure Hash tables are not permitted
        val add : ('a, 'b) t -> 'a -> 'b -> unit

        Hashtbl.add tbl key data adds a binding of key to data in table tbl.

        Warning: Previous bindings for key are not removed, but simply hidden. That is, after performing remove tbl key, the previous binding for key, if any, is restored. (Same behavior as with association lists.)

        If you desire the classic behavior of replacing elements, see replace.

        • alert impure Hash tables are not permitted
        val find : ('a, 'b) t -> 'a -> 'b

        Hashtbl.find tbl x returns the current binding of x in tbl, or raises Not_found if no such binding exists.

        • alert impure Hash tables are not permitted
        val find_opt : ('a, 'b) t -> 'a -> 'b option

        Hashtbl.find_opt tbl x returns the current binding of x in tbl, or None if no such binding exists.

        • since 4.05
        • alert impure Hash tables are not permitted
        val find_all : ('a, 'b) t -> 'a -> 'b list

        Hashtbl.find_all tbl x returns the list of all data associated with x in tbl. The current binding is returned first, then the previous bindings, in reverse order of introduction in the table.

        • alert impure Hash tables are not permitted
        val mem : ('a, 'b) t -> 'a -> bool

        Hashtbl.mem tbl x checks if x is bound in tbl.

        • alert impure Hash tables are not permitted
        val remove : ('a, 'b) t -> 'a -> unit

        Hashtbl.remove tbl x removes the current binding of x in tbl, restoring the previous binding if it exists. It does nothing if x is not bound in tbl.

        • alert impure Hash tables are not permitted
        val replace : ('a, 'b) t -> 'a -> 'b -> unit

        Hashtbl.replace tbl key data replaces the current binding of key in tbl by a binding of key to data. If key is unbound in tbl, a binding of key to data is added to tbl. This is functionally equivalent to remove tbl key followed by add tbl key data.

        • alert impure Hash tables are not permitted
        val iter : ('a -> 'b -> unit) -> ('a, 'b) t -> unit

        Hashtbl.iter f tbl applies f to all bindings in table tbl. f receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to f.

        The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

        If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

        The behavior is not specified if the hash table is modified by f during the iteration.

        • alert impure Hash tables are not permitted
        val filter_map_inplace : ('a -> 'b -> 'b option) -> ('a, 'b) t -> unit

        Hashtbl.filter_map_inplace f tbl applies f to all bindings in table tbl and update each binding depending on the result of f. If f returns None, the binding is discarded. If it returns Some new_val, the binding is update to associate the key to new_val.

        Other comments for iter apply as well.

        • since 4.03
        • alert impure Hash tables are not permitted
        val fold : ('a -> 'b -> 'acc -> 'acc) -> ('a, 'b) t -> 'acc -> 'acc

        Hashtbl.fold f tbl init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in tbl, and d1 ... dN are the associated values. Each binding is presented exactly once to f.

        The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

        If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

        The behavior is not specified if the hash table is modified by f during the iteration.

        • alert impure Hash tables are not permitted
        val length : ('a, 'b) t -> int

        Hashtbl.length tbl returns the number of bindings in tbl. It takes constant time. Multiple bindings are counted once each, so Hashtbl.length gives the number of times Hashtbl.iter calls its first argument.

        • alert impure Hash tables are not permitted
        val randomize : unit -> unit

        After a call to Hashtbl.randomize(), hash tables are created in randomized mode by default: create returns randomized hash tables, unless the ~random:false optional parameter is given. The same effect can be achieved by setting the R parameter in the OCAMLRUNPARAM environment variable.

        It is recommended that applications or Web frameworks that need to protect themselves against the denial-of-service attack described in create call Hashtbl.randomize() at initialization time before any domains are created.

        Note that once Hashtbl.randomize() was called, there is no way to revert to the non-randomized default behavior of create. This is intentional. Non-randomized hash tables can still be created using Hashtbl.create ~random:false.

        • since 4.00
        • alert impure Hash tables are not permitted
        val is_randomized : unit -> bool

        Return true if the tables are currently created in randomized mode by default, false otherwise.

        • since 4.03
        • alert impure Hash tables are not permitted
        val rebuild : ?random:bool -> ('a, 'b) t -> ('a, 'b) t

        Return a copy of the given hashtable. Unlike copy, rebuild h re-hashes all the (key, value) entries of the original table h. The returned hash table is randomized if h was randomized, or the optional random parameter is true, or if the default is to create randomized hash tables; see create for more information.

        rebuild can safely be used to import a hash table built by an old version of the Hashtbl module, then marshaled to persistent storage. After unmarshaling, apply rebuild to produce a hash table for the current version of the Hashtbl module.

        • since 4.12
        • alert impure Hash tables are not permitted
        val stats : ('a, 'b) t -> statistics

        Hashtbl.stats tbl returns statistics about the table tbl: number of buckets, size of the biggest bucket, distribution of buckets by size.

        • since 4.00
        • alert impure Hash tables are not permitted
        val to_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t

        Iterate on the whole table. The order in which the bindings appear in the sequence is unspecified. However, if the table contains several bindings for the same key, they appear in reversed order of introduction, that is, the most recent binding appears first.

        The behavior is not specified if the hash table is modified during the iteration.

        • since 4.07
        • alert impure Hash tables are not permitted
        val to_seq_keys : ('a, _) t -> 'a Stdlib.Seq.t

        Same as Seq.map fst (to_seq m)

        • since 4.07
        • alert impure Hash tables are not permitted
        val to_seq_values : (_, 'b) t -> 'b Stdlib.Seq.t

        Same as Seq.map snd (to_seq m)

        • since 4.07
        • alert impure Hash tables are not permitted
        val add_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t -> unit

        Add the given bindings to the table, using add

        • since 4.07
        • alert impure Hash tables are not permitted
        val replace_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t -> unit

        Add the given bindings to the table, using replace

        • since 4.07
        • alert impure Hash tables are not permitted
        val of_seq : ('a * 'b) Stdlib.Seq.t -> ('a, 'b) t

        Build a table from the given bindings. The bindings are added in the same order they appear in the sequence, using replace_seq, which means that if two pairs have the same key, only the latest one will appear in the table.

        • since 4.07
        • alert impure Hash tables are not permitted
        module type HashedType = sig ... end

        The input signature of the functor Make.

        module type S = sig ... end

        The output signature of the functor Make.

        module Make (H : HashedType) : S with type key = H.t

        Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

        module type SeededHashedType = sig ... end

        The input signature of the functor MakeSeeded.

        module type SeededS = sig ... end

        The output signature of the functor MakeSeeded.

        module MakeSeeded (H : SeededHashedType) : SeededS with type key = H.t

        Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

        +Hashtbl_alerting (less-power.Stdlib_alerts.Hashtbl_alerting)

        Module type Stdlib_alerts.Hashtbl_alerting

        type ('a, 'b) t = ('a, 'b) Stdlib.Hashtbl.t
        • alert impure Hash tables are not permitted
        type statistics = Stdlib.Hashtbl.statistics = {
        1. num_bindings : int;
        2. num_buckets : int;
        3. max_bucket_length : int;
        4. bucket_histogram : int array;
        }
        • alert impure Hash tables are not permitted
        include sig ... end
        val hash : 'a -> int

        Hashtbl.hash x associates a nonnegative integer to any value of any type. It is guaranteed that if x = y or Stdlib.compare x y = 0, then hash x = hash y. Moreover, hash always terminates, even on cyclic structures.

        val seeded_hash : int -> 'a -> int

        A variant of hash that is further parameterized by an integer seed.

        • since 4.00
        val hash_param : int -> int -> 'a -> int

        Hashtbl.hash_param meaningful total x computes a hash value for x, with the same properties as for hash. The two extra integer parameters meaningful and total give more precise control over hashing. Hashing performs a breadth-first, left-to-right traversal of the structure x, stopping after meaningful meaningful nodes were encountered, or total nodes (meaningful or not) were encountered. If total as specified by the user exceeds a certain value, currently 256, then it is capped to that value. Meaningful nodes are: integers; floating-point numbers; strings; characters; booleans; and constant constructors. Larger values of meaningful and total means that more nodes are taken into account to compute the final hash value, and therefore collisions are less likely to happen. However, hashing takes longer. The parameters meaningful and total govern the tradeoff between accuracy and speed. As default choices, hash and seeded_hash take meaningful = 10 and total = 100.

        val seeded_hash_param : int -> int -> int -> 'a -> int

        A variant of hash_param that is further parameterized by an integer seed. Usage: Hashtbl.seeded_hash_param meaningful total seed x.

        • since 4.00
        val create : ?random:bool -> int -> ('a, 'b) t

        Hashtbl.create n creates a new, empty hash table, with initial size n. For best results, n should be on the order of the expected number of elements that will be in the table. The table grows as needed, so n is just an initial guess.

        The optional ~random parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of Hashtbl.create or deterministic over all executions.

        A hash table that is created with ~random set to false uses a fixed hash function (hash) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other security-sensitive applications, the deterministic collision patterns can be exploited by a malicious user to create a denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down.

        A hash table that is created with ~random set to true uses the seeded hash function seeded_hash with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among 2^{30} different hash functions. All these hash functions have different collision patterns, rendering ineffective the denial-of-service attack described above. However, because of randomization, enumerating all elements of the hash table using fold or iter is no longer deterministic: elements are enumerated in different orders at different runs of the program.

        If no ~random parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling randomize or by setting the R flag in the OCAMLRUNPARAM environment variable.

        • before 4.00

          the ~random parameter was not present and all hash tables were created in non-randomized mode.

        • alert impure Hash tables are not permitted
        val clear : ('a, 'b) t -> unit

        Empty a hash table. Use reset instead of clear to shrink the size of the bucket table to its initial size.

        • alert impure Hash tables are not permitted
        val reset : ('a, 'b) t -> unit

        Empty a hash table and shrink the size of the bucket table to its initial size.

        • since 4.00
        • alert impure Hash tables are not permitted
        val copy : ('a, 'b) t -> ('a, 'b) t

        Return a copy of the given hashtable.

        • alert impure Hash tables are not permitted
        val add : ('a, 'b) t -> 'a -> 'b -> unit

        Hashtbl.add tbl key data adds a binding of key to data in table tbl.

        Warning: Previous bindings for key are not removed, but simply hidden. That is, after performing remove tbl key, the previous binding for key, if any, is restored. (Same behavior as with association lists.)

        If you desire the classic behavior of replacing elements, see replace.

        • alert impure Hash tables are not permitted
        val find : ('a, 'b) t -> 'a -> 'b

        Hashtbl.find tbl x returns the current binding of x in tbl, or raises Not_found if no such binding exists.

        • alert impure Hash tables are not permitted
        val find_opt : ('a, 'b) t -> 'a -> 'b option

        Hashtbl.find_opt tbl x returns the current binding of x in tbl, or None if no such binding exists.

        • since 4.05
        • alert impure Hash tables are not permitted
        val find_all : ('a, 'b) t -> 'a -> 'b list

        Hashtbl.find_all tbl x returns the list of all data associated with x in tbl. The current binding is returned first, then the previous bindings, in reverse order of introduction in the table.

        • alert impure Hash tables are not permitted
        val mem : ('a, 'b) t -> 'a -> bool

        Hashtbl.mem tbl x checks if x is bound in tbl.

        • alert impure Hash tables are not permitted
        val remove : ('a, 'b) t -> 'a -> unit

        Hashtbl.remove tbl x removes the current binding of x in tbl, restoring the previous binding if it exists. It does nothing if x is not bound in tbl.

        • alert impure Hash tables are not permitted
        val replace : ('a, 'b) t -> 'a -> 'b -> unit

        Hashtbl.replace tbl key data replaces the current binding of key in tbl by a binding of key to data. If key is unbound in tbl, a binding of key to data is added to tbl. This is functionally equivalent to remove tbl key followed by add tbl key data.

        • alert impure Hash tables are not permitted
        val iter : ('a -> 'b -> unit) -> ('a, 'b) t -> unit

        Hashtbl.iter f tbl applies f to all bindings in table tbl. f receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to f.

        The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

        If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

        The behavior is not specified if the hash table is modified by f during the iteration.

        • alert impure Hash tables are not permitted
        val filter_map_inplace : ('a -> 'b -> 'b option) -> ('a, 'b) t -> unit

        Hashtbl.filter_map_inplace f tbl applies f to all bindings in table tbl and update each binding depending on the result of f. If f returns None, the binding is discarded. If it returns Some new_val, the binding is update to associate the key to new_val.

        Other comments for iter apply as well.

        • since 4.03
        • alert impure Hash tables are not permitted
        val fold : ('a -> 'b -> 'acc -> 'acc) -> ('a, 'b) t -> 'acc -> 'acc

        Hashtbl.fold f tbl init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in tbl, and d1 ... dN are the associated values. Each binding is presented exactly once to f.

        The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

        If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

        The behavior is not specified if the hash table is modified by f during the iteration.

        • alert impure Hash tables are not permitted
        val length : ('a, 'b) t -> int

        Hashtbl.length tbl returns the number of bindings in tbl. It takes constant time. Multiple bindings are counted once each, so Hashtbl.length gives the number of times Hashtbl.iter calls its first argument.

        • alert impure Hash tables are not permitted
        val randomize : unit -> unit

        After a call to Hashtbl.randomize(), hash tables are created in randomized mode by default: create returns randomized hash tables, unless the ~random:false optional parameter is given. The same effect can be achieved by setting the R parameter in the OCAMLRUNPARAM environment variable.

        It is recommended that applications or Web frameworks that need to protect themselves against the denial-of-service attack described in create call Hashtbl.randomize() at initialization time before any domains are created.

        Note that once Hashtbl.randomize() was called, there is no way to revert to the non-randomized default behavior of create. This is intentional. Non-randomized hash tables can still be created using Hashtbl.create ~random:false.

        • since 4.00
        • alert impure Hash tables are not permitted
        val is_randomized : unit -> bool

        Return true if the tables are currently created in randomized mode by default, false otherwise.

        • since 4.03
        • alert impure Hash tables are not permitted
        val rebuild : ?random:bool -> ('a, 'b) t -> ('a, 'b) t

        Return a copy of the given hashtable. Unlike copy, rebuild h re-hashes all the (key, value) entries of the original table h. The returned hash table is randomized if h was randomized, or the optional random parameter is true, or if the default is to create randomized hash tables; see create for more information.

        rebuild can safely be used to import a hash table built by an old version of the Hashtbl module, then marshaled to persistent storage. After unmarshaling, apply rebuild to produce a hash table for the current version of the Hashtbl module.

        • since 4.12
        • alert impure Hash tables are not permitted
        val stats : ('a, 'b) t -> statistics

        Hashtbl.stats tbl returns statistics about the table tbl: number of buckets, size of the biggest bucket, distribution of buckets by size.

        • since 4.00
        • alert impure Hash tables are not permitted
        val to_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t

        Iterate on the whole table. The order in which the bindings appear in the sequence is unspecified. However, if the table contains several bindings for the same key, they appear in reversed order of introduction, that is, the most recent binding appears first.

        The behavior is not specified if the hash table is modified during the iteration.

        • since 4.07
        • alert impure Hash tables are not permitted
        val to_seq_keys : ('a, _) t -> 'a Stdlib.Seq.t

        Same as Seq.map fst (to_seq m)

        • since 4.07
        • alert impure Hash tables are not permitted
        val to_seq_values : (_, 'b) t -> 'b Stdlib.Seq.t

        Same as Seq.map snd (to_seq m)

        • since 4.07
        • alert impure Hash tables are not permitted
        val add_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t -> unit

        Add the given bindings to the table, using add

        • since 4.07
        • alert impure Hash tables are not permitted
        val replace_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t -> unit

        Add the given bindings to the table, using replace

        • since 4.07
        • alert impure Hash tables are not permitted
        val of_seq : ('a * 'b) Stdlib.Seq.t -> ('a, 'b) t

        Build a table from the given bindings. The bindings are added in the same order they appear in the sequence, using replace_seq, which means that if two pairs have the same key, only the latest one will appear in the table.

        • since 4.07
        • alert impure Hash tables are not permitted
        module type HashedType = sig ... end

        The input signature of the functor Make.

        module type S = sig ... end

        The output signature of the functor Make.

        module Make (H : HashedType) : S with type key = H.t

        Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

        module type SeededHashedType = sig ... end

        The input signature of the functor MakeSeeded.

        module type SeededS = sig ... end

        The output signature of the functor MakeSeeded.

        module MakeSeeded (H : SeededHashedType) : SeededS with type key = H.t

        Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/module-type-HashedType/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/module-type-HashedType/index.html index 1fad2e3..a86363a 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/module-type-HashedType/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/module-type-HashedType/index.html @@ -1,2 +1,2 @@ -HashedType (less-power.Stdlib_alerts.Hashtbl_alerting.HashedType)

        Module type Hashtbl_alerting.HashedType

        The input signature of the functor Make.

        • alert impure Hash tables are not permitted
        type t

        The type of the hashtable keys.

        val equal : t -> t -> bool

        The equality predicate used to compare keys.

        val hash : t -> int

        A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

        • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
        • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
        • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
        +HashedType (less-power.Stdlib_alerts.Hashtbl_alerting.HashedType)

        Module type Hashtbl_alerting.HashedType

        The input signature of the functor Make.

        • alert impure Hash tables are not permitted
        type t

        The type of the hashtable keys.

        val equal : t -> t -> bool

        The equality predicate used to compare keys.

        val hash : t -> int

        A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

        • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
        • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
        • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/module-type-S/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/module-type-S/index.html index 3bf3331..433c2ac 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/module-type-S/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/module-type-S/index.html @@ -1,2 +1,2 @@ -S (less-power.Stdlib_alerts.Hashtbl_alerting.S)

        Module type Hashtbl_alerting.S

        The output signature of the functor Make.

        • alert impure Hash tables are not permitted
        type key
        type !'a t
        val create : int -> 'a t
        val clear : 'a t -> unit
        val reset : 'a t -> unit
        • since 4.00
        val copy : 'a t -> 'a t
        val add : 'a t -> key -> 'a -> unit
        val remove : 'a t -> key -> unit
        val find : 'a t -> key -> 'a
        val find_opt : 'a t -> key -> 'a option
        • since 4.05
        val find_all : 'a t -> key -> 'a list
        val replace : 'a t -> key -> 'a -> unit
        val mem : 'a t -> key -> bool
        val iter : (key -> 'a -> unit) -> 'a t -> unit
        val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
        • since 4.03
        val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
        val length : 'a t -> int
        val stats : 'a t -> statistics
        • since 4.00
        val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
        • since 4.07
        val to_seq_keys : _ t -> key Stdlib.Seq.t
        • since 4.07
        val to_seq_values : 'a t -> 'a Stdlib.Seq.t
        • since 4.07
        val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
        • since 4.07
        +S (less-power.Stdlib_alerts.Hashtbl_alerting.S)

        Module type Hashtbl_alerting.S

        The output signature of the functor Make.

        • alert impure Hash tables are not permitted
        type key
        type !'a t
        val create : int -> 'a t
        val clear : 'a t -> unit
        val reset : 'a t -> unit
        • since 4.00
        val copy : 'a t -> 'a t
        val add : 'a t -> key -> 'a -> unit
        val remove : 'a t -> key -> unit
        val find : 'a t -> key -> 'a
        val find_opt : 'a t -> key -> 'a option
        • since 4.05
        val find_all : 'a t -> key -> 'a list
        val replace : 'a t -> key -> 'a -> unit
        val mem : 'a t -> key -> bool
        val iter : (key -> 'a -> unit) -> 'a t -> unit
        val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
        • since 4.03
        val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
        val length : 'a t -> int
        val stats : 'a t -> statistics
        • since 4.00
        val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
        • since 4.07
        val to_seq_keys : _ t -> key Stdlib.Seq.t
        • since 4.07
        val to_seq_values : 'a t -> 'a Stdlib.Seq.t
        • since 4.07
        val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
        • since 4.07
        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/module-type-SeededHashedType/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/module-type-SeededHashedType/index.html index 9b5f3c9..cafdb78 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/module-type-SeededHashedType/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/module-type-SeededHashedType/index.html @@ -1,2 +1,2 @@ -SeededHashedType (less-power.Stdlib_alerts.Hashtbl_alerting.SeededHashedType)

        Module type Hashtbl_alerting.SeededHashedType

        The input signature of the functor MakeSeeded.

        • since 4.00
        • alert impure Hash tables are not permitted
        type t

        The type of the hashtable keys.

        val equal : t -> t -> bool

        The equality predicate used to compare keys.

        val seeded_hash : int -> t -> int

        A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

        +SeededHashedType (less-power.Stdlib_alerts.Hashtbl_alerting.SeededHashedType)

        Module type Hashtbl_alerting.SeededHashedType

        The input signature of the functor MakeSeeded.

        • since 4.00
        • alert impure Hash tables are not permitted
        type t

        The type of the hashtable keys.

        val equal : t -> t -> bool

        The equality predicate used to compare keys.

        val seeded_hash : int -> t -> int

        A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/module-type-SeededS/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/module-type-SeededS/index.html index cdfe0e7..7876eba 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/module-type-SeededS/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Hashtbl_alerting/module-type-SeededS/index.html @@ -1,2 +1,2 @@ -SeededS (less-power.Stdlib_alerts.Hashtbl_alerting.SeededS)

        Module type Hashtbl_alerting.SeededS

        The output signature of the functor MakeSeeded.

        • since 4.00
        • alert impure Hash tables are not permitted
        type key
        type !'a t
        val create : ?random:bool -> int -> 'a t
        val clear : 'a t -> unit
        val reset : 'a t -> unit
        val copy : 'a t -> 'a t
        val add : 'a t -> key -> 'a -> unit
        val remove : 'a t -> key -> unit
        val find : 'a t -> key -> 'a
        val find_opt : 'a t -> key -> 'a option
        • since 4.05
        val find_all : 'a t -> key -> 'a list
        val replace : 'a t -> key -> 'a -> unit
        val mem : 'a t -> key -> bool
        val iter : (key -> 'a -> unit) -> 'a t -> unit
        val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
        • since 4.03
        val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
        val length : 'a t -> int
        val stats : 'a t -> statistics
        val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
        • since 4.07
        val to_seq_keys : _ t -> key Stdlib.Seq.t
        • since 4.07
        val to_seq_values : 'a t -> 'a Stdlib.Seq.t
        • since 4.07
        val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
        • since 4.07
        +SeededS (less-power.Stdlib_alerts.Hashtbl_alerting.SeededS)

        Module type Hashtbl_alerting.SeededS

        The output signature of the functor MakeSeeded.

        • since 4.00
        • alert impure Hash tables are not permitted
        type key
        type !'a t
        val create : ?random:bool -> int -> 'a t
        val clear : 'a t -> unit
        val reset : 'a t -> unit
        val copy : 'a t -> 'a t
        val add : 'a t -> key -> 'a -> unit
        val remove : 'a t -> key -> unit
        val find : 'a t -> key -> 'a
        val find_opt : 'a t -> key -> 'a option
        • since 4.05
        val find_all : 'a t -> key -> 'a list
        val replace : 'a t -> key -> 'a -> unit
        val mem : 'a t -> key -> bool
        val iter : (key -> 'a -> unit) -> 'a t -> unit
        val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
        • since 4.03
        val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
        val length : 'a t -> int
        val stats : 'a t -> statistics
        val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
        • since 4.07
        val to_seq_keys : _ t -> key Stdlib.Seq.t
        • since 4.07
        val to_seq_values : 'a t -> 'a Stdlib.Seq.t
        • since 4.07
        val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
        • since 4.07
        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-ListLabels_alerting/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-ListLabels_alerting/index.html index 9f6a53c..0af46b5 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-ListLabels_alerting/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-ListLabels_alerting/index.html @@ -1,5 +1,5 @@ -ListLabels_alerting (less-power.Stdlib_alerts.ListLabels_alerting)

        Module type Stdlib_alerts.ListLabels_alerting

        include sig ... end
        type 'a t = 'a list =
        1. | []
        2. | :: of 'a * 'a list

        An alias for the type of lists.

        val length : 'a list -> int

        Return the length (number of elements) of the given list.

        val compare_lengths : 'a list -> 'b list -> int

        Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

        • since 4.05
        val compare_length_with : 'a list -> len:int -> int

        Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

        • since 4.05
        val is_empty : 'a list -> bool

        is_empty l is true if and only if l has no elements. It is equivalent to compare_length_with l 0 = 0.

        • since 5.1
        val cons : 'a -> 'a list -> 'a list

        cons x xs is x :: xs

        • since 4.03 (4.05 in ListLabels)
        val hd : 'a list -> 'a

        Return the first element of the given list.

        • raises Failure

          if the list is empty.

        val tl : 'a list -> 'a list

        Return the given list without its first element.

        • raises Failure

          if the list is empty.

        val nth : 'a list -> int -> 'a

        Return the n-th element of the given list. The first element (head of the list) is at position 0.

        • raises Failure

          if the list is too short.

        • raises Invalid_argument

          if n is negative.

        val nth_opt : 'a list -> int -> 'a option

        Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

        • raises Invalid_argument

          if n is negative.

        • since 4.05
        val rev : 'a list -> 'a list

        List reversal.

        val init : len:int -> f:(int -> 'a) -> 'a list

        init ~len ~f is [f 0; f 1; ...; f (len-1)], evaluated left to right.

        • raises Invalid_argument

          if len < 0.

        • since 4.06
        val append : 'a list -> 'a list -> 'a list

        append l0 l1 appends l1 to l0. Same function as the infix operator @.

        • since 5.1 this function is tail-recursive.
        val rev_append : 'a list -> 'a list -> 'a list

        rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

        val concat : 'a list list -> 'a list

        Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).

        val flatten : 'a list list -> 'a list

        Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

        val equal : eq:('a -> 'a -> bool) -> 'a list -> 'a list -> bool

        equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

        Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

        • since 4.12
        val compare : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> int

        compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

        • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
        • the empty list [] is strictly smaller than non-empty lists

        Note: the cmp function will be called even if the lists have different lengths.

        • since 4.12
        val iter : f:('a -> unit) -> 'a list -> unit

        iter ~f [a1; ...; an] applies function f in turn to [a1; ...; an]. It is equivalent to f a1; f a2; ...; f an.

        val iteri : f:(int -> 'a -> unit) -> 'a list -> unit

        Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

        • since 4.00
        val map : f:('a -> 'b) -> 'a list -> 'b list

        map ~f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1; ...; f an] with the results returned by f.

        val mapi : f:(int -> 'a -> 'b) -> 'a list -> 'b list

        Same as map, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

        • since 4.00
        val rev_map : f:('a -> 'b) -> 'a list -> 'b list

        rev_map ~f l gives the same result as rev (map f l), but is more efficient.

        val filter_map : f:('a -> 'b option) -> 'a list -> 'b list

        filter_map ~f l applies f to every element of l, filters out the None elements and returns the list of the arguments of the Some elements.

        • since 4.08
        val concat_map : f:('a -> 'b list) -> 'a list -> 'b list

        concat_map ~f l gives the same result as concat (map f l). Tail-recursive.

        • since 4.10
        val fold_left_map : +ListLabels_alerting (less-power.Stdlib_alerts.ListLabels_alerting)

        Module type Stdlib_alerts.ListLabels_alerting

        include sig ... end
        type 'a t = 'a list =
        1. | []
        2. | :: of 'a * 'a list

        An alias for the type of lists.

        val length : 'a list -> int

        Return the length (number of elements) of the given list.

        val compare_lengths : 'a list -> 'b list -> int

        Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

        • since 4.05
        val compare_length_with : 'a list -> len:int -> int

        Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

        • since 4.05
        val is_empty : 'a list -> bool

        is_empty l is true if and only if l has no elements. It is equivalent to compare_length_with l 0 = 0.

        • since 5.1
        val cons : 'a -> 'a list -> 'a list

        cons x xs is x :: xs

        • since 4.03 (4.05 in ListLabels)
        val hd : 'a list -> 'a

        Return the first element of the given list.

        • raises Failure

          if the list is empty.

        val tl : 'a list -> 'a list

        Return the given list without its first element.

        • raises Failure

          if the list is empty.

        val nth : 'a list -> int -> 'a

        Return the n-th element of the given list. The first element (head of the list) is at position 0.

        • raises Failure

          if the list is too short.

        • raises Invalid_argument

          if n is negative.

        val nth_opt : 'a list -> int -> 'a option

        Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

        • raises Invalid_argument

          if n is negative.

        • since 4.05
        val rev : 'a list -> 'a list

        List reversal.

        val init : len:int -> f:(int -> 'a) -> 'a list

        init ~len ~f is [f 0; f 1; ...; f (len-1)], evaluated left to right.

        • raises Invalid_argument

          if len < 0.

        • since 4.06
        val append : 'a list -> 'a list -> 'a list

        append l0 l1 appends l1 to l0. Same function as the infix operator @.

        • since 5.1 this function is tail-recursive.
        val rev_append : 'a list -> 'a list -> 'a list

        rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

        val concat : 'a list list -> 'a list

        Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).

        val flatten : 'a list list -> 'a list

        Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

        val equal : eq:('a -> 'a -> bool) -> 'a list -> 'a list -> bool

        equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

        Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

        • since 4.12
        val compare : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> int

        compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

        • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
        • the empty list [] is strictly smaller than non-empty lists

        Note: the cmp function will be called even if the lists have different lengths.

        • since 4.12
        val iter : f:('a -> unit) -> 'a list -> unit

        iter ~f [a1; ...; an] applies function f in turn to [a1; ...; an]. It is equivalent to f a1; f a2; ...; f an.

        val iteri : f:(int -> 'a -> unit) -> 'a list -> unit

        Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

        • since 4.00
        val map : f:('a -> 'b) -> 'a list -> 'b list

        map ~f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1; ...; f an] with the results returned by f.

        val mapi : f:(int -> 'a -> 'b) -> 'a list -> 'b list

        Same as map, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

        • since 4.00
        val rev_map : f:('a -> 'b) -> 'a list -> 'b list

        rev_map ~f l gives the same result as rev (map f l), but is more efficient.

        val filter_map : f:('a -> 'b option) -> 'a list -> 'b list

        filter_map ~f l applies f to every element of l, filters out the None elements and returns the list of the arguments of the Some elements.

        • since 4.08
        val concat_map : f:('a -> 'b list) -> 'a list -> 'b list

        concat_map ~f l gives the same result as concat (map f l). Tail-recursive.

        • since 4.10
        val fold_left_map : f:('acc -> 'a -> 'acc * 'b) -> init:'acc -> 'a list -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-List_alerting/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-List_alerting/index.html index 510e145..02b2dd7 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-List_alerting/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-List_alerting/index.html @@ -1,5 +1,5 @@ -List_alerting (less-power.Stdlib_alerts.List_alerting)

        Module type Stdlib_alerts.List_alerting

        include sig ... end
        type 'a t = 'a list =
        1. | []
        2. | :: of 'a * 'a list

        An alias for the type of lists.

        val length : 'a list -> int

        Return the length (number of elements) of the given list.

        val compare_lengths : 'a list -> 'b list -> int

        Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

        • since 4.05
        val compare_length_with : 'a list -> int -> int

        Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

        • since 4.05
        val is_empty : 'a list -> bool

        is_empty l is true if and only if l has no elements. It is equivalent to compare_length_with l 0 = 0.

        • since 5.1
        val cons : 'a -> 'a list -> 'a list

        cons x xs is x :: xs

        • since 4.03 (4.05 in ListLabels)
        val hd : 'a list -> 'a

        Return the first element of the given list.

        • raises Failure

          if the list is empty.

        val tl : 'a list -> 'a list

        Return the given list without its first element.

        • raises Failure

          if the list is empty.

        val nth : 'a list -> int -> 'a

        Return the n-th element of the given list. The first element (head of the list) is at position 0.

        • raises Failure

          if the list is too short.

        • raises Invalid_argument

          if n is negative.

        val nth_opt : 'a list -> int -> 'a option

        Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

        • raises Invalid_argument

          if n is negative.

        • since 4.05
        val rev : 'a list -> 'a list

        List reversal.

        val init : int -> (int -> 'a) -> 'a list

        init len f is [f 0; f 1; ...; f (len-1)], evaluated left to right.

        • raises Invalid_argument

          if len < 0.

        • since 4.06
        val append : 'a list -> 'a list -> 'a list

        append l0 l1 appends l1 to l0. Same function as the infix operator @.

        • since 5.1 this function is tail-recursive.
        val rev_append : 'a list -> 'a list -> 'a list

        rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

        val concat : 'a list list -> 'a list

        Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).

        val flatten : 'a list list -> 'a list

        Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

        val equal : ('a -> 'a -> bool) -> 'a list -> 'a list -> bool

        equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

        Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

        • since 4.12
        val compare : ('a -> 'a -> int) -> 'a list -> 'a list -> int

        compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

        • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
        • the empty list [] is strictly smaller than non-empty lists

        Note: the cmp function will be called even if the lists have different lengths.

        • since 4.12
        val iter : ('a -> unit) -> 'a list -> unit

        iter f [a1; ...; an] applies function f in turn to [a1; ...; an]. It is equivalent to f a1; f a2; ...; f an.

        val iteri : (int -> 'a -> unit) -> 'a list -> unit

        Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

        • since 4.00
        val map : ('a -> 'b) -> 'a list -> 'b list

        map f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1; ...; f an] with the results returned by f.

        val mapi : (int -> 'a -> 'b) -> 'a list -> 'b list

        Same as map, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

        • since 4.00
        val rev_map : ('a -> 'b) -> 'a list -> 'b list

        rev_map f l gives the same result as rev (map f l), but is more efficient.

        val filter_map : ('a -> 'b option) -> 'a list -> 'b list

        filter_map f l applies f to every element of l, filters out the None elements and returns the list of the arguments of the Some elements.

        • since 4.08
        val concat_map : ('a -> 'b list) -> 'a list -> 'b list

        concat_map f l gives the same result as concat (map f l). Tail-recursive.

        • since 4.10
        val fold_left_map : +List_alerting (less-power.Stdlib_alerts.List_alerting)

        Module type Stdlib_alerts.List_alerting

        include sig ... end
        type 'a t = 'a list =
        1. | []
        2. | :: of 'a * 'a list

        An alias for the type of lists.

        val length : 'a list -> int

        Return the length (number of elements) of the given list.

        val compare_lengths : 'a list -> 'b list -> int

        Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

        • since 4.05
        val compare_length_with : 'a list -> int -> int

        Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

        • since 4.05
        val is_empty : 'a list -> bool

        is_empty l is true if and only if l has no elements. It is equivalent to compare_length_with l 0 = 0.

        • since 5.1
        val cons : 'a -> 'a list -> 'a list

        cons x xs is x :: xs

        • since 4.03 (4.05 in ListLabels)
        val hd : 'a list -> 'a

        Return the first element of the given list.

        • raises Failure

          if the list is empty.

        val tl : 'a list -> 'a list

        Return the given list without its first element.

        • raises Failure

          if the list is empty.

        val nth : 'a list -> int -> 'a

        Return the n-th element of the given list. The first element (head of the list) is at position 0.

        • raises Failure

          if the list is too short.

        • raises Invalid_argument

          if n is negative.

        val nth_opt : 'a list -> int -> 'a option

        Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

        • raises Invalid_argument

          if n is negative.

        • since 4.05
        val rev : 'a list -> 'a list

        List reversal.

        val init : int -> (int -> 'a) -> 'a list

        init len f is [f 0; f 1; ...; f (len-1)], evaluated left to right.

        • raises Invalid_argument

          if len < 0.

        • since 4.06
        val append : 'a list -> 'a list -> 'a list

        append l0 l1 appends l1 to l0. Same function as the infix operator @.

        • since 5.1 this function is tail-recursive.
        val rev_append : 'a list -> 'a list -> 'a list

        rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

        val concat : 'a list list -> 'a list

        Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).

        val flatten : 'a list list -> 'a list

        Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

        val equal : ('a -> 'a -> bool) -> 'a list -> 'a list -> bool

        equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

        Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

        • since 4.12
        val compare : ('a -> 'a -> int) -> 'a list -> 'a list -> int

        compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

        • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
        • the empty list [] is strictly smaller than non-empty lists

        Note: the cmp function will be called even if the lists have different lengths.

        • since 4.12
        val iter : ('a -> unit) -> 'a list -> unit

        iter f [a1; ...; an] applies function f in turn to [a1; ...; an]. It is equivalent to f a1; f a2; ...; f an.

        val iteri : (int -> 'a -> unit) -> 'a list -> unit

        Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

        • since 4.00
        val map : ('a -> 'b) -> 'a list -> 'b list

        map f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1; ...; f an] with the results returned by f.

        val mapi : (int -> 'a -> 'b) -> 'a list -> 'b list

        Same as map, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

        • since 4.00
        val rev_map : ('a -> 'b) -> 'a list -> 'b list

        rev_map f l gives the same result as rev (map f l), but is more efficient.

        val filter_map : ('a -> 'b option) -> 'a list -> 'b list

        filter_map f l applies f to every element of l, filters out the None elements and returns the list of the arguments of the Some elements.

        • since 4.08
        val concat_map : ('a -> 'b list) -> 'a list -> 'b list

        concat_map f l gives the same result as concat (map f l). Tail-recursive.

        • since 4.10
        val fold_left_map : ('acc -> 'a -> 'acc * 'b) -> 'acc -> 'a list -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/Make/argument-1-H/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/Make/argument-1-H/index.html index 2a6b6f3..44462f7 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/Make/argument-1-H/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/Make/argument-1-H/index.html @@ -1,2 +1,2 @@ -H (less-power.Stdlib_alerts.MoreLabels_alerting.Hashtbl.Make.H)

        Parameter Make.H

        type t

        The type of the hashtable keys.

        val equal : t -> t -> bool

        The equality predicate used to compare keys.

        val hash : t -> int

        A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

        • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
        • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
        • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
        +H (less-power.Stdlib_alerts.MoreLabels_alerting.Hashtbl.Make.H)

        Parameter Make.H

        type t

        The type of the hashtable keys.

        val equal : t -> t -> bool

        The equality predicate used to compare keys.

        val hash : t -> int

        A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

        • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
        • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
        • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/Make/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/Make/index.html index 0e904b6..1bd6a85 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/Make/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/Make/index.html @@ -1,2 +1,2 @@ -Make (less-power.Stdlib_alerts.MoreLabels_alerting.Hashtbl.Make)

        Module Hashtbl.Make

        Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

        Parameters

        module H : HashedType

        Signature

        type key = H.t
        type 'a t = 'a Stdlib.Hashtbl.Make(H).t
        val create : int -> 'a t
        val clear : 'a t -> unit
        val reset : 'a t -> unit
        • since 4.00
        val copy : 'a t -> 'a t
        val add : 'a t -> key:key -> data:'a -> unit
        val remove : 'a t -> key -> unit
        val find : 'a t -> key -> 'a
        val find_opt : 'a t -> key -> 'a option
        • since 4.05
        val find_all : 'a t -> key -> 'a list
        val replace : 'a t -> key:key -> data:'a -> unit
        val mem : 'a t -> key -> bool
        val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
        val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
        • since 4.03
        val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
        val length : 'a t -> int
        val stats : 'a t -> statistics
        • since 4.00
        val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
        • since 4.07
        val to_seq_keys : _ t -> key Stdlib.Seq.t
        • since 4.07
        val to_seq_values : 'a t -> 'a Stdlib.Seq.t
        • since 4.07
        val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
        • since 4.07
        +Make (less-power.Stdlib_alerts.MoreLabels_alerting.Hashtbl.Make)

        Module Hashtbl.Make

        Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

        Parameters

        module H : HashedType

        Signature

        type key = H.t
        type 'a t = 'a Stdlib.Hashtbl.Make(H).t
        val create : int -> 'a t
        val clear : 'a t -> unit
        val reset : 'a t -> unit
        • since 4.00
        val copy : 'a t -> 'a t
        val add : 'a t -> key:key -> data:'a -> unit
        val remove : 'a t -> key -> unit
        val find : 'a t -> key -> 'a
        val find_opt : 'a t -> key -> 'a option
        • since 4.05
        val find_all : 'a t -> key -> 'a list
        val replace : 'a t -> key:key -> data:'a -> unit
        val mem : 'a t -> key -> bool
        val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
        val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
        • since 4.03
        val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
        val length : 'a t -> int
        val stats : 'a t -> statistics
        • since 4.00
        val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
        • since 4.07
        val to_seq_keys : _ t -> key Stdlib.Seq.t
        • since 4.07
        val to_seq_values : 'a t -> 'a Stdlib.Seq.t
        • since 4.07
        val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
        • since 4.07
        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/MakeSeeded/argument-1-H/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/MakeSeeded/argument-1-H/index.html index 3d915f9..22d94ba 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/MakeSeeded/argument-1-H/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/MakeSeeded/argument-1-H/index.html @@ -1,2 +1,2 @@ -H (less-power.Stdlib_alerts.MoreLabels_alerting.Hashtbl.MakeSeeded.H)

        Parameter MakeSeeded.H

        type t

        The type of the hashtable keys.

        val equal : t -> t -> bool

        The equality predicate used to compare keys.

        val seeded_hash : int -> t -> int

        A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

        +H (less-power.Stdlib_alerts.MoreLabels_alerting.Hashtbl.MakeSeeded.H)

        Parameter MakeSeeded.H

        type t

        The type of the hashtable keys.

        val equal : t -> t -> bool

        The equality predicate used to compare keys.

        val seeded_hash : int -> t -> int

        A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/MakeSeeded/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/MakeSeeded/index.html index 0d6e2f9..d88b342 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/MakeSeeded/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/MakeSeeded/index.html @@ -1,2 +1,2 @@ -MakeSeeded (less-power.Stdlib_alerts.MoreLabels_alerting.Hashtbl.MakeSeeded)

        Module Hashtbl.MakeSeeded

        Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

        • since 4.00

        Parameters

        Signature

        type key = H.t
        type 'a t = 'a Stdlib.Hashtbl.MakeSeeded(H).t
        val create : ?random:bool -> int -> 'a t
        val clear : 'a t -> unit
        val reset : 'a t -> unit
        val copy : 'a t -> 'a t
        val add : 'a t -> key:key -> data:'a -> unit
        val remove : 'a t -> key -> unit
        val find : 'a t -> key -> 'a
        val find_opt : 'a t -> key -> 'a option
        • since 4.05
        val find_all : 'a t -> key -> 'a list
        val replace : 'a t -> key:key -> data:'a -> unit
        val mem : 'a t -> key -> bool
        val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
        val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
        • since 4.03
        val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
        val length : 'a t -> int
        val stats : 'a t -> statistics
        val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
        • since 4.07
        val to_seq_keys : _ t -> key Stdlib.Seq.t
        • since 4.07
        val to_seq_values : 'a t -> 'a Stdlib.Seq.t
        • since 4.07
        val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
        • since 4.07
        +MakeSeeded (less-power.Stdlib_alerts.MoreLabels_alerting.Hashtbl.MakeSeeded)

        Module Hashtbl.MakeSeeded

        Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

        • since 4.00

        Parameters

        Signature

        type key = H.t
        type 'a t = 'a Stdlib.Hashtbl.MakeSeeded(H).t
        val create : ?random:bool -> int -> 'a t
        val clear : 'a t -> unit
        val reset : 'a t -> unit
        val copy : 'a t -> 'a t
        val add : 'a t -> key:key -> data:'a -> unit
        val remove : 'a t -> key -> unit
        val find : 'a t -> key -> 'a
        val find_opt : 'a t -> key -> 'a option
        • since 4.05
        val find_all : 'a t -> key -> 'a list
        val replace : 'a t -> key:key -> data:'a -> unit
        val mem : 'a t -> key -> bool
        val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
        val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
        • since 4.03
        val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
        val length : 'a t -> int
        val stats : 'a t -> statistics
        val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
        • since 4.07
        val to_seq_keys : _ t -> key Stdlib.Seq.t
        • since 4.07
        val to_seq_values : 'a t -> 'a Stdlib.Seq.t
        • since 4.07
        val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
        • since 4.07
        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/index.html index fa20fc7..e443818 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/index.html @@ -1,5 +1,5 @@ -Hashtbl (less-power.Stdlib_alerts.MoreLabels_alerting.Hashtbl)

        Module MoreLabels_alerting.Hashtbl

        • alert impure Hash tables are not permitted

        Hash tables and hash functions.

        Hash tables are hashed association tables, with in-place modification. Because most operations on a hash table modify their input, they're more commonly used in imperative code. The lookup of the value associated with a key (see find, find_opt) is normally very fast, often faster than the equivalent lookup in Map.

        The functors Make and MakeSeeded can be used when performance or flexibility are key. The user provides custom equality and hash functions for the key type, and obtains a custom hash table type for this particular type of key.

        Warning a hash table is only as good as the hash function. A bad hash function will turn the table into a degenerate association list, with linear time lookup instead of constant time lookup.

        The polymorphic t hash table is useful in simpler cases or in interactive environments. It uses the polymorphic hash function defined in the OCaml runtime (at the time of writing, it's SipHash), as well as the polymorphic equality (=).

        See the examples section.

        Unsynchronized accesses

        Unsynchronized accesses to a hash table may lead to an invalid hash table state. Thus, concurrent accesses to a hash tables must be synchronized (for instance with a Mutex.t).

        Generic interface

        type (!'a, !'b) t = ('a, 'b) Stdlib.Hashtbl.t

        The type of hash tables from type 'a to type 'b.

        val create : ?random:bool -> int -> ('a, 'b) t

        Hashtbl.create n creates a new, empty hash table, with initial size n. For best results, n should be on the order of the expected number of elements that will be in the table. The table grows as needed, so n is just an initial guess.

        The optional ~random parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of Hashtbl.create or deterministic over all executions.

        A hash table that is created with ~random set to false uses a fixed hash function (hash) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other security-sensitive applications, the deterministic collision patterns can be exploited by a malicious user to create a denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down.

        A hash table that is created with ~random set to true uses the seeded hash function seeded_hash with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among 2^{30} different hash functions. All these hash functions have different collision patterns, rendering ineffective the denial-of-service attack described above. However, because of randomization, enumerating all elements of the hash table using fold or iter is no longer deterministic: elements are enumerated in different orders at different runs of the program.

        If no ~random parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling randomize or by setting the R flag in the OCAMLRUNPARAM environment variable.

        • before 4.00

          the ~random parameter was not present and all hash tables were created in non-randomized mode.

        val clear : ('a, 'b) t -> unit

        Empty a hash table. Use reset instead of clear to shrink the size of the bucket table to its initial size.

        val reset : ('a, 'b) t -> unit

        Empty a hash table and shrink the size of the bucket table to its initial size.

        • since 4.00
        val copy : ('a, 'b) t -> ('a, 'b) t

        Return a copy of the given hashtable.

        val add : ('a, 'b) t -> key:'a -> data:'b -> unit

        Hashtbl.add tbl ~key ~data adds a binding of key to data in table tbl.

        Warning: Previous bindings for key are not removed, but simply hidden. That is, after performing remove tbl key, the previous binding for key, if any, is restored. (Same behavior as with association lists.)

        If you desire the classic behavior of replacing elements, see replace.

        val find : ('a, 'b) t -> 'a -> 'b

        Hashtbl.find tbl x returns the current binding of x in tbl, or raises Not_found if no such binding exists.

        val find_opt : ('a, 'b) t -> 'a -> 'b option

        Hashtbl.find_opt tbl x returns the current binding of x in tbl, or None if no such binding exists.

        • since 4.05
        val find_all : ('a, 'b) t -> 'a -> 'b list

        Hashtbl.find_all tbl x returns the list of all data associated with x in tbl. The current binding is returned first, then the previous bindings, in reverse order of introduction in the table.

        val mem : ('a, 'b) t -> 'a -> bool

        Hashtbl.mem tbl x checks if x is bound in tbl.

        val remove : ('a, 'b) t -> 'a -> unit

        Hashtbl.remove tbl x removes the current binding of x in tbl, restoring the previous binding if it exists. It does nothing if x is not bound in tbl.

        val replace : ('a, 'b) t -> key:'a -> data:'b -> unit

        Hashtbl.replace tbl ~key ~data replaces the current binding of key in tbl by a binding of key to data. If key is unbound in tbl, a binding of key to data is added to tbl. This is functionally equivalent to remove tbl key followed by add tbl key data.

        val iter : f:(key:'a -> data:'b -> unit) -> ('a, 'b) t -> unit

        Hashtbl.iter ~f tbl applies f to all bindings in table tbl. f receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to f.

        The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

        If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

        The behavior is not specified if the hash table is modified by f during the iteration.

        val filter_map_inplace : +Hashtbl (less-power.Stdlib_alerts.MoreLabels_alerting.Hashtbl)

        Module MoreLabels_alerting.Hashtbl

        • alert impure Hash tables are not permitted

        Hash tables and hash functions.

        Hash tables are hashed association tables, with in-place modification. Because most operations on a hash table modify their input, they're more commonly used in imperative code. The lookup of the value associated with a key (see find, find_opt) is normally very fast, often faster than the equivalent lookup in Map.

        The functors Make and MakeSeeded can be used when performance or flexibility are key. The user provides custom equality and hash functions for the key type, and obtains a custom hash table type for this particular type of key.

        Warning a hash table is only as good as the hash function. A bad hash function will turn the table into a degenerate association list, with linear time lookup instead of constant time lookup.

        The polymorphic t hash table is useful in simpler cases or in interactive environments. It uses the polymorphic hash function defined in the OCaml runtime (at the time of writing, it's SipHash), as well as the polymorphic equality (=).

        See the examples section.

        Unsynchronized accesses

        Unsynchronized accesses to a hash table may lead to an invalid hash table state. Thus, concurrent accesses to a hash tables must be synchronized (for instance with a Mutex.t).

        Generic interface

        type (!'a, !'b) t = ('a, 'b) Stdlib.Hashtbl.t

        The type of hash tables from type 'a to type 'b.

        val create : ?random:bool -> int -> ('a, 'b) t

        Hashtbl.create n creates a new, empty hash table, with initial size n. For best results, n should be on the order of the expected number of elements that will be in the table. The table grows as needed, so n is just an initial guess.

        The optional ~random parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of Hashtbl.create or deterministic over all executions.

        A hash table that is created with ~random set to false uses a fixed hash function (hash) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other security-sensitive applications, the deterministic collision patterns can be exploited by a malicious user to create a denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down.

        A hash table that is created with ~random set to true uses the seeded hash function seeded_hash with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among 2^{30} different hash functions. All these hash functions have different collision patterns, rendering ineffective the denial-of-service attack described above. However, because of randomization, enumerating all elements of the hash table using fold or iter is no longer deterministic: elements are enumerated in different orders at different runs of the program.

        If no ~random parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling randomize or by setting the R flag in the OCAMLRUNPARAM environment variable.

        • before 4.00

          the ~random parameter was not present and all hash tables were created in non-randomized mode.

        val clear : ('a, 'b) t -> unit

        Empty a hash table. Use reset instead of clear to shrink the size of the bucket table to its initial size.

        val reset : ('a, 'b) t -> unit

        Empty a hash table and shrink the size of the bucket table to its initial size.

        • since 4.00
        val copy : ('a, 'b) t -> ('a, 'b) t

        Return a copy of the given hashtable.

        val add : ('a, 'b) t -> key:'a -> data:'b -> unit

        Hashtbl.add tbl ~key ~data adds a binding of key to data in table tbl.

        Warning: Previous bindings for key are not removed, but simply hidden. That is, after performing remove tbl key, the previous binding for key, if any, is restored. (Same behavior as with association lists.)

        If you desire the classic behavior of replacing elements, see replace.

        val find : ('a, 'b) t -> 'a -> 'b

        Hashtbl.find tbl x returns the current binding of x in tbl, or raises Not_found if no such binding exists.

        val find_opt : ('a, 'b) t -> 'a -> 'b option

        Hashtbl.find_opt tbl x returns the current binding of x in tbl, or None if no such binding exists.

        • since 4.05
        val find_all : ('a, 'b) t -> 'a -> 'b list

        Hashtbl.find_all tbl x returns the list of all data associated with x in tbl. The current binding is returned first, then the previous bindings, in reverse order of introduction in the table.

        val mem : ('a, 'b) t -> 'a -> bool

        Hashtbl.mem tbl x checks if x is bound in tbl.

        val remove : ('a, 'b) t -> 'a -> unit

        Hashtbl.remove tbl x removes the current binding of x in tbl, restoring the previous binding if it exists. It does nothing if x is not bound in tbl.

        val replace : ('a, 'b) t -> key:'a -> data:'b -> unit

        Hashtbl.replace tbl ~key ~data replaces the current binding of key in tbl by a binding of key to data. If key is unbound in tbl, a binding of key to data is added to tbl. This is functionally equivalent to remove tbl key followed by add tbl key data.

        val iter : f:(key:'a -> data:'b -> unit) -> ('a, 'b) t -> unit

        Hashtbl.iter ~f tbl applies f to all bindings in table tbl. f receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to f.

        The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

        If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

        The behavior is not specified if the hash table is modified by f during the iteration.

        val filter_map_inplace : f:(key:'a -> data:'b -> 'b option) -> ('a, 'b) t -> unit

        Hashtbl.filter_map_inplace ~f tbl applies f to all bindings in table tbl and update each binding depending on the result of f. If f returns None, the binding is discarded. If it returns Some new_val, the binding is update to associate the key to new_val.

        Other comments for iter apply as well.

        • since 4.03
        val fold : diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/module-type-HashedType/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/module-type-HashedType/index.html index a7cbb77..496965c 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/module-type-HashedType/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/module-type-HashedType/index.html @@ -1,2 +1,2 @@ -HashedType (less-power.Stdlib_alerts.MoreLabels_alerting.Hashtbl.HashedType)

        Module type Hashtbl.HashedType

        The input signature of the functor Make.

        type t

        The type of the hashtable keys.

        val equal : t -> t -> bool

        The equality predicate used to compare keys.

        val hash : t -> int

        A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

        • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
        • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
        • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
        +HashedType (less-power.Stdlib_alerts.MoreLabels_alerting.Hashtbl.HashedType)

        Module type Hashtbl.HashedType

        The input signature of the functor Make.

        type t

        The type of the hashtable keys.

        val equal : t -> t -> bool

        The equality predicate used to compare keys.

        val hash : t -> int

        A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

        • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
        • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
        • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/module-type-S/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/module-type-S/index.html index 2a316e8..59a7ad7 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/module-type-S/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/module-type-S/index.html @@ -1,2 +1,2 @@ -S (less-power.Stdlib_alerts.MoreLabels_alerting.Hashtbl.S)

        Module type Hashtbl.S

        The output signature of the functor Make.

        type key
        type !'a t
        val create : int -> 'a t
        val clear : 'a t -> unit
        val reset : 'a t -> unit
        • since 4.00
        val copy : 'a t -> 'a t
        val add : 'a t -> key:key -> data:'a -> unit
        val remove : 'a t -> key -> unit
        val find : 'a t -> key -> 'a
        val find_opt : 'a t -> key -> 'a option
        • since 4.05
        val find_all : 'a t -> key -> 'a list
        val replace : 'a t -> key:key -> data:'a -> unit
        val mem : 'a t -> key -> bool
        val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
        val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
        • since 4.03
        val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
        val length : 'a t -> int
        val stats : 'a t -> statistics
        • since 4.00
        val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
        • since 4.07
        val to_seq_keys : _ t -> key Stdlib.Seq.t
        • since 4.07
        val to_seq_values : 'a t -> 'a Stdlib.Seq.t
        • since 4.07
        val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
        • since 4.07
        +S (less-power.Stdlib_alerts.MoreLabels_alerting.Hashtbl.S)

        Module type Hashtbl.S

        The output signature of the functor Make.

        type key
        type !'a t
        val create : int -> 'a t
        val clear : 'a t -> unit
        val reset : 'a t -> unit
        • since 4.00
        val copy : 'a t -> 'a t
        val add : 'a t -> key:key -> data:'a -> unit
        val remove : 'a t -> key -> unit
        val find : 'a t -> key -> 'a
        val find_opt : 'a t -> key -> 'a option
        • since 4.05
        val find_all : 'a t -> key -> 'a list
        val replace : 'a t -> key:key -> data:'a -> unit
        val mem : 'a t -> key -> bool
        val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
        val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
        • since 4.03
        val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
        val length : 'a t -> int
        val stats : 'a t -> statistics
        • since 4.00
        val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
        • since 4.07
        val to_seq_keys : _ t -> key Stdlib.Seq.t
        • since 4.07
        val to_seq_values : 'a t -> 'a Stdlib.Seq.t
        • since 4.07
        val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
        • since 4.07
        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/module-type-SeededHashedType/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/module-type-SeededHashedType/index.html index 3c506d3..fd6a317 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/module-type-SeededHashedType/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/module-type-SeededHashedType/index.html @@ -1,2 +1,2 @@ -SeededHashedType (less-power.Stdlib_alerts.MoreLabels_alerting.Hashtbl.SeededHashedType)

        Module type Hashtbl.SeededHashedType

        The input signature of the functor MakeSeeded.

        • since 4.00
        type t

        The type of the hashtable keys.

        val equal : t -> t -> bool

        The equality predicate used to compare keys.

        val seeded_hash : int -> t -> int

        A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

        +SeededHashedType (less-power.Stdlib_alerts.MoreLabels_alerting.Hashtbl.SeededHashedType)

        Module type Hashtbl.SeededHashedType

        The input signature of the functor MakeSeeded.

        • since 4.00
        type t

        The type of the hashtable keys.

        val equal : t -> t -> bool

        The equality predicate used to compare keys.

        val seeded_hash : int -> t -> int

        A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/module-type-SeededS/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/module-type-SeededS/index.html index b25ce28..08edebf 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/module-type-SeededS/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Hashtbl/module-type-SeededS/index.html @@ -1,2 +1,2 @@ -SeededS (less-power.Stdlib_alerts.MoreLabels_alerting.Hashtbl.SeededS)

        Module type Hashtbl.SeededS

        The output signature of the functor MakeSeeded.

        • since 4.00
        type key
        type !'a t
        val create : ?random:bool -> int -> 'a t
        val clear : 'a t -> unit
        val reset : 'a t -> unit
        val copy : 'a t -> 'a t
        val add : 'a t -> key:key -> data:'a -> unit
        val remove : 'a t -> key -> unit
        val find : 'a t -> key -> 'a
        val find_opt : 'a t -> key -> 'a option
        • since 4.05
        val find_all : 'a t -> key -> 'a list
        val replace : 'a t -> key:key -> data:'a -> unit
        val mem : 'a t -> key -> bool
        val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
        val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
        • since 4.03
        val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
        val length : 'a t -> int
        val stats : 'a t -> statistics
        val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
        • since 4.07
        val to_seq_keys : _ t -> key Stdlib.Seq.t
        • since 4.07
        val to_seq_values : 'a t -> 'a Stdlib.Seq.t
        • since 4.07
        val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
        • since 4.07
        +SeededS (less-power.Stdlib_alerts.MoreLabels_alerting.Hashtbl.SeededS)

        Module type Hashtbl.SeededS

        The output signature of the functor MakeSeeded.

        • since 4.00
        type key
        type !'a t
        val create : ?random:bool -> int -> 'a t
        val clear : 'a t -> unit
        val reset : 'a t -> unit
        val copy : 'a t -> 'a t
        val add : 'a t -> key:key -> data:'a -> unit
        val remove : 'a t -> key -> unit
        val find : 'a t -> key -> 'a
        val find_opt : 'a t -> key -> 'a option
        • since 4.05
        val find_all : 'a t -> key -> 'a list
        val replace : 'a t -> key:key -> data:'a -> unit
        val mem : 'a t -> key -> bool
        val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
        val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
        • since 4.03
        val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
        val length : 'a t -> int
        val stats : 'a t -> statistics
        val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
        • since 4.07
        val to_seq_keys : _ t -> key Stdlib.Seq.t
        • since 4.07
        val to_seq_values : 'a t -> 'a Stdlib.Seq.t
        • since 4.07
        val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
        • since 4.07
        val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
        • since 4.07
        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Map/Make/argument-1-Ord/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Map/Make/argument-1-Ord/index.html index 1bd5a01..5f99143 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Map/Make/argument-1-Ord/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Map/Make/argument-1-Ord/index.html @@ -1,2 +1,2 @@ -Ord (less-power.Stdlib_alerts.MoreLabels_alerting.Map.Make.Ord)

        Parameter Make.Ord

        type t

        The type of the map keys.

        val compare : t -> t -> int

        A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

        +Ord (less-power.Stdlib_alerts.MoreLabels_alerting.Map.Make.Ord)

        Parameter Make.Ord

        type t

        The type of the map keys.

        val compare : t -> t -> int

        A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Map/Make/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Map/Make/index.html index df19426..7cd53cb 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Map/Make/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Map/Make/index.html @@ -1,5 +1,5 @@ -Make (less-power.Stdlib_alerts.MoreLabels_alerting.Map.Make)

        Module Map.Make

        Functor building an implementation of the map structure given a totally ordered type.

        Parameters

        module Ord : OrderedType

        Signature

        Maps

        type key = Ord.t

        The type of the map keys.

        type 'a t = 'a Stdlib.Map.Make(Ord).t

        The type of maps from type key to type 'a.

        val empty : 'a t

        The empty map.

        val add : key:key -> data:'a -> 'a t -> 'a t

        add ~key ~data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

        • before 4.03

          Physical equality was not ensured.

        val add_to_list : key:key -> data:'a -> 'a list t -> 'a list t

        add_to_list ~key ~data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

        • since 5.1
        val update : key:key -> f:('a option -> 'a option) -> 'a t -> 'a t

        update ~key ~f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

        • since 4.06
        val singleton : key -> 'a -> 'a t

        singleton x y returns the one-element map that contains a binding y for x.

        • since 3.12
        val remove : key -> 'a t -> 'a t

        remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

        • before 4.03

          Physical equality was not ensured.

        val merge : +Make (less-power.Stdlib_alerts.MoreLabels_alerting.Map.Make)

        Module Map.Make

        Functor building an implementation of the map structure given a totally ordered type.

        Parameters

        module Ord : OrderedType

        Signature

        Maps

        type key = Ord.t

        The type of the map keys.

        type 'a t = 'a Stdlib.Map.Make(Ord).t

        The type of maps from type key to type 'a.

        val empty : 'a t

        The empty map.

        val add : key:key -> data:'a -> 'a t -> 'a t

        add ~key ~data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

        • before 4.03

          Physical equality was not ensured.

        val add_to_list : key:key -> data:'a -> 'a list t -> 'a list t

        add_to_list ~key ~data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

        • since 5.1
        val update : key:key -> f:('a option -> 'a option) -> 'a t -> 'a t

        update ~key ~f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

        • since 4.06
        val singleton : key -> 'a -> 'a t

        singleton x y returns the one-element map that contains a binding y for x.

        • since 3.12
        val remove : key -> 'a t -> 'a t

        remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

        • before 4.03

          Physical equality was not ensured.

        val merge : f:(key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Map/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Map/index.html index bce005f..cddc966 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Map/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Map/index.html @@ -1,5 +1,5 @@ -Map (less-power.Stdlib_alerts.MoreLabels_alerting.Map)

        Module MoreLabels_alerting.Map

        Association tables over ordered types.

        This module implements applicative association tables, also known as finite maps or dictionaries, given a total ordering function over the keys. All operations over maps are purely applicative (no side-effects). The implementation uses balanced binary trees, and therefore searching and insertion take time logarithmic in the size of the map.

        For instance:

        module IntPairs =
        +Map (less-power.Stdlib_alerts.MoreLabels_alerting.Map)

        Module MoreLabels_alerting.Map

        Association tables over ordered types.

        This module implements applicative association tables, also known as finite maps or dictionaries, given a total ordering function over the keys. All operations over maps are purely applicative (no side-effects). The implementation uses balanced binary trees, and therefore searching and insertion take time logarithmic in the size of the map.

        For instance:

        module IntPairs =
           struct
             type t = int * int
             let compare (x0,y0) (x1,y1) =
        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Map/module-type-OrderedType/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Map/module-type-OrderedType/index.html
        index ab2e1e2..ceb5b61 100644
        --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Map/module-type-OrderedType/index.html
        +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Map/module-type-OrderedType/index.html
        @@ -1,2 +1,2 @@
         
        -OrderedType (less-power.Stdlib_alerts.MoreLabels_alerting.Map.OrderedType)

        Module type Map.OrderedType

        Input signature of the functor Make.

        type t

        The type of the map keys.

        val compare : t -> t -> int

        A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

        +OrderedType (less-power.Stdlib_alerts.MoreLabels_alerting.Map.OrderedType)

        Module type Map.OrderedType

        Input signature of the functor Make.

        type t

        The type of the map keys.

        val compare : t -> t -> int

        A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Map/module-type-S/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Map/module-type-S/index.html index efc21af..dce8cd8 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Map/module-type-S/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Map/module-type-S/index.html @@ -1,5 +1,5 @@ -S (less-power.Stdlib_alerts.MoreLabels_alerting.Map.S)

        Module type Map.S

        Output signature of the functor Make.

        Maps

        type key

        The type of the map keys.

        type !+'a t

        The type of maps from type key to type 'a.

        val empty : 'a t

        The empty map.

        val add : key:key -> data:'a -> 'a t -> 'a t

        add ~key ~data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

        • before 4.03

          Physical equality was not ensured.

        val add_to_list : key:key -> data:'a -> 'a list t -> 'a list t

        add_to_list ~key ~data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

        • since 5.1
        val update : key:key -> f:('a option -> 'a option) -> 'a t -> 'a t

        update ~key ~f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

        • since 4.06
        val singleton : key -> 'a -> 'a t

        singleton x y returns the one-element map that contains a binding y for x.

        • since 3.12
        val remove : key -> 'a t -> 'a t

        remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

        • before 4.03

          Physical equality was not ensured.

        val merge : +S (less-power.Stdlib_alerts.MoreLabels_alerting.Map.S)

        Module type Map.S

        Output signature of the functor Make.

        Maps

        type key

        The type of the map keys.

        type !+'a t

        The type of maps from type key to type 'a.

        val empty : 'a t

        The empty map.

        val add : key:key -> data:'a -> 'a t -> 'a t

        add ~key ~data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

        • before 4.03

          Physical equality was not ensured.

        val add_to_list : key:key -> data:'a -> 'a list t -> 'a list t

        add_to_list ~key ~data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

        • since 5.1
        val update : key:key -> f:('a option -> 'a option) -> 'a t -> 'a t

        update ~key ~f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

        • since 4.06
        val singleton : key -> 'a -> 'a t

        singleton x y returns the one-element map that contains a binding y for x.

        • since 3.12
        val remove : key -> 'a t -> 'a t

        remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

        • before 4.03

          Physical equality was not ensured.

        val merge : f:(key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Set/Make/argument-1-Ord/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Set/Make/argument-1-Ord/index.html index ac91fa4..7c2a67c 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Set/Make/argument-1-Ord/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Set/Make/argument-1-Ord/index.html @@ -1,2 +1,2 @@ -Ord (less-power.Stdlib_alerts.MoreLabels_alerting.Set.Make.Ord)

        Parameter Make.Ord

        type t

        The type of the set elements.

        val compare : t -> t -> int

        A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

        +Ord (less-power.Stdlib_alerts.MoreLabels_alerting.Set.Make.Ord)

        Parameter Make.Ord

        type t

        The type of the set elements.

        val compare : t -> t -> int

        A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Set/Make/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Set/Make/index.html index eb6b78a..34b8e9f 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Set/Make/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Set/Make/index.html @@ -1,3 +1,3 @@ -Make (less-power.Stdlib_alerts.MoreLabels_alerting.Set.Make)

        Module Set.Make

        Functor building an implementation of the set structure given a totally ordered type.

        Parameters

        module Ord : OrderedType

        Signature

        Sets

        type elt = Ord.t

        The type of the set elements.

        type t = Stdlib.Set.Make(Ord).t

        The type of sets.

        val empty : t

        The empty set.

        val add : elt -> t -> t

        add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

        • before 4.03

          Physical equality was not ensured.

        val singleton : elt -> t

        singleton x returns the one-element set containing only x.

        val remove : elt -> t -> t

        remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

        • before 4.03

          Physical equality was not ensured.

        val union : t -> t -> t

        Set union.

        val inter : t -> t -> t

        Set intersection.

        val disjoint : t -> t -> bool

        Test if two sets are disjoint.

        • since 4.08
        val diff : t -> t -> t

        Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

        val cardinal : t -> int

        Return the number of elements of a set.

        Elements

        val elements : t -> elt list

        Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

        val min_elt : t -> elt

        Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

        val min_elt_opt : t -> elt option

        Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

        • since 4.05
        val max_elt : t -> elt

        Same as min_elt, but returns the largest element of the given set.

        val max_elt_opt : t -> elt option

        Same as min_elt_opt, but returns the largest element of the given set.

        • since 4.05
        val choose : t -> elt

        Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

        val choose_opt : t -> elt option

        Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

        • since 4.05

        Searching

        val find : elt -> t -> elt

        find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

        • since 4.01
        val find_opt : elt -> t -> elt option

        find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

        • since 4.05
        val find_first : f:(elt -> bool) -> t -> elt

        find_first ~f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

        For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

        • since 4.05
        val find_first_opt : f:(elt -> bool) -> t -> elt option

        find_first_opt ~f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

        • since 4.05
        val find_last : f:(elt -> bool) -> t -> elt

        find_last ~f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

        • since 4.05
        val find_last_opt : f:(elt -> bool) -> t -> elt option

        find_last_opt ~f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

        • since 4.05

        Traversing

        val iter : f:(elt -> unit) -> t -> unit

        iter ~f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

        val fold : f:(elt -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

        fold ~f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

        Transforming

        val map : f:(elt -> elt) -> t -> t

        map ~f s is the set whose elements are f a0,f a1... f +Make (less-power.Stdlib_alerts.MoreLabels_alerting.Set.Make)

        Module Set.Make

        Functor building an implementation of the set structure given a totally ordered type.

        Parameters

        module Ord : OrderedType

        Signature

        Sets

        type elt = Ord.t

        The type of the set elements.

        type t = Stdlib.Set.Make(Ord).t

        The type of sets.

        val empty : t

        The empty set.

        val add : elt -> t -> t

        add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

        • before 4.03

          Physical equality was not ensured.

        val singleton : elt -> t

        singleton x returns the one-element set containing only x.

        val remove : elt -> t -> t

        remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

        • before 4.03

          Physical equality was not ensured.

        val union : t -> t -> t

        Set union.

        val inter : t -> t -> t

        Set intersection.

        val disjoint : t -> t -> bool

        Test if two sets are disjoint.

        • since 4.08
        val diff : t -> t -> t

        Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

        val cardinal : t -> int

        Return the number of elements of a set.

        Elements

        val elements : t -> elt list

        Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

        val min_elt : t -> elt

        Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

        val min_elt_opt : t -> elt option

        Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

        • since 4.05
        val max_elt : t -> elt

        Same as min_elt, but returns the largest element of the given set.

        val max_elt_opt : t -> elt option

        Same as min_elt_opt, but returns the largest element of the given set.

        • since 4.05
        val choose : t -> elt

        Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

        val choose_opt : t -> elt option

        Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

        • since 4.05

        Searching

        val find : elt -> t -> elt

        find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

        • since 4.01
        val find_opt : elt -> t -> elt option

        find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

        • since 4.05
        val find_first : f:(elt -> bool) -> t -> elt

        find_first ~f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

        For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

        • since 4.05
        val find_first_opt : f:(elt -> bool) -> t -> elt option

        find_first_opt ~f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

        • since 4.05
        val find_last : f:(elt -> bool) -> t -> elt

        find_last ~f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

        • since 4.05
        val find_last_opt : f:(elt -> bool) -> t -> elt option

        find_last_opt ~f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

        • since 4.05

        Traversing

        val iter : f:(elt -> unit) -> t -> unit

        iter ~f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

        val fold : f:(elt -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

        fold ~f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

        Transforming

        val map : f:(elt -> elt) -> t -> t

        map ~f s is the set whose elements are f a0,f a1... f aN, where a0,a1...aN are the elements of s.

        The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

        If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

        • since 4.04
        val filter : f:(elt -> bool) -> t -> t

        filter ~f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

        • before 4.03

          Physical equality was not ensured.

        val filter_map : f:(elt -> elt option) -> t -> t

        filter_map ~f s returns the set of all v such that f x = Some v for some element x of s.

        For example,

        filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

        is the set of halves of the even elements of s.

        If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

        • since 4.11
        val partition : f:(elt -> bool) -> t -> t * t

        partition ~f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

        val split : elt -> t -> t * bool * t

        split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

        Predicates and comparisons

        val is_empty : t -> bool

        Test whether a set is empty or not.

        val mem : elt -> t -> bool

        mem x s tests whether x belongs to the set s.

        val equal : t -> t -> bool

        equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

        val compare : t -> t -> int

        Total ordering between sets. Can be used as the ordering function for doing sets of sets.

        val subset : t -> t -> bool

        subset s1 s2 tests whether the set s1 is a subset of the set s2.

        val for_all : f:(elt -> bool) -> t -> bool

        for_all ~f s checks if all elements of the set satisfy the predicate f.

        val exists : f:(elt -> bool) -> t -> bool

        exists ~f s checks if at least one element of the set satisfies the predicate f.

        Converting

        val to_list : t -> elt list

        to_list s is elements s.

        • since 5.1
        val of_list : elt list -> t

        of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

        • since 4.02
        val to_seq_from : elt -> t -> elt Stdlib.Seq.t

        to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

        • since 4.07
        val to_seq : t -> elt Stdlib.Seq.t

        Iterate on the whole set, in ascending order

        • since 4.07
        val to_rev_seq : t -> elt Stdlib.Seq.t

        Iterate on the whole set, in descending order

        • since 4.12
        val add_seq : elt Stdlib.Seq.t -> t -> t

        Add the given elements to the set, in order.

        • since 4.07
        val of_seq : elt Stdlib.Seq.t -> t

        Build a set from the given bindings

        • since 4.07
        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Set/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Set/index.html index cceda78..cc4aa9d 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Set/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Set/index.html @@ -1,5 +1,5 @@ -Set (less-power.Stdlib_alerts.MoreLabels_alerting.Set)

        Module MoreLabels_alerting.Set

        Sets over ordered types.

        This module implements the set data structure, given a total ordering function over the set elements. All operations over sets are purely applicative (no side-effects). The implementation uses balanced binary trees, and is therefore reasonably efficient: insertion and membership take time logarithmic in the size of the set, for instance.

        The Make functor constructs implementations for any type, given a compare function. For instance:

        module IntPairs =
        +Set (less-power.Stdlib_alerts.MoreLabels_alerting.Set)

        Module MoreLabels_alerting.Set

        Sets over ordered types.

        This module implements the set data structure, given a total ordering function over the set elements. All operations over sets are purely applicative (no side-effects). The implementation uses balanced binary trees, and is therefore reasonably efficient: insertion and membership take time logarithmic in the size of the set, for instance.

        The Make functor constructs implementations for any type, given a compare function. For instance:

        module IntPairs =
           struct
             type t = int * int
             let compare (x0,y0) (x1,y1) =
        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Set/module-type-OrderedType/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Set/module-type-OrderedType/index.html
        index 8b7b73c..a0a7563 100644
        --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Set/module-type-OrderedType/index.html
        +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Set/module-type-OrderedType/index.html
        @@ -1,2 +1,2 @@
         
        -OrderedType (less-power.Stdlib_alerts.MoreLabels_alerting.Set.OrderedType)

        Module type Set.OrderedType

        Input signature of the functor Make.

        type t

        The type of the set elements.

        val compare : t -> t -> int

        A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

        +OrderedType (less-power.Stdlib_alerts.MoreLabels_alerting.Set.OrderedType)

        Module type Set.OrderedType

        Input signature of the functor Make.

        type t

        The type of the set elements.

        val compare : t -> t -> int

        A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Set/module-type-S/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Set/module-type-S/index.html index 69f798e..bc8ccab 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Set/module-type-S/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/Set/module-type-S/index.html @@ -1,3 +1,3 @@ -S (less-power.Stdlib_alerts.MoreLabels_alerting.Set.S)

        Module type Set.S

        Output signature of the functor Make.

        Sets

        type elt

        The type of the set elements.

        type t

        The type of sets.

        val empty : t

        The empty set.

        val add : elt -> t -> t

        add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

        • before 4.03

          Physical equality was not ensured.

        val singleton : elt -> t

        singleton x returns the one-element set containing only x.

        val remove : elt -> t -> t

        remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

        • before 4.03

          Physical equality was not ensured.

        val union : t -> t -> t

        Set union.

        val inter : t -> t -> t

        Set intersection.

        val disjoint : t -> t -> bool

        Test if two sets are disjoint.

        • since 4.08
        val diff : t -> t -> t

        Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

        val cardinal : t -> int

        Return the number of elements of a set.

        Elements

        val elements : t -> elt list

        Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

        val min_elt : t -> elt

        Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

        val min_elt_opt : t -> elt option

        Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

        • since 4.05
        val max_elt : t -> elt

        Same as min_elt, but returns the largest element of the given set.

        val max_elt_opt : t -> elt option

        Same as min_elt_opt, but returns the largest element of the given set.

        • since 4.05
        val choose : t -> elt

        Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

        val choose_opt : t -> elt option

        Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

        • since 4.05

        Searching

        val find : elt -> t -> elt

        find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

        • since 4.01
        val find_opt : elt -> t -> elt option

        find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

        • since 4.05
        val find_first : f:(elt -> bool) -> t -> elt

        find_first ~f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

        For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

        • since 4.05
        val find_first_opt : f:(elt -> bool) -> t -> elt option

        find_first_opt ~f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

        • since 4.05
        val find_last : f:(elt -> bool) -> t -> elt

        find_last ~f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

        • since 4.05
        val find_last_opt : f:(elt -> bool) -> t -> elt option

        find_last_opt ~f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

        • since 4.05

        Traversing

        val iter : f:(elt -> unit) -> t -> unit

        iter ~f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

        val fold : f:(elt -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

        fold ~f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

        Transforming

        val map : f:(elt -> elt) -> t -> t

        map ~f s is the set whose elements are f a0,f a1... f +S (less-power.Stdlib_alerts.MoreLabels_alerting.Set.S)

        Module type Set.S

        Output signature of the functor Make.

        Sets

        type elt

        The type of the set elements.

        type t

        The type of sets.

        val empty : t

        The empty set.

        val add : elt -> t -> t

        add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

        • before 4.03

          Physical equality was not ensured.

        val singleton : elt -> t

        singleton x returns the one-element set containing only x.

        val remove : elt -> t -> t

        remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

        • before 4.03

          Physical equality was not ensured.

        val union : t -> t -> t

        Set union.

        val inter : t -> t -> t

        Set intersection.

        val disjoint : t -> t -> bool

        Test if two sets are disjoint.

        • since 4.08
        val diff : t -> t -> t

        Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

        val cardinal : t -> int

        Return the number of elements of a set.

        Elements

        val elements : t -> elt list

        Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

        val min_elt : t -> elt

        Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

        val min_elt_opt : t -> elt option

        Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

        • since 4.05
        val max_elt : t -> elt

        Same as min_elt, but returns the largest element of the given set.

        val max_elt_opt : t -> elt option

        Same as min_elt_opt, but returns the largest element of the given set.

        • since 4.05
        val choose : t -> elt

        Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

        val choose_opt : t -> elt option

        Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

        • since 4.05

        Searching

        val find : elt -> t -> elt

        find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

        • since 4.01
        val find_opt : elt -> t -> elt option

        find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

        • since 4.05
        val find_first : f:(elt -> bool) -> t -> elt

        find_first ~f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

        For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

        • since 4.05
        val find_first_opt : f:(elt -> bool) -> t -> elt option

        find_first_opt ~f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

        • since 4.05
        val find_last : f:(elt -> bool) -> t -> elt

        find_last ~f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

        • since 4.05
        val find_last_opt : f:(elt -> bool) -> t -> elt option

        find_last_opt ~f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

        • since 4.05

        Traversing

        val iter : f:(elt -> unit) -> t -> unit

        iter ~f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

        val fold : f:(elt -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

        fold ~f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

        Transforming

        val map : f:(elt -> elt) -> t -> t

        map ~f s is the set whose elements are f a0,f a1... f aN, where a0,a1...aN are the elements of s.

        The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

        If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

        • since 4.04
        val filter : f:(elt -> bool) -> t -> t

        filter ~f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

        • before 4.03

          Physical equality was not ensured.

        val filter_map : f:(elt -> elt option) -> t -> t

        filter_map ~f s returns the set of all v such that f x = Some v for some element x of s.

        For example,

        filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

        is the set of halves of the even elements of s.

        If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

        • since 4.11
        val partition : f:(elt -> bool) -> t -> t * t

        partition ~f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

        val split : elt -> t -> t * bool * t

        split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

        Predicates and comparisons

        val is_empty : t -> bool

        Test whether a set is empty or not.

        val mem : elt -> t -> bool

        mem x s tests whether x belongs to the set s.

        val equal : t -> t -> bool

        equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

        val compare : t -> t -> int

        Total ordering between sets. Can be used as the ordering function for doing sets of sets.

        val subset : t -> t -> bool

        subset s1 s2 tests whether the set s1 is a subset of the set s2.

        val for_all : f:(elt -> bool) -> t -> bool

        for_all ~f s checks if all elements of the set satisfy the predicate f.

        val exists : f:(elt -> bool) -> t -> bool

        exists ~f s checks if at least one element of the set satisfies the predicate f.

        Converting

        val to_list : t -> elt list

        to_list s is elements s.

        • since 5.1
        val of_list : elt list -> t

        of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

        • since 4.02
        val to_seq_from : elt -> t -> elt Stdlib.Seq.t

        to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

        • since 4.07
        val to_seq : t -> elt Stdlib.Seq.t

        Iterate on the whole set, in ascending order

        • since 4.07
        val to_rev_seq : t -> elt Stdlib.Seq.t

        Iterate on the whole set, in descending order

        • since 4.12
        val add_seq : elt Stdlib.Seq.t -> t -> t

        Add the given elements to the set, in order.

        • since 4.07
        val of_seq : elt Stdlib.Seq.t -> t

        Build a set from the given bindings

        • since 4.07
        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/index.html index b1fe6a0..2008fa9 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-MoreLabels_alerting/index.html @@ -1,2 +1,2 @@ -MoreLabels_alerting (less-power.Stdlib_alerts.MoreLabels_alerting)

        Module type Stdlib_alerts.MoreLabels_alerting

        include sig ... end
        module Map : sig ... end

        Association tables over ordered types.

        module Set : sig ... end

        Sets over ordered types.

        module Hashtbl : sig ... end
        +MoreLabels_alerting (less-power.Stdlib_alerts.MoreLabels_alerting)

        Module type Stdlib_alerts.MoreLabels_alerting

        include sig ... end
        module Map : sig ... end

        Association tables over ordered types.

        module Set : sig ... end

        Sets over ordered types.

        module Hashtbl : sig ... end
        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Printexc_alerting/Slot/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Printexc_alerting/Slot/index.html index ded5a7f..cd0e3db 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Printexc_alerting/Slot/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Printexc_alerting/Slot/index.html @@ -1,2 +1,2 @@ -Slot (less-power.Stdlib_alerts.Printexc_alerting.Slot)

        Module Printexc_alerting.Slot

        • since 4.02
        • alert unsafe This item is not permitted
        val is_raise : t -> bool

        is_raise slot is true when slot refers to a raising point in the code, and false when it comes from a simple function call.

        • since 4.02
        val is_inline : t -> bool

        is_inline slot is true when slot refers to a call that got inlined by the compiler, and false when it comes from any other context.

        • since 4.04
        val location : t -> location option

        location slot returns the location information of the slot, if available, and None otherwise.

        Some possible reasons for failing to return a location are as follow:

        • the slot corresponds to a compiler-inserted raise
        • the slot corresponds to a part of the program that has not been compiled with debug information (-g)
        • since 4.02
        val name : t -> string option

        name slot returns the name of the function or definition enclosing the location referred to by the slot.

        name slot returns None if the name is unavailable, which may happen for the same reasons as location returning None.

        • since 4.11
        val format : int -> t -> string option

        format pos slot returns the string representation of slot as raw_backtrace_to_string would format it, assuming it is the pos-th element of the backtrace: the 0-th element is pretty-printed differently than the others.

        Whole-backtrace printing functions also skip some uninformative slots; in that case, format pos slot returns None.

        • since 4.02
        +Slot (less-power.Stdlib_alerts.Printexc_alerting.Slot)

        Module Printexc_alerting.Slot

        • since 4.02
        • alert unsafe This item is not permitted
        val is_raise : t -> bool

        is_raise slot is true when slot refers to a raising point in the code, and false when it comes from a simple function call.

        • since 4.02
        val is_inline : t -> bool

        is_inline slot is true when slot refers to a call that got inlined by the compiler, and false when it comes from any other context.

        • since 4.04
        val location : t -> location option

        location slot returns the location information of the slot, if available, and None otherwise.

        Some possible reasons for failing to return a location are as follow:

        • the slot corresponds to a compiler-inserted raise
        • the slot corresponds to a part of the program that has not been compiled with debug information (-g)
        • since 4.02
        val name : t -> string option

        name slot returns the name of the function or definition enclosing the location referred to by the slot.

        name slot returns None if the name is unavailable, which may happen for the same reasons as location returning None.

        • since 4.11
        val format : int -> t -> string option

        format pos slot returns the string representation of slot as raw_backtrace_to_string would format it, assuming it is the pos-th element of the backtrace: the 0-th element is pretty-printed differently than the others.

        Whole-backtrace printing functions also skip some uninformative slots; in that case, format pos slot returns None.

        • since 4.02
        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Printexc_alerting/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Printexc_alerting/index.html index 3fc6e75..8b03773 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Printexc_alerting/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Printexc_alerting/index.html @@ -1,5 +1,5 @@ -Printexc_alerting (less-power.Stdlib_alerts.Printexc_alerting)

        Module type Stdlib_alerts.Printexc_alerting

        type raw_backtrace = Stdlib.Printexc.raw_backtrace
        • alert unsafe This item is not permitted
        type raw_backtrace_slot = Stdlib.Printexc.raw_backtrace_slot
        • alert unsafe This item is not permitted
        type backtrace_slot = Stdlib.Printexc.backtrace_slot
        • alert unsafe This item is not permitted
        type location = Stdlib.Printexc.location = {
        1. filename : string;
        2. line_number : int;
        3. start_char : int;
        4. end_char : int;
        }
        • alert unsafe This item is not permitted
        include sig ... end
        type t = exn = ..

        The type of exception values.

        val to_string_default : exn -> string

        Printexc.to_string_default e returns a string representation of the exception e, ignoring all registered exception printers.

        • since 4.09
        val to_string : exn -> string

        Printexc.to_string e returns a string representation of the exception e.

        • alert unsafe This item is not permitted
        val print : ('a -> 'b) -> 'a -> 'b

        Printexc.print fn x applies fn to x and returns the result. If the evaluation of fn x raises any exception, the name of the exception is printed on standard error output, and the exception is raised again. The typical use is to catch and report exceptions that escape a function application.

        • alert unsafe This item is not permitted
        val catch : ('a -> 'b) -> 'a -> 'b

        Printexc.catch fn x is similar to Printexc.print, but aborts the program with exit code 2 after printing the uncaught exception. This function is deprecated: the runtime system is now able to print uncaught exceptions as precisely as Printexc.catch does. Moreover, calling Printexc.catch makes it harder to track the location of the exception using the debugger or the stack backtrace facility. So, do not use Printexc.catch in new code.

        • deprecated This function is no longer needed.
        • alert unsafe This item is not permitted
        val print_backtrace : Stdlib.out_channel -> unit

        Printexc.print_backtrace oc prints an exception backtrace on the output channel oc. The backtrace lists the program locations where the most-recently raised exception was raised and where it was propagated through function calls.

        If the call is not inside an exception handler, the returned backtrace is unspecified. If the call is after some exception-catching code (before in the handler, or in a when-guard during the matching of the exception handler), the backtrace may correspond to a later exception than the handled one.

        • since 3.11
        • alert unsafe This item is not permitted
        val get_backtrace : unit -> string

        Printexc.get_backtrace () returns a string containing the same exception backtrace that Printexc.print_backtrace would print. Same restriction usage than print_backtrace.

        • since 3.11
        • alert unsafe This item is not permitted
        val record_backtrace : bool -> unit

        Printexc.record_backtrace b turns recording of exception backtraces on (if b = true) or off (if b = false). Initially, backtraces are not recorded, unless the b flag is given to the program through the OCAMLRUNPARAM variable.

        • since 3.11
        • alert unsafe This item is not permitted
        val backtrace_status : unit -> bool

        Printexc.backtrace_status() returns true if exception backtraces are currently recorded, false if not.

        • since 3.11
        • alert unsafe This item is not permitted
        val register_printer : (exn -> string option) -> unit

        Printexc.register_printer fn registers fn as an exception printer. The printer should return None or raise an exception if it does not know how to convert the passed exception, and Some +Printexc_alerting (less-power.Stdlib_alerts.Printexc_alerting)

        Module type Stdlib_alerts.Printexc_alerting

        type raw_backtrace = Stdlib.Printexc.raw_backtrace
        • alert unsafe This item is not permitted
        type raw_backtrace_slot = Stdlib.Printexc.raw_backtrace_slot
        • alert unsafe This item is not permitted
        type backtrace_slot = Stdlib.Printexc.backtrace_slot
        • alert unsafe This item is not permitted
        type location = Stdlib.Printexc.location = {
        1. filename : string;
        2. line_number : int;
        3. start_char : int;
        4. end_char : int;
        }
        • alert unsafe This item is not permitted
        include sig ... end
        type t = exn = ..

        The type of exception values.

        val to_string_default : exn -> string

        Printexc.to_string_default e returns a string representation of the exception e, ignoring all registered exception printers.

        • since 4.09
        val to_string : exn -> string

        Printexc.to_string e returns a string representation of the exception e.

        • alert unsafe This item is not permitted
        val print : ('a -> 'b) -> 'a -> 'b

        Printexc.print fn x applies fn to x and returns the result. If the evaluation of fn x raises any exception, the name of the exception is printed on standard error output, and the exception is raised again. The typical use is to catch and report exceptions that escape a function application.

        • alert unsafe This item is not permitted
        val catch : ('a -> 'b) -> 'a -> 'b

        Printexc.catch fn x is similar to Printexc.print, but aborts the program with exit code 2 after printing the uncaught exception. This function is deprecated: the runtime system is now able to print uncaught exceptions as precisely as Printexc.catch does. Moreover, calling Printexc.catch makes it harder to track the location of the exception using the debugger or the stack backtrace facility. So, do not use Printexc.catch in new code.

        • deprecated This function is no longer needed.
        • alert unsafe This item is not permitted
        val print_backtrace : Stdlib.out_channel -> unit

        Printexc.print_backtrace oc prints an exception backtrace on the output channel oc. The backtrace lists the program locations where the most-recently raised exception was raised and where it was propagated through function calls.

        If the call is not inside an exception handler, the returned backtrace is unspecified. If the call is after some exception-catching code (before in the handler, or in a when-guard during the matching of the exception handler), the backtrace may correspond to a later exception than the handled one.

        • since 3.11
        • alert unsafe This item is not permitted
        val get_backtrace : unit -> string

        Printexc.get_backtrace () returns a string containing the same exception backtrace that Printexc.print_backtrace would print. Same restriction usage than print_backtrace.

        • since 3.11
        • alert unsafe This item is not permitted
        val record_backtrace : bool -> unit

        Printexc.record_backtrace b turns recording of exception backtraces on (if b = true) or off (if b = false). Initially, backtraces are not recorded, unless the b flag is given to the program through the OCAMLRUNPARAM variable.

        • since 3.11
        • alert unsafe This item is not permitted
        val backtrace_status : unit -> bool

        Printexc.backtrace_status() returns true if exception backtraces are currently recorded, false if not.

        • since 3.11
        • alert unsafe This item is not permitted
        val register_printer : (exn -> string option) -> unit

        Printexc.register_printer fn registers fn as an exception printer. The printer should return None or raise an exception if it does not know how to convert the passed exception, and Some s with s the resulting string if it can convert the passed exception. Exceptions raised by the printer are ignored.

        When converting an exception into a string, the printers will be invoked in the reverse order of their registrations, until a printer returns a Some s value (if no such printer exists, the runtime will use a generic printer).

        When using this mechanism, one should be aware that an exception backtrace is attached to the thread that saw it raised, rather than to the exception itself. Practically, it means that the code related to fn should not use the backtrace if it has itself raised an exception before.

        • since 3.11.2
        • alert unsafe This item is not permitted
        val use_printers : exn -> string option

        Printexc.use_printers e returns None if there are no registered printers and Some s with else as the resulting string otherwise.

        • since 4.09
        • alert unsafe This item is not permitted
        type raw_backtrace_entry = private int

        A raw_backtrace_entry is an element of a raw_backtrace.

        Each raw_backtrace_entry is an opaque integer, whose value is not stable between different programs, or even between different runs of the same binary.

        A raw_backtrace_entry can be converted to a usable form using backtrace_slots_of_raw_entry below. Note that, due to inlining, a single raw_backtrace_entry may convert to several backtrace_slots. Since the values of a raw_backtrace_entry are not stable, they cannot be marshalled. If they are to be converted, the conversion must be done by the process that generated them.

        Again due to inlining, there may be multiple distinct raw_backtrace_entry values that convert to equal backtrace_slots. However, if two raw_backtrace_entrys are equal as integers, then they represent the same backtrace_slots.

        • since 4.12
        • alert unsafe This item is not permitted
        val raw_backtrace_entries : raw_backtrace -> raw_backtrace_entry array
        • since 4.12
        • alert unsafe This item is not permitted
        val get_raw_backtrace : unit -> raw_backtrace

        Printexc.get_raw_backtrace () returns the same exception backtrace that Printexc.print_backtrace would print, but in a raw format. Same restriction usage than print_backtrace.

        • since 4.01
        • alert unsafe This item is not permitted
        val print_raw_backtrace : Stdlib.out_channel -> raw_backtrace -> unit

        Print a raw backtrace in the same format Printexc.print_backtrace uses.

        • since 4.01
        • alert unsafe This item is not permitted
        val raw_backtrace_to_string : raw_backtrace -> string

        Return a string from a raw backtrace, in the same format Printexc.get_backtrace uses.

        • since 4.01
        • alert unsafe This item is not permitted
        val raise_with_backtrace : exn -> raw_backtrace -> 'a

        Reraise the exception using the given raw_backtrace for the origin of the exception

        • since 4.05
        • alert unsafe This item is not permitted
        val get_callstack : int -> raw_backtrace

        Printexc.get_callstack n returns a description of the top of the call stack on the current program point (for the current thread), with at most n entries. (Note: this function is not related to exceptions at all, despite being part of the Printexc module.)

        • since 4.01
        • alert unsafe This item is not permitted
        val default_uncaught_exception_handler : exn -> raw_backtrace -> unit

        Printexc.default_uncaught_exception_handler prints the exception and backtrace on standard error output.

        • since 4.11
        • alert unsafe This item is not permitted
        val set_uncaught_exception_handler : (exn -> raw_backtrace -> unit) -> unit

        Printexc.set_uncaught_exception_handler fn registers fn as the handler for uncaught exceptions. The default handler is Printexc.default_uncaught_exception_handler.

        Note that when fn is called all the functions registered with Stdlib.at_exit have already been called. Because of this you must make sure any output channel fn writes on is flushed.

        Also note that exceptions raised by user code in the interactive toplevel are not passed to this function as they are caught by the toplevel itself.

        If fn raises an exception, both the exceptions passed to fn and raised by fn will be printed with their respective backtrace.

        • since 4.02
        • alert unsafe This item is not permitted
        val backtrace_slots : raw_backtrace -> backtrace_slot array option

        Returns the slots of a raw backtrace, or None if none of them contain useful information.

        In the return array, the slot at index 0 corresponds to the most recent function call, raise, or primitive get_backtrace call in the trace.

        Some possible reasons for returning None are as follow:

        • none of the slots in the trace come from modules compiled with debug information (-g)
        • the program is a bytecode program that has not been linked with debug information enabled (ocamlc -g)
        • since 4.02
        • alert unsafe This item is not permitted
        val backtrace_slots_of_raw_entry : raw_backtrace_entry -> backtrace_slot array option

        Returns the slots of a single raw backtrace entry, or None if this entry lacks debug information.

        Slots are returned in the same order as backtrace_slots: the slot at index 0 is the most recent call, raise, or primitive, and subsequent slots represent callers.

        • since 4.12
        • alert unsafe This item is not permitted
        module Slot : sig ... end
        val raw_backtrace_length : raw_backtrace -> int

        raw_backtrace_length bckt returns the number of slots in the backtrace bckt.

        • since 4.02
        • alert unsafe This item is not permitted
        val get_raw_backtrace_slot : raw_backtrace -> int -> raw_backtrace_slot

        get_raw_backtrace_slot bckt pos returns the slot in position pos in the backtrace bckt.

        • since 4.02
        • alert unsafe This item is not permitted
        val convert_raw_backtrace_slot : raw_backtrace_slot -> backtrace_slot

        Extracts the user-friendly backtrace_slot from a low-level raw_backtrace_slot.

        • since 4.02
        • alert unsafe This item is not permitted
        val get_raw_backtrace_next_slot : diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Printf_alerting/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Printf_alerting/index.html index 2a3200b..a82ef17 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Printf_alerting/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Printf_alerting/index.html @@ -1,5 +1,5 @@ -Printf_alerting (less-power.Stdlib_alerts.Printf_alerting)

        Module type Stdlib_alerts.Printf_alerting

        include sig ... end
        val sprintf : ('a, unit, string) Stdlib.format -> 'a

        Same as Printf.fprintf, but instead of printing on an output channel, return a string containing the result of formatting the arguments.

        val ksprintf : (string -> 'd) -> ('a, unit, string, 'd) Stdlib.format4 -> 'a

        Same as sprintf above, but instead of returning the string, passes it to the first argument.

        • since 3.09
        val fprintf : +Printf_alerting (less-power.Stdlib_alerts.Printf_alerting)

        Module type Stdlib_alerts.Printf_alerting

        include sig ... end
        val sprintf : ('a, unit, string) Stdlib.format -> 'a

        Same as Printf.fprintf, but instead of printing on an output channel, return a string containing the result of formatting the arguments.

        val ksprintf : (string -> 'd) -> ('a, unit, string, 'd) Stdlib.format4 -> 'a

        Same as sprintf above, but instead of returning the string, passes it to the first argument.

        • since 3.09
        val fprintf : Stdlib.out_channel -> ('a, Stdlib.out_channel, unit) Stdlib.format -> 'a

        fprintf outchan format arg1 ... argN formats the arguments arg1 to argN according to the format string format, and outputs the resulting string on the channel outchan.

        The format string is a character string which contains two types of objects: plain characters, which are simply copied to the output channel, and conversion specifications, each of which causes conversion and printing of arguments.

        Conversion specifications have the following form:

        % [flags] [width] [.precision] type

        In short, a conversion specification consists in the % character, followed by optional modifiers and a type which is made of one or two characters.

        The types and their meanings are:

        • d, i: convert an integer argument to signed decimal. The flag # adds underscores to large values for readability.
        • u, n, l, L, or N: convert an integer argument to unsigned decimal. Warning: n, l, L, and N are used for scanf, and should not be used for printf. The flag # adds underscores to large values for readability.
        • x: convert an integer argument to unsigned hexadecimal, using lowercase letters. The flag # adds a 0x prefix to non zero values.
        • X: convert an integer argument to unsigned hexadecimal, using uppercase letters. The flag # adds a 0X prefix to non zero values.
        • o: convert an integer argument to unsigned octal. The flag # adds a 0 prefix to non zero values.
        • s: insert a string argument.
        • S: convert a string argument to OCaml syntax (double quotes, escapes).
        • c: insert a character argument.
        • C: convert a character argument to OCaml syntax (single quotes, escapes).
        • f: convert a floating-point argument to decimal notation, in the style dddd.ddd.
        • F: convert a floating-point argument to OCaml syntax (dddd. or dddd.ddd or d.ddd e+-dd). Converts to hexadecimal with the # flag (see h).
        • e or E: convert a floating-point argument to decimal notation, in the style d.ddd e+-dd (mantissa and exponent).
        • g or G: convert a floating-point argument to decimal notation, in style f or e, E (whichever is more compact). Moreover, any trailing zeros are removed from the fractional part of the result and the decimal-point character is removed if there is no fractional part remaining.
        • h or H: convert a floating-point argument to hexadecimal notation, in the style 0xh.hhhh p+-dd (hexadecimal mantissa, exponent in decimal and denotes a power of 2).
        • B: convert a boolean argument to the string true or false
        • b: convert a boolean argument (deprecated; do not use in new programs).
        • ld, li, lu, lx, lX, lo: convert an int32 argument to the format specified by the second letter (decimal, hexadecimal, etc).
        • nd, ni, nu, nx, nX, no: convert a nativeint argument to the format specified by the second letter.
        • Ld, Li, Lu, Lx, LX, Lo: convert an int64 argument to the format specified by the second letter.
        • a: user-defined printer. Take two arguments and apply the first one to outchan (the current output channel) and to the second argument. The first argument must therefore have type out_channel -> 'b -> unit and the second 'b. The output produced by the function is inserted in the output of fprintf at the current point.
        • t: same as %a, but take only one argument (with type out_channel -> unit) and apply it to outchan.
        • \{ fmt %\}: convert a format string argument to its type digest. The argument must have the same type as the internal format string fmt.
        • ( fmt %): format string substitution. Take a format string argument and substitute it to the internal format string fmt to print following arguments. The argument must have the same type as the internal format string fmt.
        • !: take no argument and flush the output.
        • %: take no argument and output one % character.
        • \@: take no argument and output one \@ character.
        • ,: take no argument and output nothing: a no-op delimiter for conversion specifications.

        The optional flags are:

        • -: left-justify the output (default is right justification).
        • 0: for numerical conversions, pad with zeroes instead of spaces.
        • +: for signed numerical conversions, prefix number with a + sign if positive.
        • space: for signed numerical conversions, prefix number with a space if positive.
        • #: request an alternate formatting style for the integer types and the floating-point type F.

        The optional width is an integer indicating the minimal width of the result. For instance, %6d prints an integer, prefixing it with spaces to fill at least 6 characters.

        The optional precision is a dot . followed by an integer indicating how many digits follow the decimal point in the %f, %e, %E, %h, and %H conversions or the maximum number of significant digits to appear for the %F, %g and %G conversions. For instance, %.4f prints a float with 4 fractional digits.

        The integer in a width or precision can also be specified as *, in which case an extra integer argument is taken to specify the corresponding width or precision. This integer argument precedes immediately the argument to print. For instance, %.*f prints a float with as many fractional digits as the value of the argument given before the float.

        • alert input_output Input/output is not permitted
        val printf : ('a, Stdlib.out_channel, unit) Stdlib.format -> 'a

        Same as Printf.fprintf, but output on stdout.

        • alert input_output Input/output is not permitted
        val eprintf : ('a, Stdlib.out_channel, unit) Stdlib.format -> 'a

        Same as Printf.fprintf, but output on stderr.

        • alert input_output Input/output is not permitted
        val ifprintf : 'b -> ('a, 'b, 'c, unit) Stdlib.format4 -> 'a

        Same as Printf.fprintf, but does not print anything. Useful to ignore some material when conditionally printing.

        • since 3.10
        • alert input_output Input/output is not permitted
        val kfprintf : diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Scanf_alerting/Scanning/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Scanf_alerting/Scanning/index.html index 75cb413..3c425c0 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Scanf_alerting/Scanning/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Scanf_alerting/Scanning/index.html @@ -1,2 +1,2 @@ -Scanning (less-power.Stdlib_alerts.Scanf_alerting.Scanning)

        Module Scanf_alerting.Scanning

        type in_channel
        type scanbuf
        +Scanning (less-power.Stdlib_alerts.Scanf_alerting.Scanning)

        Module Scanf_alerting.Scanning

        type in_channel
        type scanbuf
        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Scanf_alerting/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Scanf_alerting/index.html index 8a03013..1dd7785 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Scanf_alerting/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Scanf_alerting/index.html @@ -1,5 +1,5 @@ -Scanf_alerting (less-power.Stdlib_alerts.Scanf_alerting)

        Module type Stdlib_alerts.Scanf_alerting

        module Scanning : sig ... end
        include sig ... end
        type ('a, 'b, 'c, 'd) scanner = +Scanf_alerting (less-power.Stdlib_alerts.Scanf_alerting)

        Module type Stdlib_alerts.Scanf_alerting

        module Scanning : sig ... end
        include sig ... end
        type ('a, 'b, 'c, 'd) scanner = ('a, Scanning.in_channel, 'b, 'c, 'a -> 'd, 'd) Stdlib.format6 -> 'c

        The type of formatted input scanners: ('a, 'b, 'c, 'd) scanner is the type of a formatted input function that reads from some formatted input channel according to some format string; more precisely, if scan is some formatted input function, then scan ic fmt f applies f to all the arguments specified by format string fmt, when scan has read those arguments from the Scanning.in_channel formatted input channel ic.

        For instance, the Scanf.scanf function below has type ('a, 'b, 'c, 'd) scanner, since it is a formatted input function that reads from Scanning.stdin: scanf fmt f applies f to the arguments specified by fmt, reading those arguments from Stdlib.stdin as expected.

        If the format fmt has some %r indications, the corresponding formatted input functions must be provided before receiver function f. For instance, if read_elem is an input function for values of type t, then bscanf ic "%r;" read_elem f reads a value v of type t followed by a ';' character, and returns f v.

        • since 3.10
        type ('a, 'b, 'c, 'd) scanner_opt = diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Seq_alerting/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Seq_alerting/index.html index 960fd68..b85c25e 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Seq_alerting/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Seq_alerting/index.html @@ -1,2 +1,2 @@ -Seq_alerting (less-power.Stdlib_alerts.Seq_alerting)

        Module type Stdlib_alerts.Seq_alerting

        type 'a t = unit -> 'a node
        and 'a node = 'a Stdlib.Seq.node =
        1. | Nil
        2. | Cons of 'a * 'a t
        include sig ... end
        val is_empty : 'a t -> bool

        is_empty xs determines whether the sequence xs is empty.

        It is recommended that the sequence xs be persistent. Indeed, is_empty xs demands the head of the sequence xs, so, if xs is ephemeral, it may be the case that xs cannot be used any more after this call has taken place.

        • since 4.14
        val uncons : 'a t -> ('a * 'a t) option

        If xs is empty, then uncons xs is None.

        If xs is nonempty, then uncons xs is Some (x, ys) where x is the head of the sequence and ys its tail.

        • since 4.14
        val length : 'a t -> int

        length xs is the length of the sequence xs.

        The sequence xs must be finite.

        • since 4.14
        val iter : ('a -> unit) -> 'a t -> unit

        iter f xs invokes f x successively for every element x of the sequence xs, from left to right.

        It terminates only if the sequence xs is finite.

        val fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

        fold_left f _ xs invokes f _ x successively for every element x of the sequence xs, from left to right.

        An accumulator of type 'a is threaded through the calls to f.

        It terminates only if the sequence xs is finite.

        val iteri : (int -> 'a -> unit) -> 'a t -> unit

        iteri f xs invokes f i x successively for every element x located at index i in the sequence xs.

        It terminates only if the sequence xs is finite.

        iteri f xs is equivalent to iter (fun (i, x) -> f i x) (zip (ints 0) xs).

        • since 4.14
        val fold_lefti : ('acc -> int -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

        fold_lefti f _ xs invokes f _ i x successively for every element x located at index i of the sequence xs.

        An accumulator of type 'b is threaded through the calls to f.

        It terminates only if the sequence xs is finite.

        fold_lefti f accu xs is equivalent to fold_left (fun accu (i, x) -> f accu i x) accu (zip (ints 0) xs).

        • since 4.14
        val for_all : ('a -> bool) -> 'a t -> bool

        for_all p xs determines whether all elements x of the sequence xs satisfy p x.

        The sequence xs must be finite.

        • since 4.14
        val exists : ('a -> bool) -> 'a t -> bool

        exists xs p determines whether at least one element x of the sequence xs satisfies p x.

        The sequence xs must be finite.

        • since 4.14
        val find : ('a -> bool) -> 'a t -> 'a option

        find p xs returns Some x, where x is the first element of the sequence xs that satisfies p x, if there is such an element.

        It returns None if there is no such element.

        The sequence xs must be finite.

        • since 4.14
        val find_index : ('a -> bool) -> 'a t -> int option

        find_index p xs returns Some i, where i is the index of the first element of the sequence xs that satisfies p x, if there is such an element.

        It returns None if there is no such element.

        The sequence xs must be finite.

        • since 5.1
        val find_map : ('a -> 'b option) -> 'a t -> 'b option

        find_map f xs returns Some y, where x is the first element of the sequence xs such that f x = Some _, if there is such an element, and where y is defined by f x = Some y.

        It returns None if there is no such element.

        The sequence xs must be finite.

        • since 4.14
        val find_mapi : (int -> 'a -> 'b option) -> 'a t -> 'b option

        Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

        The sequence xs must be finite.

        • since 5.1
        val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit

        iter2 f xs ys invokes f x y successively for every pair (x, y) of elements drawn synchronously from the sequences xs and ys.

        If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

        Iteration terminates only if at least one of the sequences xs and ys is finite.

        iter2 f xs ys is equivalent to iter (fun (x, y) -> f x y) (zip xs ys).

        • since 4.14
        val fold_left2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc

        fold_left2 f _ xs ys invokes f _ x y successively for every pair (x, y) of elements drawn synchronously from the sequences xs and ys.

        An accumulator of type 'a is threaded through the calls to f.

        If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

        Iteration terminates only if at least one of the sequences xs and ys is finite.

        fold_left2 f accu xs ys is equivalent to fold_left (fun accu (x, y) -> f accu x y) (zip xs ys).

        • since 4.14
        val for_all2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

        for_all2 p xs ys determines whether all pairs (x, y) of elements drawn synchronously from the sequences xs and ys satisfy p x y.

        If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored. In particular, if xs or ys is empty, then for_all2 p xs ys is true. This is where for_all2 and equal differ: equal eq xs ys can be true only if xs and ys have the same length.

        At least one of the sequences xs and ys must be finite.

        for_all2 p xs ys is equivalent to for_all (fun b -> b) (map2 p xs ys).

        • since 4.14
        val exists2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

        exists2 p xs ys determines whether some pair (x, y) of elements drawn synchronously from the sequences xs and ys satisfies p x y.

        If the sequences xs and ys have different lengths, then iteration must stop as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

        At least one of the sequences xs and ys must be finite.

        exists2 p xs ys is equivalent to exists (fun b -> b) (map2 p xs ys).

        • since 4.14
        val equal : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

        Provided the function eq defines an equality on elements, equal eq xs ys determines whether the sequences xs and ys are pointwise equal.

        At least one of the sequences xs and ys must be finite.

        • since 4.14
        val compare : ('a -> 'b -> int) -> 'a t -> 'b t -> int

        Provided the function cmp defines a preorder on elements, compare cmp xs ys compares the sequences xs and ys according to the lexicographic preorder.

        For more details on comparison functions, see Array.sort.

        At least one of the sequences xs and ys must be finite.

        • since 4.14
        val empty : 'a t

        empty is the empty sequence. It has no elements. Its length is 0.

        val return : 'a -> 'a t

        return x is the sequence whose sole element is x. Its length is 1.

        val cons : 'a -> 'a t -> 'a t

        cons x xs is the sequence that begins with the element x, followed with the sequence xs.

        Writing cons (f()) xs causes the function call f() to take place immediately. For this call to be delayed until the sequence is queried, one must instead write (fun () -> Cons(f(), xs)).

        • since 4.11
        val init : int -> (int -> 'a) -> 'a t

        init n f is the sequence f 0; f 1; ...; f (n-1).

        n must be nonnegative.

        If desired, the infinite sequence f 0; f 1; ... can be defined as map f (ints 0).

        • raises Invalid_argument

          if n is negative.

        • since 4.14
        val unfold : ('b -> ('a * 'b) option) -> 'b -> 'a t

        unfold constructs a sequence out of a step function and an initial state.

        If f u is None then unfold f u is the empty sequence. If f u is Some (x, u') then unfold f u is the nonempty sequence cons x (unfold f u').

        For example, unfold (function [] -> None | h :: t -> Some (h, t)) l is equivalent to List.to_seq l.

        • since 4.11
        val repeat : 'a -> 'a t

        repeat x is the infinite sequence where the element x is repeated indefinitely.

        repeat x is equivalent to cycle (return x).

        • since 4.14
        val forever : (unit -> 'a) -> 'a t

        forever f is an infinite sequence where every element is produced (on demand) by the function call f().

        For instance, forever Random.bool is an infinite sequence of random bits.

        forever f is equivalent to map f (repeat ()).

        • since 4.14
        val cycle : 'a t -> 'a t

        cycle xs is the infinite sequence that consists of an infinite number of repetitions of the sequence xs.

        If xs is an empty sequence, then cycle xs is empty as well.

        Consuming (a prefix of) the sequence cycle xs once can cause the sequence xs to be consumed more than once. Therefore, xs must be persistent.

        • since 4.14
        val iterate : ('a -> 'a) -> 'a -> 'a t

        iterate f x is the infinite sequence whose elements are x, f x, f (f x), and so on.

        In other words, it is the orbit of the function f, starting at x.

        • since 4.14
        val map : ('a -> 'b) -> 'a t -> 'b t

        map f xs is the image of the sequence xs through the transformation f.

        If xs is the sequence x0; x1; ... then map f xs is the sequence f x0; f x1; ....

        val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t

        mapi is analogous to map, but applies the function f to an index and an element.

        mapi f xs is equivalent to map2 f (ints 0) xs.

        • since 4.14
        val filter : ('a -> bool) -> 'a t -> 'a t

        filter p xs is the sequence of the elements x of xs that satisfy p x.

        In other words, filter p xs is the sequence xs, deprived of the elements x such that p x is false.

        val filter_map : ('a -> 'b option) -> 'a t -> 'b t

        filter_map f xs is the sequence of the elements y such that f x = Some y, where x ranges over xs.

        filter_map f xs is equivalent to map Option.get (filter Option.is_some (map f xs)).

        val scan : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b t

        If xs is a sequence [x0; x1; x2; ...], then scan f a0 xs is a sequence of accumulators [a0; a1; a2; ...] where a1 is f a0 x0, a2 is f a1 x1, and so on.

        Thus, scan f a0 xs is conceptually related to fold_left f a0 xs. However, instead of performing an eager iteration and immediately returning the final accumulator, it returns a sequence of accumulators.

        For instance, scan (+) 0 transforms a sequence of integers into the sequence of its partial sums.

        If xs has length n then scan f a0 xs has length n+1.

        • since 4.14
        val take : int -> 'a t -> 'a t

        take n xs is the sequence of the first n elements of xs.

        If xs has fewer than n elements, then take n xs is equivalent to xs.

        n must be nonnegative.

        • raises Invalid_argument

          if n is negative.

        • since 4.14
        val drop : int -> 'a t -> 'a t

        drop n xs is the sequence xs, deprived of its first n elements.

        If xs has fewer than n elements, then drop n xs is empty.

        n must be nonnegative.

        drop is lazy: the first n+1 elements of the sequence xs are demanded only when the first element of drop n xs is demanded. For this reason, drop 1 xs is not equivalent to tail xs, which queries xs immediately.

        • raises Invalid_argument

          if n is negative.

        • since 4.14
        val take_while : ('a -> bool) -> 'a t -> 'a t

        take_while p xs is the longest prefix of the sequence xs where every element x satisfies p x.

        • since 4.14
        val drop_while : ('a -> bool) -> 'a t -> 'a t

        drop_while p xs is the sequence xs, deprived of the prefix take_while p xs.

        • since 4.14
        val group : ('a -> 'a -> bool) -> 'a t -> 'a t t

        Provided the function eq defines an equality on elements, group eq xs is the sequence of the maximal runs of adjacent duplicate elements of the sequence xs.

        Every element of group eq xs is a nonempty sequence of equal elements.

        The concatenation concat (group eq xs) is equal to xs.

        Consuming group eq xs, and consuming the sequences that it contains, can cause xs to be consumed more than once. Therefore, xs must be persistent.

        • since 4.14
        val memoize : 'a t -> 'a t

        The sequence memoize xs has the same elements as the sequence xs.

        Regardless of whether xs is ephemeral or persistent, memoize xs is persistent: even if it is queried several times, xs is queried at most once.

        The construction of the sequence memoize xs internally relies on suspensions provided by the module Lazy. These suspensions are not thread-safe. Therefore, the sequence memoize xs must not be queried by multiple threads concurrently.

        • since 4.14
        val transpose : 'a t t -> 'a t t

        If xss is a matrix (a sequence of rows), then transpose xss is the sequence of the columns of the matrix xss.

        The rows of the matrix xss are not required to have the same length.

        The matrix xss is not required to be finite (in either direction).

        The matrix xss must be persistent.

        • since 4.14
        val append : 'a t -> 'a t -> 'a t

        append xs ys is the concatenation of the sequences xs and ys.

        Its elements are the elements of xs, followed by the elements of ys.

        • since 4.11
        val concat : 'a t t -> 'a t

        If xss is a sequence of sequences, then concat xss is its concatenation.

        If xss is the sequence xs0; xs1; ... then concat xss is the sequence xs0 @ xs1 @ ....

        • since 4.13
        val flat_map : ('a -> 'b t) -> 'a t -> 'b t

        flat_map f xs is equivalent to concat (map f xs).

        val concat_map : ('a -> 'b t) -> 'a t -> 'b t

        concat_map f xs is equivalent to concat (map f xs).

        concat_map is an alias for flat_map.

        • since 4.13
        val zip : 'a t -> 'b t -> ('a * 'b) t

        zip xs ys is the sequence of pairs (x, y) drawn synchronously from the sequences xs and ys.

        If the sequences xs and ys have different lengths, then the sequence ends as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

        zip xs ys is equivalent to map2 (fun a b -> (a, b)) xs ys.

        • since 4.14
        val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

        map2 f xs ys is the sequence of the elements f x y, where the pairs (x, y) are drawn synchronously from the sequences xs and ys.

        If the sequences xs and ys have different lengths, then the sequence ends as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

        map2 f xs ys is equivalent to map (fun (x, y) -> f x y) (zip xs ys).

        • since 4.14
        val interleave : 'a t -> 'a t -> 'a t

        interleave xs ys is the sequence that begins with the first element of xs, continues with the first element of ys, and so on.

        When one of the sequences xs and ys is exhausted, interleave xs ys continues with the rest of the other sequence.

        • since 4.14
        val sorted_merge : ('a -> 'a -> int) -> 'a t -> 'a t -> 'a t

        If the sequences xs and ys are sorted according to the total preorder cmp, then sorted_merge cmp xs ys is the sorted sequence obtained by merging the sequences xs and ys.

        For more details on comparison functions, see Array.sort.

        • since 4.14
        val product : 'a t -> 'b t -> ('a * 'b) t

        product xs ys is the Cartesian product of the sequences xs and ys.

        For every element x of xs and for every element y of ys, the pair (x, y) appears once as an element of product xs ys.

        The order in which the pairs appear is unspecified.

        The sequences xs and ys are not required to be finite.

        The sequences xs and ys must be persistent.

        • since 4.14
        val map_product : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

        The sequence map_product f xs ys is the image through f of the Cartesian product of the sequences xs and ys.

        For every element x of xs and for every element y of ys, the element f x y appears once as an element of map_product f xs ys.

        The order in which these elements appear is unspecified.

        The sequences xs and ys are not required to be finite.

        The sequences xs and ys must be persistent.

        map_product f xs ys is equivalent to map (fun (x, y) -> f x y) (product xs ys).

        • since 4.14
        val unzip : ('a * 'b) t -> 'a t * 'b t

        unzip transforms a sequence of pairs into a pair of sequences.

        unzip xs is equivalent to (map fst xs, map snd xs).

        Querying either of the sequences returned by unzip xs causes xs to be queried. Therefore, querying both of them causes xs to be queried twice. Thus, xs must be persistent and cheap. If that is not the case, use unzip (memoize xs).

        • since 4.14
        val split : ('a * 'b) t -> 'a t * 'b t

        split is an alias for unzip.

        • since 4.14
        val partition_map : ('a -> ('b, 'c) Stdlib.Either.t) -> 'a t -> 'b t * 'c t

        partition_map f xs returns a pair of sequences (ys, zs), where:

        • ys is the sequence of the elements y such that f x = Left y, where x ranges over xs;
        • zs is the sequence of the elements z such that f x = Right z, where x ranges over xs.

        partition_map f xs is equivalent to a pair of filter_map Either.find_left (map f xs) and filter_map Either.find_right (map f xs).

        Querying either of the sequences returned by partition_map f xs causes xs to be queried. Therefore, querying both of them causes xs to be queried twice. Thus, xs must be persistent and cheap. If that is not the case, use partition_map f (memoize xs).

        • since 4.14
        val partition : ('a -> bool) -> 'a t -> 'a t * 'a t

        partition p xs returns a pair of the subsequence of the elements of xs that satisfy p and the subsequence of the elements of xs that do not satisfy p.

        partition p xs is equivalent to filter p xs, filter (fun x -> not (p x)) xs.

        Consuming both of the sequences returned by partition p xs causes xs to be consumed twice and causes the function f to be applied twice to each element of the list. Therefore, f should be pure and cheap. Furthermore, xs should be persistent and cheap. If that is not the case, use partition p (memoize xs).

        • since 4.14
        val of_dispenser : (unit -> 'a option) -> 'a t

        of_dispenser it is the sequence of the elements produced by the dispenser it. It is an ephemeral sequence: it can be consumed at most once. If a persistent sequence is needed, use memoize (of_dispenser it).

        • since 4.14
        val ints : int -> int t

        ints i is the infinite sequence of the integers beginning at i and counting up.

        • since 4.14
        val once : 'a t -> 'a t

        The sequence once xs has the same elements as the sequence xs.

        Regardless of whether xs is ephemeral or persistent, once xs is an ephemeral sequence: it can be queried at most once. If it (or a suffix of it) is queried more than once, then the exception Forced_twice is raised. This can be useful, while debugging or testing, to ensure that a sequence is consumed at most once.

        • raises Forced_twice

          if once xs, or a suffix of it, is queried more than once.

        • since 4.14
        • alert impure This imperative programming item is not permitted
        exception Forced_twice

        This exception is raised when a sequence returned by once (or a suffix of it) is queried more than once.

        • since 4.14
        • alert impure This imperative programming item is not permitted
        val to_dispenser : 'a t -> unit -> 'a option

        to_dispenser xs is a fresh dispenser on the sequence xs.

        This dispenser has mutable internal state, which is not protected by a lock; so, it must not be used by several threads concurrently.

        • since 4.14
        • alert impure This imperative programming item is not permitted
        +Seq_alerting (less-power.Stdlib_alerts.Seq_alerting)

        Module type Stdlib_alerts.Seq_alerting

        type 'a t = unit -> 'a node
        and 'a node = 'a Stdlib.Seq.node =
        1. | Nil
        2. | Cons of 'a * 'a t
        include sig ... end
        val is_empty : 'a t -> bool

        is_empty xs determines whether the sequence xs is empty.

        It is recommended that the sequence xs be persistent. Indeed, is_empty xs demands the head of the sequence xs, so, if xs is ephemeral, it may be the case that xs cannot be used any more after this call has taken place.

        • since 4.14
        val uncons : 'a t -> ('a * 'a t) option

        If xs is empty, then uncons xs is None.

        If xs is nonempty, then uncons xs is Some (x, ys) where x is the head of the sequence and ys its tail.

        • since 4.14
        val length : 'a t -> int

        length xs is the length of the sequence xs.

        The sequence xs must be finite.

        • since 4.14
        val iter : ('a -> unit) -> 'a t -> unit

        iter f xs invokes f x successively for every element x of the sequence xs, from left to right.

        It terminates only if the sequence xs is finite.

        val fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

        fold_left f _ xs invokes f _ x successively for every element x of the sequence xs, from left to right.

        An accumulator of type 'a is threaded through the calls to f.

        It terminates only if the sequence xs is finite.

        val iteri : (int -> 'a -> unit) -> 'a t -> unit

        iteri f xs invokes f i x successively for every element x located at index i in the sequence xs.

        It terminates only if the sequence xs is finite.

        iteri f xs is equivalent to iter (fun (i, x) -> f i x) (zip (ints 0) xs).

        • since 4.14
        val fold_lefti : ('acc -> int -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

        fold_lefti f _ xs invokes f _ i x successively for every element x located at index i of the sequence xs.

        An accumulator of type 'b is threaded through the calls to f.

        It terminates only if the sequence xs is finite.

        fold_lefti f accu xs is equivalent to fold_left (fun accu (i, x) -> f accu i x) accu (zip (ints 0) xs).

        • since 4.14
        val for_all : ('a -> bool) -> 'a t -> bool

        for_all p xs determines whether all elements x of the sequence xs satisfy p x.

        The sequence xs must be finite.

        • since 4.14
        val exists : ('a -> bool) -> 'a t -> bool

        exists xs p determines whether at least one element x of the sequence xs satisfies p x.

        The sequence xs must be finite.

        • since 4.14
        val find : ('a -> bool) -> 'a t -> 'a option

        find p xs returns Some x, where x is the first element of the sequence xs that satisfies p x, if there is such an element.

        It returns None if there is no such element.

        The sequence xs must be finite.

        • since 4.14
        val find_index : ('a -> bool) -> 'a t -> int option

        find_index p xs returns Some i, where i is the index of the first element of the sequence xs that satisfies p x, if there is such an element.

        It returns None if there is no such element.

        The sequence xs must be finite.

        • since 5.1
        val find_map : ('a -> 'b option) -> 'a t -> 'b option

        find_map f xs returns Some y, where x is the first element of the sequence xs such that f x = Some _, if there is such an element, and where y is defined by f x = Some y.

        It returns None if there is no such element.

        The sequence xs must be finite.

        • since 4.14
        val find_mapi : (int -> 'a -> 'b option) -> 'a t -> 'b option

        Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

        The sequence xs must be finite.

        • since 5.1
        val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit

        iter2 f xs ys invokes f x y successively for every pair (x, y) of elements drawn synchronously from the sequences xs and ys.

        If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

        Iteration terminates only if at least one of the sequences xs and ys is finite.

        iter2 f xs ys is equivalent to iter (fun (x, y) -> f x y) (zip xs ys).

        • since 4.14
        val fold_left2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc

        fold_left2 f _ xs ys invokes f _ x y successively for every pair (x, y) of elements drawn synchronously from the sequences xs and ys.

        An accumulator of type 'a is threaded through the calls to f.

        If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

        Iteration terminates only if at least one of the sequences xs and ys is finite.

        fold_left2 f accu xs ys is equivalent to fold_left (fun accu (x, y) -> f accu x y) (zip xs ys).

        • since 4.14
        val for_all2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

        for_all2 p xs ys determines whether all pairs (x, y) of elements drawn synchronously from the sequences xs and ys satisfy p x y.

        If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored. In particular, if xs or ys is empty, then for_all2 p xs ys is true. This is where for_all2 and equal differ: equal eq xs ys can be true only if xs and ys have the same length.

        At least one of the sequences xs and ys must be finite.

        for_all2 p xs ys is equivalent to for_all (fun b -> b) (map2 p xs ys).

        • since 4.14
        val exists2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

        exists2 p xs ys determines whether some pair (x, y) of elements drawn synchronously from the sequences xs and ys satisfies p x y.

        If the sequences xs and ys have different lengths, then iteration must stop as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

        At least one of the sequences xs and ys must be finite.

        exists2 p xs ys is equivalent to exists (fun b -> b) (map2 p xs ys).

        • since 4.14
        val equal : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

        Provided the function eq defines an equality on elements, equal eq xs ys determines whether the sequences xs and ys are pointwise equal.

        At least one of the sequences xs and ys must be finite.

        • since 4.14
        val compare : ('a -> 'b -> int) -> 'a t -> 'b t -> int

        Provided the function cmp defines a preorder on elements, compare cmp xs ys compares the sequences xs and ys according to the lexicographic preorder.

        For more details on comparison functions, see Array.sort.

        At least one of the sequences xs and ys must be finite.

        • since 4.14
        val empty : 'a t

        empty is the empty sequence. It has no elements. Its length is 0.

        val return : 'a -> 'a t

        return x is the sequence whose sole element is x. Its length is 1.

        val cons : 'a -> 'a t -> 'a t

        cons x xs is the sequence that begins with the element x, followed with the sequence xs.

        Writing cons (f()) xs causes the function call f() to take place immediately. For this call to be delayed until the sequence is queried, one must instead write (fun () -> Cons(f(), xs)).

        • since 4.11
        val init : int -> (int -> 'a) -> 'a t

        init n f is the sequence f 0; f 1; ...; f (n-1).

        n must be nonnegative.

        If desired, the infinite sequence f 0; f 1; ... can be defined as map f (ints 0).

        • raises Invalid_argument

          if n is negative.

        • since 4.14
        val unfold : ('b -> ('a * 'b) option) -> 'b -> 'a t

        unfold constructs a sequence out of a step function and an initial state.

        If f u is None then unfold f u is the empty sequence. If f u is Some (x, u') then unfold f u is the nonempty sequence cons x (unfold f u').

        For example, unfold (function [] -> None | h :: t -> Some (h, t)) l is equivalent to List.to_seq l.

        • since 4.11
        val repeat : 'a -> 'a t

        repeat x is the infinite sequence where the element x is repeated indefinitely.

        repeat x is equivalent to cycle (return x).

        • since 4.14
        val forever : (unit -> 'a) -> 'a t

        forever f is an infinite sequence where every element is produced (on demand) by the function call f().

        For instance, forever Random.bool is an infinite sequence of random bits.

        forever f is equivalent to map f (repeat ()).

        • since 4.14
        val cycle : 'a t -> 'a t

        cycle xs is the infinite sequence that consists of an infinite number of repetitions of the sequence xs.

        If xs is an empty sequence, then cycle xs is empty as well.

        Consuming (a prefix of) the sequence cycle xs once can cause the sequence xs to be consumed more than once. Therefore, xs must be persistent.

        • since 4.14
        val iterate : ('a -> 'a) -> 'a -> 'a t

        iterate f x is the infinite sequence whose elements are x, f x, f (f x), and so on.

        In other words, it is the orbit of the function f, starting at x.

        • since 4.14
        val map : ('a -> 'b) -> 'a t -> 'b t

        map f xs is the image of the sequence xs through the transformation f.

        If xs is the sequence x0; x1; ... then map f xs is the sequence f x0; f x1; ....

        val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t

        mapi is analogous to map, but applies the function f to an index and an element.

        mapi f xs is equivalent to map2 f (ints 0) xs.

        • since 4.14
        val filter : ('a -> bool) -> 'a t -> 'a t

        filter p xs is the sequence of the elements x of xs that satisfy p x.

        In other words, filter p xs is the sequence xs, deprived of the elements x such that p x is false.

        val filter_map : ('a -> 'b option) -> 'a t -> 'b t

        filter_map f xs is the sequence of the elements y such that f x = Some y, where x ranges over xs.

        filter_map f xs is equivalent to map Option.get (filter Option.is_some (map f xs)).

        val scan : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b t

        If xs is a sequence [x0; x1; x2; ...], then scan f a0 xs is a sequence of accumulators [a0; a1; a2; ...] where a1 is f a0 x0, a2 is f a1 x1, and so on.

        Thus, scan f a0 xs is conceptually related to fold_left f a0 xs. However, instead of performing an eager iteration and immediately returning the final accumulator, it returns a sequence of accumulators.

        For instance, scan (+) 0 transforms a sequence of integers into the sequence of its partial sums.

        If xs has length n then scan f a0 xs has length n+1.

        • since 4.14
        val take : int -> 'a t -> 'a t

        take n xs is the sequence of the first n elements of xs.

        If xs has fewer than n elements, then take n xs is equivalent to xs.

        n must be nonnegative.

        • raises Invalid_argument

          if n is negative.

        • since 4.14
        val drop : int -> 'a t -> 'a t

        drop n xs is the sequence xs, deprived of its first n elements.

        If xs has fewer than n elements, then drop n xs is empty.

        n must be nonnegative.

        drop is lazy: the first n+1 elements of the sequence xs are demanded only when the first element of drop n xs is demanded. For this reason, drop 1 xs is not equivalent to tail xs, which queries xs immediately.

        • raises Invalid_argument

          if n is negative.

        • since 4.14
        val take_while : ('a -> bool) -> 'a t -> 'a t

        take_while p xs is the longest prefix of the sequence xs where every element x satisfies p x.

        • since 4.14
        val drop_while : ('a -> bool) -> 'a t -> 'a t

        drop_while p xs is the sequence xs, deprived of the prefix take_while p xs.

        • since 4.14
        val group : ('a -> 'a -> bool) -> 'a t -> 'a t t

        Provided the function eq defines an equality on elements, group eq xs is the sequence of the maximal runs of adjacent duplicate elements of the sequence xs.

        Every element of group eq xs is a nonempty sequence of equal elements.

        The concatenation concat (group eq xs) is equal to xs.

        Consuming group eq xs, and consuming the sequences that it contains, can cause xs to be consumed more than once. Therefore, xs must be persistent.

        • since 4.14
        val memoize : 'a t -> 'a t

        The sequence memoize xs has the same elements as the sequence xs.

        Regardless of whether xs is ephemeral or persistent, memoize xs is persistent: even if it is queried several times, xs is queried at most once.

        The construction of the sequence memoize xs internally relies on suspensions provided by the module Lazy. These suspensions are not thread-safe. Therefore, the sequence memoize xs must not be queried by multiple threads concurrently.

        • since 4.14
        val transpose : 'a t t -> 'a t t

        If xss is a matrix (a sequence of rows), then transpose xss is the sequence of the columns of the matrix xss.

        The rows of the matrix xss are not required to have the same length.

        The matrix xss is not required to be finite (in either direction).

        The matrix xss must be persistent.

        • since 4.14
        val append : 'a t -> 'a t -> 'a t

        append xs ys is the concatenation of the sequences xs and ys.

        Its elements are the elements of xs, followed by the elements of ys.

        • since 4.11
        val concat : 'a t t -> 'a t

        If xss is a sequence of sequences, then concat xss is its concatenation.

        If xss is the sequence xs0; xs1; ... then concat xss is the sequence xs0 @ xs1 @ ....

        • since 4.13
        val flat_map : ('a -> 'b t) -> 'a t -> 'b t

        flat_map f xs is equivalent to concat (map f xs).

        val concat_map : ('a -> 'b t) -> 'a t -> 'b t

        concat_map f xs is equivalent to concat (map f xs).

        concat_map is an alias for flat_map.

        • since 4.13
        val zip : 'a t -> 'b t -> ('a * 'b) t

        zip xs ys is the sequence of pairs (x, y) drawn synchronously from the sequences xs and ys.

        If the sequences xs and ys have different lengths, then the sequence ends as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

        zip xs ys is equivalent to map2 (fun a b -> (a, b)) xs ys.

        • since 4.14
        val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

        map2 f xs ys is the sequence of the elements f x y, where the pairs (x, y) are drawn synchronously from the sequences xs and ys.

        If the sequences xs and ys have different lengths, then the sequence ends as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

        map2 f xs ys is equivalent to map (fun (x, y) -> f x y) (zip xs ys).

        • since 4.14
        val interleave : 'a t -> 'a t -> 'a t

        interleave xs ys is the sequence that begins with the first element of xs, continues with the first element of ys, and so on.

        When one of the sequences xs and ys is exhausted, interleave xs ys continues with the rest of the other sequence.

        • since 4.14
        val sorted_merge : ('a -> 'a -> int) -> 'a t -> 'a t -> 'a t

        If the sequences xs and ys are sorted according to the total preorder cmp, then sorted_merge cmp xs ys is the sorted sequence obtained by merging the sequences xs and ys.

        For more details on comparison functions, see Array.sort.

        • since 4.14
        val product : 'a t -> 'b t -> ('a * 'b) t

        product xs ys is the Cartesian product of the sequences xs and ys.

        For every element x of xs and for every element y of ys, the pair (x, y) appears once as an element of product xs ys.

        The order in which the pairs appear is unspecified.

        The sequences xs and ys are not required to be finite.

        The sequences xs and ys must be persistent.

        • since 4.14
        val map_product : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

        The sequence map_product f xs ys is the image through f of the Cartesian product of the sequences xs and ys.

        For every element x of xs and for every element y of ys, the element f x y appears once as an element of map_product f xs ys.

        The order in which these elements appear is unspecified.

        The sequences xs and ys are not required to be finite.

        The sequences xs and ys must be persistent.

        map_product f xs ys is equivalent to map (fun (x, y) -> f x y) (product xs ys).

        • since 4.14
        val unzip : ('a * 'b) t -> 'a t * 'b t

        unzip transforms a sequence of pairs into a pair of sequences.

        unzip xs is equivalent to (map fst xs, map snd xs).

        Querying either of the sequences returned by unzip xs causes xs to be queried. Therefore, querying both of them causes xs to be queried twice. Thus, xs must be persistent and cheap. If that is not the case, use unzip (memoize xs).

        • since 4.14
        val split : ('a * 'b) t -> 'a t * 'b t

        split is an alias for unzip.

        • since 4.14
        val partition_map : ('a -> ('b, 'c) Stdlib.Either.t) -> 'a t -> 'b t * 'c t

        partition_map f xs returns a pair of sequences (ys, zs), where:

        • ys is the sequence of the elements y such that f x = Left y, where x ranges over xs;
        • zs is the sequence of the elements z such that f x = Right z, where x ranges over xs.

        partition_map f xs is equivalent to a pair of filter_map Either.find_left (map f xs) and filter_map Either.find_right (map f xs).

        Querying either of the sequences returned by partition_map f xs causes xs to be queried. Therefore, querying both of them causes xs to be queried twice. Thus, xs must be persistent and cheap. If that is not the case, use partition_map f (memoize xs).

        • since 4.14
        val partition : ('a -> bool) -> 'a t -> 'a t * 'a t

        partition p xs returns a pair of the subsequence of the elements of xs that satisfy p and the subsequence of the elements of xs that do not satisfy p.

        partition p xs is equivalent to filter p xs, filter (fun x -> not (p x)) xs.

        Consuming both of the sequences returned by partition p xs causes xs to be consumed twice and causes the function f to be applied twice to each element of the list. Therefore, f should be pure and cheap. Furthermore, xs should be persistent and cheap. If that is not the case, use partition p (memoize xs).

        • since 4.14
        val of_dispenser : (unit -> 'a option) -> 'a t

        of_dispenser it is the sequence of the elements produced by the dispenser it. It is an ephemeral sequence: it can be consumed at most once. If a persistent sequence is needed, use memoize (of_dispenser it).

        • since 4.14
        val ints : int -> int t

        ints i is the infinite sequence of the integers beginning at i and counting up.

        • since 4.14
        val once : 'a t -> 'a t

        The sequence once xs has the same elements as the sequence xs.

        Regardless of whether xs is ephemeral or persistent, once xs is an ephemeral sequence: it can be queried at most once. If it (or a suffix of it) is queried more than once, then the exception Forced_twice is raised. This can be useful, while debugging or testing, to ensure that a sequence is consumed at most once.

        • raises Forced_twice

          if once xs, or a suffix of it, is queried more than once.

        • since 4.14
        • alert impure This imperative programming item is not permitted
        exception Forced_twice

        This exception is raised when a sequence returned by once (or a suffix of it) is queried more than once.

        • since 4.14
        • alert impure This imperative programming item is not permitted
        val to_dispenser : 'a t -> unit -> 'a option

        to_dispenser xs is a fresh dispenser on the sequence xs.

        This dispenser has mutable internal state, which is not protected by a lock; so, it must not be used by several threads concurrently.

        • since 4.14
        • alert impure This imperative programming item is not permitted
        diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-StdLabels_alerting/List/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-StdLabels_alerting/List/index.html index 5c7cf7a..291ba4b 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-StdLabels_alerting/List/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-StdLabels_alerting/List/index.html @@ -1,5 +1,5 @@ -List (less-power.Stdlib_alerts.StdLabels_alerting.List)

        Module StdLabels_alerting.List

        • alert list_op List operations are not permitted
        include sig ... end
        type 'a t = 'a list =
        1. | []
        2. | :: of 'a * 'a list

        An alias for the type of lists.

        val length : 'a list -> int

        Return the length (number of elements) of the given list.

        val compare_lengths : 'a list -> 'b list -> int

        Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

        • since 4.05
        val compare_length_with : 'a list -> len:int -> int

        Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

        • since 4.05
        val is_empty : 'a list -> bool

        is_empty l is true if and only if l has no elements. It is equivalent to compare_length_with l 0 = 0.

        • since 5.1
        val cons : 'a -> 'a list -> 'a list

        cons x xs is x :: xs

        • since 4.03 (4.05 in ListLabels)
        val hd : 'a list -> 'a

        Return the first element of the given list.

        • raises Failure

          if the list is empty.

        val tl : 'a list -> 'a list

        Return the given list without its first element.

        • raises Failure

          if the list is empty.

        val nth : 'a list -> int -> 'a

        Return the n-th element of the given list. The first element (head of the list) is at position 0.

        • raises Failure

          if the list is too short.

        • raises Invalid_argument

          if n is negative.

        val nth_opt : 'a list -> int -> 'a option

        Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

        • raises Invalid_argument

          if n is negative.

        • since 4.05
        val rev : 'a list -> 'a list

        List reversal.

        val init : len:int -> f:(int -> 'a) -> 'a list

        init ~len ~f is [f 0; f 1; ...; f (len-1)], evaluated left to right.

        • raises Invalid_argument

          if len < 0.

        • since 4.06
        val append : 'a list -> 'a list -> 'a list

        append l0 l1 appends l1 to l0. Same function as the infix operator @.

        • since 5.1 this function is tail-recursive.
        val rev_append : 'a list -> 'a list -> 'a list

        rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

        val concat : 'a list list -> 'a list

        Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).

        val flatten : 'a list list -> 'a list

        Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

        val equal : eq:('a -> 'a -> bool) -> 'a list -> 'a list -> bool

        equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

        Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

        • since 4.12
        val compare : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> int

        compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

        • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
        • the empty list [] is strictly smaller than non-empty lists

        Note: the cmp function will be called even if the lists have different lengths.

        • since 4.12
        val iter : f:('a -> unit) -> 'a list -> unit

        iter ~f [a1; ...; an] applies function f in turn to [a1; ...; an]. It is equivalent to f a1; f a2; ...; f an.

        val iteri : f:(int -> 'a -> unit) -> 'a list -> unit

        Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

        • since 4.00
        val map : f:('a -> 'b) -> 'a list -> 'b list

        map ~f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1; ...; f an] with the results returned by f.

        val mapi : f:(int -> 'a -> 'b) -> 'a list -> 'b list

        Same as map, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

        • since 4.00
        val rev_map : f:('a -> 'b) -> 'a list -> 'b list

        rev_map ~f l gives the same result as rev (map f l), but is more efficient.

        val filter_map : f:('a -> 'b option) -> 'a list -> 'b list

        filter_map ~f l applies f to every element of l, filters out the None elements and returns the list of the arguments of the Some elements.

        • since 4.08
        val concat_map : f:('a -> 'b list) -> 'a list -> 'b list

        concat_map ~f l gives the same result as concat (map f l). Tail-recursive.

        • since 4.10
        val fold_left_map : +List (less-power.Stdlib_alerts.StdLabels_alerting.List)

        Module StdLabels_alerting.List

        • alert list_op List operations are not permitted
        include sig ... end
        type 'a t = 'a list =
        1. | []
        2. | :: of 'a * 'a list

        An alias for the type of lists.

        val length : 'a list -> int

        Return the length (number of elements) of the given list.

        val compare_lengths : 'a list -> 'b list -> int

        Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

        • since 4.05
        val compare_length_with : 'a list -> len:int -> int

        Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

        • since 4.05
        val is_empty : 'a list -> bool

        is_empty l is true if and only if l has no elements. It is equivalent to compare_length_with l 0 = 0.

        • since 5.1
        val cons : 'a -> 'a list -> 'a list

        cons x xs is x :: xs

        • since 4.03 (4.05 in ListLabels)
        val hd : 'a list -> 'a

        Return the first element of the given list.

        • raises Failure

          if the list is empty.

        val tl : 'a list -> 'a list

        Return the given list without its first element.

        • raises Failure

          if the list is empty.

        val nth : 'a list -> int -> 'a

        Return the n-th element of the given list. The first element (head of the list) is at position 0.

        • raises Failure

          if the list is too short.

        • raises Invalid_argument

          if n is negative.

        val nth_opt : 'a list -> int -> 'a option

        Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

        • raises Invalid_argument

          if n is negative.

        • since 4.05
        val rev : 'a list -> 'a list

        List reversal.

        val init : len:int -> f:(int -> 'a) -> 'a list

        init ~len ~f is [f 0; f 1; ...; f (len-1)], evaluated left to right.

        • raises Invalid_argument

          if len < 0.

        • since 4.06
        val append : 'a list -> 'a list -> 'a list

        append l0 l1 appends l1 to l0. Same function as the infix operator @.

        • since 5.1 this function is tail-recursive.
        val rev_append : 'a list -> 'a list -> 'a list

        rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

        val concat : 'a list list -> 'a list

        Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).

        val flatten : 'a list list -> 'a list

        Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

        val equal : eq:('a -> 'a -> bool) -> 'a list -> 'a list -> bool

        equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

        Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

        • since 4.12
        val compare : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> int

        compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

        • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
        • the empty list [] is strictly smaller than non-empty lists

        Note: the cmp function will be called even if the lists have different lengths.

        • since 4.12
        val iter : f:('a -> unit) -> 'a list -> unit

        iter ~f [a1; ...; an] applies function f in turn to [a1; ...; an]. It is equivalent to f a1; f a2; ...; f an.

        val iteri : f:(int -> 'a -> unit) -> 'a list -> unit

        Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

        • since 4.00
        val map : f:('a -> 'b) -> 'a list -> 'b list

        map ~f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1; ...; f an] with the results returned by f.

        val mapi : f:(int -> 'a -> 'b) -> 'a list -> 'b list

        Same as map, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

        • since 4.00
        val rev_map : f:('a -> 'b) -> 'a list -> 'b list

        rev_map ~f l gives the same result as rev (map f l), but is more efficient.

        val filter_map : f:('a -> 'b option) -> 'a list -> 'b list

        filter_map ~f l applies f to every element of l, filters out the None elements and returns the list of the arguments of the Some elements.

        • since 4.08
        val concat_map : f:('a -> 'b list) -> 'a list -> 'b list

        concat_map ~f l gives the same result as concat (map f l). Tail-recursive.

        • since 4.10
        val fold_left_map : f:('acc -> 'a -> 'acc * 'b) -> init:'acc -> 'a list -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-StdLabels_alerting/String/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-StdLabels_alerting/String/index.html index 349b802..5917b22 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-StdLabels_alerting/String/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-StdLabels_alerting/String/index.html @@ -1,5 +1,5 @@ -String (less-power.Stdlib_alerts.StdLabels_alerting.String)

        Module StdLabels_alerting.String

        include sig ... end
        type t = string

        The type for strings.

        val make : int -> char -> string

        make n c is a string of length n with each index holding the character c.

        • raises Invalid_argument

          if n < 0 or n > Sys.max_string_length.

        val init : int -> f:(int -> char) -> string

        init n ~f is a string of length n with index i holding the character f i (called in increasing index order).

        • raises Invalid_argument

          if n < 0 or n > Sys.max_string_length.

        • since 4.02
        val empty : string

        The empty string.

        • since 4.13
        val length : string -> int

        length s is the length (number of bytes/characters) of s.

        val get : string -> int -> char

        get s i is the character at index i in s. This is the same as writing s.[i].

        • raises Invalid_argument

          if i not an index of s.

        val concat : sep:string -> string list -> string

        concat ~sep ss concatenates the list of strings ss, inserting the separator string sep between each.

        • raises Invalid_argument

          if the result is longer than Sys.max_string_length bytes.

        val cat : string -> string -> string

        cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

        • raises Invalid_argument

          if the result is longer than Sys.max_string_length bytes.

        • since 4.13
        val equal : t -> t -> bool

        equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

        • since 4.03 (4.05 in StringLabels)
        val compare : t -> t -> int

        compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

        val starts_with : prefix:string -> string -> bool

        starts_with ~prefix s is true if and only if s starts with prefix.

        • since 4.13
        val ends_with : suffix:string -> string -> bool

        ends_with ~suffix s is true if and only if s ends with suffix.

        • since 4.13
        val contains_from : string -> int -> char -> bool

        contains_from s start c is true if and only if c appears in s after position start.

        • raises Invalid_argument

          if start is not a valid position in s.

        val rcontains_from : string -> int -> char -> bool

        rcontains_from s stop c is true if and only if c appears in s before position stop+1.

        • raises Invalid_argument

          if stop < 0 or stop+1 is not a valid position in s.

        val contains : string -> char -> bool

        contains s c is String.contains_from s 0 c.

        val sub : string -> pos:int -> len:int -> string

        sub s ~pos ~len is a string of length len, containing the substring of s that starts at position pos and has length len.

        • raises Invalid_argument

          if pos and len do not designate a valid substring of s.

        val split_on_char : sep:char -> string -> string list

        split_on_char ~sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

        The function's result is specified by the following invariants:

        • The list is not empty.
        • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) +String (less-power.Stdlib_alerts.StdLabels_alerting.String)

          Module StdLabels_alerting.String

          include sig ... end
          type t = string

          The type for strings.

          val make : int -> char -> string

          make n c is a string of length n with each index holding the character c.

          • raises Invalid_argument

            if n < 0 or n > Sys.max_string_length.

          val init : int -> f:(int -> char) -> string

          init n ~f is a string of length n with index i holding the character f i (called in increasing index order).

          • raises Invalid_argument

            if n < 0 or n > Sys.max_string_length.

          • since 4.02
          val empty : string

          The empty string.

          • since 4.13
          val length : string -> int

          length s is the length (number of bytes/characters) of s.

          val get : string -> int -> char

          get s i is the character at index i in s. This is the same as writing s.[i].

          • raises Invalid_argument

            if i not an index of s.

          val concat : sep:string -> string list -> string

          concat ~sep ss concatenates the list of strings ss, inserting the separator string sep between each.

          • raises Invalid_argument

            if the result is longer than Sys.max_string_length bytes.

          val cat : string -> string -> string

          cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

          • raises Invalid_argument

            if the result is longer than Sys.max_string_length bytes.

          • since 4.13
          val equal : t -> t -> bool

          equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

          • since 4.03 (4.05 in StringLabels)
          val compare : t -> t -> int

          compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

          val starts_with : prefix:string -> string -> bool

          starts_with ~prefix s is true if and only if s starts with prefix.

          • since 4.13
          val ends_with : suffix:string -> string -> bool

          ends_with ~suffix s is true if and only if s ends with suffix.

          • since 4.13
          val contains_from : string -> int -> char -> bool

          contains_from s start c is true if and only if c appears in s after position start.

          • raises Invalid_argument

            if start is not a valid position in s.

          val rcontains_from : string -> int -> char -> bool

          rcontains_from s stop c is true if and only if c appears in s before position stop+1.

          • raises Invalid_argument

            if stop < 0 or stop+1 is not a valid position in s.

          val contains : string -> char -> bool

          contains s c is String.contains_from s 0 c.

          val sub : string -> pos:int -> len:int -> string

          sub s ~pos ~len is a string of length len, containing the substring of s that starts at position pos and has length len.

          • raises Invalid_argument

            if pos and len do not designate a valid substring of s.

          val split_on_char : sep:char -> string -> string list

          split_on_char ~sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

          The function's result is specified by the following invariants:

          • The list is not empty.
          • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) (split_on_char sep s) = s).
          • No string in the result contains the sep character.
          • since 4.04 (4.05 in StringLabels)
          val map : f:(char -> char) -> string -> string

          map f s is the string resulting from applying f to all the characters of s in increasing order.

          • since 4.00
          val mapi : f:(int -> char -> char) -> string -> string

          mapi ~f s is like map but the index of the character is also passed to f.

          • since 4.02
          val fold_left : f:('acc -> char -> 'acc) -> init:'acc -> string -> 'acc

          fold_left f x s computes f (... (f (f x s.[0]) s.[1]) ...) s.[n-1], where n is the length of the string s.

          • since 4.13
          val fold_right : f:(char -> 'acc -> 'acc) -> string -> init:'acc -> 'acc

          fold_right f s x computes f s.[0] (f s.[1] ( ... (f s.[n-1] x) ...)), where n is the length of the string s.

          • since 4.13
          val for_all : f:(char -> bool) -> string -> bool

          for_all p s checks if all characters in s satisfy the predicate p.

          • since 4.13
          val exists : f:(char -> bool) -> string -> bool

          exists p s checks if at least one character of s satisfies the predicate p.

          • since 4.13
          val trim : string -> string

          trim s is s without leading and trailing whitespace. Whitespace characters are: ' ', '\x0C' (form feed), '\n', '\r', and '\t'.

          • since 4.00
          val escaped : string -> string

          escaped s is s with special characters represented by escape sequences, following the lexical conventions of OCaml.

          All characters outside the US-ASCII printable range [0x20;0x7E] are escaped, as well as backslash (0x2F) and double-quote (0x22).

          The function Scanf.unescaped is a left inverse of escaped, i.e. Scanf.unescaped (escaped s) = s for any string s (unless escaped s fails).

          • raises Invalid_argument

            if the result is longer than Sys.max_string_length bytes.

          val uppercase_ascii : string -> string

          uppercase_ascii s is s with all lowercase letters translated to uppercase, using the US-ASCII character set.

          • since 4.03 (4.05 in StringLabels)
          val lowercase_ascii : string -> string

          lowercase_ascii s is s with all uppercase letters translated to lowercase, using the US-ASCII character set.

          • since 4.03 (4.05 in StringLabels)
          val capitalize_ascii : string -> string

          capitalize_ascii s is s with the first character set to uppercase, using the US-ASCII character set.

          • since 4.03 (4.05 in StringLabels)
          val uncapitalize_ascii : string -> string

          uncapitalize_ascii s is s with the first character set to lowercase, using the US-ASCII character set.

          • since 4.03 (4.05 in StringLabels)
          val iter : f:(char -> unit) -> string -> unit

          iter ~f s applies function f in turn to all the characters of s. It is equivalent to f s.[0]; f s.[1]; ...; f s.[length s - 1]; ().

          val iteri : f:(int -> char -> unit) -> string -> unit

          iteri is like iter, but the function is also given the corresponding character index.

          • since 4.00
          val index_from : string -> int -> char -> int

          index_from s i c is the index of the first occurrence of c in s after position i.

          • raises Not_found

            if c does not occur in s after position i.

          • raises Invalid_argument

            if i is not a valid position in s.

          val index_from_opt : string -> int -> char -> int option

          index_from_opt s i c is the index of the first occurrence of c in s after position i (if any).

          • raises Invalid_argument

            if i is not a valid position in s.

          • since 4.05
          val rindex_from : string -> int -> char -> int

          rindex_from s i c is the index of the last occurrence of c in s before position i+1.

          • raises Not_found

            if c does not occur in s before position i+1.

          • raises Invalid_argument

            if i+1 is not a valid position in s.

          val rindex_from_opt : string -> int -> char -> int option

          rindex_from_opt s i c is the index of the last occurrence of c in s before position i+1 (if any).

          • raises Invalid_argument

            if i+1 is not a valid position in s.

          • since 4.05
          val index : string -> char -> int

          index s c is String.index_from s 0 c.

          val index_opt : string -> char -> int option

          index_opt s c is String.index_from_opt s 0 c.

          • since 4.05
          val rindex : string -> char -> int

          rindex s c is String.rindex_from s (length s - 1) c.

          val rindex_opt : string -> char -> int option

          rindex_opt s c is String.rindex_from_opt s (length s - 1) c.

          • since 4.05
          val to_seq : t -> char Stdlib.Seq.t

          to_seq s is a sequence made of the string's characters in increasing order. In "unsafe-string" mode, modifications of the string during iteration will be reflected in the sequence.

          • since 4.07
          val to_seqi : t -> (int * char) Stdlib.Seq.t

          to_seqi s is like to_seq but also tuples the corresponding index.

          • since 4.07
          val of_seq : char Stdlib.Seq.t -> t

          of_seq s is a string made of the sequence's characters.

          • since 4.07
          val get_utf_8_uchar : t -> int -> Stdlib.Uchar.utf_decode

          get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

          val is_valid_utf_8 : t -> bool

          is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

          val get_utf_16be_uchar : t -> int -> Stdlib.Uchar.utf_decode

          get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

          val is_valid_utf_16be : t -> bool

          is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

          val get_utf_16le_uchar : t -> int -> Stdlib.Uchar.utf_decode

          get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

          val is_valid_utf_16le : t -> bool

          is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

          val get_uint8 : string -> int -> int

          get_uint8 b i is b's unsigned 8-bit integer starting at character index i.

          • since 4.13
          val get_int8 : string -> int -> int

          get_int8 b i is b's signed 8-bit integer starting at character index i.

          • since 4.13
          val get_uint16_ne : string -> int -> int

          get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at character index i.

          • since 4.13
          val get_uint16_be : string -> int -> int

          get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at character index i.

          • since 4.13
          val get_uint16_le : string -> int -> int

          get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at character index i.

          • since 4.13
          val get_int16_ne : string -> int -> int

          get_int16_ne b i is b's native-endian signed 16-bit integer starting at character index i.

          • since 4.13
          val get_int16_be : string -> int -> int

          get_int16_be b i is b's big-endian signed 16-bit integer starting at character index i.

          • since 4.13
          val get_int16_le : string -> int -> int

          get_int16_le b i is b's little-endian signed 16-bit integer starting at character index i.

          • since 4.13
          val get_int32_ne : string -> int -> int32

          get_int32_ne b i is b's native-endian 32-bit integer starting at character index i.

          • since 4.13
          val hash : t -> int

          An unseeded hash function for strings, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

          • since 5.0
          val seeded_hash : int -> t -> int

          A seeded hash function for strings, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

          • since 5.0
          val get_int32_be : string -> int -> int32

          get_int32_be b i is b's big-endian 32-bit integer starting at character index i.

          • since 4.13
          val get_int32_le : string -> int -> int32

          get_int32_le b i is b's little-endian 32-bit integer starting at character index i.

          • since 4.13
          val get_int64_ne : string -> int -> int64

          get_int64_ne b i is b's native-endian 64-bit integer starting at character index i.

          • since 4.13
          val get_int64_be : string -> int -> int64

          get_int64_be b i is b's big-endian 64-bit integer starting at character index i.

          • since 4.13
          val get_int64_le : string -> int -> int64

          get_int64_le b i is b's little-endian 64-bit integer starting at character index i.

          • since 4.13
          val of_bytes : bytes -> string

          Return a new string that contains the same bytes as the given byte sequence.

          • since 4.13
          • alert impure This imperative programming item is not permitted
          val to_bytes : string -> bytes

          Return a new byte sequence that contains the same bytes as the given string.

          • since 4.13
          • alert impure This imperative programming item is not permitted
          val blit : src:string -> src_pos:int -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-StdLabels_alerting/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-StdLabels_alerting/index.html index bb0173f..5eb2f70 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-StdLabels_alerting/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-StdLabels_alerting/index.html @@ -1,2 +1,2 @@ -StdLabels_alerting (less-power.Stdlib_alerts.StdLabels_alerting)

          Module type Stdlib_alerts.StdLabels_alerting

          include sig ... end
          module Array = Stdlib.ArrayLabels
          module Bytes = Stdlib.BytesLabels
          +StdLabels_alerting (less-power.Stdlib_alerts.StdLabels_alerting)

          Module type Stdlib_alerts.StdLabels_alerting

          include sig ... end
          module Array = Stdlib.ArrayLabels
          module Bytes = Stdlib.BytesLabels
          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Char/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Char/index.html index d65012c..7b31657 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Char/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Char/index.html @@ -1,2 +1,2 @@ -Char (less-power.Stdlib_alerts.Stdlib_alerting.Char)

          Module Stdlib_alerting.Char

          include sig ... end
          val code : char -> int

          Return the ASCII code of the argument.

          val chr : int -> char

          Return the character with the given ASCII code.

          val escaped : char -> string

          Return a string representing the given character, with special characters escaped following the lexical conventions of OCaml. All characters outside the ASCII printable range (32..126) are escaped, as well as backslash, double-quote, and single-quote.

          val lowercase_ascii : char -> char

          Convert the given character to its equivalent lowercase character, using the US-ASCII character set.

          • since 4.03
          val uppercase_ascii : char -> char

          Convert the given character to its equivalent uppercase character, using the US-ASCII character set.

          • since 4.03
          type t = char

          An alias for the type of characters.

          val compare : t -> t -> int

          The comparison function for characters, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Char to be passed as argument to the functors Set.Make and Map.Make.

          val equal : t -> t -> bool

          The equal function for chars.

          • since 4.03
          val seeded_hash : int -> t -> int

          A seeded hash function for characters, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

          • since 5.1
          val hash : t -> int

          An unseeded hash function for characters, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

          • since 5.1
          +Char (less-power.Stdlib_alerts.Stdlib_alerting.Char)

          Module Stdlib_alerting.Char

          include sig ... end
          val code : char -> int

          Return the ASCII code of the argument.

          val chr : int -> char

          Return the character with the given ASCII code.

          val escaped : char -> string

          Return a string representing the given character, with special characters escaped following the lexical conventions of OCaml. All characters outside the ASCII printable range (32..126) are escaped, as well as backslash, double-quote, and single-quote.

          val lowercase_ascii : char -> char

          Convert the given character to its equivalent lowercase character, using the US-ASCII character set.

          • since 4.03
          val uppercase_ascii : char -> char

          Convert the given character to its equivalent uppercase character, using the US-ASCII character set.

          • since 4.03
          type t = char

          An alias for the type of characters.

          val compare : t -> t -> int

          The comparison function for characters, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Char to be passed as argument to the functors Set.Make and Map.Make.

          val equal : t -> t -> bool

          The equal function for chars.

          • since 4.03
          val seeded_hash : int -> t -> int

          A seeded hash function for characters, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

          • since 5.1
          val hash : t -> int

          An unseeded hash function for characters, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

          • since 5.1
          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Digest/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Digest/index.html index e273db7..3148c93 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Digest/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Digest/index.html @@ -1,2 +1,2 @@ -Digest (less-power.Stdlib_alerts.Stdlib_alerting.Digest)

          Module Stdlib_alerting.Digest

          include sig ... end
          type t = string

          The type of digests: 16-character strings.

          val compare : t -> t -> int

          The comparison function for 16-character digest, with the same specification as Stdlib.compare and the implementation shared with String.compare. Along with the type t, this function compare allows the module Digest to be passed as argument to the functors Set.Make and Map.Make.

          • since 4.00
          val equal : t -> t -> bool

          The equal function for 16-character digest.

          • since 4.03
          val string : string -> t

          Return the digest of the given string.

          val substring : string -> int -> int -> t

          Digest.substring s ofs len returns the digest of the substring of s starting at index ofs and containing len characters.

          val to_hex : t -> string

          Return the printable hexadecimal representation of the given digest.

          val from_hex : string -> t

          Convert a hexadecimal representation back into the corresponding digest.

          • raises Invalid_argument

            if the argument is not exactly 32 hexadecimal characters.

          • since 4.00
          val bytes : bytes -> t

          Return the digest of the given byte sequence.

          • since 4.02
          • alert impure Imperative programming is not permitted
          val subbytes : bytes -> int -> int -> t

          Digest.subbytes s ofs len returns the digest of the subsequence of s starting at index ofs and containing len bytes.

          • since 4.02
          • alert impure Imperative programming is not permitted
          val channel : Stdlib.in_channel -> int -> t

          If len is nonnegative, Digest.channel ic len reads len characters from channel ic and returns their digest, or raises End_of_file if end-of-file is reached before len characters are read. If len is negative, Digest.channel ic len reads all characters from ic until end-of-file is reached and return their digest.

          • alert input_output Input/output is not permitted
          val file : string -> t

          Return the digest of the file whose name is given.

          • alert input_output Input/output is not permitted
          val output : Stdlib.out_channel -> t -> unit

          Write a digest on the given output channel.

          • alert input_output Input/output is not permitted
          val input : Stdlib.in_channel -> t

          Read a digest from the given input channel.

          • alert input_output Input/output is not permitted
          +Digest (less-power.Stdlib_alerts.Stdlib_alerting.Digest)

          Module Stdlib_alerting.Digest

          include sig ... end
          type t = string

          The type of digests: 16-character strings.

          val compare : t -> t -> int

          The comparison function for 16-character digest, with the same specification as Stdlib.compare and the implementation shared with String.compare. Along with the type t, this function compare allows the module Digest to be passed as argument to the functors Set.Make and Map.Make.

          • since 4.00
          val equal : t -> t -> bool

          The equal function for 16-character digest.

          • since 4.03
          val string : string -> t

          Return the digest of the given string.

          val substring : string -> int -> int -> t

          Digest.substring s ofs len returns the digest of the substring of s starting at index ofs and containing len characters.

          val to_hex : t -> string

          Return the printable hexadecimal representation of the given digest.

          val from_hex : string -> t

          Convert a hexadecimal representation back into the corresponding digest.

          • raises Invalid_argument

            if the argument is not exactly 32 hexadecimal characters.

          • since 4.00
          val bytes : bytes -> t

          Return the digest of the given byte sequence.

          • since 4.02
          • alert impure Imperative programming is not permitted
          val subbytes : bytes -> int -> int -> t

          Digest.subbytes s ofs len returns the digest of the subsequence of s starting at index ofs and containing len bytes.

          • since 4.02
          • alert impure Imperative programming is not permitted
          val channel : Stdlib.in_channel -> int -> t

          If len is nonnegative, Digest.channel ic len reads len characters from channel ic and returns their digest, or raises End_of_file if end-of-file is reached before len characters are read. If len is negative, Digest.channel ic len reads all characters from ic until end-of-file is reached and return their digest.

          • alert input_output Input/output is not permitted
          val file : string -> t

          Return the digest of the file whose name is given.

          • alert input_output Input/output is not permitted
          val output : Stdlib.out_channel -> t -> unit

          Write a digest on the given output channel.

          • alert input_output Input/output is not permitted
          val input : Stdlib.in_channel -> t

          Read a digest from the given input channel.

          • alert input_output Input/output is not permitted
          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Filename/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Filename/index.html index 1df8855..8fbdb46 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Filename/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Filename/index.html @@ -1,5 +1,5 @@ -Filename (less-power.Stdlib_alerts.Stdlib_alerting.Filename)

          Module Stdlib_alerting.Filename

          include sig ... end
          val current_dir_name : string

          The conventional name for the current directory (e.g. . in Unix).

          val parent_dir_name : string

          The conventional name for the parent of the current directory (e.g. .. in Unix).

          val dir_sep : string

          The directory separator (e.g. / in Unix).

          • since 3.11.2
          val concat : string -> string -> string

          concat dir file returns a file name that designates file file in directory dir.

          val is_relative : string -> bool

          Return true if the file name is relative to the current directory, false if it is absolute (i.e. in Unix, starts with /).

          val is_implicit : string -> bool

          Return true if the file name is relative and does not start with an explicit reference to the current directory (./ or ../ in Unix), false if it starts with an explicit reference to the root directory or the current directory.

          val check_suffix : string -> string -> bool

          check_suffix name suff returns true if the filename name ends with the suffix suff.

          Under Windows ports (including Cygwin), comparison is case-insensitive, relying on String.lowercase_ascii. Note that this does not match exactly the interpretation of case-insensitive filename equivalence from Windows.

          val chop_suffix : string -> string -> string

          chop_suffix name suff removes the suffix suff from the filename name.

          val chop_suffix_opt : suffix:string -> string -> string option

          chop_suffix_opt ~suffix filename removes the suffix from the filename if possible, or returns None if the filename does not end with the suffix.

          Under Windows ports (including Cygwin), comparison is case-insensitive, relying on String.lowercase_ascii. Note that this does not match exactly the interpretation of case-insensitive filename equivalence from Windows.

          • since 4.08
          val extension : string -> string

          extension name is the shortest suffix ext of name0 where:

          • name0 is the longest suffix of name that does not contain a directory separator;
          • ext starts with a period;
          • ext is preceded by at least one non-period character in name0.

          If such a suffix does not exist, extension name is the empty string.

          • since 4.04
          val remove_extension : string -> string

          Return the given file name without its extension, as defined in Filename.extension. If the extension is empty, the function returns the given file name.

          The following invariant holds for any file name s:

          remove_extension s ^ extension s = s

          • since 4.04
          val chop_extension : string -> string

          Same as Filename.remove_extension, but raise Invalid_argument if the given name has an empty extension.

          val basename : string -> string

          Split a file name into directory name / base file name. If name is a valid file name, then concat (dirname name) (basename name) returns a file name which is equivalent to name. Moreover, after setting the current directory to dirname name (with Sys.chdir), references to basename name (which is a relative file name) designate the same file as name before the call to Sys.chdir.

          This function conforms to the specification of POSIX.1-2008 for the basename utility.

          val dirname : string -> string

          See Filename.basename. This function conforms to the specification of POSIX.1-2008 for the dirname utility.

          val null : string

          null is "/dev/null" on POSIX and "NUL" on Windows. It represents a file on the OS that discards all writes and returns end of file on reads.

          • since 4.10
          val quote : string -> string

          Return a quoted version of a file name, suitable for use as one argument in a command line, escaping all meta-characters. Warning: under Windows, the output is only suitable for use with programs that follow the standard Windows quoting conventions.

          val quote_command : +Filename (less-power.Stdlib_alerts.Stdlib_alerting.Filename)

          Module Stdlib_alerting.Filename

          include sig ... end
          val current_dir_name : string

          The conventional name for the current directory (e.g. . in Unix).

          val parent_dir_name : string

          The conventional name for the parent of the current directory (e.g. .. in Unix).

          val dir_sep : string

          The directory separator (e.g. / in Unix).

          • since 3.11.2
          val concat : string -> string -> string

          concat dir file returns a file name that designates file file in directory dir.

          val is_relative : string -> bool

          Return true if the file name is relative to the current directory, false if it is absolute (i.e. in Unix, starts with /).

          val is_implicit : string -> bool

          Return true if the file name is relative and does not start with an explicit reference to the current directory (./ or ../ in Unix), false if it starts with an explicit reference to the root directory or the current directory.

          val check_suffix : string -> string -> bool

          check_suffix name suff returns true if the filename name ends with the suffix suff.

          Under Windows ports (including Cygwin), comparison is case-insensitive, relying on String.lowercase_ascii. Note that this does not match exactly the interpretation of case-insensitive filename equivalence from Windows.

          val chop_suffix : string -> string -> string

          chop_suffix name suff removes the suffix suff from the filename name.

          val chop_suffix_opt : suffix:string -> string -> string option

          chop_suffix_opt ~suffix filename removes the suffix from the filename if possible, or returns None if the filename does not end with the suffix.

          Under Windows ports (including Cygwin), comparison is case-insensitive, relying on String.lowercase_ascii. Note that this does not match exactly the interpretation of case-insensitive filename equivalence from Windows.

          • since 4.08
          val extension : string -> string

          extension name is the shortest suffix ext of name0 where:

          • name0 is the longest suffix of name that does not contain a directory separator;
          • ext starts with a period;
          • ext is preceded by at least one non-period character in name0.

          If such a suffix does not exist, extension name is the empty string.

          • since 4.04
          val remove_extension : string -> string

          Return the given file name without its extension, as defined in Filename.extension. If the extension is empty, the function returns the given file name.

          The following invariant holds for any file name s:

          remove_extension s ^ extension s = s

          • since 4.04
          val chop_extension : string -> string

          Same as Filename.remove_extension, but raise Invalid_argument if the given name has an empty extension.

          val basename : string -> string

          Split a file name into directory name / base file name. If name is a valid file name, then concat (dirname name) (basename name) returns a file name which is equivalent to name. Moreover, after setting the current directory to dirname name (with Sys.chdir), references to basename name (which is a relative file name) designate the same file as name before the call to Sys.chdir.

          This function conforms to the specification of POSIX.1-2008 for the basename utility.

          val dirname : string -> string

          See Filename.basename. This function conforms to the specification of POSIX.1-2008 for the dirname utility.

          val null : string

          null is "/dev/null" on POSIX and "NUL" on Windows. It represents a file on the OS that discards all writes and returns end of file on reads.

          • since 4.10
          val quote : string -> string

          Return a quoted version of a file name, suitable for use as one argument in a command line, escaping all meta-characters. Warning: under Windows, the output is only suitable for use with programs that follow the standard Windows quoting conventions.

          val quote_command : string -> ?stdin:string -> ?stdout:string -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Float/Array/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Float/Array/index.html index a0bba10..17e58ca 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Float/Array/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Float/Array/index.html @@ -1,5 +1,5 @@ -Array (less-power.Stdlib_alerts.Stdlib_alerting.Float.Array)

          Module Float.Array

          Float arrays with packed representation.

          • alert impure Arrays are not permitted
          type t = floatarray

          The type of float arrays with packed representation.

          • since 4.08
          val length : t -> int

          Return the length (number of elements) of the given floatarray.

          val get : t -> int -> float

          get a n returns the element number n of floatarray a.

          val set : t -> int -> float -> unit

          set a n x modifies floatarray a in place, replacing element number n with x.

          val make : int -> float -> t

          make n x returns a fresh floatarray of length n, initialized with x.

          val create : int -> t

          create n returns a fresh floatarray of length n, with uninitialized data.

          val init : int -> (int -> float) -> t

          init n f returns a fresh floatarray of length n, with element number i initialized to the result of f i. In other terms, init n f tabulates the results of f applied to the integers 0 to n-1.

          val append : t -> t -> t

          append v1 v2 returns a fresh floatarray containing the concatenation of the floatarrays v1 and v2.

          val concat : t list -> t

          Same as append, but concatenates a list of floatarrays.

          val sub : t -> int -> int -> t

          sub a pos len returns a fresh floatarray of length len, containing the elements number pos to pos + len - 1 of floatarray a.

          • raises Invalid_argument

            if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

          val copy : t -> t

          copy a returns a copy of a, that is, a fresh floatarray containing the same elements as a.

          val fill : t -> int -> int -> float -> unit

          fill a pos len x modifies the floatarray a in place, storing x in elements number pos to pos + len - 1.

          val blit : t -> int -> t -> int -> int -> unit

          blit src src_pos dst dst_pos len copies len elements from floatarray src, starting at element number src_pos, to floatarray dst, starting at element number dst_pos. It works correctly even if src and dst are the same floatarray, and the source and destination chunks overlap.

          • raises Invalid_argument

            if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

          val to_list : t -> float list

          to_list a returns the list of all the elements of a.

          val of_list : float list -> t

          of_list l returns a fresh floatarray containing the elements of l.

          • raises Invalid_argument

            if the length of l is greater than Sys.max_floatarray_length.

          Iterators

          val iter : (float -> unit) -> t -> unit

          iter f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

          val iteri : (int -> float -> unit) -> t -> unit

          Same as iter, but the function is applied with the index of the element as first argument, and the element itself as second argument.

          val map : (float -> float) -> t -> t

          map f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

          val map_inplace : (float -> float) -> t -> unit

          map_inplace f a applies function f to all elements of a, and updates their values in place.

          • since 5.1
          val mapi : (int -> float -> float) -> t -> t

          Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

          val mapi_inplace : (int -> float -> float) -> t -> unit

          Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

          • since 5.1
          val fold_left : ('acc -> float -> 'acc) -> 'acc -> t -> 'acc

          fold_left f x init computes f (... (f (f x init.(0)) init.(1)) ...) init.(n-1), where n is the length of the floatarray init.

          val fold_right : (float -> 'acc -> 'acc) -> t -> 'acc -> 'acc

          fold_right f a init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the floatarray a.

          Iterators on two arrays

          val iter2 : (float -> float -> unit) -> t -> t -> unit

          Array.iter2 f a b applies function f to all the elements of a and b.

          val map2 : (float -> float -> float) -> t -> t -> t

          map2 f a b applies function f to all the elements of a and b, and builds a floatarray with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

          Array scanning

          val for_all : (float -> bool) -> t -> bool

          for_all f [|a1; ...; an|] checks if all elements of the floatarray satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

          val exists : (float -> bool) -> t -> bool

          exists f [|a1; ...; an|] checks if at least one element of the floatarray satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

          val mem : float -> t -> bool

          mem a set is true if and only if there is an element of set that is structurally equal to a, i.e. there is an x in set such that compare a x = 0.

          val mem_ieee : float -> t -> bool

          Same as mem, but uses IEEE equality instead of structural equality.

          Array searching

          val find_opt : (float -> bool) -> t -> float option
          val find_index : (float -> bool) -> t -> int option

          find_index f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

          It returns None if there is no such element.

          • since 5.1
          val find_map : (float -> 'a option) -> t -> 'a option
          val find_mapi : (int -> float -> 'a option) -> t -> 'a option

          Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

          • since 5.1

          Sorting

          val sort : (float -> float -> int) -> t -> unit

          Sort a floatarray in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

          The current implementation uses Heap Sort. It runs in constant stack space.

          Specification of the comparison function: Let a be the floatarray and cmp the comparison function. The following must be true for all x, y, z in a :

          • cmp x y > 0 if and only if cmp y x < 0
          • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

          When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

          • cmp a.(i) a.(j) >= 0 if and only if i >= j
          val stable_sort : (float -> float -> int) -> t -> unit

          Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

          The current implementation uses Merge Sort. It uses a temporary floatarray of length n/2, where n is the length of the floatarray. It is usually faster than the current implementation of sort.

          val fast_sort : (float -> float -> int) -> t -> unit

          Same as sort or stable_sort, whichever is faster on typical input.

          Float arrays and Sequences

          val to_seq : t -> float Stdlib.Seq.t

          Iterate on the floatarray, in increasing order. Modifications of the floatarray during iteration will be reflected in the sequence.

          val to_seqi : t -> (int * float) Stdlib.Seq.t

          Iterate on the floatarray, in increasing order, yielding indices along elements. Modifications of the floatarray during iteration will be reflected in the sequence.

          val of_seq : float Stdlib.Seq.t -> t

          Create an array from the generator.

          val map_to_array : (float -> 'a) -> t -> 'a array

          map_to_array f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

          val map_from_array : ('a -> float) -> 'a array -> t

          map_from_array f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

          Arrays and concurrency safety

          Care must be taken when concurrently accessing float arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

          Atomicity

          Every float array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

          For example, consider the following program:

          let size = 100_000_000
          +Array (less-power.Stdlib_alerts.Stdlib_alerting.Float.Array)

          Module Float.Array

          Float arrays with packed representation.

          • alert impure Arrays are not permitted
          type t = floatarray

          The type of float arrays with packed representation.

          • since 4.08
          val length : t -> int

          Return the length (number of elements) of the given floatarray.

          val get : t -> int -> float

          get a n returns the element number n of floatarray a.

          val set : t -> int -> float -> unit

          set a n x modifies floatarray a in place, replacing element number n with x.

          val make : int -> float -> t

          make n x returns a fresh floatarray of length n, initialized with x.

          val create : int -> t

          create n returns a fresh floatarray of length n, with uninitialized data.

          val init : int -> (int -> float) -> t

          init n f returns a fresh floatarray of length n, with element number i initialized to the result of f i. In other terms, init n f tabulates the results of f applied to the integers 0 to n-1.

          val append : t -> t -> t

          append v1 v2 returns a fresh floatarray containing the concatenation of the floatarrays v1 and v2.

          val concat : t list -> t

          Same as append, but concatenates a list of floatarrays.

          val sub : t -> int -> int -> t

          sub a pos len returns a fresh floatarray of length len, containing the elements number pos to pos + len - 1 of floatarray a.

          • raises Invalid_argument

            if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

          val copy : t -> t

          copy a returns a copy of a, that is, a fresh floatarray containing the same elements as a.

          val fill : t -> int -> int -> float -> unit

          fill a pos len x modifies the floatarray a in place, storing x in elements number pos to pos + len - 1.

          val blit : t -> int -> t -> int -> int -> unit

          blit src src_pos dst dst_pos len copies len elements from floatarray src, starting at element number src_pos, to floatarray dst, starting at element number dst_pos. It works correctly even if src and dst are the same floatarray, and the source and destination chunks overlap.

          • raises Invalid_argument

            if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

          val to_list : t -> float list

          to_list a returns the list of all the elements of a.

          val of_list : float list -> t

          of_list l returns a fresh floatarray containing the elements of l.

          • raises Invalid_argument

            if the length of l is greater than Sys.max_floatarray_length.

          Iterators

          val iter : (float -> unit) -> t -> unit

          iter f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

          val iteri : (int -> float -> unit) -> t -> unit

          Same as iter, but the function is applied with the index of the element as first argument, and the element itself as second argument.

          val map : (float -> float) -> t -> t

          map f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

          val map_inplace : (float -> float) -> t -> unit

          map_inplace f a applies function f to all elements of a, and updates their values in place.

          • since 5.1
          val mapi : (int -> float -> float) -> t -> t

          Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

          val mapi_inplace : (int -> float -> float) -> t -> unit

          Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

          • since 5.1
          val fold_left : ('acc -> float -> 'acc) -> 'acc -> t -> 'acc

          fold_left f x init computes f (... (f (f x init.(0)) init.(1)) ...) init.(n-1), where n is the length of the floatarray init.

          val fold_right : (float -> 'acc -> 'acc) -> t -> 'acc -> 'acc

          fold_right f a init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the floatarray a.

          Iterators on two arrays

          val iter2 : (float -> float -> unit) -> t -> t -> unit

          Array.iter2 f a b applies function f to all the elements of a and b.

          val map2 : (float -> float -> float) -> t -> t -> t

          map2 f a b applies function f to all the elements of a and b, and builds a floatarray with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

          Array scanning

          val for_all : (float -> bool) -> t -> bool

          for_all f [|a1; ...; an|] checks if all elements of the floatarray satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

          val exists : (float -> bool) -> t -> bool

          exists f [|a1; ...; an|] checks if at least one element of the floatarray satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

          val mem : float -> t -> bool

          mem a set is true if and only if there is an element of set that is structurally equal to a, i.e. there is an x in set such that compare a x = 0.

          val mem_ieee : float -> t -> bool

          Same as mem, but uses IEEE equality instead of structural equality.

          Array searching

          val find_opt : (float -> bool) -> t -> float option
          val find_index : (float -> bool) -> t -> int option

          find_index f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

          It returns None if there is no such element.

          • since 5.1
          val find_map : (float -> 'a option) -> t -> 'a option
          val find_mapi : (int -> float -> 'a option) -> t -> 'a option

          Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

          • since 5.1

          Sorting

          val sort : (float -> float -> int) -> t -> unit

          Sort a floatarray in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

          The current implementation uses Heap Sort. It runs in constant stack space.

          Specification of the comparison function: Let a be the floatarray and cmp the comparison function. The following must be true for all x, y, z in a :

          • cmp x y > 0 if and only if cmp y x < 0
          • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

          When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

          • cmp a.(i) a.(j) >= 0 if and only if i >= j
          val stable_sort : (float -> float -> int) -> t -> unit

          Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

          The current implementation uses Merge Sort. It uses a temporary floatarray of length n/2, where n is the length of the floatarray. It is usually faster than the current implementation of sort.

          val fast_sort : (float -> float -> int) -> t -> unit

          Same as sort or stable_sort, whichever is faster on typical input.

          Float arrays and Sequences

          val to_seq : t -> float Stdlib.Seq.t

          Iterate on the floatarray, in increasing order. Modifications of the floatarray during iteration will be reflected in the sequence.

          val to_seqi : t -> (int * float) Stdlib.Seq.t

          Iterate on the floatarray, in increasing order, yielding indices along elements. Modifications of the floatarray during iteration will be reflected in the sequence.

          val of_seq : float Stdlib.Seq.t -> t

          Create an array from the generator.

          val map_to_array : (float -> 'a) -> t -> 'a array

          map_to_array f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

          val map_from_array : ('a -> float) -> 'a array -> t

          map_from_array f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

          Arrays and concurrency safety

          Care must be taken when concurrently accessing float arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

          Atomicity

          Every float array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

          For example, consider the following program:

          let size = 100_000_000
           let a = Float.Array.make size 1.
           let update a f () =
              Float.Array.iteri (fun i x -> Float.Array.set a i (f x)) a
          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Float/ArrayLabels/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Float/ArrayLabels/index.html
          index efa24bd..a088adb 100644
          --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Float/ArrayLabels/index.html
          +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Float/ArrayLabels/index.html
          @@ -1,5 +1,5 @@
           
          -ArrayLabels (less-power.Stdlib_alerts.Stdlib_alerting.Float.ArrayLabels)

          Module Float.ArrayLabels

          Float arrays with packed representation (labeled functions).

          • alert impure Arrays are not permitted
          type t = floatarray

          The type of float arrays with packed representation.

          • since 4.08
          val length : t -> int

          Return the length (number of elements) of the given floatarray.

          val get : t -> int -> float

          get a n returns the element number n of floatarray a.

          val set : t -> int -> float -> unit

          set a n x modifies floatarray a in place, replacing element number n with x.

          val make : int -> float -> t

          make n x returns a fresh floatarray of length n, initialized with x.

          val create : int -> t

          create n returns a fresh floatarray of length n, with uninitialized data.

          val init : int -> f:(int -> float) -> t

          init n ~f returns a fresh floatarray of length n, with element number i initialized to the result of f i. In other terms, init n ~f tabulates the results of f applied to the integers 0 to n-1.

          val append : t -> t -> t

          append v1 v2 returns a fresh floatarray containing the concatenation of the floatarrays v1 and v2.

          val concat : t list -> t

          Same as append, but concatenates a list of floatarrays.

          val sub : t -> pos:int -> len:int -> t

          sub a ~pos ~len returns a fresh floatarray of length len, containing the elements number pos to pos + len - 1 of floatarray a.

          • raises Invalid_argument

            if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

          val copy : t -> t

          copy a returns a copy of a, that is, a fresh floatarray containing the same elements as a.

          val fill : t -> pos:int -> len:int -> float -> unit

          fill a ~pos ~len x modifies the floatarray a in place, storing x in elements number pos to pos + len - 1.

          val blit : src:t -> src_pos:int -> dst:t -> dst_pos:int -> len:int -> unit

          blit ~src ~src_pos ~dst ~dst_pos ~len copies len elements from floatarray src, starting at element number src_pos, to floatarray dst, starting at element number dst_pos. It works correctly even if src and dst are the same floatarray, and the source and destination chunks overlap.

          • raises Invalid_argument

            if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

          val to_list : t -> float list

          to_list a returns the list of all the elements of a.

          val of_list : float list -> t

          of_list l returns a fresh floatarray containing the elements of l.

          • raises Invalid_argument

            if the length of l is greater than Sys.max_floatarray_length.

          Iterators

          val iter : f:(float -> unit) -> t -> unit

          iter ~f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

          val iteri : f:(int -> float -> unit) -> t -> unit

          Same as iter, but the function is applied with the index of the element as first argument, and the element itself as second argument.

          val map : f:(float -> float) -> t -> t

          map ~f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

          val map_inplace : f:(float -> float) -> t -> unit

          map_inplace f a applies function f to all elements of a, and updates their values in place.

          • since 5.1
          val mapi : f:(int -> float -> float) -> t -> t

          Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

          val mapi_inplace : f:(int -> float -> float) -> t -> unit

          Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

          • since 5.1
          val fold_left : f:('acc -> float -> 'acc) -> init:'acc -> t -> 'acc

          fold_left ~f x ~init computes f (... (f (f x init.(0)) init.(1)) ...) init.(n-1), where n is the length of the floatarray init.

          val fold_right : f:(float -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

          fold_right f a init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the floatarray a.

          Iterators on two arrays

          val iter2 : f:(float -> float -> unit) -> t -> t -> unit

          Array.iter2 ~f a b applies function f to all the elements of a and b.

          val map2 : f:(float -> float -> float) -> t -> t -> t

          map2 ~f a b applies function f to all the elements of a and b, and builds a floatarray with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

          Array scanning

          val for_all : f:(float -> bool) -> t -> bool

          for_all ~f [|a1; ...; an|] checks if all elements of the floatarray satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

          val exists : f:(float -> bool) -> t -> bool

          exists f [|a1; ...; an|] checks if at least one element of the floatarray satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

          val mem : float -> set:t -> bool

          mem a ~set is true if and only if there is an element of set that is structurally equal to a, i.e. there is an x in set such that compare a x = 0.

          val mem_ieee : float -> set:t -> bool

          Same as mem, but uses IEEE equality instead of structural equality.

          Array searching

          val find_opt : f:(float -> bool) -> t -> float option
          val find_index : f:(float -> bool) -> t -> int option

          find_index ~f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

          It returns None if there is no such element.

          • since 5.1
          val find_map : f:(float -> 'a option) -> t -> 'a option
          val find_mapi : f:(int -> float -> 'a option) -> t -> 'a option

          Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

          • since 5.1

          Sorting

          val sort : cmp:(float -> float -> int) -> t -> unit

          Sort a floatarray in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

          The current implementation uses Heap Sort. It runs in constant stack space.

          Specification of the comparison function: Let a be the floatarray and cmp the comparison function. The following must be true for all x, y, z in a :

          • cmp x y > 0 if and only if cmp y x < 0
          • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

          When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

          • cmp a.(i) a.(j) >= 0 if and only if i >= j
          val stable_sort : cmp:(float -> float -> int) -> t -> unit

          Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

          The current implementation uses Merge Sort. It uses a temporary floatarray of length n/2, where n is the length of the floatarray. It is usually faster than the current implementation of sort.

          val fast_sort : cmp:(float -> float -> int) -> t -> unit

          Same as sort or stable_sort, whichever is faster on typical input.

          Float arrays and Sequences

          val to_seq : t -> float Stdlib.Seq.t

          Iterate on the floatarray, in increasing order. Modifications of the floatarray during iteration will be reflected in the sequence.

          val to_seqi : t -> (int * float) Stdlib.Seq.t

          Iterate on the floatarray, in increasing order, yielding indices along elements. Modifications of the floatarray during iteration will be reflected in the sequence.

          val of_seq : float Stdlib.Seq.t -> t

          Create an array from the generator.

          val map_to_array : f:(float -> 'a) -> t -> 'a array

          map_to_array ~f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

          val map_from_array : f:('a -> float) -> 'a array -> t

          map_from_array ~f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

          Arrays and concurrency safety

          Care must be taken when concurrently accessing float arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

          Atomicity

          Every float array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

          For example, consider the following program:

          let size = 100_000_000
          +ArrayLabels (less-power.Stdlib_alerts.Stdlib_alerting.Float.ArrayLabels)

          Module Float.ArrayLabels

          Float arrays with packed representation (labeled functions).

          • alert impure Arrays are not permitted
          type t = floatarray

          The type of float arrays with packed representation.

          • since 4.08
          val length : t -> int

          Return the length (number of elements) of the given floatarray.

          val get : t -> int -> float

          get a n returns the element number n of floatarray a.

          val set : t -> int -> float -> unit

          set a n x modifies floatarray a in place, replacing element number n with x.

          val make : int -> float -> t

          make n x returns a fresh floatarray of length n, initialized with x.

          val create : int -> t

          create n returns a fresh floatarray of length n, with uninitialized data.

          val init : int -> f:(int -> float) -> t

          init n ~f returns a fresh floatarray of length n, with element number i initialized to the result of f i. In other terms, init n ~f tabulates the results of f applied to the integers 0 to n-1.

          val append : t -> t -> t

          append v1 v2 returns a fresh floatarray containing the concatenation of the floatarrays v1 and v2.

          val concat : t list -> t

          Same as append, but concatenates a list of floatarrays.

          val sub : t -> pos:int -> len:int -> t

          sub a ~pos ~len returns a fresh floatarray of length len, containing the elements number pos to pos + len - 1 of floatarray a.

          • raises Invalid_argument

            if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

          val copy : t -> t

          copy a returns a copy of a, that is, a fresh floatarray containing the same elements as a.

          val fill : t -> pos:int -> len:int -> float -> unit

          fill a ~pos ~len x modifies the floatarray a in place, storing x in elements number pos to pos + len - 1.

          val blit : src:t -> src_pos:int -> dst:t -> dst_pos:int -> len:int -> unit

          blit ~src ~src_pos ~dst ~dst_pos ~len copies len elements from floatarray src, starting at element number src_pos, to floatarray dst, starting at element number dst_pos. It works correctly even if src and dst are the same floatarray, and the source and destination chunks overlap.

          • raises Invalid_argument

            if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

          val to_list : t -> float list

          to_list a returns the list of all the elements of a.

          val of_list : float list -> t

          of_list l returns a fresh floatarray containing the elements of l.

          • raises Invalid_argument

            if the length of l is greater than Sys.max_floatarray_length.

          Iterators

          val iter : f:(float -> unit) -> t -> unit

          iter ~f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

          val iteri : f:(int -> float -> unit) -> t -> unit

          Same as iter, but the function is applied with the index of the element as first argument, and the element itself as second argument.

          val map : f:(float -> float) -> t -> t

          map ~f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

          val map_inplace : f:(float -> float) -> t -> unit

          map_inplace f a applies function f to all elements of a, and updates their values in place.

          • since 5.1
          val mapi : f:(int -> float -> float) -> t -> t

          Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

          val mapi_inplace : f:(int -> float -> float) -> t -> unit

          Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

          • since 5.1
          val fold_left : f:('acc -> float -> 'acc) -> init:'acc -> t -> 'acc

          fold_left ~f x ~init computes f (... (f (f x init.(0)) init.(1)) ...) init.(n-1), where n is the length of the floatarray init.

          val fold_right : f:(float -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

          fold_right f a init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the floatarray a.

          Iterators on two arrays

          val iter2 : f:(float -> float -> unit) -> t -> t -> unit

          Array.iter2 ~f a b applies function f to all the elements of a and b.

          val map2 : f:(float -> float -> float) -> t -> t -> t

          map2 ~f a b applies function f to all the elements of a and b, and builds a floatarray with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

          Array scanning

          val for_all : f:(float -> bool) -> t -> bool

          for_all ~f [|a1; ...; an|] checks if all elements of the floatarray satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

          val exists : f:(float -> bool) -> t -> bool

          exists f [|a1; ...; an|] checks if at least one element of the floatarray satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

          val mem : float -> set:t -> bool

          mem a ~set is true if and only if there is an element of set that is structurally equal to a, i.e. there is an x in set such that compare a x = 0.

          val mem_ieee : float -> set:t -> bool

          Same as mem, but uses IEEE equality instead of structural equality.

          Array searching

          val find_opt : f:(float -> bool) -> t -> float option
          val find_index : f:(float -> bool) -> t -> int option

          find_index ~f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

          It returns None if there is no such element.

          • since 5.1
          val find_map : f:(float -> 'a option) -> t -> 'a option
          val find_mapi : f:(int -> float -> 'a option) -> t -> 'a option

          Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

          • since 5.1

          Sorting

          val sort : cmp:(float -> float -> int) -> t -> unit

          Sort a floatarray in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

          The current implementation uses Heap Sort. It runs in constant stack space.

          Specification of the comparison function: Let a be the floatarray and cmp the comparison function. The following must be true for all x, y, z in a :

          • cmp x y > 0 if and only if cmp y x < 0
          • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

          When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

          • cmp a.(i) a.(j) >= 0 if and only if i >= j
          val stable_sort : cmp:(float -> float -> int) -> t -> unit

          Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

          The current implementation uses Merge Sort. It uses a temporary floatarray of length n/2, where n is the length of the floatarray. It is usually faster than the current implementation of sort.

          val fast_sort : cmp:(float -> float -> int) -> t -> unit

          Same as sort or stable_sort, whichever is faster on typical input.

          Float arrays and Sequences

          val to_seq : t -> float Stdlib.Seq.t

          Iterate on the floatarray, in increasing order. Modifications of the floatarray during iteration will be reflected in the sequence.

          val to_seqi : t -> (int * float) Stdlib.Seq.t

          Iterate on the floatarray, in increasing order, yielding indices along elements. Modifications of the floatarray during iteration will be reflected in the sequence.

          val of_seq : float Stdlib.Seq.t -> t

          Create an array from the generator.

          val map_to_array : f:(float -> 'a) -> t -> 'a array

          map_to_array ~f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

          val map_from_array : f:('a -> float) -> 'a array -> t

          map_from_array ~f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

          Arrays and concurrency safety

          Care must be taken when concurrently accessing float arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

          Atomicity

          Every float array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

          For example, consider the following program:

          let size = 100_000_000
           let a = Float.ArrayLabels.make size 1.
           let update a f () =
              Float.ArrayLabels.iteri ~f:(fun i x -> Float.Array.set a i (f x)) a
          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Float/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Float/index.html
          index e8c0320..dcd19d7 100644
          --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Float/index.html
          +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Float/index.html
          @@ -1,2 +1,2 @@
           
          -Float (less-power.Stdlib_alerts.Stdlib_alerting.Float)

          Module Stdlib_alerting.Float

          include sig ... end
          val zero : float

          The floating point 0.

          • since 4.08
          val one : float

          The floating-point 1.

          • since 4.08
          val minus_one : float

          The floating-point -1.

          • since 4.08
          val neg : float -> float

          Unary negation.

          val add : float -> float -> float

          Floating-point addition.

          val sub : float -> float -> float

          Floating-point subtraction.

          val mul : float -> float -> float

          Floating-point multiplication.

          val div : float -> float -> float

          Floating-point division.

          val fma : float -> float -> float -> float

          fma x y z returns x * y + z, with a best effort for computing this expression with a single rounding, using either hardware instructions (providing full IEEE compliance) or a software emulation.

          On 64-bit Cygwin, 64-bit mingw-w64 and MSVC 2017 and earlier, this function may be emulated owing to known bugs on limitations on these platforms. Note: since software emulation of the fma is costly, make sure that you are using hardware fma support if performance matters.

          • since 4.08
          val rem : float -> float -> float

          rem a b returns the remainder of a with respect to b. The returned value is a -. n *. b, where n is the quotient a /. b rounded towards zero to an integer.

          val succ : float -> float

          succ x returns the floating point number right after x i.e., the smallest floating-point number greater than x. See also next_after.

          • since 4.08
          val pred : float -> float

          pred x returns the floating-point number right before x i.e., the greatest floating-point number smaller than x. See also next_after.

          • since 4.08
          val abs : float -> float

          abs f returns the absolute value of f.

          val infinity : float

          Positive infinity.

          val neg_infinity : float

          Negative infinity.

          val nan : float

          A special floating-point value denoting the result of an undefined operation such as 0.0 /. 0.0. Stands for 'not a number'. Any floating-point operation with nan as argument returns nan as result, unless otherwise specified in IEEE 754 standard. As for floating-point comparisons, =, <, <=, > and >= return false and <> returns true if one or both of their arguments is nan.

          nan is quiet_nan since 5.1; it was a signaling NaN before.

          val signaling_nan : float

          Signaling NaN. The corresponding signals do not raise OCaml exception, but the value can be useful for interoperability with C libraries.

          • since 5.1
          val quiet_nan : float

          Quiet NaN.

          • since 5.1
          val pi : float

          The constant pi.

          val max_float : float

          The largest positive finite value of type float.

          val min_float : float

          The smallest positive, non-zero, non-denormalized value of type float.

          val epsilon : float

          The difference between 1.0 and the smallest exactly representable floating-point number greater than 1.0.

          val is_finite : float -> bool

          is_finite x is true if and only if x is finite i.e., not infinite and not nan.

          • since 4.08
          val is_infinite : float -> bool

          is_infinite x is true if and only if x is infinity or neg_infinity.

          • since 4.08
          val is_nan : float -> bool

          is_nan x is true if and only if x is not a number (see nan).

          • since 4.08
          val is_integer : float -> bool

          is_integer x is true if and only if x is an integer.

          • since 4.08
          val of_int : int -> float

          Convert an integer to floating-point.

          val to_int : float -> int

          Truncate the given floating-point number to an integer. The result is unspecified if the argument is nan or falls outside the range of representable integers.

          val of_string : string -> float

          Convert the given string to a float. The string is read in decimal (by default) or in hexadecimal (marked by 0x or 0X). The format of decimal floating-point numbers is [-] dd.ddd (e|E) [+|-] dd , where d stands for a decimal digit. The format of hexadecimal floating-point numbers is [-] 0(x|X) hh.hhh (p|P) [+|-] dd , where h stands for an hexadecimal digit and d for a decimal digit. In both cases, at least one of the integer and fractional parts must be given; the exponent part is optional. The _ (underscore) character can appear anywhere in the string and is ignored. Depending on the execution platforms, other representations of floating-point numbers can be accepted, but should not be relied upon.

          • raises Failure

            if the given string is not a valid representation of a float.

          val of_string_opt : string -> float option

          Same as of_string, but returns None instead of raising.

          val to_string : float -> string

          Return a string representation of a floating-point number.

          This conversion can involve a loss of precision. For greater control over the manner in which the number is printed, see Printf.

          This function is an alias for Stdlib.string_of_float.

          type fpclass = Stdlib.fpclass =
          1. | FP_normal
            (*

            Normal number, none of the below

            *)
          2. | FP_subnormal
            (*

            Number very close to 0.0, has reduced precision

            *)
          3. | FP_zero
            (*

            Number is 0.0 or -0.0

            *)
          4. | FP_infinite
            (*

            Number is positive or negative infinity

            *)
          5. | FP_nan
            (*

            Not a number: result of an undefined operation

            *)

          The five classes of floating-point numbers, as determined by the classify_float function.

          val classify_float : float -> fpclass

          Return the class of the given floating-point number: normal, subnormal, zero, infinite, or not a number.

          val pow : float -> float -> float

          Exponentiation.

          val sqrt : float -> float

          Square root.

          val cbrt : float -> float

          Cube root.

          • since 4.13
          val exp : float -> float

          Exponential.

          val exp2 : float -> float

          Base 2 exponential function.

          • since 4.13
          val log : float -> float

          Natural logarithm.

          val log10 : float -> float

          Base 10 logarithm.

          val log2 : float -> float

          Base 2 logarithm.

          • since 4.13
          val expm1 : float -> float

          expm1 x computes exp x -. 1.0, giving numerically-accurate results even if x is close to 0.0.

          val log1p : float -> float

          log1p x computes log(1.0 +. x) (natural logarithm), giving numerically-accurate results even if x is close to 0.0.

          val cos : float -> float

          Cosine. Argument is in radians.

          val sin : float -> float

          Sine. Argument is in radians.

          val tan : float -> float

          Tangent. Argument is in radians.

          val acos : float -> float

          Arc cosine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between 0.0 and pi.

          val asin : float -> float

          Arc sine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between -pi/2 and pi/2.

          val atan : float -> float

          Arc tangent. Result is in radians and is between -pi/2 and pi/2.

          val atan2 : float -> float -> float

          atan2 y x returns the arc tangent of y /. x. The signs of x and y are used to determine the quadrant of the result. Result is in radians and is between -pi and pi.

          val hypot : float -> float -> float

          hypot x y returns sqrt(x *. x +. y *. y), that is, the length of the hypotenuse of a right-angled triangle with sides of length x and y, or, equivalently, the distance of the point (x,y) to origin. If one of x or y is infinite, returns infinity even if the other is nan.

          val cosh : float -> float

          Hyperbolic cosine. Argument is in radians.

          val sinh : float -> float

          Hyperbolic sine. Argument is in radians.

          val tanh : float -> float

          Hyperbolic tangent. Argument is in radians.

          val acosh : float -> float

          Hyperbolic arc cosine. The argument must fall within the range [1.0, inf]. Result is in radians and is between 0.0 and inf.

          • since 4.13
          val asinh : float -> float

          Hyperbolic arc sine. The argument and result range over the entire real line. Result is in radians.

          • since 4.13
          val atanh : float -> float

          Hyperbolic arc tangent. The argument must fall within the range [-1.0, 1.0]. Result is in radians and ranges over the entire real line.

          • since 4.13
          val erf : float -> float

          Error function. The argument ranges over the entire real line. The result is always within [-1.0, 1.0].

          • since 4.13
          val erfc : float -> float

          Complementary error function (erfc x = 1 - erf x). The argument ranges over the entire real line. The result is always within [-1.0, 1.0].

          • since 4.13
          val trunc : float -> float

          trunc x rounds x to the nearest integer whose absolute value is less than or equal to x.

          • since 4.08
          val round : float -> float

          round x rounds x to the nearest integer with ties (fractional values of 0.5) rounded away from zero, regardless of the current rounding direction. If x is an integer, +0., -0., nan, or infinite, x itself is returned.

          On 64-bit mingw-w64, this function may be emulated owing to a bug in the C runtime library (CRT) on this platform.

          • since 4.08
          val ceil : float -> float

          Round above to an integer value. ceil f returns the least integer value greater than or equal to f. The result is returned as a float.

          val floor : float -> float

          Round below to an integer value. floor f returns the greatest integer value less than or equal to f. The result is returned as a float.

          val next_after : float -> float -> float

          next_after x y returns the next representable floating-point value following x in the direction of y. More precisely, if y is greater (resp. less) than x, it returns the smallest (resp. largest) representable number greater (resp. less) than x. If x equals y, the function returns y. If x or y is nan, a nan is returned. Note that next_after max_float infinity = infinity and that next_after 0. infinity is the smallest denormalized positive number. If x is the smallest denormalized positive number, next_after x 0. = 0.

          • since 4.08
          val copy_sign : float -> float -> float

          copy_sign x y returns a float whose absolute value is that of x and whose sign is that of y. If x is nan, returns nan. If y is nan, returns either x or -. x, but it is not specified which.

          val sign_bit : float -> bool

          sign_bit x is true if and only if the sign bit of x is set. For example sign_bit 1. and signbit 0. are false while sign_bit (-1.) and sign_bit (-0.) are true.

          • since 4.08
          val frexp : float -> float * int

          frexp f returns the pair of the significant and the exponent of f. When f is zero, the significant x and the exponent n of f are equal to zero. When f is non-zero, they are defined by f = x *. 2 ** n and 0.5 <= x < 1.0.

          val ldexp : float -> int -> float

          ldexp x n returns x *. 2 ** n.

          val modf : float -> float * float

          modf f returns the pair of the fractional and integral part of f.

          type t = float

          An alias for the type of floating-point numbers.

          val compare : t -> t -> int

          compare x y returns 0 if x is equal to y, a negative integer if x is less than y, and a positive integer if x is greater than y. compare treats nan as equal to itself and less than any other float value. This treatment of nan ensures that compare defines a total ordering relation.

          val equal : t -> t -> bool

          The equal function for floating-point numbers, compared using compare.

          val min : t -> t -> t

          min x y returns the minimum of x and y. It returns nan when x or y is nan. Moreover min (-0.) (+0.) = -0.

          • since 4.08
          val max : float -> float -> float

          max x y returns the maximum of x and y. It returns nan when x or y is nan. Moreover max (-0.) (+0.) = +0.

          • since 4.08
          val min_max : float -> float -> float * float

          min_max x y is (min x y, max x y), just more efficient.

          • since 4.08
          val min_num : t -> t -> t

          min_num x y returns the minimum of x and y treating nan as missing values. If both x and y are nan, nan is returned. Moreover min_num (-0.) (+0.) = -0.

          • since 4.08
          val max_num : t -> t -> t

          max_num x y returns the maximum of x and y treating nan as missing values. If both x and y are nan nan is returned. Moreover max_num (-0.) (+0.) = +0.

          • since 4.08
          val min_max_num : float -> float -> float * float

          min_max_num x y is (min_num x y, max_num x y), just more efficient. Note that in particular min_max_num x nan = (x, x) and min_max_num nan y = (y, y).

          • since 4.08
          val seeded_hash : int -> t -> int

          A seeded hash function for floats, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

          • since 5.1
          val hash : t -> int

          An unseeded hash function for floats, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

          module Array : sig ... end

          Float arrays with packed representation.

          module ArrayLabels : sig ... end

          Float arrays with packed representation (labeled functions).

          +Float (less-power.Stdlib_alerts.Stdlib_alerting.Float)

          Module Stdlib_alerting.Float

          include sig ... end
          val zero : float

          The floating point 0.

          • since 4.08
          val one : float

          The floating-point 1.

          • since 4.08
          val minus_one : float

          The floating-point -1.

          • since 4.08
          val neg : float -> float

          Unary negation.

          val add : float -> float -> float

          Floating-point addition.

          val sub : float -> float -> float

          Floating-point subtraction.

          val mul : float -> float -> float

          Floating-point multiplication.

          val div : float -> float -> float

          Floating-point division.

          val fma : float -> float -> float -> float

          fma x y z returns x * y + z, with a best effort for computing this expression with a single rounding, using either hardware instructions (providing full IEEE compliance) or a software emulation.

          On 64-bit Cygwin, 64-bit mingw-w64 and MSVC 2017 and earlier, this function may be emulated owing to known bugs on limitations on these platforms. Note: since software emulation of the fma is costly, make sure that you are using hardware fma support if performance matters.

          • since 4.08
          val rem : float -> float -> float

          rem a b returns the remainder of a with respect to b. The returned value is a -. n *. b, where n is the quotient a /. b rounded towards zero to an integer.

          val succ : float -> float

          succ x returns the floating point number right after x i.e., the smallest floating-point number greater than x. See also next_after.

          • since 4.08
          val pred : float -> float

          pred x returns the floating-point number right before x i.e., the greatest floating-point number smaller than x. See also next_after.

          • since 4.08
          val abs : float -> float

          abs f returns the absolute value of f.

          val infinity : float

          Positive infinity.

          val neg_infinity : float

          Negative infinity.

          val nan : float

          A special floating-point value denoting the result of an undefined operation such as 0.0 /. 0.0. Stands for 'not a number'. Any floating-point operation with nan as argument returns nan as result, unless otherwise specified in IEEE 754 standard. As for floating-point comparisons, =, <, <=, > and >= return false and <> returns true if one or both of their arguments is nan.

          nan is quiet_nan since 5.1; it was a signaling NaN before.

          val signaling_nan : float

          Signaling NaN. The corresponding signals do not raise OCaml exception, but the value can be useful for interoperability with C libraries.

          • since 5.1
          val quiet_nan : float

          Quiet NaN.

          • since 5.1
          val pi : float

          The constant pi.

          val max_float : float

          The largest positive finite value of type float.

          val min_float : float

          The smallest positive, non-zero, non-denormalized value of type float.

          val epsilon : float

          The difference between 1.0 and the smallest exactly representable floating-point number greater than 1.0.

          val is_finite : float -> bool

          is_finite x is true if and only if x is finite i.e., not infinite and not nan.

          • since 4.08
          val is_infinite : float -> bool

          is_infinite x is true if and only if x is infinity or neg_infinity.

          • since 4.08
          val is_nan : float -> bool

          is_nan x is true if and only if x is not a number (see nan).

          • since 4.08
          val is_integer : float -> bool

          is_integer x is true if and only if x is an integer.

          • since 4.08
          val of_int : int -> float

          Convert an integer to floating-point.

          val to_int : float -> int

          Truncate the given floating-point number to an integer. The result is unspecified if the argument is nan or falls outside the range of representable integers.

          val of_string : string -> float

          Convert the given string to a float. The string is read in decimal (by default) or in hexadecimal (marked by 0x or 0X). The format of decimal floating-point numbers is [-] dd.ddd (e|E) [+|-] dd , where d stands for a decimal digit. The format of hexadecimal floating-point numbers is [-] 0(x|X) hh.hhh (p|P) [+|-] dd , where h stands for an hexadecimal digit and d for a decimal digit. In both cases, at least one of the integer and fractional parts must be given; the exponent part is optional. The _ (underscore) character can appear anywhere in the string and is ignored. Depending on the execution platforms, other representations of floating-point numbers can be accepted, but should not be relied upon.

          • raises Failure

            if the given string is not a valid representation of a float.

          val of_string_opt : string -> float option

          Same as of_string, but returns None instead of raising.

          val to_string : float -> string

          Return a string representation of a floating-point number.

          This conversion can involve a loss of precision. For greater control over the manner in which the number is printed, see Printf.

          This function is an alias for Stdlib.string_of_float.

          type fpclass = Stdlib.fpclass =
          1. | FP_normal
            (*

            Normal number, none of the below

            *)
          2. | FP_subnormal
            (*

            Number very close to 0.0, has reduced precision

            *)
          3. | FP_zero
            (*

            Number is 0.0 or -0.0

            *)
          4. | FP_infinite
            (*

            Number is positive or negative infinity

            *)
          5. | FP_nan
            (*

            Not a number: result of an undefined operation

            *)

          The five classes of floating-point numbers, as determined by the classify_float function.

          val classify_float : float -> fpclass

          Return the class of the given floating-point number: normal, subnormal, zero, infinite, or not a number.

          val pow : float -> float -> float

          Exponentiation.

          val sqrt : float -> float

          Square root.

          val cbrt : float -> float

          Cube root.

          • since 4.13
          val exp : float -> float

          Exponential.

          val exp2 : float -> float

          Base 2 exponential function.

          • since 4.13
          val log : float -> float

          Natural logarithm.

          val log10 : float -> float

          Base 10 logarithm.

          val log2 : float -> float

          Base 2 logarithm.

          • since 4.13
          val expm1 : float -> float

          expm1 x computes exp x -. 1.0, giving numerically-accurate results even if x is close to 0.0.

          val log1p : float -> float

          log1p x computes log(1.0 +. x) (natural logarithm), giving numerically-accurate results even if x is close to 0.0.

          val cos : float -> float

          Cosine. Argument is in radians.

          val sin : float -> float

          Sine. Argument is in radians.

          val tan : float -> float

          Tangent. Argument is in radians.

          val acos : float -> float

          Arc cosine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between 0.0 and pi.

          val asin : float -> float

          Arc sine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between -pi/2 and pi/2.

          val atan : float -> float

          Arc tangent. Result is in radians and is between -pi/2 and pi/2.

          val atan2 : float -> float -> float

          atan2 y x returns the arc tangent of y /. x. The signs of x and y are used to determine the quadrant of the result. Result is in radians and is between -pi and pi.

          val hypot : float -> float -> float

          hypot x y returns sqrt(x *. x +. y *. y), that is, the length of the hypotenuse of a right-angled triangle with sides of length x and y, or, equivalently, the distance of the point (x,y) to origin. If one of x or y is infinite, returns infinity even if the other is nan.

          val cosh : float -> float

          Hyperbolic cosine. Argument is in radians.

          val sinh : float -> float

          Hyperbolic sine. Argument is in radians.

          val tanh : float -> float

          Hyperbolic tangent. Argument is in radians.

          val acosh : float -> float

          Hyperbolic arc cosine. The argument must fall within the range [1.0, inf]. Result is in radians and is between 0.0 and inf.

          • since 4.13
          val asinh : float -> float

          Hyperbolic arc sine. The argument and result range over the entire real line. Result is in radians.

          • since 4.13
          val atanh : float -> float

          Hyperbolic arc tangent. The argument must fall within the range [-1.0, 1.0]. Result is in radians and ranges over the entire real line.

          • since 4.13
          val erf : float -> float

          Error function. The argument ranges over the entire real line. The result is always within [-1.0, 1.0].

          • since 4.13
          val erfc : float -> float

          Complementary error function (erfc x = 1 - erf x). The argument ranges over the entire real line. The result is always within [-1.0, 1.0].

          • since 4.13
          val trunc : float -> float

          trunc x rounds x to the nearest integer whose absolute value is less than or equal to x.

          • since 4.08
          val round : float -> float

          round x rounds x to the nearest integer with ties (fractional values of 0.5) rounded away from zero, regardless of the current rounding direction. If x is an integer, +0., -0., nan, or infinite, x itself is returned.

          On 64-bit mingw-w64, this function may be emulated owing to a bug in the C runtime library (CRT) on this platform.

          • since 4.08
          val ceil : float -> float

          Round above to an integer value. ceil f returns the least integer value greater than or equal to f. The result is returned as a float.

          val floor : float -> float

          Round below to an integer value. floor f returns the greatest integer value less than or equal to f. The result is returned as a float.

          val next_after : float -> float -> float

          next_after x y returns the next representable floating-point value following x in the direction of y. More precisely, if y is greater (resp. less) than x, it returns the smallest (resp. largest) representable number greater (resp. less) than x. If x equals y, the function returns y. If x or y is nan, a nan is returned. Note that next_after max_float infinity = infinity and that next_after 0. infinity is the smallest denormalized positive number. If x is the smallest denormalized positive number, next_after x 0. = 0.

          • since 4.08
          val copy_sign : float -> float -> float

          copy_sign x y returns a float whose absolute value is that of x and whose sign is that of y. If x is nan, returns nan. If y is nan, returns either x or -. x, but it is not specified which.

          val sign_bit : float -> bool

          sign_bit x is true if and only if the sign bit of x is set. For example sign_bit 1. and signbit 0. are false while sign_bit (-1.) and sign_bit (-0.) are true.

          • since 4.08
          val frexp : float -> float * int

          frexp f returns the pair of the significant and the exponent of f. When f is zero, the significant x and the exponent n of f are equal to zero. When f is non-zero, they are defined by f = x *. 2 ** n and 0.5 <= x < 1.0.

          val ldexp : float -> int -> float

          ldexp x n returns x *. 2 ** n.

          val modf : float -> float * float

          modf f returns the pair of the fractional and integral part of f.

          type t = float

          An alias for the type of floating-point numbers.

          val compare : t -> t -> int

          compare x y returns 0 if x is equal to y, a negative integer if x is less than y, and a positive integer if x is greater than y. compare treats nan as equal to itself and less than any other float value. This treatment of nan ensures that compare defines a total ordering relation.

          val equal : t -> t -> bool

          The equal function for floating-point numbers, compared using compare.

          val min : t -> t -> t

          min x y returns the minimum of x and y. It returns nan when x or y is nan. Moreover min (-0.) (+0.) = -0.

          • since 4.08
          val max : float -> float -> float

          max x y returns the maximum of x and y. It returns nan when x or y is nan. Moreover max (-0.) (+0.) = +0.

          • since 4.08
          val min_max : float -> float -> float * float

          min_max x y is (min x y, max x y), just more efficient.

          • since 4.08
          val min_num : t -> t -> t

          min_num x y returns the minimum of x and y treating nan as missing values. If both x and y are nan, nan is returned. Moreover min_num (-0.) (+0.) = -0.

          • since 4.08
          val max_num : t -> t -> t

          max_num x y returns the maximum of x and y treating nan as missing values. If both x and y are nan nan is returned. Moreover max_num (-0.) (+0.) = +0.

          • since 4.08
          val min_max_num : float -> float -> float * float

          min_max_num x y is (min_num x y, max_num x y), just more efficient. Note that in particular min_max_num x nan = (x, x) and min_max_num nan y = (y, y).

          • since 4.08
          val seeded_hash : int -> t -> int

          A seeded hash function for floats, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

          • since 5.1
          val hash : t -> int

          An unseeded hash function for floats, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

          module Array : sig ... end

          Float arrays with packed representation.

          module ArrayLabels : sig ... end

          Float arrays with packed representation (labeled functions).

          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/Make/argument-1-H/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/Make/argument-1-H/index.html index 0da9603..21ac5fd 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/Make/argument-1-H/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/Make/argument-1-H/index.html @@ -1,2 +1,2 @@ -H (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.Make.H)

          Parameter Make.H

          type t

          The type of the hashtable keys.

          val equal : t -> t -> bool

          The equality predicate used to compare keys.

          val hash : t -> int

          A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

          • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
          • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
          • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
          +H (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.Make.H)

          Parameter Make.H

          type t

          The type of the hashtable keys.

          val equal : t -> t -> bool

          The equality predicate used to compare keys.

          val hash : t -> int

          A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

          • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
          • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
          • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/Make/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/Make/index.html index 4f4b930..6552d7e 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/Make/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/Make/index.html @@ -1,2 +1,2 @@ -Make (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.Make)

          Module Hashtbl.Make

          Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

          • alert impure Hash tables are not permitted

          Parameters

          module H : HashedType

          Signature

          type key = H.t
          type !'a t
          val create : int -> 'a t
          val clear : 'a t -> unit
          val reset : 'a t -> unit
          • since 4.00
          val copy : 'a t -> 'a t
          val add : 'a t -> key -> 'a -> unit
          val remove : 'a t -> key -> unit
          val find : 'a t -> key -> 'a
          val find_opt : 'a t -> key -> 'a option
          • since 4.05
          val find_all : 'a t -> key -> 'a list
          val replace : 'a t -> key -> 'a -> unit
          val mem : 'a t -> key -> bool
          val iter : (key -> 'a -> unit) -> 'a t -> unit
          val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
          • since 4.03
          val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
          val length : 'a t -> int
          val stats : 'a t -> statistics
          • since 4.00
          val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
          • since 4.07
          val to_seq_keys : _ t -> key Stdlib.Seq.t
          • since 4.07
          val to_seq_values : 'a t -> 'a Stdlib.Seq.t
          • since 4.07
          val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
          • since 4.07
          +Make (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.Make)

          Module Hashtbl.Make

          Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

          • alert impure Hash tables are not permitted

          Parameters

          module H : HashedType

          Signature

          type key = H.t
          type !'a t
          val create : int -> 'a t
          val clear : 'a t -> unit
          val reset : 'a t -> unit
          • since 4.00
          val copy : 'a t -> 'a t
          val add : 'a t -> key -> 'a -> unit
          val remove : 'a t -> key -> unit
          val find : 'a t -> key -> 'a
          val find_opt : 'a t -> key -> 'a option
          • since 4.05
          val find_all : 'a t -> key -> 'a list
          val replace : 'a t -> key -> 'a -> unit
          val mem : 'a t -> key -> bool
          val iter : (key -> 'a -> unit) -> 'a t -> unit
          val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
          • since 4.03
          val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
          val length : 'a t -> int
          val stats : 'a t -> statistics
          • since 4.00
          val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
          • since 4.07
          val to_seq_keys : _ t -> key Stdlib.Seq.t
          • since 4.07
          val to_seq_values : 'a t -> 'a Stdlib.Seq.t
          • since 4.07
          val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
          • since 4.07
          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/MakeSeeded/argument-1-H/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/MakeSeeded/argument-1-H/index.html index 87da65f..82fc2f9 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/MakeSeeded/argument-1-H/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/MakeSeeded/argument-1-H/index.html @@ -1,2 +1,2 @@ -H (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.MakeSeeded.H)

          Parameter MakeSeeded.H

          type t

          The type of the hashtable keys.

          val equal : t -> t -> bool

          The equality predicate used to compare keys.

          val seeded_hash : int -> t -> int

          A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

          +H (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.MakeSeeded.H)

          Parameter MakeSeeded.H

          type t

          The type of the hashtable keys.

          val equal : t -> t -> bool

          The equality predicate used to compare keys.

          val seeded_hash : int -> t -> int

          A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/MakeSeeded/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/MakeSeeded/index.html index 7a8b720..6cda401 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/MakeSeeded/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/MakeSeeded/index.html @@ -1,2 +1,2 @@ -MakeSeeded (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.MakeSeeded)

          Module Hashtbl.MakeSeeded

          Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

          • since 4.00
          • alert impure Hash tables are not permitted

          Parameters

          Signature

          type key = H.t
          type !'a t
          val create : ?random:bool -> int -> 'a t
          val clear : 'a t -> unit
          val reset : 'a t -> unit
          val copy : 'a t -> 'a t
          val add : 'a t -> key -> 'a -> unit
          val remove : 'a t -> key -> unit
          val find : 'a t -> key -> 'a
          val find_opt : 'a t -> key -> 'a option
          • since 4.05
          val find_all : 'a t -> key -> 'a list
          val replace : 'a t -> key -> 'a -> unit
          val mem : 'a t -> key -> bool
          val iter : (key -> 'a -> unit) -> 'a t -> unit
          val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
          • since 4.03
          val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
          val length : 'a t -> int
          val stats : 'a t -> statistics
          val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
          • since 4.07
          val to_seq_keys : _ t -> key Stdlib.Seq.t
          • since 4.07
          val to_seq_values : 'a t -> 'a Stdlib.Seq.t
          • since 4.07
          val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
          • since 4.07
          +MakeSeeded (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.MakeSeeded)

          Module Hashtbl.MakeSeeded

          Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

          • since 4.00
          • alert impure Hash tables are not permitted

          Parameters

          Signature

          type key = H.t
          type !'a t
          val create : ?random:bool -> int -> 'a t
          val clear : 'a t -> unit
          val reset : 'a t -> unit
          val copy : 'a t -> 'a t
          val add : 'a t -> key -> 'a -> unit
          val remove : 'a t -> key -> unit
          val find : 'a t -> key -> 'a
          val find_opt : 'a t -> key -> 'a option
          • since 4.05
          val find_all : 'a t -> key -> 'a list
          val replace : 'a t -> key -> 'a -> unit
          val mem : 'a t -> key -> bool
          val iter : (key -> 'a -> unit) -> 'a t -> unit
          val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
          • since 4.03
          val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
          val length : 'a t -> int
          val stats : 'a t -> statistics
          val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
          • since 4.07
          val to_seq_keys : _ t -> key Stdlib.Seq.t
          • since 4.07
          val to_seq_values : 'a t -> 'a Stdlib.Seq.t
          • since 4.07
          val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
          • since 4.07
          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/index.html index 1412b7d..8d78537 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/index.html @@ -1,2 +1,2 @@ -Hashtbl (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl)

          Module Stdlib_alerting.Hashtbl

          type ('a, 'b) t = ('a, 'b) Stdlib.Hashtbl.t
          • alert impure Hash tables are not permitted
          type statistics = Stdlib.Hashtbl.statistics = {
          1. num_bindings : int;
          2. num_buckets : int;
          3. max_bucket_length : int;
          4. bucket_histogram : int array;
          }
          • alert impure Hash tables are not permitted
          include sig ... end
          val hash : 'a -> int

          Hashtbl.hash x associates a nonnegative integer to any value of any type. It is guaranteed that if x = y or Stdlib.compare x y = 0, then hash x = hash y. Moreover, hash always terminates, even on cyclic structures.

          val seeded_hash : int -> 'a -> int

          A variant of hash that is further parameterized by an integer seed.

          • since 4.00
          val hash_param : int -> int -> 'a -> int

          Hashtbl.hash_param meaningful total x computes a hash value for x, with the same properties as for hash. The two extra integer parameters meaningful and total give more precise control over hashing. Hashing performs a breadth-first, left-to-right traversal of the structure x, stopping after meaningful meaningful nodes were encountered, or total nodes (meaningful or not) were encountered. If total as specified by the user exceeds a certain value, currently 256, then it is capped to that value. Meaningful nodes are: integers; floating-point numbers; strings; characters; booleans; and constant constructors. Larger values of meaningful and total means that more nodes are taken into account to compute the final hash value, and therefore collisions are less likely to happen. However, hashing takes longer. The parameters meaningful and total govern the tradeoff between accuracy and speed. As default choices, hash and seeded_hash take meaningful = 10 and total = 100.

          val seeded_hash_param : int -> int -> int -> 'a -> int

          A variant of hash_param that is further parameterized by an integer seed. Usage: Hashtbl.seeded_hash_param meaningful total seed x.

          • since 4.00
          val create : ?random:bool -> int -> ('a, 'b) t

          Hashtbl.create n creates a new, empty hash table, with initial size n. For best results, n should be on the order of the expected number of elements that will be in the table. The table grows as needed, so n is just an initial guess.

          The optional ~random parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of Hashtbl.create or deterministic over all executions.

          A hash table that is created with ~random set to false uses a fixed hash function (hash) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other security-sensitive applications, the deterministic collision patterns can be exploited by a malicious user to create a denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down.

          A hash table that is created with ~random set to true uses the seeded hash function seeded_hash with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among 2^{30} different hash functions. All these hash functions have different collision patterns, rendering ineffective the denial-of-service attack described above. However, because of randomization, enumerating all elements of the hash table using fold or iter is no longer deterministic: elements are enumerated in different orders at different runs of the program.

          If no ~random parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling randomize or by setting the R flag in the OCAMLRUNPARAM environment variable.

          • before 4.00

            the ~random parameter was not present and all hash tables were created in non-randomized mode.

          • alert impure Hash tables are not permitted
          val clear : ('a, 'b) t -> unit

          Empty a hash table. Use reset instead of clear to shrink the size of the bucket table to its initial size.

          • alert impure Hash tables are not permitted
          val reset : ('a, 'b) t -> unit

          Empty a hash table and shrink the size of the bucket table to its initial size.

          • since 4.00
          • alert impure Hash tables are not permitted
          val copy : ('a, 'b) t -> ('a, 'b) t

          Return a copy of the given hashtable.

          • alert impure Hash tables are not permitted
          val add : ('a, 'b) t -> 'a -> 'b -> unit

          Hashtbl.add tbl key data adds a binding of key to data in table tbl.

          Warning: Previous bindings for key are not removed, but simply hidden. That is, after performing remove tbl key, the previous binding for key, if any, is restored. (Same behavior as with association lists.)

          If you desire the classic behavior of replacing elements, see replace.

          • alert impure Hash tables are not permitted
          val find : ('a, 'b) t -> 'a -> 'b

          Hashtbl.find tbl x returns the current binding of x in tbl, or raises Not_found if no such binding exists.

          • alert impure Hash tables are not permitted
          val find_opt : ('a, 'b) t -> 'a -> 'b option

          Hashtbl.find_opt tbl x returns the current binding of x in tbl, or None if no such binding exists.

          • since 4.05
          • alert impure Hash tables are not permitted
          val find_all : ('a, 'b) t -> 'a -> 'b list

          Hashtbl.find_all tbl x returns the list of all data associated with x in tbl. The current binding is returned first, then the previous bindings, in reverse order of introduction in the table.

          • alert impure Hash tables are not permitted
          val mem : ('a, 'b) t -> 'a -> bool

          Hashtbl.mem tbl x checks if x is bound in tbl.

          • alert impure Hash tables are not permitted
          val remove : ('a, 'b) t -> 'a -> unit

          Hashtbl.remove tbl x removes the current binding of x in tbl, restoring the previous binding if it exists. It does nothing if x is not bound in tbl.

          • alert impure Hash tables are not permitted
          val replace : ('a, 'b) t -> 'a -> 'b -> unit

          Hashtbl.replace tbl key data replaces the current binding of key in tbl by a binding of key to data. If key is unbound in tbl, a binding of key to data is added to tbl. This is functionally equivalent to remove tbl key followed by add tbl key data.

          • alert impure Hash tables are not permitted
          val iter : ('a -> 'b -> unit) -> ('a, 'b) t -> unit

          Hashtbl.iter f tbl applies f to all bindings in table tbl. f receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to f.

          The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

          If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

          The behavior is not specified if the hash table is modified by f during the iteration.

          • alert impure Hash tables are not permitted
          val filter_map_inplace : ('a -> 'b -> 'b option) -> ('a, 'b) t -> unit

          Hashtbl.filter_map_inplace f tbl applies f to all bindings in table tbl and update each binding depending on the result of f. If f returns None, the binding is discarded. If it returns Some new_val, the binding is update to associate the key to new_val.

          Other comments for iter apply as well.

          • since 4.03
          • alert impure Hash tables are not permitted
          val fold : ('a -> 'b -> 'acc -> 'acc) -> ('a, 'b) t -> 'acc -> 'acc

          Hashtbl.fold f tbl init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in tbl, and d1 ... dN are the associated values. Each binding is presented exactly once to f.

          The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

          If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

          The behavior is not specified if the hash table is modified by f during the iteration.

          • alert impure Hash tables are not permitted
          val length : ('a, 'b) t -> int

          Hashtbl.length tbl returns the number of bindings in tbl. It takes constant time. Multiple bindings are counted once each, so Hashtbl.length gives the number of times Hashtbl.iter calls its first argument.

          • alert impure Hash tables are not permitted
          val randomize : unit -> unit

          After a call to Hashtbl.randomize(), hash tables are created in randomized mode by default: create returns randomized hash tables, unless the ~random:false optional parameter is given. The same effect can be achieved by setting the R parameter in the OCAMLRUNPARAM environment variable.

          It is recommended that applications or Web frameworks that need to protect themselves against the denial-of-service attack described in create call Hashtbl.randomize() at initialization time before any domains are created.

          Note that once Hashtbl.randomize() was called, there is no way to revert to the non-randomized default behavior of create. This is intentional. Non-randomized hash tables can still be created using Hashtbl.create ~random:false.

          • since 4.00
          • alert impure Hash tables are not permitted
          val is_randomized : unit -> bool

          Return true if the tables are currently created in randomized mode by default, false otherwise.

          • since 4.03
          • alert impure Hash tables are not permitted
          val rebuild : ?random:bool -> ('a, 'b) t -> ('a, 'b) t

          Return a copy of the given hashtable. Unlike copy, rebuild h re-hashes all the (key, value) entries of the original table h. The returned hash table is randomized if h was randomized, or the optional random parameter is true, or if the default is to create randomized hash tables; see create for more information.

          rebuild can safely be used to import a hash table built by an old version of the Hashtbl module, then marshaled to persistent storage. After unmarshaling, apply rebuild to produce a hash table for the current version of the Hashtbl module.

          • since 4.12
          • alert impure Hash tables are not permitted
          val stats : ('a, 'b) t -> statistics

          Hashtbl.stats tbl returns statistics about the table tbl: number of buckets, size of the biggest bucket, distribution of buckets by size.

          • since 4.00
          • alert impure Hash tables are not permitted
          val to_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t

          Iterate on the whole table. The order in which the bindings appear in the sequence is unspecified. However, if the table contains several bindings for the same key, they appear in reversed order of introduction, that is, the most recent binding appears first.

          The behavior is not specified if the hash table is modified during the iteration.

          • since 4.07
          • alert impure Hash tables are not permitted
          val to_seq_keys : ('a, _) t -> 'a Stdlib.Seq.t

          Same as Seq.map fst (to_seq m)

          • since 4.07
          • alert impure Hash tables are not permitted
          val to_seq_values : (_, 'b) t -> 'b Stdlib.Seq.t

          Same as Seq.map snd (to_seq m)

          • since 4.07
          • alert impure Hash tables are not permitted
          val add_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t -> unit

          Add the given bindings to the table, using add

          • since 4.07
          • alert impure Hash tables are not permitted
          val replace_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t -> unit

          Add the given bindings to the table, using replace

          • since 4.07
          • alert impure Hash tables are not permitted
          val of_seq : ('a * 'b) Stdlib.Seq.t -> ('a, 'b) t

          Build a table from the given bindings. The bindings are added in the same order they appear in the sequence, using replace_seq, which means that if two pairs have the same key, only the latest one will appear in the table.

          • since 4.07
          • alert impure Hash tables are not permitted
          module type HashedType = sig ... end

          The input signature of the functor Make.

          module type S = sig ... end

          The output signature of the functor Make.

          module Make (H : HashedType) : S with type key = H.t

          Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

          module type SeededHashedType = sig ... end

          The input signature of the functor MakeSeeded.

          module type SeededS = sig ... end

          The output signature of the functor MakeSeeded.

          module MakeSeeded (H : SeededHashedType) : SeededS with type key = H.t

          Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

          +Hashtbl (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl)

          Module Stdlib_alerting.Hashtbl

          type ('a, 'b) t = ('a, 'b) Stdlib.Hashtbl.t
          • alert impure Hash tables are not permitted
          type statistics = Stdlib.Hashtbl.statistics = {
          1. num_bindings : int;
          2. num_buckets : int;
          3. max_bucket_length : int;
          4. bucket_histogram : int array;
          }
          • alert impure Hash tables are not permitted
          include sig ... end
          val hash : 'a -> int

          Hashtbl.hash x associates a nonnegative integer to any value of any type. It is guaranteed that if x = y or Stdlib.compare x y = 0, then hash x = hash y. Moreover, hash always terminates, even on cyclic structures.

          val seeded_hash : int -> 'a -> int

          A variant of hash that is further parameterized by an integer seed.

          • since 4.00
          val hash_param : int -> int -> 'a -> int

          Hashtbl.hash_param meaningful total x computes a hash value for x, with the same properties as for hash. The two extra integer parameters meaningful and total give more precise control over hashing. Hashing performs a breadth-first, left-to-right traversal of the structure x, stopping after meaningful meaningful nodes were encountered, or total nodes (meaningful or not) were encountered. If total as specified by the user exceeds a certain value, currently 256, then it is capped to that value. Meaningful nodes are: integers; floating-point numbers; strings; characters; booleans; and constant constructors. Larger values of meaningful and total means that more nodes are taken into account to compute the final hash value, and therefore collisions are less likely to happen. However, hashing takes longer. The parameters meaningful and total govern the tradeoff between accuracy and speed. As default choices, hash and seeded_hash take meaningful = 10 and total = 100.

          val seeded_hash_param : int -> int -> int -> 'a -> int

          A variant of hash_param that is further parameterized by an integer seed. Usage: Hashtbl.seeded_hash_param meaningful total seed x.

          • since 4.00
          val create : ?random:bool -> int -> ('a, 'b) t

          Hashtbl.create n creates a new, empty hash table, with initial size n. For best results, n should be on the order of the expected number of elements that will be in the table. The table grows as needed, so n is just an initial guess.

          The optional ~random parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of Hashtbl.create or deterministic over all executions.

          A hash table that is created with ~random set to false uses a fixed hash function (hash) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other security-sensitive applications, the deterministic collision patterns can be exploited by a malicious user to create a denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down.

          A hash table that is created with ~random set to true uses the seeded hash function seeded_hash with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among 2^{30} different hash functions. All these hash functions have different collision patterns, rendering ineffective the denial-of-service attack described above. However, because of randomization, enumerating all elements of the hash table using fold or iter is no longer deterministic: elements are enumerated in different orders at different runs of the program.

          If no ~random parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling randomize or by setting the R flag in the OCAMLRUNPARAM environment variable.

          • before 4.00

            the ~random parameter was not present and all hash tables were created in non-randomized mode.

          • alert impure Hash tables are not permitted
          val clear : ('a, 'b) t -> unit

          Empty a hash table. Use reset instead of clear to shrink the size of the bucket table to its initial size.

          • alert impure Hash tables are not permitted
          val reset : ('a, 'b) t -> unit

          Empty a hash table and shrink the size of the bucket table to its initial size.

          • since 4.00
          • alert impure Hash tables are not permitted
          val copy : ('a, 'b) t -> ('a, 'b) t

          Return a copy of the given hashtable.

          • alert impure Hash tables are not permitted
          val add : ('a, 'b) t -> 'a -> 'b -> unit

          Hashtbl.add tbl key data adds a binding of key to data in table tbl.

          Warning: Previous bindings for key are not removed, but simply hidden. That is, after performing remove tbl key, the previous binding for key, if any, is restored. (Same behavior as with association lists.)

          If you desire the classic behavior of replacing elements, see replace.

          • alert impure Hash tables are not permitted
          val find : ('a, 'b) t -> 'a -> 'b

          Hashtbl.find tbl x returns the current binding of x in tbl, or raises Not_found if no such binding exists.

          • alert impure Hash tables are not permitted
          val find_opt : ('a, 'b) t -> 'a -> 'b option

          Hashtbl.find_opt tbl x returns the current binding of x in tbl, or None if no such binding exists.

          • since 4.05
          • alert impure Hash tables are not permitted
          val find_all : ('a, 'b) t -> 'a -> 'b list

          Hashtbl.find_all tbl x returns the list of all data associated with x in tbl. The current binding is returned first, then the previous bindings, in reverse order of introduction in the table.

          • alert impure Hash tables are not permitted
          val mem : ('a, 'b) t -> 'a -> bool

          Hashtbl.mem tbl x checks if x is bound in tbl.

          • alert impure Hash tables are not permitted
          val remove : ('a, 'b) t -> 'a -> unit

          Hashtbl.remove tbl x removes the current binding of x in tbl, restoring the previous binding if it exists. It does nothing if x is not bound in tbl.

          • alert impure Hash tables are not permitted
          val replace : ('a, 'b) t -> 'a -> 'b -> unit

          Hashtbl.replace tbl key data replaces the current binding of key in tbl by a binding of key to data. If key is unbound in tbl, a binding of key to data is added to tbl. This is functionally equivalent to remove tbl key followed by add tbl key data.

          • alert impure Hash tables are not permitted
          val iter : ('a -> 'b -> unit) -> ('a, 'b) t -> unit

          Hashtbl.iter f tbl applies f to all bindings in table tbl. f receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to f.

          The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

          If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

          The behavior is not specified if the hash table is modified by f during the iteration.

          • alert impure Hash tables are not permitted
          val filter_map_inplace : ('a -> 'b -> 'b option) -> ('a, 'b) t -> unit

          Hashtbl.filter_map_inplace f tbl applies f to all bindings in table tbl and update each binding depending on the result of f. If f returns None, the binding is discarded. If it returns Some new_val, the binding is update to associate the key to new_val.

          Other comments for iter apply as well.

          • since 4.03
          • alert impure Hash tables are not permitted
          val fold : ('a -> 'b -> 'acc -> 'acc) -> ('a, 'b) t -> 'acc -> 'acc

          Hashtbl.fold f tbl init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in tbl, and d1 ... dN are the associated values. Each binding is presented exactly once to f.

          The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

          If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

          The behavior is not specified if the hash table is modified by f during the iteration.

          • alert impure Hash tables are not permitted
          val length : ('a, 'b) t -> int

          Hashtbl.length tbl returns the number of bindings in tbl. It takes constant time. Multiple bindings are counted once each, so Hashtbl.length gives the number of times Hashtbl.iter calls its first argument.

          • alert impure Hash tables are not permitted
          val randomize : unit -> unit

          After a call to Hashtbl.randomize(), hash tables are created in randomized mode by default: create returns randomized hash tables, unless the ~random:false optional parameter is given. The same effect can be achieved by setting the R parameter in the OCAMLRUNPARAM environment variable.

          It is recommended that applications or Web frameworks that need to protect themselves against the denial-of-service attack described in create call Hashtbl.randomize() at initialization time before any domains are created.

          Note that once Hashtbl.randomize() was called, there is no way to revert to the non-randomized default behavior of create. This is intentional. Non-randomized hash tables can still be created using Hashtbl.create ~random:false.

          • since 4.00
          • alert impure Hash tables are not permitted
          val is_randomized : unit -> bool

          Return true if the tables are currently created in randomized mode by default, false otherwise.

          • since 4.03
          • alert impure Hash tables are not permitted
          val rebuild : ?random:bool -> ('a, 'b) t -> ('a, 'b) t

          Return a copy of the given hashtable. Unlike copy, rebuild h re-hashes all the (key, value) entries of the original table h. The returned hash table is randomized if h was randomized, or the optional random parameter is true, or if the default is to create randomized hash tables; see create for more information.

          rebuild can safely be used to import a hash table built by an old version of the Hashtbl module, then marshaled to persistent storage. After unmarshaling, apply rebuild to produce a hash table for the current version of the Hashtbl module.

          • since 4.12
          • alert impure Hash tables are not permitted
          val stats : ('a, 'b) t -> statistics

          Hashtbl.stats tbl returns statistics about the table tbl: number of buckets, size of the biggest bucket, distribution of buckets by size.

          • since 4.00
          • alert impure Hash tables are not permitted
          val to_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t

          Iterate on the whole table. The order in which the bindings appear in the sequence is unspecified. However, if the table contains several bindings for the same key, they appear in reversed order of introduction, that is, the most recent binding appears first.

          The behavior is not specified if the hash table is modified during the iteration.

          • since 4.07
          • alert impure Hash tables are not permitted
          val to_seq_keys : ('a, _) t -> 'a Stdlib.Seq.t

          Same as Seq.map fst (to_seq m)

          • since 4.07
          • alert impure Hash tables are not permitted
          val to_seq_values : (_, 'b) t -> 'b Stdlib.Seq.t

          Same as Seq.map snd (to_seq m)

          • since 4.07
          • alert impure Hash tables are not permitted
          val add_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t -> unit

          Add the given bindings to the table, using add

          • since 4.07
          • alert impure Hash tables are not permitted
          val replace_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t -> unit

          Add the given bindings to the table, using replace

          • since 4.07
          • alert impure Hash tables are not permitted
          val of_seq : ('a * 'b) Stdlib.Seq.t -> ('a, 'b) t

          Build a table from the given bindings. The bindings are added in the same order they appear in the sequence, using replace_seq, which means that if two pairs have the same key, only the latest one will appear in the table.

          • since 4.07
          • alert impure Hash tables are not permitted
          module type HashedType = sig ... end

          The input signature of the functor Make.

          module type S = sig ... end

          The output signature of the functor Make.

          module Make (H : HashedType) : S with type key = H.t

          Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

          module type SeededHashedType = sig ... end

          The input signature of the functor MakeSeeded.

          module type SeededS = sig ... end

          The output signature of the functor MakeSeeded.

          module MakeSeeded (H : SeededHashedType) : SeededS with type key = H.t

          Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/module-type-HashedType/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/module-type-HashedType/index.html index b153795..bdec07a 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/module-type-HashedType/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/module-type-HashedType/index.html @@ -1,2 +1,2 @@ -HashedType (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.HashedType)

          Module type Hashtbl.HashedType

          The input signature of the functor Make.

          • alert impure Hash tables are not permitted
          type t

          The type of the hashtable keys.

          val equal : t -> t -> bool

          The equality predicate used to compare keys.

          val hash : t -> int

          A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

          • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
          • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
          • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
          +HashedType (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.HashedType)

          Module type Hashtbl.HashedType

          The input signature of the functor Make.

          • alert impure Hash tables are not permitted
          type t

          The type of the hashtable keys.

          val equal : t -> t -> bool

          The equality predicate used to compare keys.

          val hash : t -> int

          A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

          • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
          • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
          • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/module-type-S/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/module-type-S/index.html index 401d57b..622032d 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/module-type-S/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/module-type-S/index.html @@ -1,2 +1,2 @@ -S (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.S)

          Module type Hashtbl.S

          The output signature of the functor Make.

          • alert impure Hash tables are not permitted
          type key
          type !'a t
          val create : int -> 'a t
          val clear : 'a t -> unit
          val reset : 'a t -> unit
          • since 4.00
          val copy : 'a t -> 'a t
          val add : 'a t -> key -> 'a -> unit
          val remove : 'a t -> key -> unit
          val find : 'a t -> key -> 'a
          val find_opt : 'a t -> key -> 'a option
          • since 4.05
          val find_all : 'a t -> key -> 'a list
          val replace : 'a t -> key -> 'a -> unit
          val mem : 'a t -> key -> bool
          val iter : (key -> 'a -> unit) -> 'a t -> unit
          val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
          • since 4.03
          val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
          val length : 'a t -> int
          val stats : 'a t -> statistics
          • since 4.00
          val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
          • since 4.07
          val to_seq_keys : _ t -> key Stdlib.Seq.t
          • since 4.07
          val to_seq_values : 'a t -> 'a Stdlib.Seq.t
          • since 4.07
          val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
          • since 4.07
          +S (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.S)

          Module type Hashtbl.S

          The output signature of the functor Make.

          • alert impure Hash tables are not permitted
          type key
          type !'a t
          val create : int -> 'a t
          val clear : 'a t -> unit
          val reset : 'a t -> unit
          • since 4.00
          val copy : 'a t -> 'a t
          val add : 'a t -> key -> 'a -> unit
          val remove : 'a t -> key -> unit
          val find : 'a t -> key -> 'a
          val find_opt : 'a t -> key -> 'a option
          • since 4.05
          val find_all : 'a t -> key -> 'a list
          val replace : 'a t -> key -> 'a -> unit
          val mem : 'a t -> key -> bool
          val iter : (key -> 'a -> unit) -> 'a t -> unit
          val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
          • since 4.03
          val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
          val length : 'a t -> int
          val stats : 'a t -> statistics
          • since 4.00
          val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
          • since 4.07
          val to_seq_keys : _ t -> key Stdlib.Seq.t
          • since 4.07
          val to_seq_values : 'a t -> 'a Stdlib.Seq.t
          • since 4.07
          val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
          • since 4.07
          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/module-type-SeededHashedType/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/module-type-SeededHashedType/index.html index f18a2d5..58be2ab 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/module-type-SeededHashedType/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/module-type-SeededHashedType/index.html @@ -1,2 +1,2 @@ -SeededHashedType (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.SeededHashedType)

          Module type Hashtbl.SeededHashedType

          The input signature of the functor MakeSeeded.

          • since 4.00
          • alert impure Hash tables are not permitted
          type t

          The type of the hashtable keys.

          val equal : t -> t -> bool

          The equality predicate used to compare keys.

          val seeded_hash : int -> t -> int

          A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

          +SeededHashedType (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.SeededHashedType)

          Module type Hashtbl.SeededHashedType

          The input signature of the functor MakeSeeded.

          • since 4.00
          • alert impure Hash tables are not permitted
          type t

          The type of the hashtable keys.

          val equal : t -> t -> bool

          The equality predicate used to compare keys.

          val seeded_hash : int -> t -> int

          A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/module-type-SeededS/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/module-type-SeededS/index.html index 1c3216d..5ddb088 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/module-type-SeededS/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Hashtbl/module-type-SeededS/index.html @@ -1,2 +1,2 @@ -SeededS (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.SeededS)

          Module type Hashtbl.SeededS

          The output signature of the functor MakeSeeded.

          • since 4.00
          • alert impure Hash tables are not permitted
          type key
          type !'a t
          val create : ?random:bool -> int -> 'a t
          val clear : 'a t -> unit
          val reset : 'a t -> unit
          val copy : 'a t -> 'a t
          val add : 'a t -> key -> 'a -> unit
          val remove : 'a t -> key -> unit
          val find : 'a t -> key -> 'a
          val find_opt : 'a t -> key -> 'a option
          • since 4.05
          val find_all : 'a t -> key -> 'a list
          val replace : 'a t -> key -> 'a -> unit
          val mem : 'a t -> key -> bool
          val iter : (key -> 'a -> unit) -> 'a t -> unit
          val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
          • since 4.03
          val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
          val length : 'a t -> int
          val stats : 'a t -> statistics
          val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
          • since 4.07
          val to_seq_keys : _ t -> key Stdlib.Seq.t
          • since 4.07
          val to_seq_values : 'a t -> 'a Stdlib.Seq.t
          • since 4.07
          val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
          • since 4.07
          +SeededS (less-power.Stdlib_alerts.Stdlib_alerting.Hashtbl.SeededS)

          Module type Hashtbl.SeededS

          The output signature of the functor MakeSeeded.

          • since 4.00
          • alert impure Hash tables are not permitted
          type key
          type !'a t
          val create : ?random:bool -> int -> 'a t
          val clear : 'a t -> unit
          val reset : 'a t -> unit
          val copy : 'a t -> 'a t
          val add : 'a t -> key -> 'a -> unit
          val remove : 'a t -> key -> unit
          val find : 'a t -> key -> 'a
          val find_opt : 'a t -> key -> 'a option
          • since 4.05
          val find_all : 'a t -> key -> 'a list
          val replace : 'a t -> key -> 'a -> unit
          val mem : 'a t -> key -> bool
          val iter : (key -> 'a -> unit) -> 'a t -> unit
          val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
          • since 4.03
          val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
          val length : 'a t -> int
          val stats : 'a t -> statistics
          val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
          • since 4.07
          val to_seq_keys : _ t -> key Stdlib.Seq.t
          • since 4.07
          val to_seq_values : 'a t -> 'a Stdlib.Seq.t
          • since 4.07
          val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
          • since 4.07
          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/LargeFile/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/LargeFile/index.html index 3b539c1..150d3db 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/LargeFile/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/LargeFile/index.html @@ -1,2 +1,2 @@ -LargeFile (less-power.Stdlib_alerts.Stdlib_alerting.LargeFile)

          Module Stdlib_alerting.LargeFile

          Operations on large files. This sub-module provides 64-bit variants of the channel functions that manipulate file positions and file sizes. By representing positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), these alternate functions allow operating on files whose sizes are greater than max_int.

          • alert input_output Input/output is not permitted
          val seek_out : out_channel -> int64 -> unit
          val pos_out : out_channel -> int64
          val out_channel_length : out_channel -> int64
          val seek_in : in_channel -> int64 -> unit
          val pos_in : in_channel -> int64
          val in_channel_length : in_channel -> int64
          +LargeFile (less-power.Stdlib_alerts.Stdlib_alerting.LargeFile)

          Module Stdlib_alerting.LargeFile

          Operations on large files. This sub-module provides 64-bit variants of the channel functions that manipulate file positions and file sizes. By representing positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), these alternate functions allow operating on files whose sizes are greater than max_int.

          • alert input_output Input/output is not permitted
          val seek_out : out_channel -> int64 -> unit
          val pos_out : out_channel -> int64
          val out_channel_length : out_channel -> int64
          val seek_in : in_channel -> int64 -> unit
          val pos_in : in_channel -> int64
          val in_channel_length : in_channel -> int64
          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/List/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/List/index.html index 4b92a83..4f790f7 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/List/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/List/index.html @@ -1,5 +1,5 @@ -List (less-power.Stdlib_alerts.Stdlib_alerting.List)

          Module Stdlib_alerting.List

          • alert list_op List operations are not permitted
          include sig ... end
          type 'a t = 'a list =
          1. | []
          2. | :: of 'a * 'a list

          An alias for the type of lists.

          val length : 'a list -> int

          Return the length (number of elements) of the given list.

          val compare_lengths : 'a list -> 'b list -> int

          Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

          • since 4.05
          val compare_length_with : 'a list -> int -> int

          Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

          • since 4.05
          val is_empty : 'a list -> bool

          is_empty l is true if and only if l has no elements. It is equivalent to compare_length_with l 0 = 0.

          • since 5.1
          val cons : 'a -> 'a list -> 'a list

          cons x xs is x :: xs

          • since 4.03 (4.05 in ListLabels)
          val hd : 'a list -> 'a

          Return the first element of the given list.

          • raises Failure

            if the list is empty.

          val tl : 'a list -> 'a list

          Return the given list without its first element.

          • raises Failure

            if the list is empty.

          val nth : 'a list -> int -> 'a

          Return the n-th element of the given list. The first element (head of the list) is at position 0.

          • raises Failure

            if the list is too short.

          val nth_opt : 'a list -> int -> 'a option

          Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

          • since 4.05
          val rev : 'a list -> 'a list

          List reversal.

          val init : int -> (int -> 'a) -> 'a list

          init len f is [f 0; f 1; ...; f (len-1)], evaluated left to right.

          • since 4.06
          val append : 'a list -> 'a list -> 'a list

          append l0 l1 appends l1 to l0. Same function as the infix operator @.

          • since 5.1 this function is tail-recursive.
          val rev_append : 'a list -> 'a list -> 'a list

          rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

          val concat : 'a list list -> 'a list

          Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).

          val flatten : 'a list list -> 'a list

          Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

          val equal : ('a -> 'a -> bool) -> 'a list -> 'a list -> bool

          equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

          Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

          • since 4.12
          val compare : ('a -> 'a -> int) -> 'a list -> 'a list -> int

          compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

          • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
          • the empty list [] is strictly smaller than non-empty lists

          Note: the cmp function will be called even if the lists have different lengths.

          • since 4.12
          val iter : ('a -> unit) -> 'a list -> unit

          iter f [a1; ...; an] applies function f in turn to [a1; ...; an]. It is equivalent to f a1; f a2; ...; f an.

          val iteri : (int -> 'a -> unit) -> 'a list -> unit

          Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

          • since 4.00
          val map : ('a -> 'b) -> 'a list -> 'b list

          map f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1; ...; f an] with the results returned by f.

          val mapi : (int -> 'a -> 'b) -> 'a list -> 'b list

          Same as map, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

          • since 4.00
          val rev_map : ('a -> 'b) -> 'a list -> 'b list

          rev_map f l gives the same result as rev (map f l), but is more efficient.

          val filter_map : ('a -> 'b option) -> 'a list -> 'b list

          filter_map f l applies f to every element of l, filters out the None elements and returns the list of the arguments of the Some elements.

          • since 4.08
          val concat_map : ('a -> 'b list) -> 'a list -> 'b list

          concat_map f l gives the same result as concat (map f l). Tail-recursive.

          • since 4.10
          val fold_left_map : +List (less-power.Stdlib_alerts.Stdlib_alerting.List)

          Module Stdlib_alerting.List

          • alert list_op List operations are not permitted
          include sig ... end
          type 'a t = 'a list =
          1. | []
          2. | :: of 'a * 'a list

          An alias for the type of lists.

          val length : 'a list -> int

          Return the length (number of elements) of the given list.

          val compare_lengths : 'a list -> 'b list -> int

          Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

          • since 4.05
          val compare_length_with : 'a list -> int -> int

          Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

          • since 4.05
          val is_empty : 'a list -> bool

          is_empty l is true if and only if l has no elements. It is equivalent to compare_length_with l 0 = 0.

          • since 5.1
          val cons : 'a -> 'a list -> 'a list

          cons x xs is x :: xs

          • since 4.03 (4.05 in ListLabels)
          val hd : 'a list -> 'a

          Return the first element of the given list.

          • raises Failure

            if the list is empty.

          val tl : 'a list -> 'a list

          Return the given list without its first element.

          • raises Failure

            if the list is empty.

          val nth : 'a list -> int -> 'a

          Return the n-th element of the given list. The first element (head of the list) is at position 0.

          • raises Failure

            if the list is too short.

          val nth_opt : 'a list -> int -> 'a option

          Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

          • since 4.05
          val rev : 'a list -> 'a list

          List reversal.

          val init : int -> (int -> 'a) -> 'a list

          init len f is [f 0; f 1; ...; f (len-1)], evaluated left to right.

          • since 4.06
          val append : 'a list -> 'a list -> 'a list

          append l0 l1 appends l1 to l0. Same function as the infix operator @.

          • since 5.1 this function is tail-recursive.
          val rev_append : 'a list -> 'a list -> 'a list

          rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

          val concat : 'a list list -> 'a list

          Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).

          val flatten : 'a list list -> 'a list

          Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

          val equal : ('a -> 'a -> bool) -> 'a list -> 'a list -> bool

          equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

          Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

          • since 4.12
          val compare : ('a -> 'a -> int) -> 'a list -> 'a list -> int

          compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

          • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
          • the empty list [] is strictly smaller than non-empty lists

          Note: the cmp function will be called even if the lists have different lengths.

          • since 4.12
          val iter : ('a -> unit) -> 'a list -> unit

          iter f [a1; ...; an] applies function f in turn to [a1; ...; an]. It is equivalent to f a1; f a2; ...; f an.

          val iteri : (int -> 'a -> unit) -> 'a list -> unit

          Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

          • since 4.00
          val map : ('a -> 'b) -> 'a list -> 'b list

          map f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1; ...; f an] with the results returned by f.

          val mapi : (int -> 'a -> 'b) -> 'a list -> 'b list

          Same as map, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

          • since 4.00
          val rev_map : ('a -> 'b) -> 'a list -> 'b list

          rev_map f l gives the same result as rev (map f l), but is more efficient.

          val filter_map : ('a -> 'b option) -> 'a list -> 'b list

          filter_map f l applies f to every element of l, filters out the None elements and returns the list of the arguments of the Some elements.

          • since 4.08
          val concat_map : ('a -> 'b list) -> 'a list -> 'b list

          concat_map f l gives the same result as concat (map f l). Tail-recursive.

          • since 4.10
          val fold_left_map : ('acc -> 'a -> 'acc * 'b) -> 'acc -> 'a list -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/ListLabels/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/ListLabels/index.html index 0ea1217..0c6f0fd 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/ListLabels/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/ListLabels/index.html @@ -1,5 +1,5 @@ -ListLabels (less-power.Stdlib_alerts.Stdlib_alerting.ListLabels)

          Module Stdlib_alerting.ListLabels

          • alert list_op List operations are not permitted
          include sig ... end
          type 'a t = 'a list =
          1. | []
          2. | :: of 'a * 'a list

          An alias for the type of lists.

          val length : 'a list -> int

          Return the length (number of elements) of the given list.

          val compare_lengths : 'a list -> 'b list -> int

          Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

          • since 4.05
          val compare_length_with : 'a list -> len:int -> int

          Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

          • since 4.05
          val is_empty : 'a list -> bool

          is_empty l is true if and only if l has no elements. It is equivalent to compare_length_with l 0 = 0.

          • since 5.1
          val cons : 'a -> 'a list -> 'a list

          cons x xs is x :: xs

          • since 4.03 (4.05 in ListLabels)
          val hd : 'a list -> 'a

          Return the first element of the given list.

          • raises Failure

            if the list is empty.

          val tl : 'a list -> 'a list

          Return the given list without its first element.

          • raises Failure

            if the list is empty.

          val nth : 'a list -> int -> 'a

          Return the n-th element of the given list. The first element (head of the list) is at position 0.

          • raises Failure

            if the list is too short.

          val nth_opt : 'a list -> int -> 'a option

          Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

          • since 4.05
          val rev : 'a list -> 'a list

          List reversal.

          val init : len:int -> f:(int -> 'a) -> 'a list

          init ~len ~f is [f 0; f 1; ...; f (len-1)], evaluated left to right.

          • since 4.06
          val append : 'a list -> 'a list -> 'a list

          append l0 l1 appends l1 to l0. Same function as the infix operator @.

          • since 5.1 this function is tail-recursive.
          val rev_append : 'a list -> 'a list -> 'a list

          rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

          val concat : 'a list list -> 'a list

          Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).

          val flatten : 'a list list -> 'a list

          Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

          val equal : eq:('a -> 'a -> bool) -> 'a list -> 'a list -> bool

          equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

          Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

          • since 4.12
          val compare : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> int

          compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

          • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
          • the empty list [] is strictly smaller than non-empty lists

          Note: the cmp function will be called even if the lists have different lengths.

          • since 4.12
          val iter : f:('a -> unit) -> 'a list -> unit

          iter ~f [a1; ...; an] applies function f in turn to [a1; ...; an]. It is equivalent to f a1; f a2; ...; f an.

          val iteri : f:(int -> 'a -> unit) -> 'a list -> unit

          Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

          • since 4.00
          val map : f:('a -> 'b) -> 'a list -> 'b list

          map ~f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1; ...; f an] with the results returned by f.

          val mapi : f:(int -> 'a -> 'b) -> 'a list -> 'b list

          Same as map, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

          • since 4.00
          val rev_map : f:('a -> 'b) -> 'a list -> 'b list

          rev_map ~f l gives the same result as rev (map f l), but is more efficient.

          val filter_map : f:('a -> 'b option) -> 'a list -> 'b list

          filter_map ~f l applies f to every element of l, filters out the None elements and returns the list of the arguments of the Some elements.

          • since 4.08
          val concat_map : f:('a -> 'b list) -> 'a list -> 'b list

          concat_map ~f l gives the same result as concat (map f l). Tail-recursive.

          • since 4.10
          val fold_left_map : +ListLabels (less-power.Stdlib_alerts.Stdlib_alerting.ListLabels)

          Module Stdlib_alerting.ListLabels

          • alert list_op List operations are not permitted
          include sig ... end
          type 'a t = 'a list =
          1. | []
          2. | :: of 'a * 'a list

          An alias for the type of lists.

          val length : 'a list -> int

          Return the length (number of elements) of the given list.

          val compare_lengths : 'a list -> 'b list -> int

          Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

          • since 4.05
          val compare_length_with : 'a list -> len:int -> int

          Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

          • since 4.05
          val is_empty : 'a list -> bool

          is_empty l is true if and only if l has no elements. It is equivalent to compare_length_with l 0 = 0.

          • since 5.1
          val cons : 'a -> 'a list -> 'a list

          cons x xs is x :: xs

          • since 4.03 (4.05 in ListLabels)
          val hd : 'a list -> 'a

          Return the first element of the given list.

          • raises Failure

            if the list is empty.

          val tl : 'a list -> 'a list

          Return the given list without its first element.

          • raises Failure

            if the list is empty.

          val nth : 'a list -> int -> 'a

          Return the n-th element of the given list. The first element (head of the list) is at position 0.

          • raises Failure

            if the list is too short.

          val nth_opt : 'a list -> int -> 'a option

          Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

          • since 4.05
          val rev : 'a list -> 'a list

          List reversal.

          val init : len:int -> f:(int -> 'a) -> 'a list

          init ~len ~f is [f 0; f 1; ...; f (len-1)], evaluated left to right.

          • since 4.06
          val append : 'a list -> 'a list -> 'a list

          append l0 l1 appends l1 to l0. Same function as the infix operator @.

          • since 5.1 this function is tail-recursive.
          val rev_append : 'a list -> 'a list -> 'a list

          rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

          val concat : 'a list list -> 'a list

          Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).

          val flatten : 'a list list -> 'a list

          Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

          val equal : eq:('a -> 'a -> bool) -> 'a list -> 'a list -> bool

          equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

          Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

          • since 4.12
          val compare : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> int

          compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

          • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
          • the empty list [] is strictly smaller than non-empty lists

          Note: the cmp function will be called even if the lists have different lengths.

          • since 4.12
          val iter : f:('a -> unit) -> 'a list -> unit

          iter ~f [a1; ...; an] applies function f in turn to [a1; ...; an]. It is equivalent to f a1; f a2; ...; f an.

          val iteri : f:(int -> 'a -> unit) -> 'a list -> unit

          Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

          • since 4.00
          val map : f:('a -> 'b) -> 'a list -> 'b list

          map ~f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1; ...; f an] with the results returned by f.

          val mapi : f:(int -> 'a -> 'b) -> 'a list -> 'b list

          Same as map, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

          • since 4.00
          val rev_map : f:('a -> 'b) -> 'a list -> 'b list

          rev_map ~f l gives the same result as rev (map f l), but is more efficient.

          val filter_map : f:('a -> 'b option) -> 'a list -> 'b list

          filter_map ~f l applies f to every element of l, filters out the None elements and returns the list of the arguments of the Some elements.

          • since 4.08
          val concat_map : f:('a -> 'b list) -> 'a list -> 'b list

          concat_map ~f l gives the same result as concat (map f l). Tail-recursive.

          • since 4.10
          val fold_left_map : f:('acc -> 'a -> 'acc * 'b) -> init:'acc -> 'a list -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/Make/argument-1-H/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/Make/argument-1-H/index.html index e7c83d9..82d5da3 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/Make/argument-1-H/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/Make/argument-1-H/index.html @@ -1,2 +1,2 @@ -H (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.Make.H)

          Parameter Make.H

          type t

          The type of the hashtable keys.

          val equal : t -> t -> bool

          The equality predicate used to compare keys.

          val hash : t -> int

          A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

          • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
          • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
          • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
          +H (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.Make.H)

          Parameter Make.H

          type t

          The type of the hashtable keys.

          val equal : t -> t -> bool

          The equality predicate used to compare keys.

          val hash : t -> int

          A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

          • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
          • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
          • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/Make/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/Make/index.html index 21ed009..d6ddd45 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/Make/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/Make/index.html @@ -1,2 +1,2 @@ -Make (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.Make)

          Module Hashtbl.Make

          Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

          Parameters

          module H : HashedType

          Signature

          type key = H.t
          type 'a t = 'a Stdlib.Hashtbl.Make(H).t
          val create : int -> 'a t
          val clear : 'a t -> unit
          val reset : 'a t -> unit
          • since 4.00
          val copy : 'a t -> 'a t
          val add : 'a t -> key:key -> data:'a -> unit
          val remove : 'a t -> key -> unit
          val find : 'a t -> key -> 'a
          val find_opt : 'a t -> key -> 'a option
          • since 4.05
          val find_all : 'a t -> key -> 'a list
          val replace : 'a t -> key:key -> data:'a -> unit
          val mem : 'a t -> key -> bool
          val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
          val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
          • since 4.03
          val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
          val length : 'a t -> int
          val stats : 'a t -> statistics
          • since 4.00
          val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
          • since 4.07
          val to_seq_keys : _ t -> key Stdlib.Seq.t
          • since 4.07
          val to_seq_values : 'a t -> 'a Stdlib.Seq.t
          • since 4.07
          val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
          • since 4.07
          +Make (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.Make)

          Module Hashtbl.Make

          Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

          Parameters

          module H : HashedType

          Signature

          type key = H.t
          type 'a t = 'a Stdlib.Hashtbl.Make(H).t
          val create : int -> 'a t
          val clear : 'a t -> unit
          val reset : 'a t -> unit
          • since 4.00
          val copy : 'a t -> 'a t
          val add : 'a t -> key:key -> data:'a -> unit
          val remove : 'a t -> key -> unit
          val find : 'a t -> key -> 'a
          val find_opt : 'a t -> key -> 'a option
          • since 4.05
          val find_all : 'a t -> key -> 'a list
          val replace : 'a t -> key:key -> data:'a -> unit
          val mem : 'a t -> key -> bool
          val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
          val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
          • since 4.03
          val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
          val length : 'a t -> int
          val stats : 'a t -> statistics
          • since 4.00
          val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
          • since 4.07
          val to_seq_keys : _ t -> key Stdlib.Seq.t
          • since 4.07
          val to_seq_values : 'a t -> 'a Stdlib.Seq.t
          • since 4.07
          val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
          • since 4.07
          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/MakeSeeded/argument-1-H/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/MakeSeeded/argument-1-H/index.html index 879cafe..1545802 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/MakeSeeded/argument-1-H/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/MakeSeeded/argument-1-H/index.html @@ -1,2 +1,2 @@ -H (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.MakeSeeded.H)

          Parameter MakeSeeded.H

          type t

          The type of the hashtable keys.

          val equal : t -> t -> bool

          The equality predicate used to compare keys.

          val seeded_hash : int -> t -> int

          A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

          +H (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.MakeSeeded.H)

          Parameter MakeSeeded.H

          type t

          The type of the hashtable keys.

          val equal : t -> t -> bool

          The equality predicate used to compare keys.

          val seeded_hash : int -> t -> int

          A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/MakeSeeded/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/MakeSeeded/index.html index 26c16ff..10dc303 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/MakeSeeded/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/MakeSeeded/index.html @@ -1,2 +1,2 @@ -MakeSeeded (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.MakeSeeded)

          Module Hashtbl.MakeSeeded

          Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

          • since 4.00

          Parameters

          Signature

          type key = H.t
          type 'a t = 'a Stdlib.Hashtbl.MakeSeeded(H).t
          val create : ?random:bool -> int -> 'a t
          val clear : 'a t -> unit
          val reset : 'a t -> unit
          val copy : 'a t -> 'a t
          val add : 'a t -> key:key -> data:'a -> unit
          val remove : 'a t -> key -> unit
          val find : 'a t -> key -> 'a
          val find_opt : 'a t -> key -> 'a option
          • since 4.05
          val find_all : 'a t -> key -> 'a list
          val replace : 'a t -> key:key -> data:'a -> unit
          val mem : 'a t -> key -> bool
          val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
          val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
          • since 4.03
          val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
          val length : 'a t -> int
          val stats : 'a t -> statistics
          val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
          • since 4.07
          val to_seq_keys : _ t -> key Stdlib.Seq.t
          • since 4.07
          val to_seq_values : 'a t -> 'a Stdlib.Seq.t
          • since 4.07
          val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
          • since 4.07
          +MakeSeeded (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.MakeSeeded)

          Module Hashtbl.MakeSeeded

          Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

          • since 4.00

          Parameters

          Signature

          type key = H.t
          type 'a t = 'a Stdlib.Hashtbl.MakeSeeded(H).t
          val create : ?random:bool -> int -> 'a t
          val clear : 'a t -> unit
          val reset : 'a t -> unit
          val copy : 'a t -> 'a t
          val add : 'a t -> key:key -> data:'a -> unit
          val remove : 'a t -> key -> unit
          val find : 'a t -> key -> 'a
          val find_opt : 'a t -> key -> 'a option
          • since 4.05
          val find_all : 'a t -> key -> 'a list
          val replace : 'a t -> key:key -> data:'a -> unit
          val mem : 'a t -> key -> bool
          val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
          val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
          • since 4.03
          val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
          val length : 'a t -> int
          val stats : 'a t -> statistics
          val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
          • since 4.07
          val to_seq_keys : _ t -> key Stdlib.Seq.t
          • since 4.07
          val to_seq_values : 'a t -> 'a Stdlib.Seq.t
          • since 4.07
          val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
          • since 4.07
          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/index.html index 6c56589..bbc22b0 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/index.html @@ -1,5 +1,5 @@ -Hashtbl (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl)

          Module MoreLabels.Hashtbl

          • alert impure Hash tables are not permitted

          Hash tables and hash functions.

          Hash tables are hashed association tables, with in-place modification. Because most operations on a hash table modify their input, they're more commonly used in imperative code. The lookup of the value associated with a key (see find, find_opt) is normally very fast, often faster than the equivalent lookup in Map.

          The functors Make and MakeSeeded can be used when performance or flexibility are key. The user provides custom equality and hash functions for the key type, and obtains a custom hash table type for this particular type of key.

          Warning a hash table is only as good as the hash function. A bad hash function will turn the table into a degenerate association list, with linear time lookup instead of constant time lookup.

          The polymorphic t hash table is useful in simpler cases or in interactive environments. It uses the polymorphic hash function defined in the OCaml runtime (at the time of writing, it's SipHash), as well as the polymorphic equality (=).

          See the examples section.

          Unsynchronized accesses

          Unsynchronized accesses to a hash table may lead to an invalid hash table state. Thus, concurrent accesses to a hash tables must be synchronized (for instance with a Mutex.t).

          Generic interface

          type (!'a, !'b) t = ('a, 'b) Stdlib.Hashtbl.t

          The type of hash tables from type 'a to type 'b.

          val create : ?random:bool -> int -> ('a, 'b) t

          Hashtbl.create n creates a new, empty hash table, with initial size n. For best results, n should be on the order of the expected number of elements that will be in the table. The table grows as needed, so n is just an initial guess.

          The optional ~random parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of Hashtbl.create or deterministic over all executions.

          A hash table that is created with ~random set to false uses a fixed hash function (hash) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other security-sensitive applications, the deterministic collision patterns can be exploited by a malicious user to create a denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down.

          A hash table that is created with ~random set to true uses the seeded hash function seeded_hash with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among 2^{30} different hash functions. All these hash functions have different collision patterns, rendering ineffective the denial-of-service attack described above. However, because of randomization, enumerating all elements of the hash table using fold or iter is no longer deterministic: elements are enumerated in different orders at different runs of the program.

          If no ~random parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling randomize or by setting the R flag in the OCAMLRUNPARAM environment variable.

          • before 4.00

            the ~random parameter was not present and all hash tables were created in non-randomized mode.

          val clear : ('a, 'b) t -> unit

          Empty a hash table. Use reset instead of clear to shrink the size of the bucket table to its initial size.

          val reset : ('a, 'b) t -> unit

          Empty a hash table and shrink the size of the bucket table to its initial size.

          • since 4.00
          val copy : ('a, 'b) t -> ('a, 'b) t

          Return a copy of the given hashtable.

          val add : ('a, 'b) t -> key:'a -> data:'b -> unit

          Hashtbl.add tbl ~key ~data adds a binding of key to data in table tbl.

          Warning: Previous bindings for key are not removed, but simply hidden. That is, after performing remove tbl key, the previous binding for key, if any, is restored. (Same behavior as with association lists.)

          If you desire the classic behavior of replacing elements, see replace.

          val find : ('a, 'b) t -> 'a -> 'b

          Hashtbl.find tbl x returns the current binding of x in tbl, or raises Not_found if no such binding exists.

          val find_opt : ('a, 'b) t -> 'a -> 'b option

          Hashtbl.find_opt tbl x returns the current binding of x in tbl, or None if no such binding exists.

          • since 4.05
          val find_all : ('a, 'b) t -> 'a -> 'b list

          Hashtbl.find_all tbl x returns the list of all data associated with x in tbl. The current binding is returned first, then the previous bindings, in reverse order of introduction in the table.

          val mem : ('a, 'b) t -> 'a -> bool

          Hashtbl.mem tbl x checks if x is bound in tbl.

          val remove : ('a, 'b) t -> 'a -> unit

          Hashtbl.remove tbl x removes the current binding of x in tbl, restoring the previous binding if it exists. It does nothing if x is not bound in tbl.

          val replace : ('a, 'b) t -> key:'a -> data:'b -> unit

          Hashtbl.replace tbl ~key ~data replaces the current binding of key in tbl by a binding of key to data. If key is unbound in tbl, a binding of key to data is added to tbl. This is functionally equivalent to remove tbl key followed by add tbl key data.

          val iter : f:(key:'a -> data:'b -> unit) -> ('a, 'b) t -> unit

          Hashtbl.iter ~f tbl applies f to all bindings in table tbl. f receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to f.

          The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

          If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

          The behavior is not specified if the hash table is modified by f during the iteration.

          val filter_map_inplace : +Hashtbl (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl)

          Module MoreLabels.Hashtbl

          • alert impure Hash tables are not permitted

          Hash tables and hash functions.

          Hash tables are hashed association tables, with in-place modification. Because most operations on a hash table modify their input, they're more commonly used in imperative code. The lookup of the value associated with a key (see find, find_opt) is normally very fast, often faster than the equivalent lookup in Map.

          The functors Make and MakeSeeded can be used when performance or flexibility are key. The user provides custom equality and hash functions for the key type, and obtains a custom hash table type for this particular type of key.

          Warning a hash table is only as good as the hash function. A bad hash function will turn the table into a degenerate association list, with linear time lookup instead of constant time lookup.

          The polymorphic t hash table is useful in simpler cases or in interactive environments. It uses the polymorphic hash function defined in the OCaml runtime (at the time of writing, it's SipHash), as well as the polymorphic equality (=).

          See the examples section.

          Unsynchronized accesses

          Unsynchronized accesses to a hash table may lead to an invalid hash table state. Thus, concurrent accesses to a hash tables must be synchronized (for instance with a Mutex.t).

          Generic interface

          type (!'a, !'b) t = ('a, 'b) Stdlib.Hashtbl.t

          The type of hash tables from type 'a to type 'b.

          val create : ?random:bool -> int -> ('a, 'b) t

          Hashtbl.create n creates a new, empty hash table, with initial size n. For best results, n should be on the order of the expected number of elements that will be in the table. The table grows as needed, so n is just an initial guess.

          The optional ~random parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of Hashtbl.create or deterministic over all executions.

          A hash table that is created with ~random set to false uses a fixed hash function (hash) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other security-sensitive applications, the deterministic collision patterns can be exploited by a malicious user to create a denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down.

          A hash table that is created with ~random set to true uses the seeded hash function seeded_hash with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among 2^{30} different hash functions. All these hash functions have different collision patterns, rendering ineffective the denial-of-service attack described above. However, because of randomization, enumerating all elements of the hash table using fold or iter is no longer deterministic: elements are enumerated in different orders at different runs of the program.

          If no ~random parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling randomize or by setting the R flag in the OCAMLRUNPARAM environment variable.

          • before 4.00

            the ~random parameter was not present and all hash tables were created in non-randomized mode.

          val clear : ('a, 'b) t -> unit

          Empty a hash table. Use reset instead of clear to shrink the size of the bucket table to its initial size.

          val reset : ('a, 'b) t -> unit

          Empty a hash table and shrink the size of the bucket table to its initial size.

          • since 4.00
          val copy : ('a, 'b) t -> ('a, 'b) t

          Return a copy of the given hashtable.

          val add : ('a, 'b) t -> key:'a -> data:'b -> unit

          Hashtbl.add tbl ~key ~data adds a binding of key to data in table tbl.

          Warning: Previous bindings for key are not removed, but simply hidden. That is, after performing remove tbl key, the previous binding for key, if any, is restored. (Same behavior as with association lists.)

          If you desire the classic behavior of replacing elements, see replace.

          val find : ('a, 'b) t -> 'a -> 'b

          Hashtbl.find tbl x returns the current binding of x in tbl, or raises Not_found if no such binding exists.

          val find_opt : ('a, 'b) t -> 'a -> 'b option

          Hashtbl.find_opt tbl x returns the current binding of x in tbl, or None if no such binding exists.

          • since 4.05
          val find_all : ('a, 'b) t -> 'a -> 'b list

          Hashtbl.find_all tbl x returns the list of all data associated with x in tbl. The current binding is returned first, then the previous bindings, in reverse order of introduction in the table.

          val mem : ('a, 'b) t -> 'a -> bool

          Hashtbl.mem tbl x checks if x is bound in tbl.

          val remove : ('a, 'b) t -> 'a -> unit

          Hashtbl.remove tbl x removes the current binding of x in tbl, restoring the previous binding if it exists. It does nothing if x is not bound in tbl.

          val replace : ('a, 'b) t -> key:'a -> data:'b -> unit

          Hashtbl.replace tbl ~key ~data replaces the current binding of key in tbl by a binding of key to data. If key is unbound in tbl, a binding of key to data is added to tbl. This is functionally equivalent to remove tbl key followed by add tbl key data.

          val iter : f:(key:'a -> data:'b -> unit) -> ('a, 'b) t -> unit

          Hashtbl.iter ~f tbl applies f to all bindings in table tbl. f receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to f.

          The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

          If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

          The behavior is not specified if the hash table is modified by f during the iteration.

          val filter_map_inplace : f:(key:'a -> data:'b -> 'b option) -> ('a, 'b) t -> unit

          Hashtbl.filter_map_inplace ~f tbl applies f to all bindings in table tbl and update each binding depending on the result of f. If f returns None, the binding is discarded. If it returns Some new_val, the binding is update to associate the key to new_val.

          Other comments for iter apply as well.

          • since 4.03
          val fold : diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/module-type-HashedType/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/module-type-HashedType/index.html index ff24538..95e9c64 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/module-type-HashedType/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/module-type-HashedType/index.html @@ -1,2 +1,2 @@ -HashedType (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.HashedType)

          Module type Hashtbl.HashedType

          The input signature of the functor Make.

          type t

          The type of the hashtable keys.

          val equal : t -> t -> bool

          The equality predicate used to compare keys.

          val hash : t -> int

          A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

          • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
          • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
          • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
          +HashedType (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.HashedType)

          Module type Hashtbl.HashedType

          The input signature of the functor Make.

          type t

          The type of the hashtable keys.

          val equal : t -> t -> bool

          The equality predicate used to compare keys.

          val hash : t -> int

          A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

          • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
          • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
          • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/module-type-S/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/module-type-S/index.html index d3fdb53..04bd6e0 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/module-type-S/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/module-type-S/index.html @@ -1,2 +1,2 @@ -S (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.S)

          Module type Hashtbl.S

          The output signature of the functor Make.

          type key
          type !'a t
          val create : int -> 'a t
          val clear : 'a t -> unit
          val reset : 'a t -> unit
          • since 4.00
          val copy : 'a t -> 'a t
          val add : 'a t -> key:key -> data:'a -> unit
          val remove : 'a t -> key -> unit
          val find : 'a t -> key -> 'a
          val find_opt : 'a t -> key -> 'a option
          • since 4.05
          val find_all : 'a t -> key -> 'a list
          val replace : 'a t -> key:key -> data:'a -> unit
          val mem : 'a t -> key -> bool
          val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
          val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
          • since 4.03
          val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
          val length : 'a t -> int
          val stats : 'a t -> statistics
          • since 4.00
          val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
          • since 4.07
          val to_seq_keys : _ t -> key Stdlib.Seq.t
          • since 4.07
          val to_seq_values : 'a t -> 'a Stdlib.Seq.t
          • since 4.07
          val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
          • since 4.07
          +S (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.S)

          Module type Hashtbl.S

          The output signature of the functor Make.

          type key
          type !'a t
          val create : int -> 'a t
          val clear : 'a t -> unit
          val reset : 'a t -> unit
          • since 4.00
          val copy : 'a t -> 'a t
          val add : 'a t -> key:key -> data:'a -> unit
          val remove : 'a t -> key -> unit
          val find : 'a t -> key -> 'a
          val find_opt : 'a t -> key -> 'a option
          • since 4.05
          val find_all : 'a t -> key -> 'a list
          val replace : 'a t -> key:key -> data:'a -> unit
          val mem : 'a t -> key -> bool
          val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
          val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
          • since 4.03
          val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
          val length : 'a t -> int
          val stats : 'a t -> statistics
          • since 4.00
          val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
          • since 4.07
          val to_seq_keys : _ t -> key Stdlib.Seq.t
          • since 4.07
          val to_seq_values : 'a t -> 'a Stdlib.Seq.t
          • since 4.07
          val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
          • since 4.07
          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/module-type-SeededHashedType/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/module-type-SeededHashedType/index.html index 7f19e3a..bc9b832 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/module-type-SeededHashedType/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/module-type-SeededHashedType/index.html @@ -1,2 +1,2 @@ -SeededHashedType (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.SeededHashedType)

          Module type Hashtbl.SeededHashedType

          The input signature of the functor MakeSeeded.

          • since 4.00
          type t

          The type of the hashtable keys.

          val equal : t -> t -> bool

          The equality predicate used to compare keys.

          val seeded_hash : int -> t -> int

          A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

          +SeededHashedType (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.SeededHashedType)

          Module type Hashtbl.SeededHashedType

          The input signature of the functor MakeSeeded.

          • since 4.00
          type t

          The type of the hashtable keys.

          val equal : t -> t -> bool

          The equality predicate used to compare keys.

          val seeded_hash : int -> t -> int

          A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/module-type-SeededS/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/module-type-SeededS/index.html index bef92e9..1f0c973 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/module-type-SeededS/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Hashtbl/module-type-SeededS/index.html @@ -1,2 +1,2 @@ -SeededS (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.SeededS)

          Module type Hashtbl.SeededS

          The output signature of the functor MakeSeeded.

          • since 4.00
          type key
          type !'a t
          val create : ?random:bool -> int -> 'a t
          val clear : 'a t -> unit
          val reset : 'a t -> unit
          val copy : 'a t -> 'a t
          val add : 'a t -> key:key -> data:'a -> unit
          val remove : 'a t -> key -> unit
          val find : 'a t -> key -> 'a
          val find_opt : 'a t -> key -> 'a option
          • since 4.05
          val find_all : 'a t -> key -> 'a list
          val replace : 'a t -> key:key -> data:'a -> unit
          val mem : 'a t -> key -> bool
          val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
          val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
          • since 4.03
          val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
          val length : 'a t -> int
          val stats : 'a t -> statistics
          val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
          • since 4.07
          val to_seq_keys : _ t -> key Stdlib.Seq.t
          • since 4.07
          val to_seq_values : 'a t -> 'a Stdlib.Seq.t
          • since 4.07
          val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
          • since 4.07
          +SeededS (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Hashtbl.SeededS)

          Module type Hashtbl.SeededS

          The output signature of the functor MakeSeeded.

          • since 4.00
          type key
          type !'a t
          val create : ?random:bool -> int -> 'a t
          val clear : 'a t -> unit
          val reset : 'a t -> unit
          val copy : 'a t -> 'a t
          val add : 'a t -> key:key -> data:'a -> unit
          val remove : 'a t -> key -> unit
          val find : 'a t -> key -> 'a
          val find_opt : 'a t -> key -> 'a option
          • since 4.05
          val find_all : 'a t -> key -> 'a list
          val replace : 'a t -> key:key -> data:'a -> unit
          val mem : 'a t -> key -> bool
          val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
          val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
          • since 4.03
          val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
          val length : 'a t -> int
          val stats : 'a t -> statistics
          val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
          • since 4.07
          val to_seq_keys : _ t -> key Stdlib.Seq.t
          • since 4.07
          val to_seq_values : 'a t -> 'a Stdlib.Seq.t
          • since 4.07
          val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
          • since 4.07
          val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
          • since 4.07
          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Map/Make/argument-1-Ord/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Map/Make/argument-1-Ord/index.html index dbf500b..2c0a73e 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Map/Make/argument-1-Ord/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Map/Make/argument-1-Ord/index.html @@ -1,2 +1,2 @@ -Ord (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Map.Make.Ord)

          Parameter Make.Ord

          type t

          The type of the map keys.

          val compare : t -> t -> int

          A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

          +Ord (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Map.Make.Ord)

          Parameter Make.Ord

          type t

          The type of the map keys.

          val compare : t -> t -> int

          A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Map/Make/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Map/Make/index.html index a183b72..4aa699d 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Map/Make/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Map/Make/index.html @@ -1,5 +1,5 @@ -Make (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Map.Make)

          Module Map.Make

          Functor building an implementation of the map structure given a totally ordered type.

          Parameters

          module Ord : OrderedType

          Signature

          Maps

          type key = Ord.t

          The type of the map keys.

          type 'a t = 'a Stdlib.Map.Make(Ord).t

          The type of maps from type key to type 'a.

          val empty : 'a t

          The empty map.

          val add : key:key -> data:'a -> 'a t -> 'a t

          add ~key ~data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

          • before 4.03

            Physical equality was not ensured.

          val add_to_list : key:key -> data:'a -> 'a list t -> 'a list t

          add_to_list ~key ~data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

          • since 5.1
          val update : key:key -> f:('a option -> 'a option) -> 'a t -> 'a t

          update ~key ~f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

          • since 4.06
          val singleton : key -> 'a -> 'a t

          singleton x y returns the one-element map that contains a binding y for x.

          • since 3.12
          val remove : key -> 'a t -> 'a t

          remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

          • before 4.03

            Physical equality was not ensured.

          val merge : +Make (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Map.Make)

          Module Map.Make

          Functor building an implementation of the map structure given a totally ordered type.

          Parameters

          module Ord : OrderedType

          Signature

          Maps

          type key = Ord.t

          The type of the map keys.

          type 'a t = 'a Stdlib.Map.Make(Ord).t

          The type of maps from type key to type 'a.

          val empty : 'a t

          The empty map.

          val add : key:key -> data:'a -> 'a t -> 'a t

          add ~key ~data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

          • before 4.03

            Physical equality was not ensured.

          val add_to_list : key:key -> data:'a -> 'a list t -> 'a list t

          add_to_list ~key ~data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

          • since 5.1
          val update : key:key -> f:('a option -> 'a option) -> 'a t -> 'a t

          update ~key ~f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

          • since 4.06
          val singleton : key -> 'a -> 'a t

          singleton x y returns the one-element map that contains a binding y for x.

          • since 3.12
          val remove : key -> 'a t -> 'a t

          remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

          • before 4.03

            Physical equality was not ensured.

          val merge : f:(key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Map/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Map/index.html index 3c38d0b..ba9136a 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Map/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Map/index.html @@ -1,5 +1,5 @@ -Map (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Map)

          Module MoreLabels.Map

          Association tables over ordered types.

          This module implements applicative association tables, also known as finite maps or dictionaries, given a total ordering function over the keys. All operations over maps are purely applicative (no side-effects). The implementation uses balanced binary trees, and therefore searching and insertion take time logarithmic in the size of the map.

          For instance:

          module IntPairs =
          +Map (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Map)

          Module MoreLabels.Map

          Association tables over ordered types.

          This module implements applicative association tables, also known as finite maps or dictionaries, given a total ordering function over the keys. All operations over maps are purely applicative (no side-effects). The implementation uses balanced binary trees, and therefore searching and insertion take time logarithmic in the size of the map.

          For instance:

          module IntPairs =
             struct
               type t = int * int
               let compare (x0,y0) (x1,y1) =
          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Map/module-type-OrderedType/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Map/module-type-OrderedType/index.html
          index a7531ba..0a96497 100644
          --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Map/module-type-OrderedType/index.html
          +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Map/module-type-OrderedType/index.html
          @@ -1,2 +1,2 @@
           
          -OrderedType (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Map.OrderedType)

          Module type Map.OrderedType

          Input signature of the functor Make.

          type t

          The type of the map keys.

          val compare : t -> t -> int

          A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

          +OrderedType (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Map.OrderedType)

          Module type Map.OrderedType

          Input signature of the functor Make.

          type t

          The type of the map keys.

          val compare : t -> t -> int

          A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Map/module-type-S/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Map/module-type-S/index.html index a850367..ead58e5 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Map/module-type-S/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Map/module-type-S/index.html @@ -1,5 +1,5 @@ -S (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Map.S)

          Module type Map.S

          Output signature of the functor Make.

          Maps

          type key

          The type of the map keys.

          type !+'a t

          The type of maps from type key to type 'a.

          val empty : 'a t

          The empty map.

          val add : key:key -> data:'a -> 'a t -> 'a t

          add ~key ~data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

          • before 4.03

            Physical equality was not ensured.

          val add_to_list : key:key -> data:'a -> 'a list t -> 'a list t

          add_to_list ~key ~data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

          • since 5.1
          val update : key:key -> f:('a option -> 'a option) -> 'a t -> 'a t

          update ~key ~f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

          • since 4.06
          val singleton : key -> 'a -> 'a t

          singleton x y returns the one-element map that contains a binding y for x.

          • since 3.12
          val remove : key -> 'a t -> 'a t

          remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

          • before 4.03

            Physical equality was not ensured.

          val merge : +S (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Map.S)

          Module type Map.S

          Output signature of the functor Make.

          Maps

          type key

          The type of the map keys.

          type !+'a t

          The type of maps from type key to type 'a.

          val empty : 'a t

          The empty map.

          val add : key:key -> data:'a -> 'a t -> 'a t

          add ~key ~data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

          • before 4.03

            Physical equality was not ensured.

          val add_to_list : key:key -> data:'a -> 'a list t -> 'a list t

          add_to_list ~key ~data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

          • since 5.1
          val update : key:key -> f:('a option -> 'a option) -> 'a t -> 'a t

          update ~key ~f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

          • since 4.06
          val singleton : key -> 'a -> 'a t

          singleton x y returns the one-element map that contains a binding y for x.

          • since 3.12
          val remove : key -> 'a t -> 'a t

          remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

          • before 4.03

            Physical equality was not ensured.

          val merge : f:(key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Set/Make/argument-1-Ord/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Set/Make/argument-1-Ord/index.html index efd86b4..4df4937 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Set/Make/argument-1-Ord/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Set/Make/argument-1-Ord/index.html @@ -1,2 +1,2 @@ -Ord (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Set.Make.Ord)

          Parameter Make.Ord

          type t

          The type of the set elements.

          val compare : t -> t -> int

          A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

          +Ord (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Set.Make.Ord)

          Parameter Make.Ord

          type t

          The type of the set elements.

          val compare : t -> t -> int

          A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Set/Make/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Set/Make/index.html index d4a8285..03f21dc 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Set/Make/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Set/Make/index.html @@ -1,3 +1,3 @@ -Make (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Set.Make)

          Module Set.Make

          Functor building an implementation of the set structure given a totally ordered type.

          Parameters

          module Ord : OrderedType

          Signature

          Sets

          type elt = Ord.t

          The type of the set elements.

          type t = Stdlib.Set.Make(Ord).t

          The type of sets.

          val empty : t

          The empty set.

          val add : elt -> t -> t

          add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

          • before 4.03

            Physical equality was not ensured.

          val singleton : elt -> t

          singleton x returns the one-element set containing only x.

          val remove : elt -> t -> t

          remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

          • before 4.03

            Physical equality was not ensured.

          val union : t -> t -> t

          Set union.

          val inter : t -> t -> t

          Set intersection.

          val disjoint : t -> t -> bool

          Test if two sets are disjoint.

          • since 4.08
          val diff : t -> t -> t

          Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

          val cardinal : t -> int

          Return the number of elements of a set.

          Elements

          val elements : t -> elt list

          Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

          val min_elt : t -> elt

          Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

          val min_elt_opt : t -> elt option

          Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

          • since 4.05
          val max_elt : t -> elt

          Same as min_elt, but returns the largest element of the given set.

          val max_elt_opt : t -> elt option

          Same as min_elt_opt, but returns the largest element of the given set.

          • since 4.05
          val choose : t -> elt

          Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

          val choose_opt : t -> elt option

          Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

          • since 4.05

          Searching

          val find : elt -> t -> elt

          find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

          • since 4.01
          val find_opt : elt -> t -> elt option

          find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

          • since 4.05
          val find_first : f:(elt -> bool) -> t -> elt

          find_first ~f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

          For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

          • since 4.05
          val find_first_opt : f:(elt -> bool) -> t -> elt option

          find_first_opt ~f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

          • since 4.05
          val find_last : f:(elt -> bool) -> t -> elt

          find_last ~f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

          • since 4.05
          val find_last_opt : f:(elt -> bool) -> t -> elt option

          find_last_opt ~f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

          • since 4.05

          Traversing

          val iter : f:(elt -> unit) -> t -> unit

          iter ~f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

          val fold : f:(elt -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

          fold ~f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

          Transforming

          val map : f:(elt -> elt) -> t -> t

          map ~f s is the set whose elements are f a0,f a1... f +Make (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Set.Make)

          Module Set.Make

          Functor building an implementation of the set structure given a totally ordered type.

          Parameters

          module Ord : OrderedType

          Signature

          Sets

          type elt = Ord.t

          The type of the set elements.

          type t = Stdlib.Set.Make(Ord).t

          The type of sets.

          val empty : t

          The empty set.

          val add : elt -> t -> t

          add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

          • before 4.03

            Physical equality was not ensured.

          val singleton : elt -> t

          singleton x returns the one-element set containing only x.

          val remove : elt -> t -> t

          remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

          • before 4.03

            Physical equality was not ensured.

          val union : t -> t -> t

          Set union.

          val inter : t -> t -> t

          Set intersection.

          val disjoint : t -> t -> bool

          Test if two sets are disjoint.

          • since 4.08
          val diff : t -> t -> t

          Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

          val cardinal : t -> int

          Return the number of elements of a set.

          Elements

          val elements : t -> elt list

          Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

          val min_elt : t -> elt

          Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

          val min_elt_opt : t -> elt option

          Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

          • since 4.05
          val max_elt : t -> elt

          Same as min_elt, but returns the largest element of the given set.

          val max_elt_opt : t -> elt option

          Same as min_elt_opt, but returns the largest element of the given set.

          • since 4.05
          val choose : t -> elt

          Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

          val choose_opt : t -> elt option

          Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

          • since 4.05

          Searching

          val find : elt -> t -> elt

          find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

          • since 4.01
          val find_opt : elt -> t -> elt option

          find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

          • since 4.05
          val find_first : f:(elt -> bool) -> t -> elt

          find_first ~f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

          For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

          • since 4.05
          val find_first_opt : f:(elt -> bool) -> t -> elt option

          find_first_opt ~f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

          • since 4.05
          val find_last : f:(elt -> bool) -> t -> elt

          find_last ~f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

          • since 4.05
          val find_last_opt : f:(elt -> bool) -> t -> elt option

          find_last_opt ~f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

          • since 4.05

          Traversing

          val iter : f:(elt -> unit) -> t -> unit

          iter ~f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

          val fold : f:(elt -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

          fold ~f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

          Transforming

          val map : f:(elt -> elt) -> t -> t

          map ~f s is the set whose elements are f a0,f a1... f aN, where a0,a1...aN are the elements of s.

          The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

          If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

          • since 4.04
          val filter : f:(elt -> bool) -> t -> t

          filter ~f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

          • before 4.03

            Physical equality was not ensured.

          val filter_map : f:(elt -> elt option) -> t -> t

          filter_map ~f s returns the set of all v such that f x = Some v for some element x of s.

          For example,

          filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

          is the set of halves of the even elements of s.

          If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

          • since 4.11
          val partition : f:(elt -> bool) -> t -> t * t

          partition ~f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

          val split : elt -> t -> t * bool * t

          split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

          Predicates and comparisons

          val is_empty : t -> bool

          Test whether a set is empty or not.

          val mem : elt -> t -> bool

          mem x s tests whether x belongs to the set s.

          val equal : t -> t -> bool

          equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

          val compare : t -> t -> int

          Total ordering between sets. Can be used as the ordering function for doing sets of sets.

          val subset : t -> t -> bool

          subset s1 s2 tests whether the set s1 is a subset of the set s2.

          val for_all : f:(elt -> bool) -> t -> bool

          for_all ~f s checks if all elements of the set satisfy the predicate f.

          val exists : f:(elt -> bool) -> t -> bool

          exists ~f s checks if at least one element of the set satisfies the predicate f.

          Converting

          val to_list : t -> elt list

          to_list s is elements s.

          • since 5.1
          val of_list : elt list -> t

          of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

          • since 4.02
          val to_seq_from : elt -> t -> elt Stdlib.Seq.t

          to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

          • since 4.07
          val to_seq : t -> elt Stdlib.Seq.t

          Iterate on the whole set, in ascending order

          • since 4.07
          val to_rev_seq : t -> elt Stdlib.Seq.t

          Iterate on the whole set, in descending order

          • since 4.12
          val add_seq : elt Stdlib.Seq.t -> t -> t

          Add the given elements to the set, in order.

          • since 4.07
          val of_seq : elt Stdlib.Seq.t -> t

          Build a set from the given bindings

          • since 4.07
          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Set/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Set/index.html index d8ede0a..21e1593 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Set/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Set/index.html @@ -1,5 +1,5 @@ -Set (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Set)

          Module MoreLabels.Set

          Sets over ordered types.

          This module implements the set data structure, given a total ordering function over the set elements. All operations over sets are purely applicative (no side-effects). The implementation uses balanced binary trees, and is therefore reasonably efficient: insertion and membership take time logarithmic in the size of the set, for instance.

          The Make functor constructs implementations for any type, given a compare function. For instance:

          module IntPairs =
          +Set (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Set)

          Module MoreLabels.Set

          Sets over ordered types.

          This module implements the set data structure, given a total ordering function over the set elements. All operations over sets are purely applicative (no side-effects). The implementation uses balanced binary trees, and is therefore reasonably efficient: insertion and membership take time logarithmic in the size of the set, for instance.

          The Make functor constructs implementations for any type, given a compare function. For instance:

          module IntPairs =
             struct
               type t = int * int
               let compare (x0,y0) (x1,y1) =
          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Set/module-type-OrderedType/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Set/module-type-OrderedType/index.html
          index ba9b815..76c2df7 100644
          --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Set/module-type-OrderedType/index.html
          +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Set/module-type-OrderedType/index.html
          @@ -1,2 +1,2 @@
           
          -OrderedType (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Set.OrderedType)

          Module type Set.OrderedType

          Input signature of the functor Make.

          type t

          The type of the set elements.

          val compare : t -> t -> int

          A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

          +OrderedType (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Set.OrderedType)

          Module type Set.OrderedType

          Input signature of the functor Make.

          type t

          The type of the set elements.

          val compare : t -> t -> int

          A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Set/module-type-S/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Set/module-type-S/index.html index f7f23f0..181d33a 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Set/module-type-S/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/Set/module-type-S/index.html @@ -1,3 +1,3 @@ -S (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Set.S)

          Module type Set.S

          Output signature of the functor Make.

          Sets

          type elt

          The type of the set elements.

          type t

          The type of sets.

          val empty : t

          The empty set.

          val add : elt -> t -> t

          add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

          • before 4.03

            Physical equality was not ensured.

          val singleton : elt -> t

          singleton x returns the one-element set containing only x.

          val remove : elt -> t -> t

          remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

          • before 4.03

            Physical equality was not ensured.

          val union : t -> t -> t

          Set union.

          val inter : t -> t -> t

          Set intersection.

          val disjoint : t -> t -> bool

          Test if two sets are disjoint.

          • since 4.08
          val diff : t -> t -> t

          Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

          val cardinal : t -> int

          Return the number of elements of a set.

          Elements

          val elements : t -> elt list

          Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

          val min_elt : t -> elt

          Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

          val min_elt_opt : t -> elt option

          Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

          • since 4.05
          val max_elt : t -> elt

          Same as min_elt, but returns the largest element of the given set.

          val max_elt_opt : t -> elt option

          Same as min_elt_opt, but returns the largest element of the given set.

          • since 4.05
          val choose : t -> elt

          Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

          val choose_opt : t -> elt option

          Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

          • since 4.05

          Searching

          val find : elt -> t -> elt

          find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

          • since 4.01
          val find_opt : elt -> t -> elt option

          find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

          • since 4.05
          val find_first : f:(elt -> bool) -> t -> elt

          find_first ~f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

          For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

          • since 4.05
          val find_first_opt : f:(elt -> bool) -> t -> elt option

          find_first_opt ~f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

          • since 4.05
          val find_last : f:(elt -> bool) -> t -> elt

          find_last ~f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

          • since 4.05
          val find_last_opt : f:(elt -> bool) -> t -> elt option

          find_last_opt ~f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

          • since 4.05

          Traversing

          val iter : f:(elt -> unit) -> t -> unit

          iter ~f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

          val fold : f:(elt -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

          fold ~f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

          Transforming

          val map : f:(elt -> elt) -> t -> t

          map ~f s is the set whose elements are f a0,f a1... f +S (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels.Set.S)

          Module type Set.S

          Output signature of the functor Make.

          Sets

          type elt

          The type of the set elements.

          type t

          The type of sets.

          val empty : t

          The empty set.

          val add : elt -> t -> t

          add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

          • before 4.03

            Physical equality was not ensured.

          val singleton : elt -> t

          singleton x returns the one-element set containing only x.

          val remove : elt -> t -> t

          remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

          • before 4.03

            Physical equality was not ensured.

          val union : t -> t -> t

          Set union.

          val inter : t -> t -> t

          Set intersection.

          val disjoint : t -> t -> bool

          Test if two sets are disjoint.

          • since 4.08
          val diff : t -> t -> t

          Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

          val cardinal : t -> int

          Return the number of elements of a set.

          Elements

          val elements : t -> elt list

          Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

          val min_elt : t -> elt

          Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

          val min_elt_opt : t -> elt option

          Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

          • since 4.05
          val max_elt : t -> elt

          Same as min_elt, but returns the largest element of the given set.

          val max_elt_opt : t -> elt option

          Same as min_elt_opt, but returns the largest element of the given set.

          • since 4.05
          val choose : t -> elt

          Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

          val choose_opt : t -> elt option

          Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

          • since 4.05

          Searching

          val find : elt -> t -> elt

          find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

          • since 4.01
          val find_opt : elt -> t -> elt option

          find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

          • since 4.05
          val find_first : f:(elt -> bool) -> t -> elt

          find_first ~f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

          For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

          • since 4.05
          val find_first_opt : f:(elt -> bool) -> t -> elt option

          find_first_opt ~f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

          • since 4.05
          val find_last : f:(elt -> bool) -> t -> elt

          find_last ~f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

          • since 4.05
          val find_last_opt : f:(elt -> bool) -> t -> elt option

          find_last_opt ~f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

          • since 4.05

          Traversing

          val iter : f:(elt -> unit) -> t -> unit

          iter ~f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

          val fold : f:(elt -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

          fold ~f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

          Transforming

          val map : f:(elt -> elt) -> t -> t

          map ~f s is the set whose elements are f a0,f a1... f aN, where a0,a1...aN are the elements of s.

          The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

          If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

          • since 4.04
          val filter : f:(elt -> bool) -> t -> t

          filter ~f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

          • before 4.03

            Physical equality was not ensured.

          val filter_map : f:(elt -> elt option) -> t -> t

          filter_map ~f s returns the set of all v such that f x = Some v for some element x of s.

          For example,

          filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

          is the set of halves of the even elements of s.

          If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

          • since 4.11
          val partition : f:(elt -> bool) -> t -> t * t

          partition ~f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

          val split : elt -> t -> t * bool * t

          split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

          Predicates and comparisons

          val is_empty : t -> bool

          Test whether a set is empty or not.

          val mem : elt -> t -> bool

          mem x s tests whether x belongs to the set s.

          val equal : t -> t -> bool

          equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

          val compare : t -> t -> int

          Total ordering between sets. Can be used as the ordering function for doing sets of sets.

          val subset : t -> t -> bool

          subset s1 s2 tests whether the set s1 is a subset of the set s2.

          val for_all : f:(elt -> bool) -> t -> bool

          for_all ~f s checks if all elements of the set satisfy the predicate f.

          val exists : f:(elt -> bool) -> t -> bool

          exists ~f s checks if at least one element of the set satisfies the predicate f.

          Converting

          val to_list : t -> elt list

          to_list s is elements s.

          • since 5.1
          val of_list : elt list -> t

          of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

          • since 4.02
          val to_seq_from : elt -> t -> elt Stdlib.Seq.t

          to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

          • since 4.07
          val to_seq : t -> elt Stdlib.Seq.t

          Iterate on the whole set, in ascending order

          • since 4.07
          val to_rev_seq : t -> elt Stdlib.Seq.t

          Iterate on the whole set, in descending order

          • since 4.12
          val add_seq : elt Stdlib.Seq.t -> t -> t

          Add the given elements to the set, in order.

          • since 4.07
          val of_seq : elt Stdlib.Seq.t -> t

          Build a set from the given bindings

          • since 4.07
          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/index.html index 4e8c41b..3b49550 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/MoreLabels/index.html @@ -1,2 +1,2 @@ -MoreLabels (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels)

          Module Stdlib_alerting.MoreLabels

          include sig ... end
          module Map : sig ... end

          Association tables over ordered types.

          module Set : sig ... end

          Sets over ordered types.

          module Hashtbl : sig ... end
          +MoreLabels (less-power.Stdlib_alerts.Stdlib_alerting.MoreLabels)

          Module Stdlib_alerting.MoreLabels

          include sig ... end
          module Map : sig ... end

          Association tables over ordered types.

          module Set : sig ... end

          Sets over ordered types.

          module Hashtbl : sig ... end
          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Printexc/Slot/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Printexc/Slot/index.html index 0106dc6..655b8e8 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Printexc/Slot/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Printexc/Slot/index.html @@ -1,2 +1,2 @@ -Slot (less-power.Stdlib_alerts.Stdlib_alerting.Printexc.Slot)

          Module Printexc.Slot

          • since 4.02
          • alert unsafe This item is not permitted
          val is_raise : t -> bool

          is_raise slot is true when slot refers to a raising point in the code, and false when it comes from a simple function call.

          • since 4.02
          val is_inline : t -> bool

          is_inline slot is true when slot refers to a call that got inlined by the compiler, and false when it comes from any other context.

          • since 4.04
          val location : t -> location option

          location slot returns the location information of the slot, if available, and None otherwise.

          Some possible reasons for failing to return a location are as follow:

          • the slot corresponds to a compiler-inserted raise
          • the slot corresponds to a part of the program that has not been compiled with debug information (-g)
          • since 4.02
          val name : t -> string option

          name slot returns the name of the function or definition enclosing the location referred to by the slot.

          name slot returns None if the name is unavailable, which may happen for the same reasons as location returning None.

          • since 4.11
          val format : int -> t -> string option

          format pos slot returns the string representation of slot as raw_backtrace_to_string would format it, assuming it is the pos-th element of the backtrace: the 0-th element is pretty-printed differently than the others.

          Whole-backtrace printing functions also skip some uninformative slots; in that case, format pos slot returns None.

          • since 4.02
          +Slot (less-power.Stdlib_alerts.Stdlib_alerting.Printexc.Slot)

          Module Printexc.Slot

          • since 4.02
          • alert unsafe This item is not permitted
          val is_raise : t -> bool

          is_raise slot is true when slot refers to a raising point in the code, and false when it comes from a simple function call.

          • since 4.02
          val is_inline : t -> bool

          is_inline slot is true when slot refers to a call that got inlined by the compiler, and false when it comes from any other context.

          • since 4.04
          val location : t -> location option

          location slot returns the location information of the slot, if available, and None otherwise.

          Some possible reasons for failing to return a location are as follow:

          • the slot corresponds to a compiler-inserted raise
          • the slot corresponds to a part of the program that has not been compiled with debug information (-g)
          • since 4.02
          val name : t -> string option

          name slot returns the name of the function or definition enclosing the location referred to by the slot.

          name slot returns None if the name is unavailable, which may happen for the same reasons as location returning None.

          • since 4.11
          val format : int -> t -> string option

          format pos slot returns the string representation of slot as raw_backtrace_to_string would format it, assuming it is the pos-th element of the backtrace: the 0-th element is pretty-printed differently than the others.

          Whole-backtrace printing functions also skip some uninformative slots; in that case, format pos slot returns None.

          • since 4.02
          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Printexc/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Printexc/index.html index d035cd2..dc169f9 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Printexc/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Printexc/index.html @@ -1,5 +1,5 @@ -Printexc (less-power.Stdlib_alerts.Stdlib_alerting.Printexc)

          Module Stdlib_alerting.Printexc

          type raw_backtrace = Stdlib.Printexc.raw_backtrace
          • alert unsafe This item is not permitted
          type raw_backtrace_slot = Stdlib.Printexc.raw_backtrace_slot
          • alert unsafe This item is not permitted
          type backtrace_slot = Stdlib.Printexc.backtrace_slot
          • alert unsafe This item is not permitted
          type location = Stdlib.Printexc.location = {
          1. filename : string;
          2. line_number : int;
          3. start_char : int;
          4. end_char : int;
          }
          • alert unsafe This item is not permitted
          include sig ... end
          type t = exn = ..

          The type of exception values.

          val to_string_default : exn -> string

          Printexc.to_string_default e returns a string representation of the exception e, ignoring all registered exception printers.

          • since 4.09
          val to_string : exn -> string

          Printexc.to_string e returns a string representation of the exception e.

          • alert unsafe This item is not permitted
          val print : ('a -> 'b) -> 'a -> 'b

          Printexc.print fn x applies fn to x and returns the result. If the evaluation of fn x raises any exception, the name of the exception is printed on standard error output, and the exception is raised again. The typical use is to catch and report exceptions that escape a function application.

          • alert unsafe This item is not permitted
          val catch : ('a -> 'b) -> 'a -> 'b

          Printexc.catch fn x is similar to Printexc.print, but aborts the program with exit code 2 after printing the uncaught exception. This function is deprecated: the runtime system is now able to print uncaught exceptions as precisely as Printexc.catch does. Moreover, calling Printexc.catch makes it harder to track the location of the exception using the debugger or the stack backtrace facility. So, do not use Printexc.catch in new code.

          • deprecated This function is no longer needed.
          • alert unsafe This item is not permitted
          val print_backtrace : Stdlib.out_channel -> unit

          Printexc.print_backtrace oc prints an exception backtrace on the output channel oc. The backtrace lists the program locations where the most-recently raised exception was raised and where it was propagated through function calls.

          If the call is not inside an exception handler, the returned backtrace is unspecified. If the call is after some exception-catching code (before in the handler, or in a when-guard during the matching of the exception handler), the backtrace may correspond to a later exception than the handled one.

          • since 3.11
          • alert unsafe This item is not permitted
          val get_backtrace : unit -> string

          Printexc.get_backtrace () returns a string containing the same exception backtrace that Printexc.print_backtrace would print. Same restriction usage than print_backtrace.

          • since 3.11
          • alert unsafe This item is not permitted
          val record_backtrace : bool -> unit

          Printexc.record_backtrace b turns recording of exception backtraces on (if b = true) or off (if b = false). Initially, backtraces are not recorded, unless the b flag is given to the program through the OCAMLRUNPARAM variable.

          • since 3.11
          • alert unsafe This item is not permitted
          val backtrace_status : unit -> bool

          Printexc.backtrace_status() returns true if exception backtraces are currently recorded, false if not.

          • since 3.11
          • alert unsafe This item is not permitted
          val register_printer : (exn -> string option) -> unit

          Printexc.register_printer fn registers fn as an exception printer. The printer should return None or raise an exception if it does not know how to convert the passed exception, and Some +Printexc (less-power.Stdlib_alerts.Stdlib_alerting.Printexc)

          Module Stdlib_alerting.Printexc

          type raw_backtrace = Stdlib.Printexc.raw_backtrace
          • alert unsafe This item is not permitted
          type raw_backtrace_slot = Stdlib.Printexc.raw_backtrace_slot
          • alert unsafe This item is not permitted
          type backtrace_slot = Stdlib.Printexc.backtrace_slot
          • alert unsafe This item is not permitted
          type location = Stdlib.Printexc.location = {
          1. filename : string;
          2. line_number : int;
          3. start_char : int;
          4. end_char : int;
          }
          • alert unsafe This item is not permitted
          include sig ... end
          type t = exn = ..

          The type of exception values.

          val to_string_default : exn -> string

          Printexc.to_string_default e returns a string representation of the exception e, ignoring all registered exception printers.

          • since 4.09
          val to_string : exn -> string

          Printexc.to_string e returns a string representation of the exception e.

          • alert unsafe This item is not permitted
          val print : ('a -> 'b) -> 'a -> 'b

          Printexc.print fn x applies fn to x and returns the result. If the evaluation of fn x raises any exception, the name of the exception is printed on standard error output, and the exception is raised again. The typical use is to catch and report exceptions that escape a function application.

          • alert unsafe This item is not permitted
          val catch : ('a -> 'b) -> 'a -> 'b

          Printexc.catch fn x is similar to Printexc.print, but aborts the program with exit code 2 after printing the uncaught exception. This function is deprecated: the runtime system is now able to print uncaught exceptions as precisely as Printexc.catch does. Moreover, calling Printexc.catch makes it harder to track the location of the exception using the debugger or the stack backtrace facility. So, do not use Printexc.catch in new code.

          • deprecated This function is no longer needed.
          • alert unsafe This item is not permitted
          val print_backtrace : Stdlib.out_channel -> unit

          Printexc.print_backtrace oc prints an exception backtrace on the output channel oc. The backtrace lists the program locations where the most-recently raised exception was raised and where it was propagated through function calls.

          If the call is not inside an exception handler, the returned backtrace is unspecified. If the call is after some exception-catching code (before in the handler, or in a when-guard during the matching of the exception handler), the backtrace may correspond to a later exception than the handled one.

          • since 3.11
          • alert unsafe This item is not permitted
          val get_backtrace : unit -> string

          Printexc.get_backtrace () returns a string containing the same exception backtrace that Printexc.print_backtrace would print. Same restriction usage than print_backtrace.

          • since 3.11
          • alert unsafe This item is not permitted
          val record_backtrace : bool -> unit

          Printexc.record_backtrace b turns recording of exception backtraces on (if b = true) or off (if b = false). Initially, backtraces are not recorded, unless the b flag is given to the program through the OCAMLRUNPARAM variable.

          • since 3.11
          • alert unsafe This item is not permitted
          val backtrace_status : unit -> bool

          Printexc.backtrace_status() returns true if exception backtraces are currently recorded, false if not.

          • since 3.11
          • alert unsafe This item is not permitted
          val register_printer : (exn -> string option) -> unit

          Printexc.register_printer fn registers fn as an exception printer. The printer should return None or raise an exception if it does not know how to convert the passed exception, and Some s with s the resulting string if it can convert the passed exception. Exceptions raised by the printer are ignored.

          When converting an exception into a string, the printers will be invoked in the reverse order of their registrations, until a printer returns a Some s value (if no such printer exists, the runtime will use a generic printer).

          When using this mechanism, one should be aware that an exception backtrace is attached to the thread that saw it raised, rather than to the exception itself. Practically, it means that the code related to fn should not use the backtrace if it has itself raised an exception before.

          • since 3.11.2
          • alert unsafe This item is not permitted
          val use_printers : exn -> string option

          Printexc.use_printers e returns None if there are no registered printers and Some s with else as the resulting string otherwise.

          • since 4.09
          • alert unsafe This item is not permitted
          type raw_backtrace_entry = private int

          A raw_backtrace_entry is an element of a raw_backtrace.

          Each raw_backtrace_entry is an opaque integer, whose value is not stable between different programs, or even between different runs of the same binary.

          A raw_backtrace_entry can be converted to a usable form using backtrace_slots_of_raw_entry below. Note that, due to inlining, a single raw_backtrace_entry may convert to several backtrace_slots. Since the values of a raw_backtrace_entry are not stable, they cannot be marshalled. If they are to be converted, the conversion must be done by the process that generated them.

          Again due to inlining, there may be multiple distinct raw_backtrace_entry values that convert to equal backtrace_slots. However, if two raw_backtrace_entrys are equal as integers, then they represent the same backtrace_slots.

          • since 4.12
          • alert unsafe This item is not permitted
          val raw_backtrace_entries : raw_backtrace -> raw_backtrace_entry array
          • since 4.12
          • alert unsafe This item is not permitted
          val get_raw_backtrace : unit -> raw_backtrace

          Printexc.get_raw_backtrace () returns the same exception backtrace that Printexc.print_backtrace would print, but in a raw format. Same restriction usage than print_backtrace.

          • since 4.01
          • alert unsafe This item is not permitted
          val print_raw_backtrace : Stdlib.out_channel -> raw_backtrace -> unit

          Print a raw backtrace in the same format Printexc.print_backtrace uses.

          • since 4.01
          • alert unsafe This item is not permitted
          val raw_backtrace_to_string : raw_backtrace -> string

          Return a string from a raw backtrace, in the same format Printexc.get_backtrace uses.

          • since 4.01
          • alert unsafe This item is not permitted
          val raise_with_backtrace : exn -> raw_backtrace -> 'a

          Reraise the exception using the given raw_backtrace for the origin of the exception

          • since 4.05
          • alert unsafe This item is not permitted
          val get_callstack : int -> raw_backtrace

          Printexc.get_callstack n returns a description of the top of the call stack on the current program point (for the current thread), with at most n entries. (Note: this function is not related to exceptions at all, despite being part of the Printexc module.)

          • since 4.01
          • alert unsafe This item is not permitted
          val default_uncaught_exception_handler : exn -> raw_backtrace -> unit

          Printexc.default_uncaught_exception_handler prints the exception and backtrace on standard error output.

          • since 4.11
          • alert unsafe This item is not permitted
          val set_uncaught_exception_handler : (exn -> raw_backtrace -> unit) -> unit

          Printexc.set_uncaught_exception_handler fn registers fn as the handler for uncaught exceptions. The default handler is Printexc.default_uncaught_exception_handler.

          Note that when fn is called all the functions registered with Stdlib.at_exit have already been called. Because of this you must make sure any output channel fn writes on is flushed.

          Also note that exceptions raised by user code in the interactive toplevel are not passed to this function as they are caught by the toplevel itself.

          If fn raises an exception, both the exceptions passed to fn and raised by fn will be printed with their respective backtrace.

          • since 4.02
          • alert unsafe This item is not permitted
          val backtrace_slots : raw_backtrace -> backtrace_slot array option

          Returns the slots of a raw backtrace, or None if none of them contain useful information.

          In the return array, the slot at index 0 corresponds to the most recent function call, raise, or primitive get_backtrace call in the trace.

          Some possible reasons for returning None are as follow:

          • none of the slots in the trace come from modules compiled with debug information (-g)
          • the program is a bytecode program that has not been linked with debug information enabled (ocamlc -g)
          • since 4.02
          • alert unsafe This item is not permitted
          val backtrace_slots_of_raw_entry : raw_backtrace_entry -> backtrace_slot array option

          Returns the slots of a single raw backtrace entry, or None if this entry lacks debug information.

          Slots are returned in the same order as backtrace_slots: the slot at index 0 is the most recent call, raise, or primitive, and subsequent slots represent callers.

          • since 4.12
          • alert unsafe This item is not permitted
          module Slot : sig ... end
          val raw_backtrace_length : raw_backtrace -> int

          raw_backtrace_length bckt returns the number of slots in the backtrace bckt.

          • since 4.02
          • alert unsafe This item is not permitted
          val get_raw_backtrace_slot : raw_backtrace -> int -> raw_backtrace_slot

          get_raw_backtrace_slot bckt pos returns the slot in position pos in the backtrace bckt.

          • since 4.02
          • alert unsafe This item is not permitted
          val convert_raw_backtrace_slot : raw_backtrace_slot -> backtrace_slot

          Extracts the user-friendly backtrace_slot from a low-level raw_backtrace_slot.

          • since 4.02
          • alert unsafe This item is not permitted
          val get_raw_backtrace_next_slot : diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Printf/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Printf/index.html index 8b49f54..9f92a97 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Printf/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Printf/index.html @@ -1,5 +1,5 @@ -Printf (less-power.Stdlib_alerts.Stdlib_alerting.Printf)

          Module Stdlib_alerting.Printf

          include sig ... end
          val sprintf : ('a, unit, string) Stdlib.format -> 'a

          Same as Printf.fprintf, but instead of printing on an output channel, return a string containing the result of formatting the arguments.

          val ksprintf : (string -> 'd) -> ('a, unit, string, 'd) Stdlib.format4 -> 'a

          Same as sprintf above, but instead of returning the string, passes it to the first argument.

          • since 3.09
          val fprintf : +Printf (less-power.Stdlib_alerts.Stdlib_alerting.Printf)

          Module Stdlib_alerting.Printf

          include sig ... end
          val sprintf : ('a, unit, string) Stdlib.format -> 'a

          Same as Printf.fprintf, but instead of printing on an output channel, return a string containing the result of formatting the arguments.

          val ksprintf : (string -> 'd) -> ('a, unit, string, 'd) Stdlib.format4 -> 'a

          Same as sprintf above, but instead of returning the string, passes it to the first argument.

          • since 3.09
          val fprintf : Stdlib.out_channel -> ('a, Stdlib.out_channel, unit) Stdlib.format -> 'a

          fprintf outchan format arg1 ... argN formats the arguments arg1 to argN according to the format string format, and outputs the resulting string on the channel outchan.

          The format string is a character string which contains two types of objects: plain characters, which are simply copied to the output channel, and conversion specifications, each of which causes conversion and printing of arguments.

          Conversion specifications have the following form:

          % [flags] [width] [.precision] type

          In short, a conversion specification consists in the % character, followed by optional modifiers and a type which is made of one or two characters.

          The types and their meanings are:

          • d, i: convert an integer argument to signed decimal. The flag # adds underscores to large values for readability.
          • u, n, l, L, or N: convert an integer argument to unsigned decimal. Warning: n, l, L, and N are used for scanf, and should not be used for printf. The flag # adds underscores to large values for readability.
          • x: convert an integer argument to unsigned hexadecimal, using lowercase letters. The flag # adds a 0x prefix to non zero values.
          • X: convert an integer argument to unsigned hexadecimal, using uppercase letters. The flag # adds a 0X prefix to non zero values.
          • o: convert an integer argument to unsigned octal. The flag # adds a 0 prefix to non zero values.
          • s: insert a string argument.
          • S: convert a string argument to OCaml syntax (double quotes, escapes).
          • c: insert a character argument.
          • C: convert a character argument to OCaml syntax (single quotes, escapes).
          • f: convert a floating-point argument to decimal notation, in the style dddd.ddd.
          • F: convert a floating-point argument to OCaml syntax (dddd. or dddd.ddd or d.ddd e+-dd). Converts to hexadecimal with the # flag (see h).
          • e or E: convert a floating-point argument to decimal notation, in the style d.ddd e+-dd (mantissa and exponent).
          • g or G: convert a floating-point argument to decimal notation, in style f or e, E (whichever is more compact). Moreover, any trailing zeros are removed from the fractional part of the result and the decimal-point character is removed if there is no fractional part remaining.
          • h or H: convert a floating-point argument to hexadecimal notation, in the style 0xh.hhhh p+-dd (hexadecimal mantissa, exponent in decimal and denotes a power of 2).
          • B: convert a boolean argument to the string true or false
          • b: convert a boolean argument (deprecated; do not use in new programs).
          • ld, li, lu, lx, lX, lo: convert an int32 argument to the format specified by the second letter (decimal, hexadecimal, etc).
          • nd, ni, nu, nx, nX, no: convert a nativeint argument to the format specified by the second letter.
          • Ld, Li, Lu, Lx, LX, Lo: convert an int64 argument to the format specified by the second letter.
          • a: user-defined printer. Take two arguments and apply the first one to outchan (the current output channel) and to the second argument. The first argument must therefore have type out_channel -> 'b -> unit and the second 'b. The output produced by the function is inserted in the output of fprintf at the current point.
          • t: same as %a, but take only one argument (with type out_channel -> unit) and apply it to outchan.
          • \{ fmt %\}: convert a format string argument to its type digest. The argument must have the same type as the internal format string fmt.
          • ( fmt %): format string substitution. Take a format string argument and substitute it to the internal format string fmt to print following arguments. The argument must have the same type as the internal format string fmt.
          • !: take no argument and flush the output.
          • %: take no argument and output one % character.
          • \@: take no argument and output one \@ character.
          • ,: take no argument and output nothing: a no-op delimiter for conversion specifications.

          The optional flags are:

          • -: left-justify the output (default is right justification).
          • 0: for numerical conversions, pad with zeroes instead of spaces.
          • +: for signed numerical conversions, prefix number with a + sign if positive.
          • space: for signed numerical conversions, prefix number with a space if positive.
          • #: request an alternate formatting style for the integer types and the floating-point type F.

          The optional width is an integer indicating the minimal width of the result. For instance, %6d prints an integer, prefixing it with spaces to fill at least 6 characters.

          The optional precision is a dot . followed by an integer indicating how many digits follow the decimal point in the %f, %e, %E, %h, and %H conversions or the maximum number of significant digits to appear for the %F, %g and %G conversions. For instance, %.4f prints a float with 4 fractional digits.

          The integer in a width or precision can also be specified as *, in which case an extra integer argument is taken to specify the corresponding width or precision. This integer argument precedes immediately the argument to print. For instance, %.*f prints a float with as many fractional digits as the value of the argument given before the float.

          • alert input_output Input/output is not permitted
          val printf : ('a, Stdlib.out_channel, unit) Stdlib.format -> 'a

          Same as Printf.fprintf, but output on stdout.

          • alert input_output Input/output is not permitted
          val eprintf : ('a, Stdlib.out_channel, unit) Stdlib.format -> 'a

          Same as Printf.fprintf, but output on stderr.

          • alert input_output Input/output is not permitted
          val ifprintf : 'b -> ('a, 'b, 'c, unit) Stdlib.format4 -> 'a

          Same as Printf.fprintf, but does not print anything. Useful to ignore some material when conditionally printing.

          • since 3.10
          • alert input_output Input/output is not permitted
          val kfprintf : diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Scanf/Scanning/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Scanf/Scanning/index.html index 22dc23e..8c0606f 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Scanf/Scanning/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Scanf/Scanning/index.html @@ -1,2 +1,2 @@ -Scanning (less-power.Stdlib_alerts.Stdlib_alerting.Scanf.Scanning)

          Module Scanf.Scanning

          type in_channel
          type scanbuf
          +Scanning (less-power.Stdlib_alerts.Stdlib_alerting.Scanf.Scanning)

          Module Scanf.Scanning

          type in_channel
          type scanbuf
          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Scanf/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Scanf/index.html index 96c8dec..58ab3f0 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Scanf/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Scanf/index.html @@ -1,5 +1,5 @@ -Scanf (less-power.Stdlib_alerts.Stdlib_alerting.Scanf)

          Module Stdlib_alerting.Scanf

          module Scanning : sig ... end
          include sig ... end
          type ('a, 'b, 'c, 'd) scanner = +Scanf (less-power.Stdlib_alerts.Stdlib_alerting.Scanf)

          Module Stdlib_alerting.Scanf

          module Scanning : sig ... end
          include sig ... end
          type ('a, 'b, 'c, 'd) scanner = ('a, Scanning.in_channel, 'b, 'c, 'a -> 'd, 'd) Stdlib.format6 -> 'c

          The type of formatted input scanners: ('a, 'b, 'c, 'd) scanner is the type of a formatted input function that reads from some formatted input channel according to some format string; more precisely, if scan is some formatted input function, then scan ic fmt f applies f to all the arguments specified by format string fmt, when scan has read those arguments from the Scanning.in_channel formatted input channel ic.

          For instance, the Scanf.scanf function below has type ('a, 'b, 'c, 'd) scanner, since it is a formatted input function that reads from Scanning.stdin: scanf fmt f applies f to the arguments specified by fmt, reading those arguments from Stdlib.stdin as expected.

          If the format fmt has some %r indications, the corresponding formatted input functions must be provided before receiver function f. For instance, if read_elem is an input function for values of type t, then bscanf ic "%r;" read_elem f reads a value v of type t followed by a ';' character, and returns f v.

          • since 3.10
          type ('a, 'b, 'c, 'd) scanner_opt = diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Seq/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Seq/index.html index fb43ceb..6f77da0 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Seq/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Seq/index.html @@ -1,2 +1,2 @@ -Seq (less-power.Stdlib_alerts.Stdlib_alerting.Seq)

          Module Stdlib_alerting.Seq

          • alert list_op List (and sequence) operations are not permitted
          type 'a t = unit -> 'a node
          and 'a node = 'a Stdlib.Seq.node =
          1. | Nil
          2. | Cons of 'a * 'a t
          include sig ... end
          val is_empty : 'a t -> bool

          is_empty xs determines whether the sequence xs is empty.

          It is recommended that the sequence xs be persistent. Indeed, is_empty xs demands the head of the sequence xs, so, if xs is ephemeral, it may be the case that xs cannot be used any more after this call has taken place.

          • since 4.14
          val uncons : 'a t -> ('a * 'a t) option

          If xs is empty, then uncons xs is None.

          If xs is nonempty, then uncons xs is Some (x, ys) where x is the head of the sequence and ys its tail.

          • since 4.14
          val length : 'a t -> int

          length xs is the length of the sequence xs.

          The sequence xs must be finite.

          • since 4.14
          val iter : ('a -> unit) -> 'a t -> unit

          iter f xs invokes f x successively for every element x of the sequence xs, from left to right.

          It terminates only if the sequence xs is finite.

          val fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

          fold_left f _ xs invokes f _ x successively for every element x of the sequence xs, from left to right.

          An accumulator of type 'a is threaded through the calls to f.

          It terminates only if the sequence xs is finite.

          val iteri : (int -> 'a -> unit) -> 'a t -> unit

          iteri f xs invokes f i x successively for every element x located at index i in the sequence xs.

          It terminates only if the sequence xs is finite.

          iteri f xs is equivalent to iter (fun (i, x) -> f i x) (zip (ints 0) xs).

          • since 4.14
          val fold_lefti : ('acc -> int -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

          fold_lefti f _ xs invokes f _ i x successively for every element x located at index i of the sequence xs.

          An accumulator of type 'b is threaded through the calls to f.

          It terminates only if the sequence xs is finite.

          fold_lefti f accu xs is equivalent to fold_left (fun accu (i, x) -> f accu i x) accu (zip (ints 0) xs).

          • since 4.14
          val for_all : ('a -> bool) -> 'a t -> bool

          for_all p xs determines whether all elements x of the sequence xs satisfy p x.

          The sequence xs must be finite.

          • since 4.14
          val exists : ('a -> bool) -> 'a t -> bool

          exists xs p determines whether at least one element x of the sequence xs satisfies p x.

          The sequence xs must be finite.

          • since 4.14
          val find : ('a -> bool) -> 'a t -> 'a option

          find p xs returns Some x, where x is the first element of the sequence xs that satisfies p x, if there is such an element.

          It returns None if there is no such element.

          The sequence xs must be finite.

          • since 4.14
          val find_index : ('a -> bool) -> 'a t -> int option

          find_index p xs returns Some i, where i is the index of the first element of the sequence xs that satisfies p x, if there is such an element.

          It returns None if there is no such element.

          The sequence xs must be finite.

          • since 5.1
          val find_map : ('a -> 'b option) -> 'a t -> 'b option

          find_map f xs returns Some y, where x is the first element of the sequence xs such that f x = Some _, if there is such an element, and where y is defined by f x = Some y.

          It returns None if there is no such element.

          The sequence xs must be finite.

          • since 4.14
          val find_mapi : (int -> 'a -> 'b option) -> 'a t -> 'b option

          Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

          The sequence xs must be finite.

          • since 5.1
          val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit

          iter2 f xs ys invokes f x y successively for every pair (x, y) of elements drawn synchronously from the sequences xs and ys.

          If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

          Iteration terminates only if at least one of the sequences xs and ys is finite.

          iter2 f xs ys is equivalent to iter (fun (x, y) -> f x y) (zip xs ys).

          • since 4.14
          val fold_left2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc

          fold_left2 f _ xs ys invokes f _ x y successively for every pair (x, y) of elements drawn synchronously from the sequences xs and ys.

          An accumulator of type 'a is threaded through the calls to f.

          If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

          Iteration terminates only if at least one of the sequences xs and ys is finite.

          fold_left2 f accu xs ys is equivalent to fold_left (fun accu (x, y) -> f accu x y) (zip xs ys).

          • since 4.14
          val for_all2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

          for_all2 p xs ys determines whether all pairs (x, y) of elements drawn synchronously from the sequences xs and ys satisfy p x y.

          If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored. In particular, if xs or ys is empty, then for_all2 p xs ys is true. This is where for_all2 and equal differ: equal eq xs ys can be true only if xs and ys have the same length.

          At least one of the sequences xs and ys must be finite.

          for_all2 p xs ys is equivalent to for_all (fun b -> b) (map2 p xs ys).

          • since 4.14
          val exists2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

          exists2 p xs ys determines whether some pair (x, y) of elements drawn synchronously from the sequences xs and ys satisfies p x y.

          If the sequences xs and ys have different lengths, then iteration must stop as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

          At least one of the sequences xs and ys must be finite.

          exists2 p xs ys is equivalent to exists (fun b -> b) (map2 p xs ys).

          • since 4.14
          val equal : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

          Provided the function eq defines an equality on elements, equal eq xs ys determines whether the sequences xs and ys are pointwise equal.

          At least one of the sequences xs and ys must be finite.

          • since 4.14
          val compare : ('a -> 'b -> int) -> 'a t -> 'b t -> int

          Provided the function cmp defines a preorder on elements, compare cmp xs ys compares the sequences xs and ys according to the lexicographic preorder.

          For more details on comparison functions, see Array.sort.

          At least one of the sequences xs and ys must be finite.

          • since 4.14
          val empty : 'a t

          empty is the empty sequence. It has no elements. Its length is 0.

          val return : 'a -> 'a t

          return x is the sequence whose sole element is x. Its length is 1.

          val cons : 'a -> 'a t -> 'a t

          cons x xs is the sequence that begins with the element x, followed with the sequence xs.

          Writing cons (f()) xs causes the function call f() to take place immediately. For this call to be delayed until the sequence is queried, one must instead write (fun () -> Cons(f(), xs)).

          • since 4.11
          val init : int -> (int -> 'a) -> 'a t

          init n f is the sequence f 0; f 1; ...; f (n-1).

          n must be nonnegative.

          If desired, the infinite sequence f 0; f 1; ... can be defined as map f (ints 0).

          • since 4.14
          val unfold : ('b -> ('a * 'b) option) -> 'b -> 'a t

          unfold constructs a sequence out of a step function and an initial state.

          If f u is None then unfold f u is the empty sequence. If f u is Some (x, u') then unfold f u is the nonempty sequence cons x (unfold f u').

          For example, unfold (function [] -> None | h :: t -> Some (h, t)) l is equivalent to List.to_seq l.

          • since 4.11
          val repeat : 'a -> 'a t

          repeat x is the infinite sequence where the element x is repeated indefinitely.

          repeat x is equivalent to cycle (return x).

          • since 4.14
          val forever : (unit -> 'a) -> 'a t

          forever f is an infinite sequence where every element is produced (on demand) by the function call f().

          For instance, forever Random.bool is an infinite sequence of random bits.

          forever f is equivalent to map f (repeat ()).

          • since 4.14
          val cycle : 'a t -> 'a t

          cycle xs is the infinite sequence that consists of an infinite number of repetitions of the sequence xs.

          If xs is an empty sequence, then cycle xs is empty as well.

          Consuming (a prefix of) the sequence cycle xs once can cause the sequence xs to be consumed more than once. Therefore, xs must be persistent.

          • since 4.14
          val iterate : ('a -> 'a) -> 'a -> 'a t

          iterate f x is the infinite sequence whose elements are x, f x, f (f x), and so on.

          In other words, it is the orbit of the function f, starting at x.

          • since 4.14
          val map : ('a -> 'b) -> 'a t -> 'b t

          map f xs is the image of the sequence xs through the transformation f.

          If xs is the sequence x0; x1; ... then map f xs is the sequence f x0; f x1; ....

          val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t

          mapi is analogous to map, but applies the function f to an index and an element.

          mapi f xs is equivalent to map2 f (ints 0) xs.

          • since 4.14
          val filter : ('a -> bool) -> 'a t -> 'a t

          filter p xs is the sequence of the elements x of xs that satisfy p x.

          In other words, filter p xs is the sequence xs, deprived of the elements x such that p x is false.

          val filter_map : ('a -> 'b option) -> 'a t -> 'b t

          filter_map f xs is the sequence of the elements y such that f x = Some y, where x ranges over xs.

          filter_map f xs is equivalent to map Option.get (filter Option.is_some (map f xs)).

          val scan : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b t

          If xs is a sequence [x0; x1; x2; ...], then scan f a0 xs is a sequence of accumulators [a0; a1; a2; ...] where a1 is f a0 x0, a2 is f a1 x1, and so on.

          Thus, scan f a0 xs is conceptually related to fold_left f a0 xs. However, instead of performing an eager iteration and immediately returning the final accumulator, it returns a sequence of accumulators.

          For instance, scan (+) 0 transforms a sequence of integers into the sequence of its partial sums.

          If xs has length n then scan f a0 xs has length n+1.

          • since 4.14
          val take : int -> 'a t -> 'a t

          take n xs is the sequence of the first n elements of xs.

          If xs has fewer than n elements, then take n xs is equivalent to xs.

          n must be nonnegative.

          • since 4.14
          val drop : int -> 'a t -> 'a t

          drop n xs is the sequence xs, deprived of its first n elements.

          If xs has fewer than n elements, then drop n xs is empty.

          n must be nonnegative.

          drop is lazy: the first n+1 elements of the sequence xs are demanded only when the first element of drop n xs is demanded. For this reason, drop 1 xs is not equivalent to tail xs, which queries xs immediately.

          • since 4.14
          val take_while : ('a -> bool) -> 'a t -> 'a t

          take_while p xs is the longest prefix of the sequence xs where every element x satisfies p x.

          • since 4.14
          val drop_while : ('a -> bool) -> 'a t -> 'a t

          drop_while p xs is the sequence xs, deprived of the prefix take_while p xs.

          • since 4.14
          val group : ('a -> 'a -> bool) -> 'a t -> 'a t t

          Provided the function eq defines an equality on elements, group eq xs is the sequence of the maximal runs of adjacent duplicate elements of the sequence xs.

          Every element of group eq xs is a nonempty sequence of equal elements.

          The concatenation concat (group eq xs) is equal to xs.

          Consuming group eq xs, and consuming the sequences that it contains, can cause xs to be consumed more than once. Therefore, xs must be persistent.

          • since 4.14
          val memoize : 'a t -> 'a t

          The sequence memoize xs has the same elements as the sequence xs.

          Regardless of whether xs is ephemeral or persistent, memoize xs is persistent: even if it is queried several times, xs is queried at most once.

          The construction of the sequence memoize xs internally relies on suspensions provided by the module Lazy. These suspensions are not thread-safe. Therefore, the sequence memoize xs must not be queried by multiple threads concurrently.

          • since 4.14
          val transpose : 'a t t -> 'a t t

          If xss is a matrix (a sequence of rows), then transpose xss is the sequence of the columns of the matrix xss.

          The rows of the matrix xss are not required to have the same length.

          The matrix xss is not required to be finite (in either direction).

          The matrix xss must be persistent.

          • since 4.14
          val append : 'a t -> 'a t -> 'a t

          append xs ys is the concatenation of the sequences xs and ys.

          Its elements are the elements of xs, followed by the elements of ys.

          • since 4.11
          val concat : 'a t t -> 'a t

          If xss is a sequence of sequences, then concat xss is its concatenation.

          If xss is the sequence xs0; xs1; ... then concat xss is the sequence xs0 @ xs1 @ ....

          • since 4.13
          val flat_map : ('a -> 'b t) -> 'a t -> 'b t

          flat_map f xs is equivalent to concat (map f xs).

          val concat_map : ('a -> 'b t) -> 'a t -> 'b t

          concat_map f xs is equivalent to concat (map f xs).

          concat_map is an alias for flat_map.

          • since 4.13
          val zip : 'a t -> 'b t -> ('a * 'b) t

          zip xs ys is the sequence of pairs (x, y) drawn synchronously from the sequences xs and ys.

          If the sequences xs and ys have different lengths, then the sequence ends as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

          zip xs ys is equivalent to map2 (fun a b -> (a, b)) xs ys.

          • since 4.14
          val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

          map2 f xs ys is the sequence of the elements f x y, where the pairs (x, y) are drawn synchronously from the sequences xs and ys.

          If the sequences xs and ys have different lengths, then the sequence ends as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

          map2 f xs ys is equivalent to map (fun (x, y) -> f x y) (zip xs ys).

          • since 4.14
          val interleave : 'a t -> 'a t -> 'a t

          interleave xs ys is the sequence that begins with the first element of xs, continues with the first element of ys, and so on.

          When one of the sequences xs and ys is exhausted, interleave xs ys continues with the rest of the other sequence.

          • since 4.14
          val sorted_merge : ('a -> 'a -> int) -> 'a t -> 'a t -> 'a t

          If the sequences xs and ys are sorted according to the total preorder cmp, then sorted_merge cmp xs ys is the sorted sequence obtained by merging the sequences xs and ys.

          For more details on comparison functions, see Array.sort.

          • since 4.14
          val product : 'a t -> 'b t -> ('a * 'b) t

          product xs ys is the Cartesian product of the sequences xs and ys.

          For every element x of xs and for every element y of ys, the pair (x, y) appears once as an element of product xs ys.

          The order in which the pairs appear is unspecified.

          The sequences xs and ys are not required to be finite.

          The sequences xs and ys must be persistent.

          • since 4.14
          val map_product : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

          The sequence map_product f xs ys is the image through f of the Cartesian product of the sequences xs and ys.

          For every element x of xs and for every element y of ys, the element f x y appears once as an element of map_product f xs ys.

          The order in which these elements appear is unspecified.

          The sequences xs and ys are not required to be finite.

          The sequences xs and ys must be persistent.

          map_product f xs ys is equivalent to map (fun (x, y) -> f x y) (product xs ys).

          • since 4.14
          val unzip : ('a * 'b) t -> 'a t * 'b t

          unzip transforms a sequence of pairs into a pair of sequences.

          unzip xs is equivalent to (map fst xs, map snd xs).

          Querying either of the sequences returned by unzip xs causes xs to be queried. Therefore, querying both of them causes xs to be queried twice. Thus, xs must be persistent and cheap. If that is not the case, use unzip (memoize xs).

          • since 4.14
          val split : ('a * 'b) t -> 'a t * 'b t

          split is an alias for unzip.

          • since 4.14
          val partition_map : ('a -> ('b, 'c) Stdlib.Either.t) -> 'a t -> 'b t * 'c t

          partition_map f xs returns a pair of sequences (ys, zs), where:

          • ys is the sequence of the elements y such that f x = Left y, where x ranges over xs;
          • zs is the sequence of the elements z such that f x = Right z, where x ranges over xs.

          partition_map f xs is equivalent to a pair of filter_map Either.find_left (map f xs) and filter_map Either.find_right (map f xs).

          Querying either of the sequences returned by partition_map f xs causes xs to be queried. Therefore, querying both of them causes xs to be queried twice. Thus, xs must be persistent and cheap. If that is not the case, use partition_map f (memoize xs).

          • since 4.14
          val partition : ('a -> bool) -> 'a t -> 'a t * 'a t

          partition p xs returns a pair of the subsequence of the elements of xs that satisfy p and the subsequence of the elements of xs that do not satisfy p.

          partition p xs is equivalent to filter p xs, filter (fun x -> not (p x)) xs.

          Consuming both of the sequences returned by partition p xs causes xs to be consumed twice and causes the function f to be applied twice to each element of the list. Therefore, f should be pure and cheap. Furthermore, xs should be persistent and cheap. If that is not the case, use partition p (memoize xs).

          • since 4.14
          val of_dispenser : (unit -> 'a option) -> 'a t

          of_dispenser it is the sequence of the elements produced by the dispenser it. It is an ephemeral sequence: it can be consumed at most once. If a persistent sequence is needed, use memoize (of_dispenser it).

          • since 4.14
          val ints : int -> int t

          ints i is the infinite sequence of the integers beginning at i and counting up.

          • since 4.14
          val once : 'a t -> 'a t

          The sequence once xs has the same elements as the sequence xs.

          Regardless of whether xs is ephemeral or persistent, once xs is an ephemeral sequence: it can be queried at most once. If it (or a suffix of it) is queried more than once, then the exception Forced_twice is raised. This can be useful, while debugging or testing, to ensure that a sequence is consumed at most once.

          • raises Forced_twice

            if once xs, or a suffix of it, is queried more than once.

          • since 4.14
          • alert impure This imperative programming item is not permitted
          exception Forced_twice

          This exception is raised when a sequence returned by once (or a suffix of it) is queried more than once.

          • since 4.14
          • alert impure This imperative programming item is not permitted
          val to_dispenser : 'a t -> unit -> 'a option

          to_dispenser xs is a fresh dispenser on the sequence xs.

          This dispenser has mutable internal state, which is not protected by a lock; so, it must not be used by several threads concurrently.

          • since 4.14
          • alert impure This imperative programming item is not permitted
          +Seq (less-power.Stdlib_alerts.Stdlib_alerting.Seq)

          Module Stdlib_alerting.Seq

          • alert list_op List (and sequence) operations are not permitted
          type 'a t = unit -> 'a node
          and 'a node = 'a Stdlib.Seq.node =
          1. | Nil
          2. | Cons of 'a * 'a t
          include sig ... end
          val is_empty : 'a t -> bool

          is_empty xs determines whether the sequence xs is empty.

          It is recommended that the sequence xs be persistent. Indeed, is_empty xs demands the head of the sequence xs, so, if xs is ephemeral, it may be the case that xs cannot be used any more after this call has taken place.

          • since 4.14
          val uncons : 'a t -> ('a * 'a t) option

          If xs is empty, then uncons xs is None.

          If xs is nonempty, then uncons xs is Some (x, ys) where x is the head of the sequence and ys its tail.

          • since 4.14
          val length : 'a t -> int

          length xs is the length of the sequence xs.

          The sequence xs must be finite.

          • since 4.14
          val iter : ('a -> unit) -> 'a t -> unit

          iter f xs invokes f x successively for every element x of the sequence xs, from left to right.

          It terminates only if the sequence xs is finite.

          val fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

          fold_left f _ xs invokes f _ x successively for every element x of the sequence xs, from left to right.

          An accumulator of type 'a is threaded through the calls to f.

          It terminates only if the sequence xs is finite.

          val iteri : (int -> 'a -> unit) -> 'a t -> unit

          iteri f xs invokes f i x successively for every element x located at index i in the sequence xs.

          It terminates only if the sequence xs is finite.

          iteri f xs is equivalent to iter (fun (i, x) -> f i x) (zip (ints 0) xs).

          • since 4.14
          val fold_lefti : ('acc -> int -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

          fold_lefti f _ xs invokes f _ i x successively for every element x located at index i of the sequence xs.

          An accumulator of type 'b is threaded through the calls to f.

          It terminates only if the sequence xs is finite.

          fold_lefti f accu xs is equivalent to fold_left (fun accu (i, x) -> f accu i x) accu (zip (ints 0) xs).

          • since 4.14
          val for_all : ('a -> bool) -> 'a t -> bool

          for_all p xs determines whether all elements x of the sequence xs satisfy p x.

          The sequence xs must be finite.

          • since 4.14
          val exists : ('a -> bool) -> 'a t -> bool

          exists xs p determines whether at least one element x of the sequence xs satisfies p x.

          The sequence xs must be finite.

          • since 4.14
          val find : ('a -> bool) -> 'a t -> 'a option

          find p xs returns Some x, where x is the first element of the sequence xs that satisfies p x, if there is such an element.

          It returns None if there is no such element.

          The sequence xs must be finite.

          • since 4.14
          val find_index : ('a -> bool) -> 'a t -> int option

          find_index p xs returns Some i, where i is the index of the first element of the sequence xs that satisfies p x, if there is such an element.

          It returns None if there is no such element.

          The sequence xs must be finite.

          • since 5.1
          val find_map : ('a -> 'b option) -> 'a t -> 'b option

          find_map f xs returns Some y, where x is the first element of the sequence xs such that f x = Some _, if there is such an element, and where y is defined by f x = Some y.

          It returns None if there is no such element.

          The sequence xs must be finite.

          • since 4.14
          val find_mapi : (int -> 'a -> 'b option) -> 'a t -> 'b option

          Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

          The sequence xs must be finite.

          • since 5.1
          val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit

          iter2 f xs ys invokes f x y successively for every pair (x, y) of elements drawn synchronously from the sequences xs and ys.

          If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

          Iteration terminates only if at least one of the sequences xs and ys is finite.

          iter2 f xs ys is equivalent to iter (fun (x, y) -> f x y) (zip xs ys).

          • since 4.14
          val fold_left2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc

          fold_left2 f _ xs ys invokes f _ x y successively for every pair (x, y) of elements drawn synchronously from the sequences xs and ys.

          An accumulator of type 'a is threaded through the calls to f.

          If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

          Iteration terminates only if at least one of the sequences xs and ys is finite.

          fold_left2 f accu xs ys is equivalent to fold_left (fun accu (x, y) -> f accu x y) (zip xs ys).

          • since 4.14
          val for_all2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

          for_all2 p xs ys determines whether all pairs (x, y) of elements drawn synchronously from the sequences xs and ys satisfy p x y.

          If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored. In particular, if xs or ys is empty, then for_all2 p xs ys is true. This is where for_all2 and equal differ: equal eq xs ys can be true only if xs and ys have the same length.

          At least one of the sequences xs and ys must be finite.

          for_all2 p xs ys is equivalent to for_all (fun b -> b) (map2 p xs ys).

          • since 4.14
          val exists2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

          exists2 p xs ys determines whether some pair (x, y) of elements drawn synchronously from the sequences xs and ys satisfies p x y.

          If the sequences xs and ys have different lengths, then iteration must stop as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

          At least one of the sequences xs and ys must be finite.

          exists2 p xs ys is equivalent to exists (fun b -> b) (map2 p xs ys).

          • since 4.14
          val equal : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

          Provided the function eq defines an equality on elements, equal eq xs ys determines whether the sequences xs and ys are pointwise equal.

          At least one of the sequences xs and ys must be finite.

          • since 4.14
          val compare : ('a -> 'b -> int) -> 'a t -> 'b t -> int

          Provided the function cmp defines a preorder on elements, compare cmp xs ys compares the sequences xs and ys according to the lexicographic preorder.

          For more details on comparison functions, see Array.sort.

          At least one of the sequences xs and ys must be finite.

          • since 4.14
          val empty : 'a t

          empty is the empty sequence. It has no elements. Its length is 0.

          val return : 'a -> 'a t

          return x is the sequence whose sole element is x. Its length is 1.

          val cons : 'a -> 'a t -> 'a t

          cons x xs is the sequence that begins with the element x, followed with the sequence xs.

          Writing cons (f()) xs causes the function call f() to take place immediately. For this call to be delayed until the sequence is queried, one must instead write (fun () -> Cons(f(), xs)).

          • since 4.11
          val init : int -> (int -> 'a) -> 'a t

          init n f is the sequence f 0; f 1; ...; f (n-1).

          n must be nonnegative.

          If desired, the infinite sequence f 0; f 1; ... can be defined as map f (ints 0).

          • since 4.14
          val unfold : ('b -> ('a * 'b) option) -> 'b -> 'a t

          unfold constructs a sequence out of a step function and an initial state.

          If f u is None then unfold f u is the empty sequence. If f u is Some (x, u') then unfold f u is the nonempty sequence cons x (unfold f u').

          For example, unfold (function [] -> None | h :: t -> Some (h, t)) l is equivalent to List.to_seq l.

          • since 4.11
          val repeat : 'a -> 'a t

          repeat x is the infinite sequence where the element x is repeated indefinitely.

          repeat x is equivalent to cycle (return x).

          • since 4.14
          val forever : (unit -> 'a) -> 'a t

          forever f is an infinite sequence where every element is produced (on demand) by the function call f().

          For instance, forever Random.bool is an infinite sequence of random bits.

          forever f is equivalent to map f (repeat ()).

          • since 4.14
          val cycle : 'a t -> 'a t

          cycle xs is the infinite sequence that consists of an infinite number of repetitions of the sequence xs.

          If xs is an empty sequence, then cycle xs is empty as well.

          Consuming (a prefix of) the sequence cycle xs once can cause the sequence xs to be consumed more than once. Therefore, xs must be persistent.

          • since 4.14
          val iterate : ('a -> 'a) -> 'a -> 'a t

          iterate f x is the infinite sequence whose elements are x, f x, f (f x), and so on.

          In other words, it is the orbit of the function f, starting at x.

          • since 4.14
          val map : ('a -> 'b) -> 'a t -> 'b t

          map f xs is the image of the sequence xs through the transformation f.

          If xs is the sequence x0; x1; ... then map f xs is the sequence f x0; f x1; ....

          val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t

          mapi is analogous to map, but applies the function f to an index and an element.

          mapi f xs is equivalent to map2 f (ints 0) xs.

          • since 4.14
          val filter : ('a -> bool) -> 'a t -> 'a t

          filter p xs is the sequence of the elements x of xs that satisfy p x.

          In other words, filter p xs is the sequence xs, deprived of the elements x such that p x is false.

          val filter_map : ('a -> 'b option) -> 'a t -> 'b t

          filter_map f xs is the sequence of the elements y such that f x = Some y, where x ranges over xs.

          filter_map f xs is equivalent to map Option.get (filter Option.is_some (map f xs)).

          val scan : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b t

          If xs is a sequence [x0; x1; x2; ...], then scan f a0 xs is a sequence of accumulators [a0; a1; a2; ...] where a1 is f a0 x0, a2 is f a1 x1, and so on.

          Thus, scan f a0 xs is conceptually related to fold_left f a0 xs. However, instead of performing an eager iteration and immediately returning the final accumulator, it returns a sequence of accumulators.

          For instance, scan (+) 0 transforms a sequence of integers into the sequence of its partial sums.

          If xs has length n then scan f a0 xs has length n+1.

          • since 4.14
          val take : int -> 'a t -> 'a t

          take n xs is the sequence of the first n elements of xs.

          If xs has fewer than n elements, then take n xs is equivalent to xs.

          n must be nonnegative.

          • since 4.14
          val drop : int -> 'a t -> 'a t

          drop n xs is the sequence xs, deprived of its first n elements.

          If xs has fewer than n elements, then drop n xs is empty.

          n must be nonnegative.

          drop is lazy: the first n+1 elements of the sequence xs are demanded only when the first element of drop n xs is demanded. For this reason, drop 1 xs is not equivalent to tail xs, which queries xs immediately.

          • since 4.14
          val take_while : ('a -> bool) -> 'a t -> 'a t

          take_while p xs is the longest prefix of the sequence xs where every element x satisfies p x.

          • since 4.14
          val drop_while : ('a -> bool) -> 'a t -> 'a t

          drop_while p xs is the sequence xs, deprived of the prefix take_while p xs.

          • since 4.14
          val group : ('a -> 'a -> bool) -> 'a t -> 'a t t

          Provided the function eq defines an equality on elements, group eq xs is the sequence of the maximal runs of adjacent duplicate elements of the sequence xs.

          Every element of group eq xs is a nonempty sequence of equal elements.

          The concatenation concat (group eq xs) is equal to xs.

          Consuming group eq xs, and consuming the sequences that it contains, can cause xs to be consumed more than once. Therefore, xs must be persistent.

          • since 4.14
          val memoize : 'a t -> 'a t

          The sequence memoize xs has the same elements as the sequence xs.

          Regardless of whether xs is ephemeral or persistent, memoize xs is persistent: even if it is queried several times, xs is queried at most once.

          The construction of the sequence memoize xs internally relies on suspensions provided by the module Lazy. These suspensions are not thread-safe. Therefore, the sequence memoize xs must not be queried by multiple threads concurrently.

          • since 4.14
          val transpose : 'a t t -> 'a t t

          If xss is a matrix (a sequence of rows), then transpose xss is the sequence of the columns of the matrix xss.

          The rows of the matrix xss are not required to have the same length.

          The matrix xss is not required to be finite (in either direction).

          The matrix xss must be persistent.

          • since 4.14
          val append : 'a t -> 'a t -> 'a t

          append xs ys is the concatenation of the sequences xs and ys.

          Its elements are the elements of xs, followed by the elements of ys.

          • since 4.11
          val concat : 'a t t -> 'a t

          If xss is a sequence of sequences, then concat xss is its concatenation.

          If xss is the sequence xs0; xs1; ... then concat xss is the sequence xs0 @ xs1 @ ....

          • since 4.13
          val flat_map : ('a -> 'b t) -> 'a t -> 'b t

          flat_map f xs is equivalent to concat (map f xs).

          val concat_map : ('a -> 'b t) -> 'a t -> 'b t

          concat_map f xs is equivalent to concat (map f xs).

          concat_map is an alias for flat_map.

          • since 4.13
          val zip : 'a t -> 'b t -> ('a * 'b) t

          zip xs ys is the sequence of pairs (x, y) drawn synchronously from the sequences xs and ys.

          If the sequences xs and ys have different lengths, then the sequence ends as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

          zip xs ys is equivalent to map2 (fun a b -> (a, b)) xs ys.

          • since 4.14
          val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

          map2 f xs ys is the sequence of the elements f x y, where the pairs (x, y) are drawn synchronously from the sequences xs and ys.

          If the sequences xs and ys have different lengths, then the sequence ends as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

          map2 f xs ys is equivalent to map (fun (x, y) -> f x y) (zip xs ys).

          • since 4.14
          val interleave : 'a t -> 'a t -> 'a t

          interleave xs ys is the sequence that begins with the first element of xs, continues with the first element of ys, and so on.

          When one of the sequences xs and ys is exhausted, interleave xs ys continues with the rest of the other sequence.

          • since 4.14
          val sorted_merge : ('a -> 'a -> int) -> 'a t -> 'a t -> 'a t

          If the sequences xs and ys are sorted according to the total preorder cmp, then sorted_merge cmp xs ys is the sorted sequence obtained by merging the sequences xs and ys.

          For more details on comparison functions, see Array.sort.

          • since 4.14
          val product : 'a t -> 'b t -> ('a * 'b) t

          product xs ys is the Cartesian product of the sequences xs and ys.

          For every element x of xs and for every element y of ys, the pair (x, y) appears once as an element of product xs ys.

          The order in which the pairs appear is unspecified.

          The sequences xs and ys are not required to be finite.

          The sequences xs and ys must be persistent.

          • since 4.14
          val map_product : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

          The sequence map_product f xs ys is the image through f of the Cartesian product of the sequences xs and ys.

          For every element x of xs and for every element y of ys, the element f x y appears once as an element of map_product f xs ys.

          The order in which these elements appear is unspecified.

          The sequences xs and ys are not required to be finite.

          The sequences xs and ys must be persistent.

          map_product f xs ys is equivalent to map (fun (x, y) -> f x y) (product xs ys).

          • since 4.14
          val unzip : ('a * 'b) t -> 'a t * 'b t

          unzip transforms a sequence of pairs into a pair of sequences.

          unzip xs is equivalent to (map fst xs, map snd xs).

          Querying either of the sequences returned by unzip xs causes xs to be queried. Therefore, querying both of them causes xs to be queried twice. Thus, xs must be persistent and cheap. If that is not the case, use unzip (memoize xs).

          • since 4.14
          val split : ('a * 'b) t -> 'a t * 'b t

          split is an alias for unzip.

          • since 4.14
          val partition_map : ('a -> ('b, 'c) Stdlib.Either.t) -> 'a t -> 'b t * 'c t

          partition_map f xs returns a pair of sequences (ys, zs), where:

          • ys is the sequence of the elements y such that f x = Left y, where x ranges over xs;
          • zs is the sequence of the elements z such that f x = Right z, where x ranges over xs.

          partition_map f xs is equivalent to a pair of filter_map Either.find_left (map f xs) and filter_map Either.find_right (map f xs).

          Querying either of the sequences returned by partition_map f xs causes xs to be queried. Therefore, querying both of them causes xs to be queried twice. Thus, xs must be persistent and cheap. If that is not the case, use partition_map f (memoize xs).

          • since 4.14
          val partition : ('a -> bool) -> 'a t -> 'a t * 'a t

          partition p xs returns a pair of the subsequence of the elements of xs that satisfy p and the subsequence of the elements of xs that do not satisfy p.

          partition p xs is equivalent to filter p xs, filter (fun x -> not (p x)) xs.

          Consuming both of the sequences returned by partition p xs causes xs to be consumed twice and causes the function f to be applied twice to each element of the list. Therefore, f should be pure and cheap. Furthermore, xs should be persistent and cheap. If that is not the case, use partition p (memoize xs).

          • since 4.14
          val of_dispenser : (unit -> 'a option) -> 'a t

          of_dispenser it is the sequence of the elements produced by the dispenser it. It is an ephemeral sequence: it can be consumed at most once. If a persistent sequence is needed, use memoize (of_dispenser it).

          • since 4.14
          val ints : int -> int t

          ints i is the infinite sequence of the integers beginning at i and counting up.

          • since 4.14
          val once : 'a t -> 'a t

          The sequence once xs has the same elements as the sequence xs.

          Regardless of whether xs is ephemeral or persistent, once xs is an ephemeral sequence: it can be queried at most once. If it (or a suffix of it) is queried more than once, then the exception Forced_twice is raised. This can be useful, while debugging or testing, to ensure that a sequence is consumed at most once.

          • raises Forced_twice

            if once xs, or a suffix of it, is queried more than once.

          • since 4.14
          • alert impure This imperative programming item is not permitted
          exception Forced_twice

          This exception is raised when a sequence returned by once (or a suffix of it) is queried more than once.

          • since 4.14
          • alert impure This imperative programming item is not permitted
          val to_dispenser : 'a t -> unit -> 'a option

          to_dispenser xs is a fresh dispenser on the sequence xs.

          This dispenser has mutable internal state, which is not protected by a lock; so, it must not be used by several threads concurrently.

          • since 4.14
          • alert impure This imperative programming item is not permitted
          diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/StdLabels/List/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/StdLabels/List/index.html index 31b142d..0675566 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/StdLabels/List/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/StdLabels/List/index.html @@ -1,5 +1,5 @@ -List (less-power.Stdlib_alerts.Stdlib_alerting.StdLabels.List)

          Module StdLabels.List

          • alert list_op List operations are not permitted
          include sig ... end
          type 'a t = 'a list =
          1. | []
          2. | :: of 'a * 'a list

          An alias for the type of lists.

          val length : 'a list -> int

          Return the length (number of elements) of the given list.

          val compare_lengths : 'a list -> 'b list -> int

          Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

          • since 4.05
          val compare_length_with : 'a list -> len:int -> int

          Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

          • since 4.05
          val is_empty : 'a list -> bool

          is_empty l is true if and only if l has no elements. It is equivalent to compare_length_with l 0 = 0.

          • since 5.1
          val cons : 'a -> 'a list -> 'a list

          cons x xs is x :: xs

          • since 4.03 (4.05 in ListLabels)
          val hd : 'a list -> 'a

          Return the first element of the given list.

          • raises Failure

            if the list is empty.

          val tl : 'a list -> 'a list

          Return the given list without its first element.

          • raises Failure

            if the list is empty.

          val nth : 'a list -> int -> 'a

          Return the n-th element of the given list. The first element (head of the list) is at position 0.

          • raises Failure

            if the list is too short.

          val nth_opt : 'a list -> int -> 'a option

          Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

          • since 4.05
          val rev : 'a list -> 'a list

          List reversal.

          val init : len:int -> f:(int -> 'a) -> 'a list

          init ~len ~f is [f 0; f 1; ...; f (len-1)], evaluated left to right.

          • since 4.06
          val append : 'a list -> 'a list -> 'a list

          append l0 l1 appends l1 to l0. Same function as the infix operator @.

          • since 5.1 this function is tail-recursive.
          val rev_append : 'a list -> 'a list -> 'a list

          rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

          val concat : 'a list list -> 'a list

          Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).

          val flatten : 'a list list -> 'a list

          Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

          val equal : eq:('a -> 'a -> bool) -> 'a list -> 'a list -> bool

          equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

          Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

          • since 4.12
          val compare : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> int

          compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

          • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
          • the empty list [] is strictly smaller than non-empty lists

          Note: the cmp function will be called even if the lists have different lengths.

          • since 4.12
          val iter : f:('a -> unit) -> 'a list -> unit

          iter ~f [a1; ...; an] applies function f in turn to [a1; ...; an]. It is equivalent to f a1; f a2; ...; f an.

          val iteri : f:(int -> 'a -> unit) -> 'a list -> unit

          Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

          • since 4.00
          val map : f:('a -> 'b) -> 'a list -> 'b list

          map ~f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1; ...; f an] with the results returned by f.

          val mapi : f:(int -> 'a -> 'b) -> 'a list -> 'b list

          Same as map, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

          • since 4.00
          val rev_map : f:('a -> 'b) -> 'a list -> 'b list

          rev_map ~f l gives the same result as rev (map f l), but is more efficient.

          val filter_map : f:('a -> 'b option) -> 'a list -> 'b list

          filter_map ~f l applies f to every element of l, filters out the None elements and returns the list of the arguments of the Some elements.

          • since 4.08
          val concat_map : f:('a -> 'b list) -> 'a list -> 'b list

          concat_map ~f l gives the same result as concat (map f l). Tail-recursive.

          • since 4.10
          val fold_left_map : +List (less-power.Stdlib_alerts.Stdlib_alerting.StdLabels.List)

          Module StdLabels.List

          • alert list_op List operations are not permitted
          include sig ... end
          type 'a t = 'a list =
          1. | []
          2. | :: of 'a * 'a list

          An alias for the type of lists.

          val length : 'a list -> int

          Return the length (number of elements) of the given list.

          val compare_lengths : 'a list -> 'b list -> int

          Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

          • since 4.05
          val compare_length_with : 'a list -> len:int -> int

          Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

          • since 4.05
          val is_empty : 'a list -> bool

          is_empty l is true if and only if l has no elements. It is equivalent to compare_length_with l 0 = 0.

          • since 5.1
          val cons : 'a -> 'a list -> 'a list

          cons x xs is x :: xs

          • since 4.03 (4.05 in ListLabels)
          val hd : 'a list -> 'a

          Return the first element of the given list.

          • raises Failure

            if the list is empty.

          val tl : 'a list -> 'a list

          Return the given list without its first element.

          • raises Failure

            if the list is empty.

          val nth : 'a list -> int -> 'a

          Return the n-th element of the given list. The first element (head of the list) is at position 0.

          • raises Failure

            if the list is too short.

          val nth_opt : 'a list -> int -> 'a option

          Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

          • since 4.05
          val rev : 'a list -> 'a list

          List reversal.

          val init : len:int -> f:(int -> 'a) -> 'a list

          init ~len ~f is [f 0; f 1; ...; f (len-1)], evaluated left to right.

          • since 4.06
          val append : 'a list -> 'a list -> 'a list

          append l0 l1 appends l1 to l0. Same function as the infix operator @.

          • since 5.1 this function is tail-recursive.
          val rev_append : 'a list -> 'a list -> 'a list

          rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

          val concat : 'a list list -> 'a list

          Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).

          val flatten : 'a list list -> 'a list

          Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

          val equal : eq:('a -> 'a -> bool) -> 'a list -> 'a list -> bool

          equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

          Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

          • since 4.12
          val compare : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> int

          compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

          • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
          • the empty list [] is strictly smaller than non-empty lists

          Note: the cmp function will be called even if the lists have different lengths.

          • since 4.12
          val iter : f:('a -> unit) -> 'a list -> unit

          iter ~f [a1; ...; an] applies function f in turn to [a1; ...; an]. It is equivalent to f a1; f a2; ...; f an.

          val iteri : f:(int -> 'a -> unit) -> 'a list -> unit

          Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

          • since 4.00
          val map : f:('a -> 'b) -> 'a list -> 'b list

          map ~f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1; ...; f an] with the results returned by f.

          val mapi : f:(int -> 'a -> 'b) -> 'a list -> 'b list

          Same as map, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

          • since 4.00
          val rev_map : f:('a -> 'b) -> 'a list -> 'b list

          rev_map ~f l gives the same result as rev (map f l), but is more efficient.

          val filter_map : f:('a -> 'b option) -> 'a list -> 'b list

          filter_map ~f l applies f to every element of l, filters out the None elements and returns the list of the arguments of the Some elements.

          • since 4.08
          val concat_map : f:('a -> 'b list) -> 'a list -> 'b list

          concat_map ~f l gives the same result as concat (map f l). Tail-recursive.

          • since 4.10
          val fold_left_map : f:('acc -> 'a -> 'acc * 'b) -> init:'acc -> 'a list -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/StdLabels/String/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/StdLabels/String/index.html index d201730..8d3c493 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/StdLabels/String/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/StdLabels/String/index.html @@ -1,5 +1,5 @@ -String (less-power.Stdlib_alerts.Stdlib_alerting.StdLabels.String)

          Module StdLabels.String

          include sig ... end
          type t = string

          The type for strings.

          val make : int -> char -> string

          make n c is a string of length n with each index holding the character c.

          val init : int -> f:(int -> char) -> string

          init n ~f is a string of length n with index i holding the character f i (called in increasing index order).

          • since 4.02
          val empty : string

          The empty string.

          • since 4.13
          val length : string -> int

          length s is the length (number of bytes/characters) of s.

          val get : string -> int -> char

          get s i is the character at index i in s. This is the same as writing s.[i].

          val concat : sep:string -> string list -> string

          concat ~sep ss concatenates the list of strings ss, inserting the separator string sep between each.

          • raises Invalid_argument

            if the result is longer than Sys.max_string_length bytes.

          val cat : string -> string -> string

          cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

          • raises Invalid_argument

            if the result is longer than Sys.max_string_length bytes.

          • since 4.13
          val equal : t -> t -> bool

          equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

          • since 4.03 (4.05 in StringLabels)
          val compare : t -> t -> int

          compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

          val starts_with : prefix:string -> string -> bool

          starts_with ~prefix s is true if and only if s starts with prefix.

          • since 4.13
          val ends_with : suffix:string -> string -> bool

          ends_with ~suffix s is true if and only if s ends with suffix.

          • since 4.13
          val contains_from : string -> int -> char -> bool

          contains_from s start c is true if and only if c appears in s after position start.

          val rcontains_from : string -> int -> char -> bool

          rcontains_from s stop c is true if and only if c appears in s before position stop+1.

          val contains : string -> char -> bool

          contains s c is String.contains_from s 0 c.

          val sub : string -> pos:int -> len:int -> string

          sub s ~pos ~len is a string of length len, containing the substring of s that starts at position pos and has length len.

          val split_on_char : sep:char -> string -> string list

          split_on_char ~sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

          The function's result is specified by the following invariants:

          • The list is not empty.
          • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) +String (less-power.Stdlib_alerts.Stdlib_alerting.StdLabels.String)

            Module StdLabels.String

            include sig ... end
            type t = string

            The type for strings.

            val make : int -> char -> string

            make n c is a string of length n with each index holding the character c.

            val init : int -> f:(int -> char) -> string

            init n ~f is a string of length n with index i holding the character f i (called in increasing index order).

            • since 4.02
            val empty : string

            The empty string.

            • since 4.13
            val length : string -> int

            length s is the length (number of bytes/characters) of s.

            val get : string -> int -> char

            get s i is the character at index i in s. This is the same as writing s.[i].

            val concat : sep:string -> string list -> string

            concat ~sep ss concatenates the list of strings ss, inserting the separator string sep between each.

            • raises Invalid_argument

              if the result is longer than Sys.max_string_length bytes.

            val cat : string -> string -> string

            cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

            • raises Invalid_argument

              if the result is longer than Sys.max_string_length bytes.

            • since 4.13
            val equal : t -> t -> bool

            equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

            • since 4.03 (4.05 in StringLabels)
            val compare : t -> t -> int

            compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

            val starts_with : prefix:string -> string -> bool

            starts_with ~prefix s is true if and only if s starts with prefix.

            • since 4.13
            val ends_with : suffix:string -> string -> bool

            ends_with ~suffix s is true if and only if s ends with suffix.

            • since 4.13
            val contains_from : string -> int -> char -> bool

            contains_from s start c is true if and only if c appears in s after position start.

            val rcontains_from : string -> int -> char -> bool

            rcontains_from s stop c is true if and only if c appears in s before position stop+1.

            val contains : string -> char -> bool

            contains s c is String.contains_from s 0 c.

            val sub : string -> pos:int -> len:int -> string

            sub s ~pos ~len is a string of length len, containing the substring of s that starts at position pos and has length len.

            val split_on_char : sep:char -> string -> string list

            split_on_char ~sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

            The function's result is specified by the following invariants:

            • The list is not empty.
            • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) (split_on_char sep s) = s).
            • No string in the result contains the sep character.
            • since 4.04 (4.05 in StringLabels)
            val map : f:(char -> char) -> string -> string

            map f s is the string resulting from applying f to all the characters of s in increasing order.

            • since 4.00
            val mapi : f:(int -> char -> char) -> string -> string

            mapi ~f s is like map but the index of the character is also passed to f.

            • since 4.02
            val fold_left : f:('acc -> char -> 'acc) -> init:'acc -> string -> 'acc

            fold_left f x s computes f (... (f (f x s.[0]) s.[1]) ...) s.[n-1], where n is the length of the string s.

            • since 4.13
            val fold_right : f:(char -> 'acc -> 'acc) -> string -> init:'acc -> 'acc

            fold_right f s x computes f s.[0] (f s.[1] ( ... (f s.[n-1] x) ...)), where n is the length of the string s.

            • since 4.13
            val for_all : f:(char -> bool) -> string -> bool

            for_all p s checks if all characters in s satisfy the predicate p.

            • since 4.13
            val exists : f:(char -> bool) -> string -> bool

            exists p s checks if at least one character of s satisfies the predicate p.

            • since 4.13
            val trim : string -> string

            trim s is s without leading and trailing whitespace. Whitespace characters are: ' ', '\x0C' (form feed), '\n', '\r', and '\t'.

            • since 4.00
            val escaped : string -> string

            escaped s is s with special characters represented by escape sequences, following the lexical conventions of OCaml.

            All characters outside the US-ASCII printable range [0x20;0x7E] are escaped, as well as backslash (0x2F) and double-quote (0x22).

            The function Scanf.unescaped is a left inverse of escaped, i.e. Scanf.unescaped (escaped s) = s for any string s (unless escaped s fails).

            • raises Invalid_argument

              if the result is longer than Sys.max_string_length bytes.

            val uppercase_ascii : string -> string

            uppercase_ascii s is s with all lowercase letters translated to uppercase, using the US-ASCII character set.

            • since 4.03 (4.05 in StringLabels)
            val lowercase_ascii : string -> string

            lowercase_ascii s is s with all uppercase letters translated to lowercase, using the US-ASCII character set.

            • since 4.03 (4.05 in StringLabels)
            val capitalize_ascii : string -> string

            capitalize_ascii s is s with the first character set to uppercase, using the US-ASCII character set.

            • since 4.03 (4.05 in StringLabels)
            val uncapitalize_ascii : string -> string

            uncapitalize_ascii s is s with the first character set to lowercase, using the US-ASCII character set.

            • since 4.03 (4.05 in StringLabels)
            val iter : f:(char -> unit) -> string -> unit

            iter ~f s applies function f in turn to all the characters of s. It is equivalent to f s.[0]; f s.[1]; ...; f s.[length s - 1]; ().

            val iteri : f:(int -> char -> unit) -> string -> unit

            iteri is like iter, but the function is also given the corresponding character index.

            • since 4.00
            val index_from : string -> int -> char -> int

            index_from s i c is the index of the first occurrence of c in s after position i.

            • raises Not_found

              if c does not occur in s after position i.

            val index_from_opt : string -> int -> char -> int option

            index_from_opt s i c is the index of the first occurrence of c in s after position i (if any).

            • since 4.05
            val rindex_from : string -> int -> char -> int

            rindex_from s i c is the index of the last occurrence of c in s before position i+1.

            • raises Not_found

              if c does not occur in s before position i+1.

            val rindex_from_opt : string -> int -> char -> int option

            rindex_from_opt s i c is the index of the last occurrence of c in s before position i+1 (if any).

            • since 4.05
            val index : string -> char -> int

            index s c is String.index_from s 0 c.

            val index_opt : string -> char -> int option

            index_opt s c is String.index_from_opt s 0 c.

            • since 4.05
            val rindex : string -> char -> int

            rindex s c is String.rindex_from s (length s - 1) c.

            val rindex_opt : string -> char -> int option

            rindex_opt s c is String.rindex_from_opt s (length s - 1) c.

            • since 4.05
            val to_seq : t -> char Stdlib.Seq.t

            to_seq s is a sequence made of the string's characters in increasing order. In "unsafe-string" mode, modifications of the string during iteration will be reflected in the sequence.

            • since 4.07
            val to_seqi : t -> (int * char) Stdlib.Seq.t

            to_seqi s is like to_seq but also tuples the corresponding index.

            • since 4.07
            val of_seq : char Stdlib.Seq.t -> t

            of_seq s is a string made of the sequence's characters.

            • since 4.07
            val get_utf_8_uchar : t -> int -> Stdlib.Uchar.utf_decode

            get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

            val is_valid_utf_8 : t -> bool

            is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

            val get_utf_16be_uchar : t -> int -> Stdlib.Uchar.utf_decode

            get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

            val is_valid_utf_16be : t -> bool

            is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

            val get_utf_16le_uchar : t -> int -> Stdlib.Uchar.utf_decode

            get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

            val is_valid_utf_16le : t -> bool

            is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

            val get_uint8 : string -> int -> int

            get_uint8 b i is b's unsigned 8-bit integer starting at character index i.

            • since 4.13
            val get_int8 : string -> int -> int

            get_int8 b i is b's signed 8-bit integer starting at character index i.

            • since 4.13
            val get_uint16_ne : string -> int -> int

            get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at character index i.

            • since 4.13
            val get_uint16_be : string -> int -> int

            get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at character index i.

            • since 4.13
            val get_uint16_le : string -> int -> int

            get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at character index i.

            • since 4.13
            val get_int16_ne : string -> int -> int

            get_int16_ne b i is b's native-endian signed 16-bit integer starting at character index i.

            • since 4.13
            val get_int16_be : string -> int -> int

            get_int16_be b i is b's big-endian signed 16-bit integer starting at character index i.

            • since 4.13
            val get_int16_le : string -> int -> int

            get_int16_le b i is b's little-endian signed 16-bit integer starting at character index i.

            • since 4.13
            val get_int32_ne : string -> int -> int32

            get_int32_ne b i is b's native-endian 32-bit integer starting at character index i.

            • since 4.13
            val hash : t -> int

            An unseeded hash function for strings, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

            • since 5.0
            val seeded_hash : int -> t -> int

            A seeded hash function for strings, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

            • since 5.0
            val get_int32_be : string -> int -> int32

            get_int32_be b i is b's big-endian 32-bit integer starting at character index i.

            • since 4.13
            val get_int32_le : string -> int -> int32

            get_int32_le b i is b's little-endian 32-bit integer starting at character index i.

            • since 4.13
            val get_int64_ne : string -> int -> int64

            get_int64_ne b i is b's native-endian 64-bit integer starting at character index i.

            • since 4.13
            val get_int64_be : string -> int -> int64

            get_int64_be b i is b's big-endian 64-bit integer starting at character index i.

            • since 4.13
            val get_int64_le : string -> int -> int64

            get_int64_le b i is b's little-endian 64-bit integer starting at character index i.

            • since 4.13
            val of_bytes : bytes -> string

            Return a new string that contains the same bytes as the given byte sequence.

            • since 4.13
            • alert impure This imperative programming item is not permitted
            val to_bytes : string -> bytes

            Return a new byte sequence that contains the same bytes as the given string.

            • since 4.13
            • alert impure This imperative programming item is not permitted
            val blit : src:string -> src_pos:int -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/StdLabels/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/StdLabels/index.html index 2ff224f..d8850f7 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/StdLabels/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/StdLabels/index.html @@ -1,2 +1,2 @@ -StdLabels (less-power.Stdlib_alerts.Stdlib_alerting.StdLabels)

            Module Stdlib_alerting.StdLabels

            include sig ... end
            module Array = Stdlib.ArrayLabels
            module Bytes = Stdlib.BytesLabels
            +StdLabels (less-power.Stdlib_alerts.Stdlib_alerting.StdLabels)

            Module Stdlib_alerting.StdLabels

            include sig ... end
            module Array = Stdlib.ArrayLabels
            module Bytes = Stdlib.BytesLabels
            diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/String/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/String/index.html index 0af67dc..76594d3 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/String/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/String/index.html @@ -1,3 +1,3 @@ -String (less-power.Stdlib_alerts.Stdlib_alerting.String)

            Module Stdlib_alerting.String

            include sig ... end
            type t = string

            The type for strings.

            val make : int -> char -> string

            make n c is a string of length n with each index holding the character c.

            val init : int -> (int -> char) -> string

            init n f is a string of length n with index i holding the character f i (called in increasing index order).

            • since 4.02
            val empty : string

            The empty string.

            • since 4.13
            val length : string -> int

            length s is the length (number of bytes/characters) of s.

            val get : string -> int -> char

            get s i is the character at index i in s. This is the same as writing s.[i].

            val concat : string -> string list -> string

            concat sep ss concatenates the list of strings ss, inserting the separator string sep between each.

            • raises Invalid_argument

              if the result is longer than Sys.max_string_length bytes.

            val cat : string -> string -> string

            cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

            • raises Invalid_argument

              if the result is longer than Sys.max_string_length bytes.

            • since 4.13
            val equal : t -> t -> bool

            equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

            • since 4.03 (4.05 in StringLabels)
            val compare : t -> t -> int

            compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

            val starts_with : prefix:string -> string -> bool

            starts_with ~prefix s is true if and only if s starts with prefix.

            • since 4.13
            val ends_with : suffix:string -> string -> bool

            ends_with ~suffix s is true if and only if s ends with suffix.

            • since 4.13
            val contains_from : string -> int -> char -> bool

            contains_from s start c is true if and only if c appears in s after position start.

            val rcontains_from : string -> int -> char -> bool

            rcontains_from s stop c is true if and only if c appears in s before position stop+1.

            val contains : string -> char -> bool

            contains s c is String.contains_from s 0 c.

            val sub : string -> int -> int -> string

            sub s pos len is a string of length len, containing the substring of s that starts at position pos and has length len.

            val split_on_char : char -> string -> string list

            split_on_char sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

            The function's result is specified by the following invariants:

            • The list is not empty.
            • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) +String (less-power.Stdlib_alerts.Stdlib_alerting.String)

              Module Stdlib_alerting.String

              include sig ... end
              type t = string

              The type for strings.

              val make : int -> char -> string

              make n c is a string of length n with each index holding the character c.

              val init : int -> (int -> char) -> string

              init n f is a string of length n with index i holding the character f i (called in increasing index order).

              • since 4.02
              val empty : string

              The empty string.

              • since 4.13
              val length : string -> int

              length s is the length (number of bytes/characters) of s.

              val get : string -> int -> char

              get s i is the character at index i in s. This is the same as writing s.[i].

              val concat : string -> string list -> string

              concat sep ss concatenates the list of strings ss, inserting the separator string sep between each.

              • raises Invalid_argument

                if the result is longer than Sys.max_string_length bytes.

              val cat : string -> string -> string

              cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

              • raises Invalid_argument

                if the result is longer than Sys.max_string_length bytes.

              • since 4.13
              val equal : t -> t -> bool

              equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

              • since 4.03 (4.05 in StringLabels)
              val compare : t -> t -> int

              compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

              val starts_with : prefix:string -> string -> bool

              starts_with ~prefix s is true if and only if s starts with prefix.

              • since 4.13
              val ends_with : suffix:string -> string -> bool

              ends_with ~suffix s is true if and only if s ends with suffix.

              • since 4.13
              val contains_from : string -> int -> char -> bool

              contains_from s start c is true if and only if c appears in s after position start.

              val rcontains_from : string -> int -> char -> bool

              rcontains_from s stop c is true if and only if c appears in s before position stop+1.

              val contains : string -> char -> bool

              contains s c is String.contains_from s 0 c.

              val sub : string -> int -> int -> string

              sub s pos len is a string of length len, containing the substring of s that starts at position pos and has length len.

              val split_on_char : char -> string -> string list

              split_on_char sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

              The function's result is specified by the following invariants:

              • The list is not empty.
              • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) (split_on_char sep s) = s).
              • No string in the result contains the sep character.
              • since 4.04 (4.05 in StringLabels)
              val map : (char -> char) -> string -> string

              map f s is the string resulting from applying f to all the characters of s in increasing order.

              • since 4.00
              val mapi : (int -> char -> char) -> string -> string

              mapi f s is like map but the index of the character is also passed to f.

              • since 4.02
              val fold_left : ('acc -> char -> 'acc) -> 'acc -> string -> 'acc

              fold_left f x s computes f (... (f (f x s.[0]) s.[1]) ...) s.[n-1], where n is the length of the string s.

              • since 4.13
              val fold_right : (char -> 'acc -> 'acc) -> string -> 'acc -> 'acc

              fold_right f s x computes f s.[0] (f s.[1] ( ... (f s.[n-1] x) ...)), where n is the length of the string s.

              • since 4.13
              val for_all : (char -> bool) -> string -> bool

              for_all p s checks if all characters in s satisfy the predicate p.

              • since 4.13
              val exists : (char -> bool) -> string -> bool

              exists p s checks if at least one character of s satisfies the predicate p.

              • since 4.13
              val trim : string -> string

              trim s is s without leading and trailing whitespace. Whitespace characters are: ' ', '\x0C' (form feed), '\n', '\r', and '\t'.

              • since 4.00
              val escaped : string -> string

              escaped s is s with special characters represented by escape sequences, following the lexical conventions of OCaml.

              All characters outside the US-ASCII printable range [0x20;0x7E] are escaped, as well as backslash (0x2F) and double-quote (0x22).

              The function Scanf.unescaped is a left inverse of escaped, i.e. Scanf.unescaped (escaped s) = s for any string s (unless escaped s fails).

              • raises Invalid_argument

                if the result is longer than Sys.max_string_length bytes.

              val uppercase_ascii : string -> string

              uppercase_ascii s is s with all lowercase letters translated to uppercase, using the US-ASCII character set.

              • since 4.03 (4.05 in StringLabels)
              val lowercase_ascii : string -> string

              lowercase_ascii s is s with all uppercase letters translated to lowercase, using the US-ASCII character set.

              • since 4.03 (4.05 in StringLabels)
              val capitalize_ascii : string -> string

              capitalize_ascii s is s with the first character set to uppercase, using the US-ASCII character set.

              • since 4.03 (4.05 in StringLabels)
              val uncapitalize_ascii : string -> string

              uncapitalize_ascii s is s with the first character set to lowercase, using the US-ASCII character set.

              • since 4.03 (4.05 in StringLabels)
              val iter : (char -> unit) -> string -> unit

              iter f s applies function f in turn to all the characters of s. It is equivalent to f s.[0]; f s.[1]; ...; f s.[length s - 1]; ().

              val iteri : (int -> char -> unit) -> string -> unit

              iteri is like iter, but the function is also given the corresponding character index.

              • since 4.00
              val index_from : string -> int -> char -> int

              index_from s i c is the index of the first occurrence of c in s after position i.

              • raises Not_found

                if c does not occur in s after position i.

              val index_from_opt : string -> int -> char -> int option

              index_from_opt s i c is the index of the first occurrence of c in s after position i (if any).

              • since 4.05
              val rindex_from : string -> int -> char -> int

              rindex_from s i c is the index of the last occurrence of c in s before position i+1.

              • raises Not_found

                if c does not occur in s before position i+1.

              val rindex_from_opt : string -> int -> char -> int option

              rindex_from_opt s i c is the index of the last occurrence of c in s before position i+1 (if any).

              • since 4.05
              val index : string -> char -> int

              index s c is String.index_from s 0 c.

              val index_opt : string -> char -> int option

              index_opt s c is String.index_from_opt s 0 c.

              • since 4.05
              val rindex : string -> char -> int

              rindex s c is String.rindex_from s (length s - 1) c.

              val rindex_opt : string -> char -> int option

              rindex_opt s c is String.rindex_from_opt s (length s - 1) c.

              • since 4.05
              val to_seq : t -> char Stdlib.Seq.t

              to_seq s is a sequence made of the string's characters in increasing order. In "unsafe-string" mode, modifications of the string during iteration will be reflected in the sequence.

              • since 4.07
              val to_seqi : t -> (int * char) Stdlib.Seq.t

              to_seqi s is like to_seq but also tuples the corresponding index.

              • since 4.07
              val of_seq : char Stdlib.Seq.t -> t

              of_seq s is a string made of the sequence's characters.

              • since 4.07
              val get_utf_8_uchar : t -> int -> Stdlib.Uchar.utf_decode

              get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

              val is_valid_utf_8 : t -> bool

              is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

              val get_utf_16be_uchar : t -> int -> Stdlib.Uchar.utf_decode

              get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

              val is_valid_utf_16be : t -> bool

              is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

              val get_utf_16le_uchar : t -> int -> Stdlib.Uchar.utf_decode

              get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

              val is_valid_utf_16le : t -> bool

              is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

              val get_uint8 : string -> int -> int

              get_uint8 b i is b's unsigned 8-bit integer starting at character index i.

              • since 4.13
              val get_int8 : string -> int -> int

              get_int8 b i is b's signed 8-bit integer starting at character index i.

              • since 4.13
              val get_uint16_ne : string -> int -> int

              get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at character index i.

              • since 4.13
              val get_uint16_be : string -> int -> int

              get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at character index i.

              • since 4.13
              val get_uint16_le : string -> int -> int

              get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at character index i.

              • since 4.13
              val get_int16_ne : string -> int -> int

              get_int16_ne b i is b's native-endian signed 16-bit integer starting at character index i.

              • since 4.13
              val get_int16_be : string -> int -> int

              get_int16_be b i is b's big-endian signed 16-bit integer starting at character index i.

              • since 4.13
              val get_int16_le : string -> int -> int

              get_int16_le b i is b's little-endian signed 16-bit integer starting at character index i.

              • since 4.13
              val get_int32_ne : string -> int -> int32

              get_int32_ne b i is b's native-endian 32-bit integer starting at character index i.

              • since 4.13
              val hash : t -> int

              An unseeded hash function for strings, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

              • since 5.0
              val seeded_hash : int -> t -> int

              A seeded hash function for strings, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

              • since 5.0
              val get_int32_be : string -> int -> int32

              get_int32_be b i is b's big-endian 32-bit integer starting at character index i.

              • since 4.13
              val get_int32_le : string -> int -> int32

              get_int32_le b i is b's little-endian 32-bit integer starting at character index i.

              • since 4.13
              val get_int64_ne : string -> int -> int64

              get_int64_ne b i is b's native-endian 64-bit integer starting at character index i.

              • since 4.13
              val get_int64_be : string -> int -> int64

              get_int64_be b i is b's big-endian 64-bit integer starting at character index i.

              • since 4.13
              val get_int64_le : string -> int -> int64

              get_int64_le b i is b's little-endian 64-bit integer starting at character index i.

              • since 4.13
              val of_bytes : bytes -> string

              Return a new string that contains the same bytes as the given byte sequence.

              • since 4.13
              • alert impure This imperative programming item is not permitted
              val to_bytes : string -> bytes

              Return a new byte sequence that contains the same bytes as the given string.

              • since 4.13
              • alert impure This imperative programming item is not permitted
              val blit : string -> int -> bytes -> int -> int -> unit

              Same as Bytes.blit_string which should be preferred.

              • alert impure This imperative programming item is not permitted
              diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/StringLabels/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/StringLabels/index.html index 02601d3..10b25af 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/StringLabels/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/StringLabels/index.html @@ -1,5 +1,5 @@ -StringLabels (less-power.Stdlib_alerts.Stdlib_alerting.StringLabels)

              Module Stdlib_alerting.StringLabels

              include sig ... end
              type t = string

              The type for strings.

              val make : int -> char -> string

              make n c is a string of length n with each index holding the character c.

              val init : int -> f:(int -> char) -> string

              init n ~f is a string of length n with index i holding the character f i (called in increasing index order).

              • since 4.02
              val empty : string

              The empty string.

              • since 4.13
              val length : string -> int

              length s is the length (number of bytes/characters) of s.

              val get : string -> int -> char

              get s i is the character at index i in s. This is the same as writing s.[i].

              val concat : sep:string -> string list -> string

              concat ~sep ss concatenates the list of strings ss, inserting the separator string sep between each.

              • raises Invalid_argument

                if the result is longer than Sys.max_string_length bytes.

              val cat : string -> string -> string

              cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

              • raises Invalid_argument

                if the result is longer than Sys.max_string_length bytes.

              • since 4.13
              val equal : t -> t -> bool

              equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

              • since 4.03 (4.05 in StringLabels)
              val compare : t -> t -> int

              compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

              val starts_with : prefix:string -> string -> bool

              starts_with ~prefix s is true if and only if s starts with prefix.

              • since 4.13
              val ends_with : suffix:string -> string -> bool

              ends_with ~suffix s is true if and only if s ends with suffix.

              • since 4.13
              val contains_from : string -> int -> char -> bool

              contains_from s start c is true if and only if c appears in s after position start.

              val rcontains_from : string -> int -> char -> bool

              rcontains_from s stop c is true if and only if c appears in s before position stop+1.

              val contains : string -> char -> bool

              contains s c is String.contains_from s 0 c.

              val sub : string -> pos:int -> len:int -> string

              sub s ~pos ~len is a string of length len, containing the substring of s that starts at position pos and has length len.

              val split_on_char : sep:char -> string -> string list

              split_on_char ~sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

              The function's result is specified by the following invariants:

              • The list is not empty.
              • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) +StringLabels (less-power.Stdlib_alerts.Stdlib_alerting.StringLabels)

                Module Stdlib_alerting.StringLabels

                include sig ... end
                type t = string

                The type for strings.

                val make : int -> char -> string

                make n c is a string of length n with each index holding the character c.

                val init : int -> f:(int -> char) -> string

                init n ~f is a string of length n with index i holding the character f i (called in increasing index order).

                • since 4.02
                val empty : string

                The empty string.

                • since 4.13
                val length : string -> int

                length s is the length (number of bytes/characters) of s.

                val get : string -> int -> char

                get s i is the character at index i in s. This is the same as writing s.[i].

                val concat : sep:string -> string list -> string

                concat ~sep ss concatenates the list of strings ss, inserting the separator string sep between each.

                • raises Invalid_argument

                  if the result is longer than Sys.max_string_length bytes.

                val cat : string -> string -> string

                cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

                • raises Invalid_argument

                  if the result is longer than Sys.max_string_length bytes.

                • since 4.13
                val equal : t -> t -> bool

                equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

                • since 4.03 (4.05 in StringLabels)
                val compare : t -> t -> int

                compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

                val starts_with : prefix:string -> string -> bool

                starts_with ~prefix s is true if and only if s starts with prefix.

                • since 4.13
                val ends_with : suffix:string -> string -> bool

                ends_with ~suffix s is true if and only if s ends with suffix.

                • since 4.13
                val contains_from : string -> int -> char -> bool

                contains_from s start c is true if and only if c appears in s after position start.

                val rcontains_from : string -> int -> char -> bool

                rcontains_from s stop c is true if and only if c appears in s before position stop+1.

                val contains : string -> char -> bool

                contains s c is String.contains_from s 0 c.

                val sub : string -> pos:int -> len:int -> string

                sub s ~pos ~len is a string of length len, containing the substring of s that starts at position pos and has length len.

                val split_on_char : sep:char -> string -> string list

                split_on_char ~sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

                The function's result is specified by the following invariants:

                • The list is not empty.
                • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) (split_on_char sep s) = s).
                • No string in the result contains the sep character.
                • since 4.04 (4.05 in StringLabels)
                val map : f:(char -> char) -> string -> string

                map f s is the string resulting from applying f to all the characters of s in increasing order.

                • since 4.00
                val mapi : f:(int -> char -> char) -> string -> string

                mapi ~f s is like map but the index of the character is also passed to f.

                • since 4.02
                val fold_left : f:('acc -> char -> 'acc) -> init:'acc -> string -> 'acc

                fold_left f x s computes f (... (f (f x s.[0]) s.[1]) ...) s.[n-1], where n is the length of the string s.

                • since 4.13
                val fold_right : f:(char -> 'acc -> 'acc) -> string -> init:'acc -> 'acc

                fold_right f s x computes f s.[0] (f s.[1] ( ... (f s.[n-1] x) ...)), where n is the length of the string s.

                • since 4.13
                val for_all : f:(char -> bool) -> string -> bool

                for_all p s checks if all characters in s satisfy the predicate p.

                • since 4.13
                val exists : f:(char -> bool) -> string -> bool

                exists p s checks if at least one character of s satisfies the predicate p.

                • since 4.13
                val trim : string -> string

                trim s is s without leading and trailing whitespace. Whitespace characters are: ' ', '\x0C' (form feed), '\n', '\r', and '\t'.

                • since 4.00
                val escaped : string -> string

                escaped s is s with special characters represented by escape sequences, following the lexical conventions of OCaml.

                All characters outside the US-ASCII printable range [0x20;0x7E] are escaped, as well as backslash (0x2F) and double-quote (0x22).

                The function Scanf.unescaped is a left inverse of escaped, i.e. Scanf.unescaped (escaped s) = s for any string s (unless escaped s fails).

                • raises Invalid_argument

                  if the result is longer than Sys.max_string_length bytes.

                val uppercase_ascii : string -> string

                uppercase_ascii s is s with all lowercase letters translated to uppercase, using the US-ASCII character set.

                • since 4.03 (4.05 in StringLabels)
                val lowercase_ascii : string -> string

                lowercase_ascii s is s with all uppercase letters translated to lowercase, using the US-ASCII character set.

                • since 4.03 (4.05 in StringLabels)
                val capitalize_ascii : string -> string

                capitalize_ascii s is s with the first character set to uppercase, using the US-ASCII character set.

                • since 4.03 (4.05 in StringLabels)
                val uncapitalize_ascii : string -> string

                uncapitalize_ascii s is s with the first character set to lowercase, using the US-ASCII character set.

                • since 4.03 (4.05 in StringLabels)
                val iter : f:(char -> unit) -> string -> unit

                iter ~f s applies function f in turn to all the characters of s. It is equivalent to f s.[0]; f s.[1]; ...; f s.[length s - 1]; ().

                val iteri : f:(int -> char -> unit) -> string -> unit

                iteri is like iter, but the function is also given the corresponding character index.

                • since 4.00
                val index_from : string -> int -> char -> int

                index_from s i c is the index of the first occurrence of c in s after position i.

                • raises Not_found

                  if c does not occur in s after position i.

                val index_from_opt : string -> int -> char -> int option

                index_from_opt s i c is the index of the first occurrence of c in s after position i (if any).

                • since 4.05
                val rindex_from : string -> int -> char -> int

                rindex_from s i c is the index of the last occurrence of c in s before position i+1.

                • raises Not_found

                  if c does not occur in s before position i+1.

                val rindex_from_opt : string -> int -> char -> int option

                rindex_from_opt s i c is the index of the last occurrence of c in s before position i+1 (if any).

                • since 4.05
                val index : string -> char -> int

                index s c is String.index_from s 0 c.

                val index_opt : string -> char -> int option

                index_opt s c is String.index_from_opt s 0 c.

                • since 4.05
                val rindex : string -> char -> int

                rindex s c is String.rindex_from s (length s - 1) c.

                val rindex_opt : string -> char -> int option

                rindex_opt s c is String.rindex_from_opt s (length s - 1) c.

                • since 4.05
                val to_seq : t -> char Stdlib.Seq.t

                to_seq s is a sequence made of the string's characters in increasing order. In "unsafe-string" mode, modifications of the string during iteration will be reflected in the sequence.

                • since 4.07
                val to_seqi : t -> (int * char) Stdlib.Seq.t

                to_seqi s is like to_seq but also tuples the corresponding index.

                • since 4.07
                val of_seq : char Stdlib.Seq.t -> t

                of_seq s is a string made of the sequence's characters.

                • since 4.07
                val get_utf_8_uchar : t -> int -> Stdlib.Uchar.utf_decode

                get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

                val is_valid_utf_8 : t -> bool

                is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

                val get_utf_16be_uchar : t -> int -> Stdlib.Uchar.utf_decode

                get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

                val is_valid_utf_16be : t -> bool

                is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

                val get_utf_16le_uchar : t -> int -> Stdlib.Uchar.utf_decode

                get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

                val is_valid_utf_16le : t -> bool

                is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

                val get_uint8 : string -> int -> int

                get_uint8 b i is b's unsigned 8-bit integer starting at character index i.

                • since 4.13
                val get_int8 : string -> int -> int

                get_int8 b i is b's signed 8-bit integer starting at character index i.

                • since 4.13
                val get_uint16_ne : string -> int -> int

                get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at character index i.

                • since 4.13
                val get_uint16_be : string -> int -> int

                get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at character index i.

                • since 4.13
                val get_uint16_le : string -> int -> int

                get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at character index i.

                • since 4.13
                val get_int16_ne : string -> int -> int

                get_int16_ne b i is b's native-endian signed 16-bit integer starting at character index i.

                • since 4.13
                val get_int16_be : string -> int -> int

                get_int16_be b i is b's big-endian signed 16-bit integer starting at character index i.

                • since 4.13
                val get_int16_le : string -> int -> int

                get_int16_le b i is b's little-endian signed 16-bit integer starting at character index i.

                • since 4.13
                val get_int32_ne : string -> int -> int32

                get_int32_ne b i is b's native-endian 32-bit integer starting at character index i.

                • since 4.13
                val hash : t -> int

                An unseeded hash function for strings, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

                • since 5.0
                val seeded_hash : int -> t -> int

                A seeded hash function for strings, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

                • since 5.0
                val get_int32_be : string -> int -> int32

                get_int32_be b i is b's big-endian 32-bit integer starting at character index i.

                • since 4.13
                val get_int32_le : string -> int -> int32

                get_int32_le b i is b's little-endian 32-bit integer starting at character index i.

                • since 4.13
                val get_int64_ne : string -> int -> int64

                get_int64_ne b i is b's native-endian 64-bit integer starting at character index i.

                • since 4.13
                val get_int64_be : string -> int -> int64

                get_int64_be b i is b's big-endian 64-bit integer starting at character index i.

                • since 4.13
                val get_int64_le : string -> int -> int64

                get_int64_le b i is b's little-endian 64-bit integer starting at character index i.

                • since 4.13
                val of_bytes : bytes -> string

                Return a new string that contains the same bytes as the given byte sequence.

                • since 4.13
                • alert impure This imperative programming item is not permitted
                val to_bytes : string -> bytes

                Return a new byte sequence that contains the same bytes as the given string.

                • since 4.13
                • alert impure This imperative programming item is not permitted
                val blit : src:string -> src_pos:int -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Uchar/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Uchar/index.html index eba8381..e7e1f4c 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Uchar/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/Uchar/index.html @@ -1,2 +1,2 @@ -Uchar (less-power.Stdlib_alerts.Stdlib_alerting.Uchar)

                Module Stdlib_alerting.Uchar

                type t = Stdlib.Uchar.t
                type utf_decode = Stdlib.Uchar.utf_decode
                include sig ... end
                val min : t

                min is U+0000.

                val max : t

                max is U+10FFFF.

                val bom : t

                bom is U+FEFF, the byte order mark (BOM) character.

                • since 4.06
                val rep : t

                rep is U+FFFD, the replacement character.

                • since 4.06
                val succ : t -> t

                succ u is the scalar value after u in the set of Unicode scalar values.

                val pred : t -> t

                pred u is the scalar value before u in the set of Unicode scalar values.

                val is_valid : int -> bool

                is_valid n is true if and only if n is a Unicode scalar value (i.e. in the ranges 0x0000...0xD7FF or 0xE000...0x10FFFF).

                val of_int : int -> t

                of_int i is i as a Unicode character.

                val to_int : t -> int

                to_int u is u as an integer.

                val is_char : t -> bool

                is_char u is true if and only if u is a latin1 OCaml character.

                val of_char : char -> t

                of_char c is c as a Unicode character.

                val to_char : t -> char

                to_char u is u as an OCaml latin1 character.

                val equal : t -> t -> bool

                equal u u' is u = u'.

                val compare : t -> t -> int

                compare u u' is Stdlib.compare u u'.

                val hash : t -> int

                hash u associates a non-negative integer to u.

                val utf_decode_is_valid : utf_decode -> bool

                utf_decode_is_valid d is true if and only if d holds a valid decode.

                val utf_decode_uchar : utf_decode -> t

                utf_decode_uchar d is the Unicode character decoded by d if utf_decode_is_valid d is true and Uchar.rep otherwise.

                val utf_decode_length : utf_decode -> int

                utf_decode_length d is the number of elements from the source that were consumed by the decode d. This is always strictly positive and smaller or equal to 4. The kind of source elements depends on the actual decoder; for the decoders of the standard library this function always returns a length in bytes.

                val utf_decode : int -> t -> utf_decode

                utf_decode n u is a valid UTF decode for u that consumed n elements from the source for decoding. n must be positive and smaller or equal to 4 (this is not checked by the module).

                val utf_decode_invalid : int -> utf_decode

                utf_decode_invalid n is an invalid UTF decode that consumed n elements from the source to error. n must be positive and smaller or equal to 4 (this is not checked by the module). The resulting decode has rep as the decoded Unicode character.

                val utf_8_byte_length : t -> int

                utf_8_byte_length u is the number of bytes needed to encode u in UTF-8.

                val utf_16_byte_length : t -> int

                utf_16_byte_length u is the number of bytes needed to encode u in UTF-16.

                +Uchar (less-power.Stdlib_alerts.Stdlib_alerting.Uchar)

                Module Stdlib_alerting.Uchar

                type t = Stdlib.Uchar.t
                type utf_decode = Stdlib.Uchar.utf_decode
                include sig ... end
                val min : t

                min is U+0000.

                val max : t

                max is U+10FFFF.

                val bom : t

                bom is U+FEFF, the byte order mark (BOM) character.

                • since 4.06
                val rep : t

                rep is U+FFFD, the replacement character.

                • since 4.06
                val succ : t -> t

                succ u is the scalar value after u in the set of Unicode scalar values.

                val pred : t -> t

                pred u is the scalar value before u in the set of Unicode scalar values.

                val is_valid : int -> bool

                is_valid n is true if and only if n is a Unicode scalar value (i.e. in the ranges 0x0000...0xD7FF or 0xE000...0x10FFFF).

                val of_int : int -> t

                of_int i is i as a Unicode character.

                val to_int : t -> int

                to_int u is u as an integer.

                val is_char : t -> bool

                is_char u is true if and only if u is a latin1 OCaml character.

                val of_char : char -> t

                of_char c is c as a Unicode character.

                val to_char : t -> char

                to_char u is u as an OCaml latin1 character.

                val equal : t -> t -> bool

                equal u u' is u = u'.

                val compare : t -> t -> int

                compare u u' is Stdlib.compare u u'.

                val hash : t -> int

                hash u associates a non-negative integer to u.

                val utf_decode_is_valid : utf_decode -> bool

                utf_decode_is_valid d is true if and only if d holds a valid decode.

                val utf_decode_uchar : utf_decode -> t

                utf_decode_uchar d is the Unicode character decoded by d if utf_decode_is_valid d is true and Uchar.rep otherwise.

                val utf_decode_length : utf_decode -> int

                utf_decode_length d is the number of elements from the source that were consumed by the decode d. This is always strictly positive and smaller or equal to 4. The kind of source elements depends on the actual decoder; for the decoders of the standard library this function always returns a length in bytes.

                val utf_decode : int -> t -> utf_decode

                utf_decode n u is a valid UTF decode for u that consumed n elements from the source for decoding. n must be positive and smaller or equal to 4 (this is not checked by the module).

                val utf_decode_invalid : int -> utf_decode

                utf_decode_invalid n is an invalid UTF decode that consumed n elements from the source to error. n must be positive and smaller or equal to 4 (this is not checked by the module). The resulting decode has rep as the decoded Unicode character.

                val utf_8_byte_length : t -> int

                utf_8_byte_length u is the number of bytes needed to encode u in UTF-8.

                val utf_16_byte_length : t -> int

                utf_16_byte_length u is the number of bytes needed to encode u in UTF-16.

                diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/index.html index e7a8fc1..a5c1ba4 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Stdlib_alerting/index.html @@ -1,5 +1,5 @@ -Stdlib_alerting (less-power.Stdlib_alerts.Stdlib_alerting)

                Module type Stdlib_alerts.Stdlib_alerting

                Derived from Stdlib, but with items that can be restricted annotated with alerts.

                Things that can be restricted are marked with an ⚠️ Alert. Not everything marked here is disabled by default though. See Stdlib_alerts for the defaults.

                raise primitives and standard exceptions

                include sig ... end
                val raise : exn -> 'a

                Raise the given exception value

                val raise_notrace : exn -> 'a

                A faster version raise which does not record the backtrace.

                • since 4.02
                val failwith : string -> 'a

                Raise exception Failure with the given string.

                val invalid_arg : string -> 'a

                Raise exception Invalid_argument with the given string.

                exception Exit

                The Exit exception is not raised by any library function. It is provided for use in your programs.

                exception Match_failure of string * int * int

                Exception raised when none of the cases of a pattern-matching apply. The arguments are the location of the match keyword in the source code (file name, line number, column number).

                exception Assert_failure of string * int * int

                Exception raised when an assertion fails. The arguments are the location of the assert keyword in the source code (file name, line number, column number).

                exception Invalid_argument of string

                Exception raised by library functions to signal that the given arguments do not make sense. The string gives some information to the programmer. As a general rule, this exception should not be caught, it denotes a programming error and the code should be modified not to trigger it.

                exception Failure of string

                Exception raised by library functions to signal that they are undefined on the given arguments. The string is meant to give some information to the programmer; you must not pattern match on the string literal because it may change in future versions (use Failure _ instead).

                exception Not_found

                Exception raised by search functions when the desired object could not be found.

                exception Out_of_memory

                Exception raised by the garbage collector when there is insufficient memory to complete the computation. (Not reliable for allocations on the minor heap.)

                exception Stack_overflow

                Exception raised by the bytecode interpreter when the evaluation stack reaches its maximal size. This often indicates infinite or excessively deep recursion in the user's program.

                Before 4.10, it was not fully implemented by the native-code compiler.

                exception Sys_error of string

                Exception raised by the input/output functions to report an operating system error. The string is meant to give some information to the programmer; you must not pattern match on the string literal because it may change in future versions (use Sys_error _ instead).

                exception End_of_file

                Exception raised by input functions to signal that the end of file has been reached.

                exception Division_by_zero

                Exception raised by integer division and remainder operations when their second argument is zero.

                exception Sys_blocked_io

                A special case of Sys_error raised when no I/O is possible on a non-blocking I/O channel.

                exception Undefined_recursive_module of string * int * int

                Exception raised when an ill-founded recursive module definition is evaluated. The arguments are the location of the definition in the source code (file name, line number, column number).

                Polymorphic comparisons

                Not including the impure (==) and (!=).

                include sig ... end
                val (=) : 'a -> 'a -> bool

                e1 = e2 tests for structural equality of e1 and e2. Mutable structures (e.g. references and arrays) are equal if and only if their current contents are structurally equal, even if the two mutable objects are not the same physical object. Equality between functional values raises Invalid_argument. Equality between cyclic data structures may not terminate. Left-associative operator, see Ocaml_operators for more information.

                val (<>) : 'a -> 'a -> bool

                Negation of Stdlib.(=). Left-associative operator, see Ocaml_operators for more information.

                val (<) : 'a -> 'a -> bool

                See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

                val (>) : 'a -> 'a -> bool

                See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

                val (<=) : 'a -> 'a -> bool

                See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

                val (>=) : 'a -> 'a -> bool

                Structural ordering functions. These functions coincide with the usual orderings over integers, characters, strings, byte sequences and floating-point numbers, and extend them to a total ordering over all types. The ordering is compatible with ( = ). As in the case of ( = ), mutable structures are compared by contents. Comparison between functional values raises Invalid_argument. Comparison between cyclic structures may not terminate. Left-associative operator, see Ocaml_operators for more information.

                val compare : 'a -> 'a -> int

                compare x y returns 0 if x is equal to y, a negative integer if x is less than y, and a positive integer if x is greater than y. The ordering implemented by compare is compatible with the comparison predicates =, < and > defined above, with one difference on the treatment of the float value Stdlib.nan. Namely, the comparison predicates treat nan as different from any other float value, including itself; while compare treats nan as equal to itself and less than any other float value. This treatment of nan ensures that compare defines a total ordering relation.

                compare applied to functional values may raise Invalid_argument. compare applied to cyclic structures may not terminate.

                The compare function can be used as the comparison function required by the Set.Make and Map.Make functors, as well as the List.sort and Array.sort functions.

                val min : 'a -> 'a -> 'a

                Return the smaller of the two arguments. The result is unspecified if one of the arguments contains the float value nan.

                val max : 'a -> 'a -> 'a

                Return the greater of the two arguments. The result is unspecified if one of the arguments contains the float value nan.

                Physical comparisons

                The impure (==) and (!=)

                include sig ... end
                val (==) : 'a -> 'a -> bool

                e1 == e2 tests for physical equality of e1 and e2. On mutable types such as references, arrays, byte sequences, records with mutable fields and objects with mutable instance variables, e1 == e2 is true if and only if physical modification of e1 also affects e2. On non-mutable types, the behavior of ( == ) is implementation-dependent; however, it is guaranteed that e1 == e2 implies compare e1 e2 = 0. Left-associative operator, see Ocaml_operators for more information.

                • alert physical_eq Physical comparisons are not permitted. Hint: did you mean = ?
                val (!=) : 'a -> 'a -> bool

                Negation of Stdlib.(==). Left-associative operator, see Ocaml_operators for more information.

                • alert physical_eq Physical comparisons are not permitted. Hint: did you mean <> ?

                Boolean operations

                include sig ... end
                val not : bool -> bool

                The boolean negation.

                val (&&) : bool -> bool -> bool

                The boolean 'and'. Evaluation is sequential, left-to-right: in e1 && e2, e1 is evaluated first, and if it returns false, e2 is not evaluated at all. Right-associative operator, see Ocaml_operators for more information.

                val (||) : bool -> bool -> bool

                The boolean 'or'. Evaluation is sequential, left-to-right: in e1 || e2, e1 is evaluated first, and if it returns true, e2 is not evaluated at all. Right-associative operator, see Ocaml_operators for more information.

                Debugging macros

                These are safe in the sense that referential transparency is preserved, if two uses of a macro at separate locations are considered separate occurrences.

                include sig ... end
                val __LOC__ : string

                __LOC__ returns the location at which this expression appears in the file currently being parsed by the compiler, with the standard error format of OCaml: "File %S, line %d, characters %d-%d".

                • since 4.02
                • alert debug_macro Debugging macros are not permitted
                val __FILE__ : string

                __FILE__ returns the name of the file currently being parsed by the compiler.

                • since 4.02
                • alert debug_macro Debugging macros are not permitted
                val __LINE__ : int

                __LINE__ returns the line number at which this expression appears in the file currently being parsed by the compiler.

                • since 4.02
                • alert debug_macro Debugging macros are not permitted
                val __MODULE__ : string

                __MODULE__ returns the module name of the file being parsed by the compiler.

                • since 4.02
                • alert debug_macro Debugging macros are not permitted
                val __POS__ : string * int * int * int

                __POS__ returns a tuple (file,lnum,cnum,enum), corresponding to the location at which this expression appears in the file currently being parsed by the compiler. file is the current filename, lnum the line number, cnum the character position in the line and enum the last character position in the line.

                • since 4.02
                • alert debug_macro Debugging macros are not permitted
                val __FUNCTION__ : string

                __FUNCTION__ returns the name of the current function or method, including any enclosing modules or classes.

                • since 4.12
                • alert debug_macro Debugging macros are not permitted
                val __LOC_OF__ : 'a -> string * 'a

                __LOC_OF__ expr returns a pair (loc, expr) where loc is the location of expr in the file currently being parsed by the compiler, with the standard error format of OCaml: "File %S, line %d, characters %d-%d".

                • since 4.02
                • alert debug_macro Debugging macros are not permitted
                val __LINE_OF__ : 'a -> int * 'a

                __LINE_OF__ expr returns a pair (line, expr), where line is the line number at which the expression expr appears in the file currently being parsed by the compiler.

                • since 4.02
                • alert debug_macro Debugging macros are not permitted
                val __POS_OF__ : 'a -> (string * int * int * int) * 'a

                __POS_OF__ expr returns a pair (loc,expr), where loc is a tuple (file,lnum,cnum,enum) corresponding to the location at which the expression expr appears in the file currently being parsed by the compiler. file is the current filename, lnum the line number, cnum the character position in the line and enum the last character position in the line.

                • since 4.02
                • alert debug_macro Debugging macros are not permitted

                Composition operators

                include sig ... end
                val (|>) : 'a -> ('a -> 'b) -> 'b

                Reverse-application operator: x |> f |> g is exactly equivalent to g (f (x)). Left-associative operator, see Ocaml_operators for more information.

                • since 4.01
                val (@@) : ('a -> 'b) -> 'a -> 'b

                Application operator: g @@ f @@ x is exactly equivalent to g (f (x)). Right-associative operator, see Ocaml_operators for more information.

                • since 4.01

                Integer operations

                include sig ... end
                val (~-) : int -> int

                Unary negation. You can also write - e instead of ~- e. Unary operator, see Ocaml_operators for more information.

                val (~+) : int -> int

                Unary addition. You can also write + e instead of ~+ e. Unary operator, see Ocaml_operators for more information.

                • since 3.12
                val succ : int -> int

                succ x is x + 1.

                val pred : int -> int

                pred x is x - 1.

                val (+) : int -> int -> int

                Integer addition. Left-associative operator, see Ocaml_operators for more information.

                val (-) : int -> int -> int

                Integer subtraction. Left-associative operator, , see Ocaml_operators for more information.

                val (*) : int -> int -> int

                Integer multiplication. Left-associative operator, see Ocaml_operators for more information.

                val (/) : int -> int -> int

                Integer division. Integer division rounds the real quotient of its arguments towards zero. More precisely, if x >= 0 and y > 0, x / y is the greatest integer less than or equal to the real quotient of x by y. Moreover, (- x) / y = x / (- y) = - (x / y). Left-associative operator, see Ocaml_operators for more information.

                val (mod) : int -> int -> int

                Integer remainder. If y is not zero, the result of x mod y satisfies the following properties: x = (x / y) * y + x mod y and abs(x mod y) <= abs(y) - 1. If y = 0, x mod y raises Division_by_zero. Note that x mod y is negative only if x < 0. Left-associative operator, see Ocaml_operators for more information.

                val abs : int -> int

                abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

                val (land) : int -> int -> int

                Bitwise logical and. Left-associative operator, see Ocaml_operators for more information.

                val (lor) : int -> int -> int

                Bitwise logical or. Left-associative operator, see Ocaml_operators for more information.

                val (lxor) : int -> int -> int

                Bitwise logical exclusive or. Left-associative operator, see Ocaml_operators for more information.

                val lnot : int -> int

                Bitwise logical negation.

                val (lsl) : int -> int -> int

                n lsl m shifts n to the left by m bits. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

                val (lsr) : int -> int -> int

                n lsr m shifts n to the right by m bits. This is a logical shift: zeroes are inserted regardless of the sign of n. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

                val (asr) : int -> int -> int

                n asr m shifts n to the right by m bits. This is an arithmetic shift: the sign bit of n is replicated. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

                val max_int : int

                The greatest representable integer.

                val min_int : int

                The smallest representable integer.

                Floating-point operations

                include sig ... end
                val (~-.) : float -> float

                Unary negation. You can also write -. e instead of ~-. e. Unary operator, see Ocaml_operators for more information.

                val (~+.) : float -> float

                Unary addition. You can also write +. e instead of ~+. e. Unary operator, see Ocaml_operators for more information.

                • since 3.12
                val (+.) : float -> float -> float

                Floating-point addition. Left-associative operator, see Ocaml_operators for more information.

                val (-.) : float -> float -> float

                Floating-point subtraction. Left-associative operator, see Ocaml_operators for more information.

                val (*.) : float -> float -> float

                Floating-point multiplication. Left-associative operator, see Ocaml_operators for more information.

                val (/.) : float -> float -> float

                Floating-point division. Left-associative operator, see Ocaml_operators for more information.

                val (**) : float -> float -> float

                Exponentiation. Right-associative operator, see Ocaml_operators for more information.

                val exp : float -> float

                Exponential.

                val expm1 : float -> float

                expm1 x computes exp x -. 1.0, giving numerically-accurate results even if x is close to 0.0.

                • since 3.12
                val acos : float -> float

                Arc cosine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between 0.0 and pi.

                val asin : float -> float

                Arc sine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between -pi/2 and pi/2.

                val atan : float -> float

                Arc tangent. Result is in radians and is between -pi/2 and pi/2.

                val atan2 : float -> float -> float

                atan2 y x returns the arc tangent of y /. x. The signs of x and y are used to determine the quadrant of the result. Result is in radians and is between -pi and pi.

                val hypot : float -> float -> float

                hypot x y returns sqrt(x *. x + y *. y), that is, the length of the hypotenuse of a right-angled triangle with sides of length x and y, or, equivalently, the distance of the point (x,y) to origin. If one of x or y is infinite, returns infinity even if the other is nan.

                • since 4.00
                val cos : float -> float

                Cosine. Argument is in radians.

                val cosh : float -> float

                Hyperbolic cosine. Argument is in radians.

                val acosh : float -> float

                Hyperbolic arc cosine. The argument must fall within the range [1.0, inf]. Result is in radians and is between 0.0 and inf.

                • since 4.13
                val log : float -> float

                Natural logarithm.

                val log10 : float -> float

                Base 10 logarithm.

                val log1p : float -> float

                log1p x computes log(1.0 +. x) (natural logarithm), giving numerically-accurate results even if x is close to 0.0.

                • since 3.12
                val sin : float -> float

                Sine. Argument is in radians.

                val sinh : float -> float

                Hyperbolic sine. Argument is in radians.

                val asinh : float -> float

                Hyperbolic arc sine. The argument and result range over the entire real line. Result is in radians.

                • since 4.13
                val sqrt : float -> float

                Square root.

                val tan : float -> float

                Tangent. Argument is in radians.

                val tanh : float -> float

                Hyperbolic tangent. Argument is in radians.

                val atanh : float -> float

                Hyperbolic arc tangent. The argument must fall within the range [-1.0, 1.0]. Result is in radians and ranges over the entire real line.

                • since 4.13
                val ceil : float -> float

                Round above to an integer value. ceil f returns the least integer value greater than or equal to f. The result is returned as a float.

                val floor : float -> float

                Round below to an integer value. floor f returns the greatest integer value less than or equal to f. The result is returned as a float.

                val abs_float : float -> float

                abs_float f returns the absolute value of f.

                val copysign : float -> float -> float

                copysign x y returns a float whose absolute value is that of x and whose sign is that of y. If x is nan, returns nan. If y is nan, returns either x or -. x, but it is not specified which.

                • since 4.00
                val mod_float : float -> float -> float

                mod_float a b returns the remainder of a with respect to b. The returned value is a -. n *. b, where n is the quotient a /. b rounded towards zero to an integer.

                val frexp : float -> float * int

                frexp f returns the pair of the significant and the exponent of f. When f is zero, the significant x and the exponent n of f are equal to zero. When f is non-zero, they are defined by f = x *. 2 ** n and 0.5 <= x < 1.0.

                val ldexp : float -> int -> float

                ldexp x n returns x *. 2 ** n.

                val modf : float -> float * float

                modf f returns the pair of the fractional and integral part of f.

                val float : int -> float

                Same as Stdlib.float_of_int.

                val float_of_int : int -> float

                Convert an integer to floating-point.

                val truncate : float -> int

                Same as Stdlib.int_of_float.

                val int_of_float : float -> int

                Truncate the given floating-point number to an integer. The result is unspecified if the argument is nan or falls outside the range of representable integers.

                val infinity : float

                Positive infinity.

                val neg_infinity : float

                Negative infinity.

                val nan : float

                A special floating-point value denoting the result of an undefined operation such as 0.0 /. 0.0. Stands for 'not a number'. Any floating-point operation with nan as argument returns nan as result, unless otherwise specified in IEEE 754 standard. As for floating-point comparisons, =, <, <=, > and >= return false and <> returns true if one or both of their arguments is nan.

                nan is a quiet NaN since 5.1; it was a signaling NaN before.

                val max_float : float

                The largest positive finite value of type float.

                val min_float : float

                The smallest positive, non-zero, non-denormalized value of type float.

                val epsilon_float : float

                The difference between 1.0 and the smallest exactly representable floating-point number greater than 1.0.

                val classify_float : float -> Stdlib.fpclass

                Return the class of the given floating-point number: normal, subnormal, zero, infinite, or not a number.

                type fpclass = Stdlib.fpclass =
                1. | FP_normal
                2. | FP_subnormal
                3. | FP_zero
                4. | FP_infinite
                5. | FP_nan

                String operations

                More in Stdlib.String

                include sig ... end
                val (^) : string -> string -> string

                String concatenation. Right-associative operator, see Ocaml_operators for more information.

                • raises Invalid_argument

                  if the result is longer then than Sys.max_string_length bytes.

                Character operations

                More in Stdlib.Char

                include sig ... end
                val int_of_char : char -> int

                Return the ASCII code of the argument.

                val char_of_int : int -> char

                Return the character with the given ASCII code.

                Unit operations

                include sig ... end
                val ignore : 'a -> unit

                Discard the value of its argument and return (). For instance, ignore(f x) discards the result of the side-effecting function f. It is equivalent to f x; (), except that the latter may generate a compiler warning; writing ignore(f x) instead avoids the warning.

                String conversion functions

                include sig ... end
                val string_of_bool : bool -> string

                Return the string representation of a boolean. As the returned values may be shared, the user should not modify them directly.

                val bool_of_string_opt : string -> bool option

                Convert the given string to a boolean.

                Return None if the string is not "true" or "false".

                • since 4.05
                val bool_of_string : string -> bool

                Same as Stdlib.bool_of_string_opt, but raise Invalid_argument "bool_of_string" instead of returning None.

                val string_of_int : int -> string

                Return the string representation of an integer, in decimal.

                val int_of_string_opt : string -> int option

                Convert the given string to an integer. The string is read in decimal (by default, or if the string begins with 0u), in hexadecimal (if it begins with 0x or 0X), in octal (if it begins with 0o or 0O), or in binary (if it begins with 0b or 0B).

                The 0u prefix reads the input as an unsigned integer in the range [0, 2*max_int+1]. If the input exceeds max_int it is converted to the signed integer min_int + input - max_int - 1.

                The _ (underscore) character can appear anywhere in the string and is ignored.

                Return None if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type int.

                • since 4.05
                val int_of_string : string -> int

                Same as Stdlib.int_of_string_opt, but raise Failure "int_of_string" instead of returning None.

                val string_of_float : float -> string

                Return a string representation of a floating-point number.

                This conversion can involve a loss of precision. For greater control over the manner in which the number is printed, see Printf.

                val float_of_string_opt : string -> float option

                Convert the given string to a float. The string is read in decimal (by default) or in hexadecimal (marked by 0x or 0X).

                The format of decimal floating-point numbers is [-] dd.ddd (e|E) [+|-] dd , where d stands for a decimal digit.

                The format of hexadecimal floating-point numbers is [-] 0(x|X) hh.hhh (p|P) [+|-] dd , where h stands for an hexadecimal digit and d for a decimal digit.

                In both cases, at least one of the integer and fractional parts must be given; the exponent part is optional.

                The _ (underscore) character can appear anywhere in the string and is ignored.

                Depending on the execution platforms, other representations of floating-point numbers can be accepted, but should not be relied upon.

                Return None if the given string is not a valid representation of a float.

                • since 4.05
                val float_of_string : string -> float

                Same as Stdlib.float_of_string_opt, but raise Failure "float_of_string" instead of returning None.

                Pair operations

                include sig ... end
                val fst : ('a * 'b) -> 'a

                Return the first component of a pair.

                val snd : ('a * 'b) -> 'b

                Return the second component of a pair.

                Character operations

                More in Stdlib.List

                include sig ... end
                val (@) : 'a list -> 'a list -> 'a list

                l0 @ l1 appends l1 to l0. Same function as List.append. Right-associative operator, see Ocaml_operators for more information.

                • since 5.1 this function is tail-recursive.
                • alert list_op List operations are not permitted

                I/O operations

                This is regular, unmocked, IO.

                type in_channel = Stdlib.in_channel
                • alert input_output Input/output is not permitted
                type out_channel = Stdlib.out_channel
                • alert input_output Input/output is not permitted
                type open_flag = Stdlib.open_flag =
                1. | Open_rdonly
                2. | Open_wronly
                3. | Open_append
                4. | Open_creat
                5. | Open_trunc
                6. | Open_excl
                7. | Open_binary
                8. | Open_text
                9. | Open_nonblock
                • alert input_output Input/output is not permitted
                include sig ... end
                val stdin : in_channel

                The standard input for the process.

                • alert input_output Input/output is not permitted
                val stdout : out_channel

                The standard output for the process.

                • alert input_output Input/output is not permitted
                val stderr : out_channel

                The standard error output for the process.

                • alert input_output Input/output is not permitted
                val print_char : char -> unit

                Print a character on standard output.

                • alert input_output Input/output is not permitted
                val print_string : string -> unit

                Print a string on standard output.

                • alert input_output Input/output is not permitted
                val print_bytes : bytes -> unit

                Print a byte sequence on standard output.

                • since 4.02
                • alert input_output Input/output is not permitted
                val print_int : int -> unit

                Print an integer, in decimal, on standard output.

                • alert input_output Input/output is not permitted
                val print_float : float -> unit

                Print a floating-point number, in decimal, on standard output.

                The conversion of the number to a string uses string_of_float and can involve a loss of precision.

                • alert input_output Input/output is not permitted
                val print_endline : string -> unit

                Print a string, followed by a newline character, on standard output and flush standard output.

                • alert input_output Input/output is not permitted
                val print_newline : unit -> unit

                Print a newline character on standard output, and flush standard output. This can be used to simulate line buffering of standard output.

                • alert input_output Input/output is not permitted
                val prerr_char : char -> unit

                Print a character on standard error.

                • alert input_output Input/output is not permitted
                val prerr_string : string -> unit

                Print a string on standard error.

                • alert input_output Input/output is not permitted
                val prerr_bytes : bytes -> unit

                Print a byte sequence on standard error.

                • since 4.02
                • alert input_output Input/output is not permitted
                val prerr_int : int -> unit

                Print an integer, in decimal, on standard error.

                • alert input_output Input/output is not permitted
                val prerr_float : float -> unit

                Print a floating-point number, in decimal, on standard error.

                The conversion of the number to a string uses string_of_float and can involve a loss of precision.

                • alert input_output Input/output is not permitted
                val prerr_endline : string -> unit

                Print a string, followed by a newline character on standard error and flush standard error.

                • alert input_output Input/output is not permitted
                val prerr_newline : unit -> unit

                Print a newline character on standard error, and flush standard error.

                • alert input_output Input/output is not permitted
                val read_line : unit -> string

                Flush standard output, then read characters from standard input until a newline character is encountered.

                Return the string of all characters read, without the newline character at the end.

                • raises End_of_file

                  if the end of the file is reached at the beginning of line.

                • alert input_output Input/output is not permitted
                val read_int_opt : unit -> int option

                Flush standard output, then read one line from standard input and convert it to an integer.

                Return None if the line read is not a valid representation of an integer.

                • since 4.05
                • alert input_output Input/output is not permitted
                val read_int : unit -> int

                Same as Stdlib.read_int_opt, but raise Failure "int_of_string" instead of returning None.

                • alert input_output Input/output is not permitted
                val read_float_opt : unit -> float option

                Flush standard output, then read one line from standard input and convert it to a floating-point number.

                Return None if the line read is not a valid representation of a floating-point number.

                • since 4.05
                • alert input_output Input/output is not permitted
                val read_float : unit -> float

                Same as Stdlib.read_float_opt, but raise Failure "float_of_string" instead of returning None.

                • alert input_output Input/output is not permitted
                val open_out : string -> out_channel

                Open the named file for writing, and return a new output channel on that file, positioned at the beginning of the file. The file is truncated to zero length if it already exists. It is created if it does not already exists.

                • alert input_output Input/output is not permitted
                val open_out_bin : string -> out_channel

                Same as Stdlib.open_out, but the file is opened in binary mode, so that no translation takes place during writes. On operating systems that do not distinguish between text mode and binary mode, this function behaves like Stdlib.open_out.

                • alert input_output Input/output is not permitted
                val open_out_gen : open_flag list -> int -> string -> out_channel

                open_out_gen mode perm filename opens the named file for writing, as described above. The extra argument mode specifies the opening mode. The extra argument perm specifies the file permissions, in case the file must be created. Stdlib.open_out and Stdlib.open_out_bin are special cases of this function.

                • alert input_output Input/output is not permitted
                val flush : out_channel -> unit

                Flush the buffer associated with the given output channel, performing all pending writes on that channel. Interactive programs must be careful about flushing standard output and standard error at the right time.

                • alert input_output Input/output is not permitted
                val flush_all : unit -> unit

                Flush all open output channels; ignore errors.

                • alert input_output Input/output is not permitted
                val output_char : out_channel -> char -> unit

                Write the character on the given output channel.

                • alert input_output Input/output is not permitted
                val output_string : out_channel -> string -> unit

                Write the string on the given output channel.

                • alert input_output Input/output is not permitted
                val output_bytes : out_channel -> bytes -> unit

                Write the byte sequence on the given output channel.

                • since 4.02
                • alert input_output Input/output is not permitted
                val output : out_channel -> bytes -> int -> int -> unit

                output oc buf pos len writes len characters from byte sequence buf, starting at offset pos, to the given output channel oc.

                • alert input_output Input/output is not permitted
                val output_substring : out_channel -> string -> int -> int -> unit

                Same as output but take a string as argument instead of a byte sequence.

                • since 4.02
                • alert input_output Input/output is not permitted
                val output_byte : out_channel -> int -> unit

                Write one 8-bit integer (as the single character with that code) on the given output channel. The given integer is taken modulo 256.

                • alert input_output Input/output is not permitted
                val output_binary_int : out_channel -> int -> unit

                Write one integer in binary format (4 bytes, big-endian) on the given output channel. The given integer is taken modulo 232. The only reliable way to read it back is through the Stdlib.input_binary_int function. The format is compatible across all machines for a given version of OCaml.

                • alert input_output Input/output is not permitted
                val output_value : out_channel -> 'a -> unit

                Write the representation of a structured value of any type to a channel. Circularities and sharing inside the value are detected and preserved. The object can be read back, by the function Stdlib.input_value. See the description of module Marshal for more information. Stdlib.output_value is equivalent to Marshal.to_channel with an empty list of flags.

                • alert input_output Input/output is not permitted
                val seek_out : out_channel -> int -> unit

                seek_out chan pos sets the current writing position to pos for channel chan. This works only for regular files. On files of other kinds (such as terminals, pipes and sockets), the behavior is unspecified.

                • alert input_output Input/output is not permitted
                val pos_out : out_channel -> int

                Return the current writing position for the given channel. Does not work on channels opened with the Open_append flag (returns unspecified results). For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos_out, then going back to this position using seek_out will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

                • alert input_output Input/output is not permitted
                val out_channel_length : out_channel -> int

                Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless.

                • alert input_output Input/output is not permitted
                val close_out : out_channel -> unit

                Close the given channel, flushing all buffered write operations. Output functions raise a Sys_error exception when they are applied to a closed output channel, except close_out and flush, which do nothing when applied to an already closed channel. Note that close_out may raise Sys_error if the operating system signals an error when flushing or closing.

                • alert input_output Input/output is not permitted
                val close_out_noerr : out_channel -> unit

                Same as close_out, but ignore all errors.

                • alert input_output Input/output is not permitted
                val set_binary_mode_out : out_channel -> bool -> unit

                set_binary_mode_out oc true sets the channel oc to binary mode: no translations take place during output. set_binary_mode_out oc false sets the channel oc to text mode: depending on the operating system, some translations may take place during output. For instance, under Windows, end-of-lines will be translated from \n to \r\n. This function has no effect under operating systems that do not distinguish between text mode and binary mode.

                • alert input_output Input/output is not permitted
                val open_in : string -> in_channel

                Open the named file for reading, and return a new input channel on that file, positioned at the beginning of the file.

                • alert input_output Input/output is not permitted
                val open_in_bin : string -> in_channel

                Same as Stdlib.open_in, but the file is opened in binary mode, so that no translation takes place during reads. On operating systems that do not distinguish between text mode and binary mode, this function behaves like Stdlib.open_in.

                • alert input_output Input/output is not permitted
                val open_in_gen : open_flag list -> int -> string -> in_channel

                open_in_gen mode perm filename opens the named file for reading, as described above. The extra arguments mode and perm specify the opening mode and file permissions. Stdlib.open_in and Stdlib.open_in_bin are special cases of this function.

                • alert input_output Input/output is not permitted
                val input_char : in_channel -> char

                Read one character from the given input channel.

                • raises End_of_file

                  if there are no more characters to read.

                • alert input_output Input/output is not permitted
                val input_line : in_channel -> string

                Read characters from the given input channel, until a newline character is encountered. Return the string of all characters read, without the newline character at the end.

                • raises End_of_file

                  if the end of the file is reached at the beginning of line.

                • alert input_output Input/output is not permitted
                val input : in_channel -> bytes -> int -> int -> int

                input ic buf pos len reads up to len characters from the given channel ic, storing them in byte sequence buf, starting at character number pos. It returns the actual number of characters read, between 0 and len (inclusive). A return value of 0 means that the end of file was reached. A return value between 0 and len exclusive means that not all requested len characters were read, either because no more characters were available at that time, or because the implementation found it convenient to do a partial read; input must be called again to read the remaining characters, if desired. (See also Stdlib.really_input for reading exactly len characters.) Exception Invalid_argument "input" is raised if pos and len do not designate a valid range of buf.

                • alert input_output Input/output is not permitted
                val really_input : in_channel -> bytes -> int -> int -> unit

                really_input ic buf pos len reads len characters from channel ic, storing them in byte sequence buf, starting at character number pos.

                • raises End_of_file

                  if the end of file is reached before len characters have been read.

                • alert input_output Input/output is not permitted
                val really_input_string : in_channel -> int -> string

                really_input_string ic len reads len characters from channel ic and returns them in a new string.

                • raises End_of_file

                  if the end of file is reached before len characters have been read.

                • since 4.02
                • alert input_output Input/output is not permitted
                val input_byte : in_channel -> int

                Same as Stdlib.input_char, but return the 8-bit integer representing the character.

                • alert input_output Input/output is not permitted
                val input_binary_int : in_channel -> int

                Read an integer encoded in binary format (4 bytes, big-endian) from the given input channel. See Stdlib.output_binary_int.

                • raises End_of_file

                  if the end of file was reached while reading the integer.

                • alert input_output Input/output is not permitted
                val input_value : in_channel -> 'a

                Read the representation of a structured value, as produced by Stdlib.output_value, and return the corresponding value. This function is identical to Marshal.from_channel; see the description of module Marshal for more information, in particular concerning the lack of type safety.

                • alert input_output Input/output is not permitted
                val seek_in : in_channel -> int -> unit

                seek_in chan pos sets the current reading position to pos for channel chan. This works only for regular files. On files of other kinds, the behavior is unspecified.

                • alert input_output Input/output is not permitted
                val pos_in : in_channel -> int

                Return the current reading position for the given channel. For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos_in, then going back to this position using seek_in will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

                • alert input_output Input/output is not permitted
                val in_channel_length : in_channel -> int

                Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless. The returned size does not take into account the end-of-line translations that can be performed when reading from a channel opened in text mode.

                • alert input_output Input/output is not permitted
                val close_in : in_channel -> unit

                Close the given channel. Input functions raise a Sys_error exception when they are applied to a closed input channel, except close_in, which does nothing when applied to an already closed channel.

                • alert input_output Input/output is not permitted
                val close_in_noerr : in_channel -> unit

                Same as close_in, but ignore all errors.

                • alert input_output Input/output is not permitted
                val set_binary_mode_in : in_channel -> bool -> unit

                set_binary_mode_in ic true sets the channel ic to binary mode: no translations take place during input. set_binary_mode_out ic false sets the channel ic to text mode: depending on the operating system, some translations may take place during input. For instance, under Windows, end-of-lines will be translated from \r\n to \n. This function has no effect under operating systems that do not distinguish between text mode and binary mode.

                • alert input_output Input/output is not permitted
                module LargeFile : sig ... end

                Operations on large files. This sub-module provides 64-bit variants of the channel functions that manipulate file positions and file sizes. By representing positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), these alternate functions allow operating on files whose sizes are greater than max_int.

                References

                type 'a ref = 'a Stdlib.ref
                include sig ... end
                val ref : 'a -> 'a ref

                Return a fresh reference containing the given value.

                • alert impure References are not permitted
                val (!) : 'a ref -> 'a

                !r returns the current contents of reference r. Equivalent to fun r -> r.contents. Unary operator, see Ocaml_operators for more information.

                • alert impure References are not permitted
                val (:=) : 'a ref -> 'a -> unit

                r := a stores the value of a in reference r. Equivalent to fun r v -> r.contents <- v. Right-associative operator, see Ocaml_operators for more information.

                • alert impure References are not permitted
                val incr : int ref -> unit

                Increment the integer contained in the given reference. Equivalent to fun r -> r := succ !r.

                • alert impure References are not permitted
                val decr : int ref -> unit

                Decrement the integer contained in the given reference. Equivalent to fun r -> r := pred !r.

                • alert impure References are not permitted

                Result type

                More in Stdlib.Result

                type ('a, 'b) result = ('a, 'b) Stdlib.result =
                1. | Ok of 'a
                2. | Error of 'b

                Format strings

                More in Stdlib.Scanf, Stdlib.Printf, and Stdlib.Format

                include sig ... end
                type ('a, 'b, 'c, 'd, 'e, 'f) format6 = +Stdlib_alerting (less-power.Stdlib_alerts.Stdlib_alerting)

                Module type Stdlib_alerts.Stdlib_alerting

                Derived from Stdlib, but with items that can be restricted annotated with alerts.

                Things that can be restricted are marked with an ⚠️ Alert. Not everything marked here is disabled by default though. See Stdlib_alerts for the defaults.

                raise primitives and standard exceptions

                include sig ... end
                val raise : exn -> 'a

                Raise the given exception value

                val raise_notrace : exn -> 'a

                A faster version raise which does not record the backtrace.

                • since 4.02
                val failwith : string -> 'a

                Raise exception Failure with the given string.

                val invalid_arg : string -> 'a

                Raise exception Invalid_argument with the given string.

                exception Exit

                The Exit exception is not raised by any library function. It is provided for use in your programs.

                exception Match_failure of string * int * int

                Exception raised when none of the cases of a pattern-matching apply. The arguments are the location of the match keyword in the source code (file name, line number, column number).

                exception Assert_failure of string * int * int

                Exception raised when an assertion fails. The arguments are the location of the assert keyword in the source code (file name, line number, column number).

                exception Invalid_argument of string

                Exception raised by library functions to signal that the given arguments do not make sense. The string gives some information to the programmer. As a general rule, this exception should not be caught, it denotes a programming error and the code should be modified not to trigger it.

                exception Failure of string

                Exception raised by library functions to signal that they are undefined on the given arguments. The string is meant to give some information to the programmer; you must not pattern match on the string literal because it may change in future versions (use Failure _ instead).

                exception Not_found

                Exception raised by search functions when the desired object could not be found.

                exception Out_of_memory

                Exception raised by the garbage collector when there is insufficient memory to complete the computation. (Not reliable for allocations on the minor heap.)

                exception Stack_overflow

                Exception raised by the bytecode interpreter when the evaluation stack reaches its maximal size. This often indicates infinite or excessively deep recursion in the user's program.

                Before 4.10, it was not fully implemented by the native-code compiler.

                exception Sys_error of string

                Exception raised by the input/output functions to report an operating system error. The string is meant to give some information to the programmer; you must not pattern match on the string literal because it may change in future versions (use Sys_error _ instead).

                exception End_of_file

                Exception raised by input functions to signal that the end of file has been reached.

                exception Division_by_zero

                Exception raised by integer division and remainder operations when their second argument is zero.

                exception Sys_blocked_io

                A special case of Sys_error raised when no I/O is possible on a non-blocking I/O channel.

                exception Undefined_recursive_module of string * int * int

                Exception raised when an ill-founded recursive module definition is evaluated. The arguments are the location of the definition in the source code (file name, line number, column number).

                Polymorphic comparisons

                Not including the impure (==) and (!=).

                include sig ... end
                val (=) : 'a -> 'a -> bool

                e1 = e2 tests for structural equality of e1 and e2. Mutable structures (e.g. references and arrays) are equal if and only if their current contents are structurally equal, even if the two mutable objects are not the same physical object. Equality between functional values raises Invalid_argument. Equality between cyclic data structures may not terminate. Left-associative operator, see Ocaml_operators for more information.

                val (<>) : 'a -> 'a -> bool

                Negation of Stdlib.(=). Left-associative operator, see Ocaml_operators for more information.

                val (<) : 'a -> 'a -> bool

                See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

                val (>) : 'a -> 'a -> bool

                See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

                val (<=) : 'a -> 'a -> bool

                See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

                val (>=) : 'a -> 'a -> bool

                Structural ordering functions. These functions coincide with the usual orderings over integers, characters, strings, byte sequences and floating-point numbers, and extend them to a total ordering over all types. The ordering is compatible with ( = ). As in the case of ( = ), mutable structures are compared by contents. Comparison between functional values raises Invalid_argument. Comparison between cyclic structures may not terminate. Left-associative operator, see Ocaml_operators for more information.

                val compare : 'a -> 'a -> int

                compare x y returns 0 if x is equal to y, a negative integer if x is less than y, and a positive integer if x is greater than y. The ordering implemented by compare is compatible with the comparison predicates =, < and > defined above, with one difference on the treatment of the float value Stdlib.nan. Namely, the comparison predicates treat nan as different from any other float value, including itself; while compare treats nan as equal to itself and less than any other float value. This treatment of nan ensures that compare defines a total ordering relation.

                compare applied to functional values may raise Invalid_argument. compare applied to cyclic structures may not terminate.

                The compare function can be used as the comparison function required by the Set.Make and Map.Make functors, as well as the List.sort and Array.sort functions.

                val min : 'a -> 'a -> 'a

                Return the smaller of the two arguments. The result is unspecified if one of the arguments contains the float value nan.

                val max : 'a -> 'a -> 'a

                Return the greater of the two arguments. The result is unspecified if one of the arguments contains the float value nan.

                Physical comparisons

                The impure (==) and (!=)

                include sig ... end
                val (==) : 'a -> 'a -> bool

                e1 == e2 tests for physical equality of e1 and e2. On mutable types such as references, arrays, byte sequences, records with mutable fields and objects with mutable instance variables, e1 == e2 is true if and only if physical modification of e1 also affects e2. On non-mutable types, the behavior of ( == ) is implementation-dependent; however, it is guaranteed that e1 == e2 implies compare e1 e2 = 0. Left-associative operator, see Ocaml_operators for more information.

                • alert physical_eq Physical comparisons are not permitted. Hint: did you mean = ?
                val (!=) : 'a -> 'a -> bool

                Negation of Stdlib.(==). Left-associative operator, see Ocaml_operators for more information.

                • alert physical_eq Physical comparisons are not permitted. Hint: did you mean <> ?

                Boolean operations

                include sig ... end
                val not : bool -> bool

                The boolean negation.

                val (&&) : bool -> bool -> bool

                The boolean 'and'. Evaluation is sequential, left-to-right: in e1 && e2, e1 is evaluated first, and if it returns false, e2 is not evaluated at all. Right-associative operator, see Ocaml_operators for more information.

                val (||) : bool -> bool -> bool

                The boolean 'or'. Evaluation is sequential, left-to-right: in e1 || e2, e1 is evaluated first, and if it returns true, e2 is not evaluated at all. Right-associative operator, see Ocaml_operators for more information.

                Debugging macros

                These are safe in the sense that referential transparency is preserved, if two uses of a macro at separate locations are considered separate occurrences.

                include sig ... end
                val __LOC__ : string

                __LOC__ returns the location at which this expression appears in the file currently being parsed by the compiler, with the standard error format of OCaml: "File %S, line %d, characters %d-%d".

                • since 4.02
                • alert debug_macro Debugging macros are not permitted
                val __FILE__ : string

                __FILE__ returns the name of the file currently being parsed by the compiler.

                • since 4.02
                • alert debug_macro Debugging macros are not permitted
                val __LINE__ : int

                __LINE__ returns the line number at which this expression appears in the file currently being parsed by the compiler.

                • since 4.02
                • alert debug_macro Debugging macros are not permitted
                val __MODULE__ : string

                __MODULE__ returns the module name of the file being parsed by the compiler.

                • since 4.02
                • alert debug_macro Debugging macros are not permitted
                val __POS__ : string * int * int * int

                __POS__ returns a tuple (file,lnum,cnum,enum), corresponding to the location at which this expression appears in the file currently being parsed by the compiler. file is the current filename, lnum the line number, cnum the character position in the line and enum the last character position in the line.

                • since 4.02
                • alert debug_macro Debugging macros are not permitted
                val __FUNCTION__ : string

                __FUNCTION__ returns the name of the current function or method, including any enclosing modules or classes.

                • since 4.12
                • alert debug_macro Debugging macros are not permitted
                val __LOC_OF__ : 'a -> string * 'a

                __LOC_OF__ expr returns a pair (loc, expr) where loc is the location of expr in the file currently being parsed by the compiler, with the standard error format of OCaml: "File %S, line %d, characters %d-%d".

                • since 4.02
                • alert debug_macro Debugging macros are not permitted
                val __LINE_OF__ : 'a -> int * 'a

                __LINE_OF__ expr returns a pair (line, expr), where line is the line number at which the expression expr appears in the file currently being parsed by the compiler.

                • since 4.02
                • alert debug_macro Debugging macros are not permitted
                val __POS_OF__ : 'a -> (string * int * int * int) * 'a

                __POS_OF__ expr returns a pair (loc,expr), where loc is a tuple (file,lnum,cnum,enum) corresponding to the location at which the expression expr appears in the file currently being parsed by the compiler. file is the current filename, lnum the line number, cnum the character position in the line and enum the last character position in the line.

                • since 4.02
                • alert debug_macro Debugging macros are not permitted

                Composition operators

                include sig ... end
                val (|>) : 'a -> ('a -> 'b) -> 'b

                Reverse-application operator: x |> f |> g is exactly equivalent to g (f (x)). Left-associative operator, see Ocaml_operators for more information.

                • since 4.01
                val (@@) : ('a -> 'b) -> 'a -> 'b

                Application operator: g @@ f @@ x is exactly equivalent to g (f (x)). Right-associative operator, see Ocaml_operators for more information.

                • since 4.01

                Integer operations

                include sig ... end
                val (~-) : int -> int

                Unary negation. You can also write - e instead of ~- e. Unary operator, see Ocaml_operators for more information.

                val (~+) : int -> int

                Unary addition. You can also write + e instead of ~+ e. Unary operator, see Ocaml_operators for more information.

                • since 3.12
                val succ : int -> int

                succ x is x + 1.

                val pred : int -> int

                pred x is x - 1.

                val (+) : int -> int -> int

                Integer addition. Left-associative operator, see Ocaml_operators for more information.

                val (-) : int -> int -> int

                Integer subtraction. Left-associative operator, , see Ocaml_operators for more information.

                val (*) : int -> int -> int

                Integer multiplication. Left-associative operator, see Ocaml_operators for more information.

                val (/) : int -> int -> int

                Integer division. Integer division rounds the real quotient of its arguments towards zero. More precisely, if x >= 0 and y > 0, x / y is the greatest integer less than or equal to the real quotient of x by y. Moreover, (- x) / y = x / (- y) = - (x / y). Left-associative operator, see Ocaml_operators for more information.

                val (mod) : int -> int -> int

                Integer remainder. If y is not zero, the result of x mod y satisfies the following properties: x = (x / y) * y + x mod y and abs(x mod y) <= abs(y) - 1. If y = 0, x mod y raises Division_by_zero. Note that x mod y is negative only if x < 0. Left-associative operator, see Ocaml_operators for more information.

                val abs : int -> int

                abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

                val (land) : int -> int -> int

                Bitwise logical and. Left-associative operator, see Ocaml_operators for more information.

                val (lor) : int -> int -> int

                Bitwise logical or. Left-associative operator, see Ocaml_operators for more information.

                val (lxor) : int -> int -> int

                Bitwise logical exclusive or. Left-associative operator, see Ocaml_operators for more information.

                val lnot : int -> int

                Bitwise logical negation.

                val (lsl) : int -> int -> int

                n lsl m shifts n to the left by m bits. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

                val (lsr) : int -> int -> int

                n lsr m shifts n to the right by m bits. This is a logical shift: zeroes are inserted regardless of the sign of n. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

                val (asr) : int -> int -> int

                n asr m shifts n to the right by m bits. This is an arithmetic shift: the sign bit of n is replicated. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

                val max_int : int

                The greatest representable integer.

                val min_int : int

                The smallest representable integer.

                Floating-point operations

                include sig ... end
                val (~-.) : float -> float

                Unary negation. You can also write -. e instead of ~-. e. Unary operator, see Ocaml_operators for more information.

                val (~+.) : float -> float

                Unary addition. You can also write +. e instead of ~+. e. Unary operator, see Ocaml_operators for more information.

                • since 3.12
                val (+.) : float -> float -> float

                Floating-point addition. Left-associative operator, see Ocaml_operators for more information.

                val (-.) : float -> float -> float

                Floating-point subtraction. Left-associative operator, see Ocaml_operators for more information.

                val (*.) : float -> float -> float

                Floating-point multiplication. Left-associative operator, see Ocaml_operators for more information.

                val (/.) : float -> float -> float

                Floating-point division. Left-associative operator, see Ocaml_operators for more information.

                val (**) : float -> float -> float

                Exponentiation. Right-associative operator, see Ocaml_operators for more information.

                val exp : float -> float

                Exponential.

                val expm1 : float -> float

                expm1 x computes exp x -. 1.0, giving numerically-accurate results even if x is close to 0.0.

                • since 3.12
                val acos : float -> float

                Arc cosine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between 0.0 and pi.

                val asin : float -> float

                Arc sine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between -pi/2 and pi/2.

                val atan : float -> float

                Arc tangent. Result is in radians and is between -pi/2 and pi/2.

                val atan2 : float -> float -> float

                atan2 y x returns the arc tangent of y /. x. The signs of x and y are used to determine the quadrant of the result. Result is in radians and is between -pi and pi.

                val hypot : float -> float -> float

                hypot x y returns sqrt(x *. x + y *. y), that is, the length of the hypotenuse of a right-angled triangle with sides of length x and y, or, equivalently, the distance of the point (x,y) to origin. If one of x or y is infinite, returns infinity even if the other is nan.

                • since 4.00
                val cos : float -> float

                Cosine. Argument is in radians.

                val cosh : float -> float

                Hyperbolic cosine. Argument is in radians.

                val acosh : float -> float

                Hyperbolic arc cosine. The argument must fall within the range [1.0, inf]. Result is in radians and is between 0.0 and inf.

                • since 4.13
                val log : float -> float

                Natural logarithm.

                val log10 : float -> float

                Base 10 logarithm.

                val log1p : float -> float

                log1p x computes log(1.0 +. x) (natural logarithm), giving numerically-accurate results even if x is close to 0.0.

                • since 3.12
                val sin : float -> float

                Sine. Argument is in radians.

                val sinh : float -> float

                Hyperbolic sine. Argument is in radians.

                val asinh : float -> float

                Hyperbolic arc sine. The argument and result range over the entire real line. Result is in radians.

                • since 4.13
                val sqrt : float -> float

                Square root.

                val tan : float -> float

                Tangent. Argument is in radians.

                val tanh : float -> float

                Hyperbolic tangent. Argument is in radians.

                val atanh : float -> float

                Hyperbolic arc tangent. The argument must fall within the range [-1.0, 1.0]. Result is in radians and ranges over the entire real line.

                • since 4.13
                val ceil : float -> float

                Round above to an integer value. ceil f returns the least integer value greater than or equal to f. The result is returned as a float.

                val floor : float -> float

                Round below to an integer value. floor f returns the greatest integer value less than or equal to f. The result is returned as a float.

                val abs_float : float -> float

                abs_float f returns the absolute value of f.

                val copysign : float -> float -> float

                copysign x y returns a float whose absolute value is that of x and whose sign is that of y. If x is nan, returns nan. If y is nan, returns either x or -. x, but it is not specified which.

                • since 4.00
                val mod_float : float -> float -> float

                mod_float a b returns the remainder of a with respect to b. The returned value is a -. n *. b, where n is the quotient a /. b rounded towards zero to an integer.

                val frexp : float -> float * int

                frexp f returns the pair of the significant and the exponent of f. When f is zero, the significant x and the exponent n of f are equal to zero. When f is non-zero, they are defined by f = x *. 2 ** n and 0.5 <= x < 1.0.

                val ldexp : float -> int -> float

                ldexp x n returns x *. 2 ** n.

                val modf : float -> float * float

                modf f returns the pair of the fractional and integral part of f.

                val float : int -> float

                Same as Stdlib.float_of_int.

                val float_of_int : int -> float

                Convert an integer to floating-point.

                val truncate : float -> int

                Same as Stdlib.int_of_float.

                val int_of_float : float -> int

                Truncate the given floating-point number to an integer. The result is unspecified if the argument is nan or falls outside the range of representable integers.

                val infinity : float

                Positive infinity.

                val neg_infinity : float

                Negative infinity.

                val nan : float

                A special floating-point value denoting the result of an undefined operation such as 0.0 /. 0.0. Stands for 'not a number'. Any floating-point operation with nan as argument returns nan as result, unless otherwise specified in IEEE 754 standard. As for floating-point comparisons, =, <, <=, > and >= return false and <> returns true if one or both of their arguments is nan.

                nan is a quiet NaN since 5.1; it was a signaling NaN before.

                val max_float : float

                The largest positive finite value of type float.

                val min_float : float

                The smallest positive, non-zero, non-denormalized value of type float.

                val epsilon_float : float

                The difference between 1.0 and the smallest exactly representable floating-point number greater than 1.0.

                val classify_float : float -> Stdlib.fpclass

                Return the class of the given floating-point number: normal, subnormal, zero, infinite, or not a number.

                type fpclass = Stdlib.fpclass =
                1. | FP_normal
                2. | FP_subnormal
                3. | FP_zero
                4. | FP_infinite
                5. | FP_nan

                String operations

                More in Stdlib.String

                include sig ... end
                val (^) : string -> string -> string

                String concatenation. Right-associative operator, see Ocaml_operators for more information.

                • raises Invalid_argument

                  if the result is longer then than Sys.max_string_length bytes.

                Character operations

                More in Stdlib.Char

                include sig ... end
                val int_of_char : char -> int

                Return the ASCII code of the argument.

                val char_of_int : int -> char

                Return the character with the given ASCII code.

                Unit operations

                include sig ... end
                val ignore : 'a -> unit

                Discard the value of its argument and return (). For instance, ignore(f x) discards the result of the side-effecting function f. It is equivalent to f x; (), except that the latter may generate a compiler warning; writing ignore(f x) instead avoids the warning.

                String conversion functions

                include sig ... end
                val string_of_bool : bool -> string

                Return the string representation of a boolean. As the returned values may be shared, the user should not modify them directly.

                val bool_of_string_opt : string -> bool option

                Convert the given string to a boolean.

                Return None if the string is not "true" or "false".

                • since 4.05
                val bool_of_string : string -> bool

                Same as Stdlib.bool_of_string_opt, but raise Invalid_argument "bool_of_string" instead of returning None.

                val string_of_int : int -> string

                Return the string representation of an integer, in decimal.

                val int_of_string_opt : string -> int option

                Convert the given string to an integer. The string is read in decimal (by default, or if the string begins with 0u), in hexadecimal (if it begins with 0x or 0X), in octal (if it begins with 0o or 0O), or in binary (if it begins with 0b or 0B).

                The 0u prefix reads the input as an unsigned integer in the range [0, 2*max_int+1]. If the input exceeds max_int it is converted to the signed integer min_int + input - max_int - 1.

                The _ (underscore) character can appear anywhere in the string and is ignored.

                Return None if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type int.

                • since 4.05
                val int_of_string : string -> int

                Same as Stdlib.int_of_string_opt, but raise Failure "int_of_string" instead of returning None.

                val string_of_float : float -> string

                Return a string representation of a floating-point number.

                This conversion can involve a loss of precision. For greater control over the manner in which the number is printed, see Printf.

                val float_of_string_opt : string -> float option

                Convert the given string to a float. The string is read in decimal (by default) or in hexadecimal (marked by 0x or 0X).

                The format of decimal floating-point numbers is [-] dd.ddd (e|E) [+|-] dd , where d stands for a decimal digit.

                The format of hexadecimal floating-point numbers is [-] 0(x|X) hh.hhh (p|P) [+|-] dd , where h stands for an hexadecimal digit and d for a decimal digit.

                In both cases, at least one of the integer and fractional parts must be given; the exponent part is optional.

                The _ (underscore) character can appear anywhere in the string and is ignored.

                Depending on the execution platforms, other representations of floating-point numbers can be accepted, but should not be relied upon.

                Return None if the given string is not a valid representation of a float.

                • since 4.05
                val float_of_string : string -> float

                Same as Stdlib.float_of_string_opt, but raise Failure "float_of_string" instead of returning None.

                Pair operations

                include sig ... end
                val fst : ('a * 'b) -> 'a

                Return the first component of a pair.

                val snd : ('a * 'b) -> 'b

                Return the second component of a pair.

                Character operations

                More in Stdlib.List

                include sig ... end
                val (@) : 'a list -> 'a list -> 'a list

                l0 @ l1 appends l1 to l0. Same function as List.append. Right-associative operator, see Ocaml_operators for more information.

                • since 5.1 this function is tail-recursive.
                • alert list_op List operations are not permitted

                I/O operations

                This is regular, unmocked, IO.

                type in_channel = Stdlib.in_channel
                • alert input_output Input/output is not permitted
                type out_channel = Stdlib.out_channel
                • alert input_output Input/output is not permitted
                type open_flag = Stdlib.open_flag =
                1. | Open_rdonly
                2. | Open_wronly
                3. | Open_append
                4. | Open_creat
                5. | Open_trunc
                6. | Open_excl
                7. | Open_binary
                8. | Open_text
                9. | Open_nonblock
                • alert input_output Input/output is not permitted
                include sig ... end
                val stdin : in_channel

                The standard input for the process.

                • alert input_output Input/output is not permitted
                val stdout : out_channel

                The standard output for the process.

                • alert input_output Input/output is not permitted
                val stderr : out_channel

                The standard error output for the process.

                • alert input_output Input/output is not permitted
                val print_char : char -> unit

                Print a character on standard output.

                • alert input_output Input/output is not permitted
                val print_string : string -> unit

                Print a string on standard output.

                • alert input_output Input/output is not permitted
                val print_bytes : bytes -> unit

                Print a byte sequence on standard output.

                • since 4.02
                • alert input_output Input/output is not permitted
                val print_int : int -> unit

                Print an integer, in decimal, on standard output.

                • alert input_output Input/output is not permitted
                val print_float : float -> unit

                Print a floating-point number, in decimal, on standard output.

                The conversion of the number to a string uses string_of_float and can involve a loss of precision.

                • alert input_output Input/output is not permitted
                val print_endline : string -> unit

                Print a string, followed by a newline character, on standard output and flush standard output.

                • alert input_output Input/output is not permitted
                val print_newline : unit -> unit

                Print a newline character on standard output, and flush standard output. This can be used to simulate line buffering of standard output.

                • alert input_output Input/output is not permitted
                val prerr_char : char -> unit

                Print a character on standard error.

                • alert input_output Input/output is not permitted
                val prerr_string : string -> unit

                Print a string on standard error.

                • alert input_output Input/output is not permitted
                val prerr_bytes : bytes -> unit

                Print a byte sequence on standard error.

                • since 4.02
                • alert input_output Input/output is not permitted
                val prerr_int : int -> unit

                Print an integer, in decimal, on standard error.

                • alert input_output Input/output is not permitted
                val prerr_float : float -> unit

                Print a floating-point number, in decimal, on standard error.

                The conversion of the number to a string uses string_of_float and can involve a loss of precision.

                • alert input_output Input/output is not permitted
                val prerr_endline : string -> unit

                Print a string, followed by a newline character on standard error and flush standard error.

                • alert input_output Input/output is not permitted
                val prerr_newline : unit -> unit

                Print a newline character on standard error, and flush standard error.

                • alert input_output Input/output is not permitted
                val read_line : unit -> string

                Flush standard output, then read characters from standard input until a newline character is encountered.

                Return the string of all characters read, without the newline character at the end.

                • raises End_of_file

                  if the end of the file is reached at the beginning of line.

                • alert input_output Input/output is not permitted
                val read_int_opt : unit -> int option

                Flush standard output, then read one line from standard input and convert it to an integer.

                Return None if the line read is not a valid representation of an integer.

                • since 4.05
                • alert input_output Input/output is not permitted
                val read_int : unit -> int

                Same as Stdlib.read_int_opt, but raise Failure "int_of_string" instead of returning None.

                • alert input_output Input/output is not permitted
                val read_float_opt : unit -> float option

                Flush standard output, then read one line from standard input and convert it to a floating-point number.

                Return None if the line read is not a valid representation of a floating-point number.

                • since 4.05
                • alert input_output Input/output is not permitted
                val read_float : unit -> float

                Same as Stdlib.read_float_opt, but raise Failure "float_of_string" instead of returning None.

                • alert input_output Input/output is not permitted
                val open_out : string -> out_channel

                Open the named file for writing, and return a new output channel on that file, positioned at the beginning of the file. The file is truncated to zero length if it already exists. It is created if it does not already exists.

                • alert input_output Input/output is not permitted
                val open_out_bin : string -> out_channel

                Same as Stdlib.open_out, but the file is opened in binary mode, so that no translation takes place during writes. On operating systems that do not distinguish between text mode and binary mode, this function behaves like Stdlib.open_out.

                • alert input_output Input/output is not permitted
                val open_out_gen : open_flag list -> int -> string -> out_channel

                open_out_gen mode perm filename opens the named file for writing, as described above. The extra argument mode specifies the opening mode. The extra argument perm specifies the file permissions, in case the file must be created. Stdlib.open_out and Stdlib.open_out_bin are special cases of this function.

                • alert input_output Input/output is not permitted
                val flush : out_channel -> unit

                Flush the buffer associated with the given output channel, performing all pending writes on that channel. Interactive programs must be careful about flushing standard output and standard error at the right time.

                • alert input_output Input/output is not permitted
                val flush_all : unit -> unit

                Flush all open output channels; ignore errors.

                • alert input_output Input/output is not permitted
                val output_char : out_channel -> char -> unit

                Write the character on the given output channel.

                • alert input_output Input/output is not permitted
                val output_string : out_channel -> string -> unit

                Write the string on the given output channel.

                • alert input_output Input/output is not permitted
                val output_bytes : out_channel -> bytes -> unit

                Write the byte sequence on the given output channel.

                • since 4.02
                • alert input_output Input/output is not permitted
                val output : out_channel -> bytes -> int -> int -> unit

                output oc buf pos len writes len characters from byte sequence buf, starting at offset pos, to the given output channel oc.

                • alert input_output Input/output is not permitted
                val output_substring : out_channel -> string -> int -> int -> unit

                Same as output but take a string as argument instead of a byte sequence.

                • since 4.02
                • alert input_output Input/output is not permitted
                val output_byte : out_channel -> int -> unit

                Write one 8-bit integer (as the single character with that code) on the given output channel. The given integer is taken modulo 256.

                • alert input_output Input/output is not permitted
                val output_binary_int : out_channel -> int -> unit

                Write one integer in binary format (4 bytes, big-endian) on the given output channel. The given integer is taken modulo 232. The only reliable way to read it back is through the Stdlib.input_binary_int function. The format is compatible across all machines for a given version of OCaml.

                • alert input_output Input/output is not permitted
                val output_value : out_channel -> 'a -> unit

                Write the representation of a structured value of any type to a channel. Circularities and sharing inside the value are detected and preserved. The object can be read back, by the function Stdlib.input_value. See the description of module Marshal for more information. Stdlib.output_value is equivalent to Marshal.to_channel with an empty list of flags.

                • alert input_output Input/output is not permitted
                val seek_out : out_channel -> int -> unit

                seek_out chan pos sets the current writing position to pos for channel chan. This works only for regular files. On files of other kinds (such as terminals, pipes and sockets), the behavior is unspecified.

                • alert input_output Input/output is not permitted
                val pos_out : out_channel -> int

                Return the current writing position for the given channel. Does not work on channels opened with the Open_append flag (returns unspecified results). For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos_out, then going back to this position using seek_out will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

                • alert input_output Input/output is not permitted
                val out_channel_length : out_channel -> int

                Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless.

                • alert input_output Input/output is not permitted
                val close_out : out_channel -> unit

                Close the given channel, flushing all buffered write operations. Output functions raise a Sys_error exception when they are applied to a closed output channel, except close_out and flush, which do nothing when applied to an already closed channel. Note that close_out may raise Sys_error if the operating system signals an error when flushing or closing.

                • alert input_output Input/output is not permitted
                val close_out_noerr : out_channel -> unit

                Same as close_out, but ignore all errors.

                • alert input_output Input/output is not permitted
                val set_binary_mode_out : out_channel -> bool -> unit

                set_binary_mode_out oc true sets the channel oc to binary mode: no translations take place during output. set_binary_mode_out oc false sets the channel oc to text mode: depending on the operating system, some translations may take place during output. For instance, under Windows, end-of-lines will be translated from \n to \r\n. This function has no effect under operating systems that do not distinguish between text mode and binary mode.

                • alert input_output Input/output is not permitted
                val open_in : string -> in_channel

                Open the named file for reading, and return a new input channel on that file, positioned at the beginning of the file.

                • alert input_output Input/output is not permitted
                val open_in_bin : string -> in_channel

                Same as Stdlib.open_in, but the file is opened in binary mode, so that no translation takes place during reads. On operating systems that do not distinguish between text mode and binary mode, this function behaves like Stdlib.open_in.

                • alert input_output Input/output is not permitted
                val open_in_gen : open_flag list -> int -> string -> in_channel

                open_in_gen mode perm filename opens the named file for reading, as described above. The extra arguments mode and perm specify the opening mode and file permissions. Stdlib.open_in and Stdlib.open_in_bin are special cases of this function.

                • alert input_output Input/output is not permitted
                val input_char : in_channel -> char

                Read one character from the given input channel.

                • raises End_of_file

                  if there are no more characters to read.

                • alert input_output Input/output is not permitted
                val input_line : in_channel -> string

                Read characters from the given input channel, until a newline character is encountered. Return the string of all characters read, without the newline character at the end.

                • raises End_of_file

                  if the end of the file is reached at the beginning of line.

                • alert input_output Input/output is not permitted
                val input : in_channel -> bytes -> int -> int -> int

                input ic buf pos len reads up to len characters from the given channel ic, storing them in byte sequence buf, starting at character number pos. It returns the actual number of characters read, between 0 and len (inclusive). A return value of 0 means that the end of file was reached. A return value between 0 and len exclusive means that not all requested len characters were read, either because no more characters were available at that time, or because the implementation found it convenient to do a partial read; input must be called again to read the remaining characters, if desired. (See also Stdlib.really_input for reading exactly len characters.) Exception Invalid_argument "input" is raised if pos and len do not designate a valid range of buf.

                • alert input_output Input/output is not permitted
                val really_input : in_channel -> bytes -> int -> int -> unit

                really_input ic buf pos len reads len characters from channel ic, storing them in byte sequence buf, starting at character number pos.

                • raises End_of_file

                  if the end of file is reached before len characters have been read.

                • alert input_output Input/output is not permitted
                val really_input_string : in_channel -> int -> string

                really_input_string ic len reads len characters from channel ic and returns them in a new string.

                • raises End_of_file

                  if the end of file is reached before len characters have been read.

                • since 4.02
                • alert input_output Input/output is not permitted
                val input_byte : in_channel -> int

                Same as Stdlib.input_char, but return the 8-bit integer representing the character.

                • alert input_output Input/output is not permitted
                val input_binary_int : in_channel -> int

                Read an integer encoded in binary format (4 bytes, big-endian) from the given input channel. See Stdlib.output_binary_int.

                • raises End_of_file

                  if the end of file was reached while reading the integer.

                • alert input_output Input/output is not permitted
                val input_value : in_channel -> 'a

                Read the representation of a structured value, as produced by Stdlib.output_value, and return the corresponding value. This function is identical to Marshal.from_channel; see the description of module Marshal for more information, in particular concerning the lack of type safety.

                • alert input_output Input/output is not permitted
                val seek_in : in_channel -> int -> unit

                seek_in chan pos sets the current reading position to pos for channel chan. This works only for regular files. On files of other kinds, the behavior is unspecified.

                • alert input_output Input/output is not permitted
                val pos_in : in_channel -> int

                Return the current reading position for the given channel. For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos_in, then going back to this position using seek_in will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

                • alert input_output Input/output is not permitted
                val in_channel_length : in_channel -> int

                Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless. The returned size does not take into account the end-of-line translations that can be performed when reading from a channel opened in text mode.

                • alert input_output Input/output is not permitted
                val close_in : in_channel -> unit

                Close the given channel. Input functions raise a Sys_error exception when they are applied to a closed input channel, except close_in, which does nothing when applied to an already closed channel.

                • alert input_output Input/output is not permitted
                val close_in_noerr : in_channel -> unit

                Same as close_in, but ignore all errors.

                • alert input_output Input/output is not permitted
                val set_binary_mode_in : in_channel -> bool -> unit

                set_binary_mode_in ic true sets the channel ic to binary mode: no translations take place during input. set_binary_mode_out ic false sets the channel ic to text mode: depending on the operating system, some translations may take place during input. For instance, under Windows, end-of-lines will be translated from \r\n to \n. This function has no effect under operating systems that do not distinguish between text mode and binary mode.

                • alert input_output Input/output is not permitted
                module LargeFile : sig ... end

                Operations on large files. This sub-module provides 64-bit variants of the channel functions that manipulate file positions and file sizes. By representing positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), these alternate functions allow operating on files whose sizes are greater than max_int.

                References

                type 'a ref = 'a Stdlib.ref
                include sig ... end
                val ref : 'a -> 'a ref

                Return a fresh reference containing the given value.

                • alert impure References are not permitted
                val (!) : 'a ref -> 'a

                !r returns the current contents of reference r. Equivalent to fun r -> r.contents. Unary operator, see Ocaml_operators for more information.

                • alert impure References are not permitted
                val (:=) : 'a ref -> 'a -> unit

                r := a stores the value of a in reference r. Equivalent to fun r v -> r.contents <- v. Right-associative operator, see Ocaml_operators for more information.

                • alert impure References are not permitted
                val incr : int ref -> unit

                Increment the integer contained in the given reference. Equivalent to fun r -> r := succ !r.

                • alert impure References are not permitted
                val decr : int ref -> unit

                Decrement the integer contained in the given reference. Equivalent to fun r -> r := pred !r.

                • alert impure References are not permitted

                Result type

                More in Stdlib.Result

                type ('a, 'b) result = ('a, 'b) Stdlib.result =
                1. | Ok of 'a
                2. | Error of 'b

                Format strings

                More in Stdlib.Scanf, Stdlib.Printf, and Stdlib.Format

                include sig ... end
                type ('a, 'b, 'c, 'd, 'e, 'f) format6 = ('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.format6
                type ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'c, 'c, 'd) format6
                type ('a, 'b, 'c) format = ('a, 'b, 'c, 'c) format4
                val format_of_string : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> ('a, 'b, 'c, 'd, 'e, 'f) format6

                format_of_string s returns a format string read from the string literal s. Note: format_of_string can not convert a string argument that is not a literal. If you need this functionality, use the more general Scanf.format_from_string function.

                val (^^) : diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-StringLabels_alerting/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-StringLabels_alerting/index.html index ae33ccf..13027ab 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-StringLabels_alerting/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-StringLabels_alerting/index.html @@ -1,5 +1,5 @@ -StringLabels_alerting (less-power.Stdlib_alerts.StringLabels_alerting)

                Module type Stdlib_alerts.StringLabels_alerting

                include sig ... end
                type t = string

                The type for strings.

                val make : int -> char -> string

                make n c is a string of length n with each index holding the character c.

                • raises Invalid_argument

                  if n < 0 or n > Sys.max_string_length.

                val init : int -> f:(int -> char) -> string

                init n ~f is a string of length n with index i holding the character f i (called in increasing index order).

                • raises Invalid_argument

                  if n < 0 or n > Sys.max_string_length.

                • since 4.02
                val empty : string

                The empty string.

                • since 4.13
                val length : string -> int

                length s is the length (number of bytes/characters) of s.

                val get : string -> int -> char

                get s i is the character at index i in s. This is the same as writing s.[i].

                • raises Invalid_argument

                  if i not an index of s.

                val concat : sep:string -> string list -> string

                concat ~sep ss concatenates the list of strings ss, inserting the separator string sep between each.

                • raises Invalid_argument

                  if the result is longer than Sys.max_string_length bytes.

                val cat : string -> string -> string

                cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

                • raises Invalid_argument

                  if the result is longer than Sys.max_string_length bytes.

                • since 4.13
                val equal : t -> t -> bool

                equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

                • since 4.03 (4.05 in StringLabels)
                val compare : t -> t -> int

                compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

                val starts_with : prefix:string -> string -> bool

                starts_with ~prefix s is true if and only if s starts with prefix.

                • since 4.13
                val ends_with : suffix:string -> string -> bool

                ends_with ~suffix s is true if and only if s ends with suffix.

                • since 4.13
                val contains_from : string -> int -> char -> bool

                contains_from s start c is true if and only if c appears in s after position start.

                • raises Invalid_argument

                  if start is not a valid position in s.

                val rcontains_from : string -> int -> char -> bool

                rcontains_from s stop c is true if and only if c appears in s before position stop+1.

                • raises Invalid_argument

                  if stop < 0 or stop+1 is not a valid position in s.

                val contains : string -> char -> bool

                contains s c is String.contains_from s 0 c.

                val sub : string -> pos:int -> len:int -> string

                sub s ~pos ~len is a string of length len, containing the substring of s that starts at position pos and has length len.

                • raises Invalid_argument

                  if pos and len do not designate a valid substring of s.

                val split_on_char : sep:char -> string -> string list

                split_on_char ~sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

                The function's result is specified by the following invariants:

                • The list is not empty.
                • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) +StringLabels_alerting (less-power.Stdlib_alerts.StringLabels_alerting)

                  Module type Stdlib_alerts.StringLabels_alerting

                  include sig ... end
                  type t = string

                  The type for strings.

                  val make : int -> char -> string

                  make n c is a string of length n with each index holding the character c.

                  • raises Invalid_argument

                    if n < 0 or n > Sys.max_string_length.

                  val init : int -> f:(int -> char) -> string

                  init n ~f is a string of length n with index i holding the character f i (called in increasing index order).

                  • raises Invalid_argument

                    if n < 0 or n > Sys.max_string_length.

                  • since 4.02
                  val empty : string

                  The empty string.

                  • since 4.13
                  val length : string -> int

                  length s is the length (number of bytes/characters) of s.

                  val get : string -> int -> char

                  get s i is the character at index i in s. This is the same as writing s.[i].

                  • raises Invalid_argument

                    if i not an index of s.

                  val concat : sep:string -> string list -> string

                  concat ~sep ss concatenates the list of strings ss, inserting the separator string sep between each.

                  • raises Invalid_argument

                    if the result is longer than Sys.max_string_length bytes.

                  val cat : string -> string -> string

                  cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

                  • raises Invalid_argument

                    if the result is longer than Sys.max_string_length bytes.

                  • since 4.13
                  val equal : t -> t -> bool

                  equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

                  • since 4.03 (4.05 in StringLabels)
                  val compare : t -> t -> int

                  compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

                  val starts_with : prefix:string -> string -> bool

                  starts_with ~prefix s is true if and only if s starts with prefix.

                  • since 4.13
                  val ends_with : suffix:string -> string -> bool

                  ends_with ~suffix s is true if and only if s ends with suffix.

                  • since 4.13
                  val contains_from : string -> int -> char -> bool

                  contains_from s start c is true if and only if c appears in s after position start.

                  • raises Invalid_argument

                    if start is not a valid position in s.

                  val rcontains_from : string -> int -> char -> bool

                  rcontains_from s stop c is true if and only if c appears in s before position stop+1.

                  • raises Invalid_argument

                    if stop < 0 or stop+1 is not a valid position in s.

                  val contains : string -> char -> bool

                  contains s c is String.contains_from s 0 c.

                  val sub : string -> pos:int -> len:int -> string

                  sub s ~pos ~len is a string of length len, containing the substring of s that starts at position pos and has length len.

                  • raises Invalid_argument

                    if pos and len do not designate a valid substring of s.

                  val split_on_char : sep:char -> string -> string list

                  split_on_char ~sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

                  The function's result is specified by the following invariants:

                  • The list is not empty.
                  • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) (split_on_char sep s) = s).
                  • No string in the result contains the sep character.
                  • since 4.04 (4.05 in StringLabels)
                  val map : f:(char -> char) -> string -> string

                  map f s is the string resulting from applying f to all the characters of s in increasing order.

                  • since 4.00
                  val mapi : f:(int -> char -> char) -> string -> string

                  mapi ~f s is like map but the index of the character is also passed to f.

                  • since 4.02
                  val fold_left : f:('acc -> char -> 'acc) -> init:'acc -> string -> 'acc

                  fold_left f x s computes f (... (f (f x s.[0]) s.[1]) ...) s.[n-1], where n is the length of the string s.

                  • since 4.13
                  val fold_right : f:(char -> 'acc -> 'acc) -> string -> init:'acc -> 'acc

                  fold_right f s x computes f s.[0] (f s.[1] ( ... (f s.[n-1] x) ...)), where n is the length of the string s.

                  • since 4.13
                  val for_all : f:(char -> bool) -> string -> bool

                  for_all p s checks if all characters in s satisfy the predicate p.

                  • since 4.13
                  val exists : f:(char -> bool) -> string -> bool

                  exists p s checks if at least one character of s satisfies the predicate p.

                  • since 4.13
                  val trim : string -> string

                  trim s is s without leading and trailing whitespace. Whitespace characters are: ' ', '\x0C' (form feed), '\n', '\r', and '\t'.

                  • since 4.00
                  val escaped : string -> string

                  escaped s is s with special characters represented by escape sequences, following the lexical conventions of OCaml.

                  All characters outside the US-ASCII printable range [0x20;0x7E] are escaped, as well as backslash (0x2F) and double-quote (0x22).

                  The function Scanf.unescaped is a left inverse of escaped, i.e. Scanf.unescaped (escaped s) = s for any string s (unless escaped s fails).

                  • raises Invalid_argument

                    if the result is longer than Sys.max_string_length bytes.

                  val uppercase_ascii : string -> string

                  uppercase_ascii s is s with all lowercase letters translated to uppercase, using the US-ASCII character set.

                  • since 4.03 (4.05 in StringLabels)
                  val lowercase_ascii : string -> string

                  lowercase_ascii s is s with all uppercase letters translated to lowercase, using the US-ASCII character set.

                  • since 4.03 (4.05 in StringLabels)
                  val capitalize_ascii : string -> string

                  capitalize_ascii s is s with the first character set to uppercase, using the US-ASCII character set.

                  • since 4.03 (4.05 in StringLabels)
                  val uncapitalize_ascii : string -> string

                  uncapitalize_ascii s is s with the first character set to lowercase, using the US-ASCII character set.

                  • since 4.03 (4.05 in StringLabels)
                  val iter : f:(char -> unit) -> string -> unit

                  iter ~f s applies function f in turn to all the characters of s. It is equivalent to f s.[0]; f s.[1]; ...; f s.[length s - 1]; ().

                  val iteri : f:(int -> char -> unit) -> string -> unit

                  iteri is like iter, but the function is also given the corresponding character index.

                  • since 4.00
                  val index_from : string -> int -> char -> int

                  index_from s i c is the index of the first occurrence of c in s after position i.

                  • raises Not_found

                    if c does not occur in s after position i.

                  • raises Invalid_argument

                    if i is not a valid position in s.

                  val index_from_opt : string -> int -> char -> int option

                  index_from_opt s i c is the index of the first occurrence of c in s after position i (if any).

                  • raises Invalid_argument

                    if i is not a valid position in s.

                  • since 4.05
                  val rindex_from : string -> int -> char -> int

                  rindex_from s i c is the index of the last occurrence of c in s before position i+1.

                  • raises Not_found

                    if c does not occur in s before position i+1.

                  • raises Invalid_argument

                    if i+1 is not a valid position in s.

                  val rindex_from_opt : string -> int -> char -> int option

                  rindex_from_opt s i c is the index of the last occurrence of c in s before position i+1 (if any).

                  • raises Invalid_argument

                    if i+1 is not a valid position in s.

                  • since 4.05
                  val index : string -> char -> int

                  index s c is String.index_from s 0 c.

                  val index_opt : string -> char -> int option

                  index_opt s c is String.index_from_opt s 0 c.

                  • since 4.05
                  val rindex : string -> char -> int

                  rindex s c is String.rindex_from s (length s - 1) c.

                  val rindex_opt : string -> char -> int option

                  rindex_opt s c is String.rindex_from_opt s (length s - 1) c.

                  • since 4.05
                  val to_seq : t -> char Stdlib.Seq.t

                  to_seq s is a sequence made of the string's characters in increasing order. In "unsafe-string" mode, modifications of the string during iteration will be reflected in the sequence.

                  • since 4.07
                  val to_seqi : t -> (int * char) Stdlib.Seq.t

                  to_seqi s is like to_seq but also tuples the corresponding index.

                  • since 4.07
                  val of_seq : char Stdlib.Seq.t -> t

                  of_seq s is a string made of the sequence's characters.

                  • since 4.07
                  val get_utf_8_uchar : t -> int -> Stdlib.Uchar.utf_decode

                  get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

                  val is_valid_utf_8 : t -> bool

                  is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

                  val get_utf_16be_uchar : t -> int -> Stdlib.Uchar.utf_decode

                  get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

                  val is_valid_utf_16be : t -> bool

                  is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

                  val get_utf_16le_uchar : t -> int -> Stdlib.Uchar.utf_decode

                  get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

                  val is_valid_utf_16le : t -> bool

                  is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

                  val get_uint8 : string -> int -> int

                  get_uint8 b i is b's unsigned 8-bit integer starting at character index i.

                  • since 4.13
                  val get_int8 : string -> int -> int

                  get_int8 b i is b's signed 8-bit integer starting at character index i.

                  • since 4.13
                  val get_uint16_ne : string -> int -> int

                  get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at character index i.

                  • since 4.13
                  val get_uint16_be : string -> int -> int

                  get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at character index i.

                  • since 4.13
                  val get_uint16_le : string -> int -> int

                  get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at character index i.

                  • since 4.13
                  val get_int16_ne : string -> int -> int

                  get_int16_ne b i is b's native-endian signed 16-bit integer starting at character index i.

                  • since 4.13
                  val get_int16_be : string -> int -> int

                  get_int16_be b i is b's big-endian signed 16-bit integer starting at character index i.

                  • since 4.13
                  val get_int16_le : string -> int -> int

                  get_int16_le b i is b's little-endian signed 16-bit integer starting at character index i.

                  • since 4.13
                  val get_int32_ne : string -> int -> int32

                  get_int32_ne b i is b's native-endian 32-bit integer starting at character index i.

                  • since 4.13
                  val hash : t -> int

                  An unseeded hash function for strings, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

                  • since 5.0
                  val seeded_hash : int -> t -> int

                  A seeded hash function for strings, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

                  • since 5.0
                  val get_int32_be : string -> int -> int32

                  get_int32_be b i is b's big-endian 32-bit integer starting at character index i.

                  • since 4.13
                  val get_int32_le : string -> int -> int32

                  get_int32_le b i is b's little-endian 32-bit integer starting at character index i.

                  • since 4.13
                  val get_int64_ne : string -> int -> int64

                  get_int64_ne b i is b's native-endian 64-bit integer starting at character index i.

                  • since 4.13
                  val get_int64_be : string -> int -> int64

                  get_int64_be b i is b's big-endian 64-bit integer starting at character index i.

                  • since 4.13
                  val get_int64_le : string -> int -> int64

                  get_int64_le b i is b's little-endian 64-bit integer starting at character index i.

                  • since 4.13
                  val of_bytes : bytes -> string

                  Return a new string that contains the same bytes as the given byte sequence.

                  • since 4.13
                  • alert impure This imperative programming item is not permitted
                  val to_bytes : string -> bytes

                  Return a new byte sequence that contains the same bytes as the given string.

                  • since 4.13
                  • alert impure This imperative programming item is not permitted
                  val blit : src:string -> src_pos:int -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-String_alerting/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-String_alerting/index.html index a401e78..8aef33c 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-String_alerting/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-String_alerting/index.html @@ -1,3 +1,3 @@ -String_alerting (less-power.Stdlib_alerts.String_alerting)

                  Module type Stdlib_alerts.String_alerting

                  include sig ... end
                  type t = string

                  The type for strings.

                  val make : int -> char -> string

                  make n c is a string of length n with each index holding the character c.

                  • raises Invalid_argument

                    if n < 0 or n > Sys.max_string_length.

                  val init : int -> (int -> char) -> string

                  init n f is a string of length n with index i holding the character f i (called in increasing index order).

                  • raises Invalid_argument

                    if n < 0 or n > Sys.max_string_length.

                  • since 4.02
                  val empty : string

                  The empty string.

                  • since 4.13
                  val length : string -> int

                  length s is the length (number of bytes/characters) of s.

                  val get : string -> int -> char

                  get s i is the character at index i in s. This is the same as writing s.[i].

                  • raises Invalid_argument

                    if i not an index of s.

                  val concat : string -> string list -> string

                  concat sep ss concatenates the list of strings ss, inserting the separator string sep between each.

                  • raises Invalid_argument

                    if the result is longer than Sys.max_string_length bytes.

                  val cat : string -> string -> string

                  cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

                  • raises Invalid_argument

                    if the result is longer than Sys.max_string_length bytes.

                  • since 4.13
                  val equal : t -> t -> bool

                  equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

                  • since 4.03 (4.05 in StringLabels)
                  val compare : t -> t -> int

                  compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

                  val starts_with : prefix:string -> string -> bool

                  starts_with ~prefix s is true if and only if s starts with prefix.

                  • since 4.13
                  val ends_with : suffix:string -> string -> bool

                  ends_with ~suffix s is true if and only if s ends with suffix.

                  • since 4.13
                  val contains_from : string -> int -> char -> bool

                  contains_from s start c is true if and only if c appears in s after position start.

                  • raises Invalid_argument

                    if start is not a valid position in s.

                  val rcontains_from : string -> int -> char -> bool

                  rcontains_from s stop c is true if and only if c appears in s before position stop+1.

                  • raises Invalid_argument

                    if stop < 0 or stop+1 is not a valid position in s.

                  val contains : string -> char -> bool

                  contains s c is String.contains_from s 0 c.

                  val sub : string -> int -> int -> string

                  sub s pos len is a string of length len, containing the substring of s that starts at position pos and has length len.

                  • raises Invalid_argument

                    if pos and len do not designate a valid substring of s.

                  val split_on_char : char -> string -> string list

                  split_on_char sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

                  The function's result is specified by the following invariants:

                  • The list is not empty.
                  • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) +String_alerting (less-power.Stdlib_alerts.String_alerting)

                    Module type Stdlib_alerts.String_alerting

                    include sig ... end
                    type t = string

                    The type for strings.

                    val make : int -> char -> string

                    make n c is a string of length n with each index holding the character c.

                    • raises Invalid_argument

                      if n < 0 or n > Sys.max_string_length.

                    val init : int -> (int -> char) -> string

                    init n f is a string of length n with index i holding the character f i (called in increasing index order).

                    • raises Invalid_argument

                      if n < 0 or n > Sys.max_string_length.

                    • since 4.02
                    val empty : string

                    The empty string.

                    • since 4.13
                    val length : string -> int

                    length s is the length (number of bytes/characters) of s.

                    val get : string -> int -> char

                    get s i is the character at index i in s. This is the same as writing s.[i].

                    • raises Invalid_argument

                      if i not an index of s.

                    val concat : string -> string list -> string

                    concat sep ss concatenates the list of strings ss, inserting the separator string sep between each.

                    • raises Invalid_argument

                      if the result is longer than Sys.max_string_length bytes.

                    val cat : string -> string -> string

                    cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

                    • raises Invalid_argument

                      if the result is longer than Sys.max_string_length bytes.

                    • since 4.13
                    val equal : t -> t -> bool

                    equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

                    • since 4.03 (4.05 in StringLabels)
                    val compare : t -> t -> int

                    compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

                    val starts_with : prefix:string -> string -> bool

                    starts_with ~prefix s is true if and only if s starts with prefix.

                    • since 4.13
                    val ends_with : suffix:string -> string -> bool

                    ends_with ~suffix s is true if and only if s ends with suffix.

                    • since 4.13
                    val contains_from : string -> int -> char -> bool

                    contains_from s start c is true if and only if c appears in s after position start.

                    • raises Invalid_argument

                      if start is not a valid position in s.

                    val rcontains_from : string -> int -> char -> bool

                    rcontains_from s stop c is true if and only if c appears in s before position stop+1.

                    • raises Invalid_argument

                      if stop < 0 or stop+1 is not a valid position in s.

                    val contains : string -> char -> bool

                    contains s c is String.contains_from s 0 c.

                    val sub : string -> int -> int -> string

                    sub s pos len is a string of length len, containing the substring of s that starts at position pos and has length len.

                    • raises Invalid_argument

                      if pos and len do not designate a valid substring of s.

                    val split_on_char : char -> string -> string list

                    split_on_char sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

                    The function's result is specified by the following invariants:

                    • The list is not empty.
                    • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) (split_on_char sep s) = s).
                    • No string in the result contains the sep character.
                    • since 4.04 (4.05 in StringLabels)
                    val map : (char -> char) -> string -> string

                    map f s is the string resulting from applying f to all the characters of s in increasing order.

                    • since 4.00
                    val mapi : (int -> char -> char) -> string -> string

                    mapi f s is like map but the index of the character is also passed to f.

                    • since 4.02
                    val fold_left : ('acc -> char -> 'acc) -> 'acc -> string -> 'acc

                    fold_left f x s computes f (... (f (f x s.[0]) s.[1]) ...) s.[n-1], where n is the length of the string s.

                    • since 4.13
                    val fold_right : (char -> 'acc -> 'acc) -> string -> 'acc -> 'acc

                    fold_right f s x computes f s.[0] (f s.[1] ( ... (f s.[n-1] x) ...)), where n is the length of the string s.

                    • since 4.13
                    val for_all : (char -> bool) -> string -> bool

                    for_all p s checks if all characters in s satisfy the predicate p.

                    • since 4.13
                    val exists : (char -> bool) -> string -> bool

                    exists p s checks if at least one character of s satisfies the predicate p.

                    • since 4.13
                    val trim : string -> string

                    trim s is s without leading and trailing whitespace. Whitespace characters are: ' ', '\x0C' (form feed), '\n', '\r', and '\t'.

                    • since 4.00
                    val escaped : string -> string

                    escaped s is s with special characters represented by escape sequences, following the lexical conventions of OCaml.

                    All characters outside the US-ASCII printable range [0x20;0x7E] are escaped, as well as backslash (0x2F) and double-quote (0x22).

                    The function Scanf.unescaped is a left inverse of escaped, i.e. Scanf.unescaped (escaped s) = s for any string s (unless escaped s fails).

                    • raises Invalid_argument

                      if the result is longer than Sys.max_string_length bytes.

                    val uppercase_ascii : string -> string

                    uppercase_ascii s is s with all lowercase letters translated to uppercase, using the US-ASCII character set.

                    • since 4.03 (4.05 in StringLabels)
                    val lowercase_ascii : string -> string

                    lowercase_ascii s is s with all uppercase letters translated to lowercase, using the US-ASCII character set.

                    • since 4.03 (4.05 in StringLabels)
                    val capitalize_ascii : string -> string

                    capitalize_ascii s is s with the first character set to uppercase, using the US-ASCII character set.

                    • since 4.03 (4.05 in StringLabels)
                    val uncapitalize_ascii : string -> string

                    uncapitalize_ascii s is s with the first character set to lowercase, using the US-ASCII character set.

                    • since 4.03 (4.05 in StringLabels)
                    val iter : (char -> unit) -> string -> unit

                    iter f s applies function f in turn to all the characters of s. It is equivalent to f s.[0]; f s.[1]; ...; f s.[length s - 1]; ().

                    val iteri : (int -> char -> unit) -> string -> unit

                    iteri is like iter, but the function is also given the corresponding character index.

                    • since 4.00
                    val index_from : string -> int -> char -> int

                    index_from s i c is the index of the first occurrence of c in s after position i.

                    • raises Not_found

                      if c does not occur in s after position i.

                    • raises Invalid_argument

                      if i is not a valid position in s.

                    val index_from_opt : string -> int -> char -> int option

                    index_from_opt s i c is the index of the first occurrence of c in s after position i (if any).

                    • raises Invalid_argument

                      if i is not a valid position in s.

                    • since 4.05
                    val rindex_from : string -> int -> char -> int

                    rindex_from s i c is the index of the last occurrence of c in s before position i+1.

                    • raises Not_found

                      if c does not occur in s before position i+1.

                    • raises Invalid_argument

                      if i+1 is not a valid position in s.

                    val rindex_from_opt : string -> int -> char -> int option

                    rindex_from_opt s i c is the index of the last occurrence of c in s before position i+1 (if any).

                    • raises Invalid_argument

                      if i+1 is not a valid position in s.

                    • since 4.05
                    val index : string -> char -> int

                    index s c is String.index_from s 0 c.

                    val index_opt : string -> char -> int option

                    index_opt s c is String.index_from_opt s 0 c.

                    • since 4.05
                    val rindex : string -> char -> int

                    rindex s c is String.rindex_from s (length s - 1) c.

                    val rindex_opt : string -> char -> int option

                    rindex_opt s c is String.rindex_from_opt s (length s - 1) c.

                    • since 4.05
                    val to_seq : t -> char Stdlib.Seq.t

                    to_seq s is a sequence made of the string's characters in increasing order. In "unsafe-string" mode, modifications of the string during iteration will be reflected in the sequence.

                    • since 4.07
                    val to_seqi : t -> (int * char) Stdlib.Seq.t

                    to_seqi s is like to_seq but also tuples the corresponding index.

                    • since 4.07
                    val of_seq : char Stdlib.Seq.t -> t

                    of_seq s is a string made of the sequence's characters.

                    • since 4.07
                    val get_utf_8_uchar : t -> int -> Stdlib.Uchar.utf_decode

                    get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

                    val is_valid_utf_8 : t -> bool

                    is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

                    val get_utf_16be_uchar : t -> int -> Stdlib.Uchar.utf_decode

                    get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

                    val is_valid_utf_16be : t -> bool

                    is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

                    val get_utf_16le_uchar : t -> int -> Stdlib.Uchar.utf_decode

                    get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

                    val is_valid_utf_16le : t -> bool

                    is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

                    val get_uint8 : string -> int -> int

                    get_uint8 b i is b's unsigned 8-bit integer starting at character index i.

                    • since 4.13
                    val get_int8 : string -> int -> int

                    get_int8 b i is b's signed 8-bit integer starting at character index i.

                    • since 4.13
                    val get_uint16_ne : string -> int -> int

                    get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at character index i.

                    • since 4.13
                    val get_uint16_be : string -> int -> int

                    get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at character index i.

                    • since 4.13
                    val get_uint16_le : string -> int -> int

                    get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at character index i.

                    • since 4.13
                    val get_int16_ne : string -> int -> int

                    get_int16_ne b i is b's native-endian signed 16-bit integer starting at character index i.

                    • since 4.13
                    val get_int16_be : string -> int -> int

                    get_int16_be b i is b's big-endian signed 16-bit integer starting at character index i.

                    • since 4.13
                    val get_int16_le : string -> int -> int

                    get_int16_le b i is b's little-endian signed 16-bit integer starting at character index i.

                    • since 4.13
                    val get_int32_ne : string -> int -> int32

                    get_int32_ne b i is b's native-endian 32-bit integer starting at character index i.

                    • since 4.13
                    val hash : t -> int

                    An unseeded hash function for strings, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

                    • since 5.0
                    val seeded_hash : int -> t -> int

                    A seeded hash function for strings, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

                    • since 5.0
                    val get_int32_be : string -> int -> int32

                    get_int32_be b i is b's big-endian 32-bit integer starting at character index i.

                    • since 4.13
                    val get_int32_le : string -> int -> int32

                    get_int32_le b i is b's little-endian 32-bit integer starting at character index i.

                    • since 4.13
                    val get_int64_ne : string -> int -> int64

                    get_int64_ne b i is b's native-endian 64-bit integer starting at character index i.

                    • since 4.13
                    val get_int64_be : string -> int -> int64

                    get_int64_be b i is b's big-endian 64-bit integer starting at character index i.

                    • since 4.13
                    val get_int64_le : string -> int -> int64

                    get_int64_le b i is b's little-endian 64-bit integer starting at character index i.

                    • since 4.13
                    val of_bytes : bytes -> string

                    Return a new string that contains the same bytes as the given byte sequence.

                    • since 4.13
                    • alert impure This imperative programming item is not permitted
                    val to_bytes : string -> bytes

                    Return a new byte sequence that contains the same bytes as the given string.

                    • since 4.13
                    • alert impure This imperative programming item is not permitted
                    val blit : string -> int -> bytes -> int -> int -> unit

                    Same as Bytes.blit_string which should be preferred.

                    • alert impure This imperative programming item is not permitted
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Uchar_alerting/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Uchar_alerting/index.html index 121fe62..ccd0d0a 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Uchar_alerting/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_alerts/module-type-Uchar_alerting/index.html @@ -1,2 +1,2 @@ -Uchar_alerting (less-power.Stdlib_alerts.Uchar_alerting)

                    Module type Stdlib_alerts.Uchar_alerting

                    type t = Stdlib.Uchar.t
                    type utf_decode = Stdlib.Uchar.utf_decode
                    include sig ... end
                    val min : t

                    min is U+0000.

                    val max : t

                    max is U+10FFFF.

                    val bom : t

                    bom is U+FEFF, the byte order mark (BOM) character.

                    • since 4.06
                    val rep : t

                    rep is U+FFFD, the replacement character.

                    • since 4.06
                    val succ : t -> t

                    succ u is the scalar value after u in the set of Unicode scalar values.

                    • raises Invalid_argument

                      if u is max.

                    val pred : t -> t

                    pred u is the scalar value before u in the set of Unicode scalar values.

                    • raises Invalid_argument

                      if u is min.

                    val is_valid : int -> bool

                    is_valid n is true if and only if n is a Unicode scalar value (i.e. in the ranges 0x0000...0xD7FF or 0xE000...0x10FFFF).

                    val of_int : int -> t

                    of_int i is i as a Unicode character.

                    • raises Invalid_argument

                      if i does not satisfy is_valid.

                    val to_int : t -> int

                    to_int u is u as an integer.

                    val is_char : t -> bool

                    is_char u is true if and only if u is a latin1 OCaml character.

                    val of_char : char -> t

                    of_char c is c as a Unicode character.

                    val to_char : t -> char

                    to_char u is u as an OCaml latin1 character.

                    • raises Invalid_argument

                      if u does not satisfy is_char.

                    val equal : t -> t -> bool

                    equal u u' is u = u'.

                    val compare : t -> t -> int

                    compare u u' is Stdlib.compare u u'.

                    val hash : t -> int

                    hash u associates a non-negative integer to u.

                    val utf_decode_is_valid : utf_decode -> bool

                    utf_decode_is_valid d is true if and only if d holds a valid decode.

                    val utf_decode_uchar : utf_decode -> t

                    utf_decode_uchar d is the Unicode character decoded by d if utf_decode_is_valid d is true and Uchar.rep otherwise.

                    val utf_decode_length : utf_decode -> int

                    utf_decode_length d is the number of elements from the source that were consumed by the decode d. This is always strictly positive and smaller or equal to 4. The kind of source elements depends on the actual decoder; for the decoders of the standard library this function always returns a length in bytes.

                    val utf_decode : int -> t -> utf_decode

                    utf_decode n u is a valid UTF decode for u that consumed n elements from the source for decoding. n must be positive and smaller or equal to 4 (this is not checked by the module).

                    val utf_decode_invalid : int -> utf_decode

                    utf_decode_invalid n is an invalid UTF decode that consumed n elements from the source to error. n must be positive and smaller or equal to 4 (this is not checked by the module). The resulting decode has rep as the decoded Unicode character.

                    val utf_8_byte_length : t -> int

                    utf_8_byte_length u is the number of bytes needed to encode u in UTF-8.

                    val utf_16_byte_length : t -> int

                    utf_16_byte_length u is the number of bytes needed to encode u in UTF-16.

                    +Uchar_alerting (less-power.Stdlib_alerts.Uchar_alerting)

                    Module type Stdlib_alerts.Uchar_alerting

                    type t = Stdlib.Uchar.t
                    type utf_decode = Stdlib.Uchar.utf_decode
                    include sig ... end
                    val min : t

                    min is U+0000.

                    val max : t

                    max is U+10FFFF.

                    val bom : t

                    bom is U+FEFF, the byte order mark (BOM) character.

                    • since 4.06
                    val rep : t

                    rep is U+FFFD, the replacement character.

                    • since 4.06
                    val succ : t -> t

                    succ u is the scalar value after u in the set of Unicode scalar values.

                    • raises Invalid_argument

                      if u is max.

                    val pred : t -> t

                    pred u is the scalar value before u in the set of Unicode scalar values.

                    • raises Invalid_argument

                      if u is min.

                    val is_valid : int -> bool

                    is_valid n is true if and only if n is a Unicode scalar value (i.e. in the ranges 0x0000...0xD7FF or 0xE000...0x10FFFF).

                    val of_int : int -> t

                    of_int i is i as a Unicode character.

                    • raises Invalid_argument

                      if i does not satisfy is_valid.

                    val to_int : t -> int

                    to_int u is u as an integer.

                    val is_char : t -> bool

                    is_char u is true if and only if u is a latin1 OCaml character.

                    val of_char : char -> t

                    of_char c is c as a Unicode character.

                    val to_char : t -> char

                    to_char u is u as an OCaml latin1 character.

                    • raises Invalid_argument

                      if u does not satisfy is_char.

                    val equal : t -> t -> bool

                    equal u u' is u = u'.

                    val compare : t -> t -> int

                    compare u u' is Stdlib.compare u u'.

                    val hash : t -> int

                    hash u associates a non-negative integer to u.

                    val utf_decode_is_valid : utf_decode -> bool

                    utf_decode_is_valid d is true if and only if d holds a valid decode.

                    val utf_decode_uchar : utf_decode -> t

                    utf_decode_uchar d is the Unicode character decoded by d if utf_decode_is_valid d is true and Uchar.rep otherwise.

                    val utf_decode_length : utf_decode -> int

                    utf_decode_length d is the number of elements from the source that were consumed by the decode d. This is always strictly positive and smaller or equal to 4. The kind of source elements depends on the actual decoder; for the decoders of the standard library this function always returns a length in bytes.

                    val utf_decode : int -> t -> utf_decode

                    utf_decode n u is a valid UTF decode for u that consumed n elements from the source for decoding. n must be positive and smaller or equal to 4 (this is not checked by the module).

                    val utf_decode_invalid : int -> utf_decode

                    utf_decode_invalid n is an invalid UTF decode that consumed n elements from the source to error. n must be positive and smaller or equal to 4 (this is not checked by the module). The resulting decode has rep as the decoded Unicode character.

                    val utf_8_byte_length : t -> int

                    utf_8_byte_length u is the number of bytes needed to encode u in UTF-8.

                    val utf_16_byte_length : t -> int

                    utf_16_byte_length u is the number of bytes needed to encode u in UTF-16.

                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/BooleanOperations/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/BooleanOperations/index.html index d1c441d..e9234c3 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/BooleanOperations/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/BooleanOperations/index.html @@ -1,2 +1,2 @@ -BooleanOperations (less-power.Stdlib_components.BooleanOperations)

                    Module Stdlib_components.BooleanOperations

                    SAFE Boolean operations

                    val not : bool -> bool
                    val (&&) : bool -> bool -> bool
                    val (||) : bool -> bool -> bool
                    +BooleanOperations (less-power.Stdlib_components.BooleanOperations)

                    Module Stdlib_components.BooleanOperations

                    SAFE Boolean operations

                    val not : bool -> bool
                    val (&&) : bool -> bool -> bool
                    val (||) : bool -> bool -> bool
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/CharOperations/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/CharOperations/index.html index 510c9bc..e276987 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/CharOperations/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/CharOperations/index.html @@ -1,2 +1,2 @@ -CharOperations (less-power.Stdlib_components.CharOperations)

                    Module Stdlib_components.CharOperations

                    SAFE Character operations -- more in module Char

                    val int_of_char : char -> int
                    val char_of_int : int -> char
                    +CharOperations (less-power.Stdlib_components.CharOperations)

                    Module Stdlib_components.CharOperations

                    SAFE Character operations -- more in module Char

                    val int_of_char : char -> int
                    val char_of_int : int -> char
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/Comparisons/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/Comparisons/index.html index efa4274..a978a3a 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/Comparisons/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/Comparisons/index.html @@ -1,2 +1,2 @@ -Comparisons (less-power.Stdlib_components.Comparisons)

                    Module Stdlib_components.Comparisons

                    SAFE Polymorphic comparisons. Does not include the impure (==) and (!=), which are in PhysicalComparisons.

                    val (=) : 'a -> 'a -> bool
                    val (<>) : 'a -> 'a -> bool
                    val (<) : 'a -> 'a -> bool
                    val (>) : 'a -> 'a -> bool
                    val (<=) : 'a -> 'a -> bool
                    val (>=) : 'a -> 'a -> bool
                    val compare : 'a -> 'a -> int
                    val min : 'a -> 'b -> 'c
                    val max : 'a -> 'b -> 'c
                    +Comparisons (less-power.Stdlib_components.Comparisons)

                    Module Stdlib_components.Comparisons

                    SAFE Polymorphic comparisons. Does not include the impure (==) and (!=), which are in PhysicalComparisons.

                    val (=) : 'a -> 'a -> bool
                    val (<>) : 'a -> 'a -> bool
                    val (<) : 'a -> 'a -> bool
                    val (>) : 'a -> 'a -> bool
                    val (<=) : 'a -> 'a -> bool
                    val (>=) : 'a -> 'a -> bool
                    val compare : 'a -> 'a -> int
                    val min : 'a -> 'a -> 'a
                    val max : 'a -> 'a -> 'a
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/Composition/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/Composition/index.html index 22ab9cf..11f1713 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/Composition/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/Composition/index.html @@ -1,2 +1,2 @@ -Composition (less-power.Stdlib_components.Composition)

                    Module Stdlib_components.Composition

                    SAFE Composition operators

                    val (|>) : 'a -> ('a -> 'b) -> 'b
                    val (@@) : ('a -> 'b) -> 'a -> 'b
                    +Composition (less-power.Stdlib_components.Composition)

                    Module Stdlib_components.Composition

                    SAFE Composition operators

                    val (|>) : 'a -> ('a -> 'b) -> 'b
                    val (@@) : ('a -> 'b) -> 'a -> 'b
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/Debugging/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/Debugging/index.html index a24981e..ff6cb7c 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/Debugging/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/Debugging/index.html @@ -1,2 +1,2 @@ -Debugging (less-power.Stdlib_components.Debugging)

                    Module Stdlib_components.Debugging

                    SAFE Debugging macros

                    val __LOC__ : string
                    val __FILE__ : string
                    val __LINE__ : int
                    val __MODULE__ : string
                    val __POS__ : string * int * int * int
                    val __FUNCTION__ : string
                    val __LOC_OF__ : 'a -> string * 'a
                    val __LINE_OF__ : 'a -> int * 'a
                    val __POS_OF__ : 'a -> (string * int * int * int) * 'a
                    +Debugging (less-power.Stdlib_components.Debugging)

                    Module Stdlib_components.Debugging

                    SAFE Debugging macros

                    val __LOC__ : string
                    val __FILE__ : string
                    val __LINE__ : int
                    val __MODULE__ : string
                    val __POS__ : string * int * int * int
                    val __FUNCTION__ : string
                    val __LOC_OF__ : 'a -> string * 'a
                    val __LINE_OF__ : 'a -> int * 'a
                    val __POS_OF__ : 'a -> (string * int * int * int) * 'a
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/Exceptions/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/Exceptions/index.html index 527fa9b..bc19585 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/Exceptions/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/Exceptions/index.html @@ -1,2 +1,2 @@ -Exceptions (less-power.Stdlib_components.Exceptions)

                    Module Stdlib_components.Exceptions

                    SAFE raise primitives and standard exceptions

                    val raise : exn -> 'a
                    val raise_notrace : exn -> 'a
                    val failwith : string -> 'a
                    val invalid_arg : string -> 'a
                    exception Exit
                    exception Match_failure of string * int * int
                    exception Assert_failure of string * int * int
                    exception Invalid_argument of string
                    exception Failure of string
                    exception Not_found
                    exception Out_of_memory
                    exception Stack_overflow
                    exception Sys_error of string
                    exception End_of_file
                    exception Division_by_zero
                    exception Sys_blocked_io
                    exception Undefined_recursive_module of string * int * int
                    +Exceptions (less-power.Stdlib_components.Exceptions)

                    Module Stdlib_components.Exceptions

                    SAFE raise primitives and standard exceptions

                    val raise : exn -> 'a
                    val raise_notrace : exn -> 'a
                    val failwith : string -> 'a
                    val invalid_arg : string -> 'a
                    exception Exit
                    exception Match_failure of string * int * int
                    exception Assert_failure of string * int * int
                    exception Invalid_argument of string
                    exception Failure of string
                    exception Not_found
                    exception Out_of_memory
                    exception Stack_overflow
                    exception Sys_error of string
                    exception End_of_file
                    exception Division_by_zero
                    exception Sys_blocked_io
                    exception Undefined_recursive_module of string * int * int
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/Exit/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/Exit/index.html index 2670e52..8e699aa 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/Exit/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/Exit/index.html @@ -1,2 +1,2 @@ -Exit (less-power.Stdlib_components.Exit)

                    Module Stdlib_components.Exit

                    UNSAFE Functions exiting the program at_exit, exit

                    val at_exit : (unit -> unit) -> unit
                    val do_domain_local_at_exit : (unit -> unit) Stdlib.ref
                    val do_at_exit : unit -> unit
                    val exit : int -> 'a
                    +Exit (less-power.Stdlib_components.Exit)

                    Module Stdlib_components.Exit

                    UNSAFE Functions exiting the program at_exit, exit

                    val at_exit : (unit -> unit) -> unit
                    val do_domain_local_at_exit : (unit -> unit) Stdlib.ref
                    val do_at_exit : unit -> unit
                    val exit : int -> 'a
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/FloatingPointOperations/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/FloatingPointOperations/index.html index cdd3695..4e71e5f 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/FloatingPointOperations/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/FloatingPointOperations/index.html @@ -1,2 +1,2 @@ -FloatingPointOperations (less-power.Stdlib_components.FloatingPointOperations)

                    Module Stdlib_components.FloatingPointOperations

                    SAFE Floating-point operations

                    val (~-.) : float -> float
                    val (~+.) : float -> float
                    val (+.) : float -> float -> float
                    val (-.) : float -> float -> float
                    val (*.) : float -> float -> float
                    val (/.) : float -> float -> float
                    val (**) : float -> float -> float
                    val exp : float -> float
                    val expm1 : float -> float
                    val acos : float -> float
                    val asin : float -> float
                    val atan : float -> float
                    val atan2 : float -> float -> float
                    val hypot : float -> float -> float
                    val cos : float -> float
                    val cosh : float -> float
                    val acosh : float -> float
                    val log : float -> float
                    val log10 : float -> float
                    val log1p : float -> float
                    val sin : float -> float
                    val sinh : float -> float
                    val asinh : float -> float
                    val sqrt : float -> float
                    val tan : float -> float
                    val tanh : float -> float
                    val atanh : float -> float
                    val ceil : float -> float
                    val floor : float -> float
                    val abs_float : float -> float
                    val copysign : float -> float -> float
                    val mod_float : float -> float -> float
                    val frexp : float -> float * int
                    val ldexp : float -> int -> float
                    val modf : float -> float * float
                    val float : int -> float
                    val float_of_int : int -> float
                    val truncate : float -> int
                    val int_of_float : float -> int
                    val infinity : float
                    val neg_infinity : float
                    val nan : float
                    val max_float : float
                    val min_float : float
                    val epsilon_float : float
                    type fpclass = Stdlib.fpclass
                    val classify_float : float -> fpclass
                    +FloatingPointOperations (less-power.Stdlib_components.FloatingPointOperations)

                    Module Stdlib_components.FloatingPointOperations

                    SAFE Floating-point operations

                    val (~-.) : float -> float
                    val (~+.) : float -> float
                    val (+.) : float -> float -> float
                    val (-.) : float -> float -> float
                    val (*.) : float -> float -> float
                    val (/.) : float -> float -> float
                    val (**) : float -> float -> float
                    val exp : float -> float
                    val expm1 : float -> float
                    val acos : float -> float
                    val asin : float -> float
                    val atan : float -> float
                    val atan2 : float -> float -> float
                    val hypot : float -> float -> float
                    val cos : float -> float
                    val cosh : float -> float
                    val acosh : float -> float
                    val log : float -> float
                    val log10 : float -> float
                    val log1p : float -> float
                    val sin : float -> float
                    val sinh : float -> float
                    val asinh : float -> float
                    val sqrt : float -> float
                    val tan : float -> float
                    val tanh : float -> float
                    val atanh : float -> float
                    val ceil : float -> float
                    val floor : float -> float
                    val abs_float : float -> float
                    val copysign : float -> float -> float
                    val mod_float : float -> float -> float
                    val frexp : float -> float * int
                    val ldexp : float -> int -> float
                    val modf : float -> float * float
                    val float : int -> float
                    val float_of_int : int -> float
                    val truncate : float -> int
                    val int_of_float : float -> int
                    val infinity : float
                    val neg_infinity : float
                    val nan : float
                    val max_float : float
                    val min_float : float
                    val epsilon_float : float
                    type fpclass = Stdlib.fpclass
                    val classify_float : float -> fpclass
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/Formats/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/Formats/index.html index 09ac7c6..a8a310f 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/Formats/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/Formats/index.html @@ -1,5 +1,5 @@ -Formats (less-power.Stdlib_components.Formats)

                    Module Stdlib_components.Formats

                    SAFE Formats

                    type ('a, 'b, 'c, 'd, 'e, 'f) format6 = ('a, 'b, 'c, 'd, 'e, 'f) Stdlib.format6
                    type ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'd) Stdlib.format4
                    type ('a, 'b, 'c) format = ('a, 'b, 'c) Stdlib.format
                    val string_of_format : ('a, 'b, 'c, 'd, 'e, 'f) Stdlib.format6 -> string
                    val format_of_string : +Formats (less-power.Stdlib_components.Formats)

                    Module Stdlib_components.Formats

                    SAFE Formats

                    type ('a, 'b, 'c, 'd, 'e, 'f) format6 = ('a, 'b, 'c, 'd, 'e, 'f) Stdlib.format6
                    type ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'd) Stdlib.format4
                    type ('a, 'b, 'c) format = ('a, 'b, 'c) Stdlib.format
                    val string_of_format : ('a, 'b, 'c, 'd, 'e, 'f) Stdlib.format6 -> string
                    val format_of_string : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> ('a, 'b, 'c, 'd, 'e, 'f) format6
                    val (^^) : ('a, 'b, 'c, 'd, 'e, 'f) Stdlib.format6 -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/IOOperations/LargeFile/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/IOOperations/LargeFile/index.html index 24fd495..ba3070b 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/IOOperations/LargeFile/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/IOOperations/LargeFile/index.html @@ -1,2 +1,2 @@ -LargeFile (less-power.Stdlib_components.IOOperations.LargeFile)

                    Module IOOperations.LargeFile

                    val seek_out : out_channel -> int64 -> unit
                    val pos_out : out_channel -> int64
                    val out_channel_length : out_channel -> int64
                    val seek_in : in_channel -> int64 -> unit
                    val pos_in : in_channel -> int64
                    val in_channel_length : in_channel -> int64
                    +LargeFile (less-power.Stdlib_components.IOOperations.LargeFile)

                    Module IOOperations.LargeFile

                    val seek_out : out_channel -> int64 -> unit
                    val pos_out : out_channel -> int64
                    val out_channel_length : out_channel -> int64
                    val seek_in : in_channel -> int64 -> unit
                    val pos_in : in_channel -> int64
                    val in_channel_length : in_channel -> int64
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/IOOperations/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/IOOperations/index.html index 5b9fca1..3c48f37 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/IOOperations/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/IOOperations/index.html @@ -1,2 +1,2 @@ -IOOperations (less-power.Stdlib_components.IOOperations)

                    Module Stdlib_components.IOOperations

                    UNSAFE I/O operations. This is regular, unmocked, IO.

                    type in_channel = Stdlib.in_channel
                    type out_channel = Stdlib.out_channel
                    val stdin : Stdlib.in_channel
                    val stdout : Stdlib.out_channel
                    val stderr : Stdlib.out_channel
                    type open_flag = Stdlib.open_flag
                    val open_out_gen : Stdlib.open_flag list -> int -> string -> Stdlib.out_channel
                    val open_out : string -> Stdlib.out_channel
                    val open_out_bin : string -> Stdlib.out_channel
                    val flush : Stdlib.out_channel -> unit
                    val flush_all : unit -> unit
                    val output_char : Stdlib.out_channel -> char -> unit
                    val output_bytes : Stdlib.out_channel -> bytes -> unit
                    val output_string : Stdlib.out_channel -> string -> unit
                    val output : Stdlib.out_channel -> bytes -> int -> int -> unit
                    val output_substring : Stdlib.out_channel -> string -> int -> int -> unit
                    val output_byte : Stdlib.out_channel -> int -> unit
                    val output_binary_int : Stdlib.out_channel -> int -> unit
                    val output_value : Stdlib.out_channel -> 'a -> unit
                    val seek_out : Stdlib.out_channel -> int -> unit
                    val pos_out : Stdlib.out_channel -> int
                    val out_channel_length : Stdlib.out_channel -> int
                    val close_out : Stdlib.out_channel -> unit
                    val close_out_noerr : Stdlib.out_channel -> unit
                    val open_in_gen : Stdlib.open_flag list -> int -> string -> Stdlib.in_channel
                    val open_in : string -> Stdlib.in_channel
                    val open_in_bin : string -> Stdlib.in_channel
                    val input_char : Stdlib.in_channel -> char
                    val input : Stdlib.in_channel -> bytes -> int -> int -> int
                    val unsafe_really_input : Stdlib.in_channel -> bytes -> int -> int -> unit
                    val really_input : Stdlib.in_channel -> bytes -> int -> int -> unit
                    val really_input_string : Stdlib.in_channel -> int -> string
                    val input_line : Stdlib.in_channel -> string
                    val input_byte : Stdlib.in_channel -> int
                    val input_binary_int : Stdlib.in_channel -> int
                    val input_value : Stdlib.in_channel -> 'a
                    val seek_in : Stdlib.in_channel -> int -> unit
                    val pos_in : Stdlib.in_channel -> int
                    val in_channel_length : Stdlib.in_channel -> int
                    val close_in : Stdlib.in_channel -> unit
                    val close_in_noerr : Stdlib.in_channel -> unit
                    val set_binary_mode_in : Stdlib.in_channel -> bool -> unit
                    val print_char : char -> unit
                    val print_string : string -> unit
                    val print_bytes : bytes -> unit
                    val print_int : int -> unit
                    val print_float : float -> unit
                    val print_endline : string -> unit
                    val print_newline : unit -> unit
                    val prerr_char : char -> unit
                    val prerr_string : string -> unit
                    val prerr_bytes : bytes -> unit
                    val prerr_int : int -> unit
                    val prerr_float : float -> unit
                    val prerr_endline : string -> unit
                    val prerr_newline : unit -> unit
                    val read_line : unit -> string
                    val read_int : unit -> int
                    val read_int_opt : unit -> int option
                    val read_float : unit -> float
                    val read_float_opt : unit -> float option
                    module LargeFile : sig ... end
                    +IOOperations (less-power.Stdlib_components.IOOperations)

                    Module Stdlib_components.IOOperations

                    UNSAFE I/O operations. This is regular, unmocked, IO.

                    type in_channel = Stdlib.in_channel
                    type out_channel = Stdlib.out_channel
                    val stdin : Stdlib.in_channel
                    val stdout : Stdlib.out_channel
                    val stderr : Stdlib.out_channel
                    type open_flag = Stdlib.open_flag
                    val open_out_gen : Stdlib.open_flag list -> int -> string -> Stdlib.out_channel
                    val open_out : string -> Stdlib.out_channel
                    val open_out_bin : string -> Stdlib.out_channel
                    val flush : Stdlib.out_channel -> unit
                    val flush_all : unit -> unit
                    val output_char : Stdlib.out_channel -> char -> unit
                    val output_bytes : Stdlib.out_channel -> bytes -> unit
                    val output_string : Stdlib.out_channel -> string -> unit
                    val output : Stdlib.out_channel -> bytes -> int -> int -> unit
                    val output_substring : Stdlib.out_channel -> string -> int -> int -> unit
                    val output_byte : Stdlib.out_channel -> int -> unit
                    val output_binary_int : Stdlib.out_channel -> int -> unit
                    val output_value : Stdlib.out_channel -> 'a -> unit
                    val seek_out : Stdlib.out_channel -> int -> unit
                    val pos_out : Stdlib.out_channel -> int
                    val out_channel_length : Stdlib.out_channel -> int
                    val close_out : Stdlib.out_channel -> unit
                    val close_out_noerr : Stdlib.out_channel -> unit
                    val open_in_gen : Stdlib.open_flag list -> int -> string -> Stdlib.in_channel
                    val open_in : string -> Stdlib.in_channel
                    val open_in_bin : string -> Stdlib.in_channel
                    val input_char : Stdlib.in_channel -> char
                    val input : Stdlib.in_channel -> bytes -> int -> int -> int
                    val unsafe_really_input : Stdlib.in_channel -> bytes -> int -> int -> unit
                    val really_input : Stdlib.in_channel -> bytes -> int -> int -> unit
                    val really_input_string : Stdlib.in_channel -> int -> string
                    val input_line : Stdlib.in_channel -> string
                    val input_byte : Stdlib.in_channel -> int
                    val input_binary_int : Stdlib.in_channel -> int
                    val input_value : Stdlib.in_channel -> 'a
                    val seek_in : Stdlib.in_channel -> int -> unit
                    val pos_in : Stdlib.in_channel -> int
                    val in_channel_length : Stdlib.in_channel -> int
                    val close_in : Stdlib.in_channel -> unit
                    val close_in_noerr : Stdlib.in_channel -> unit
                    val set_binary_mode_in : Stdlib.in_channel -> bool -> unit
                    val print_char : char -> unit
                    val print_string : string -> unit
                    val print_bytes : bytes -> unit
                    val print_int : int -> unit
                    val print_float : float -> unit
                    val print_endline : string -> unit
                    val print_newline : unit -> unit
                    val prerr_char : char -> unit
                    val prerr_string : string -> unit
                    val prerr_bytes : bytes -> unit
                    val prerr_int : int -> unit
                    val prerr_float : float -> unit
                    val prerr_endline : string -> unit
                    val prerr_newline : unit -> unit
                    val read_line : unit -> string
                    val read_int : unit -> int
                    val read_int_opt : unit -> int option
                    val read_float : unit -> float
                    val read_float_opt : unit -> float option
                    module LargeFile : sig ... end
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/IntegerOperations/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/IntegerOperations/index.html index 27bac1b..0965962 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/IntegerOperations/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/IntegerOperations/index.html @@ -1,2 +1,2 @@ -IntegerOperations (less-power.Stdlib_components.IntegerOperations)

                    Module Stdlib_components.IntegerOperations

                    SAFE Integer operations

                    val (~-) : int -> int
                    val (~+) : int -> int
                    val succ : int -> int
                    val pred : int -> int
                    val (+) : int -> int -> int
                    val (-) : int -> int -> int
                    val (*) : int -> int -> int
                    val (/) : int -> int -> int
                    val (mod) : int -> int -> int
                    val abs : int -> int
                    val (land) : int -> int -> int
                    val (lor) : int -> int -> int
                    val (lxor) : int -> int -> int
                    val lnot : int -> int
                    val (lsl) : int -> int -> int
                    val (lsr) : int -> int -> int
                    val (asr) : int -> int -> int
                    val max_int : int
                    val min_int : int
                    +IntegerOperations (less-power.Stdlib_components.IntegerOperations)

                    Module Stdlib_components.IntegerOperations

                    SAFE Integer operations

                    val (~-) : int -> int
                    val (~+) : int -> int
                    val succ : int -> int
                    val pred : int -> int
                    val (+) : int -> int -> int
                    val (-) : int -> int -> int
                    val (*) : int -> int -> int
                    val (/) : int -> int -> int
                    val (mod) : int -> int -> int
                    val abs : int -> int
                    val (land) : int -> int -> int
                    val (lor) : int -> int -> int
                    val (lxor) : int -> int -> int
                    val lnot : int -> int
                    val (lsl) : int -> int -> int
                    val (lsr) : int -> int -> int
                    val (asr) : int -> int -> int
                    val max_int : int
                    val min_int : int
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/ListOperations/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/ListOperations/index.html index c7f902e..ff4e161 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/ListOperations/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/ListOperations/index.html @@ -1,2 +1,2 @@ -ListOperations (less-power.Stdlib_components.ListOperations)

                    Module Stdlib_components.ListOperations

                    SAFE List operations -- more in module List

                    val (@) : 'a list -> 'a list -> 'a list
                    +ListOperations (less-power.Stdlib_components.ListOperations)

                    Module Stdlib_components.ListOperations

                    SAFE List operations -- more in module List

                    val (@) : 'a list -> 'a list -> 'a list
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/PairOperations/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/PairOperations/index.html index 45c0846..37a7f83 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/PairOperations/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/PairOperations/index.html @@ -1,2 +1,2 @@ -PairOperations (less-power.Stdlib_components.PairOperations)

                    Module Stdlib_components.PairOperations

                    SAFE Pair operations

                    val fst : ('a * 'b) -> 'a
                    val snd : ('a * 'b) -> 'b
                    +PairOperations (less-power.Stdlib_components.PairOperations)

                    Module Stdlib_components.PairOperations

                    SAFE Pair operations

                    val fst : ('a * 'b) -> 'a
                    val snd : ('a * 'b) -> 'b
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/PhysicalComparisons/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/PhysicalComparisons/index.html index f5b7662..79e9777 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/PhysicalComparisons/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/PhysicalComparisons/index.html @@ -1,2 +1,2 @@ -PhysicalComparisons (less-power.Stdlib_components.PhysicalComparisons)

                    Module Stdlib_components.PhysicalComparisons

                    UNSAFE The impure (==) and (!=)

                    val (==) : 'a -> 'a -> bool
                    val (!=) : 'a -> 'a -> bool
                    +PhysicalComparisons (less-power.Stdlib_components.PhysicalComparisons)

                    Module Stdlib_components.PhysicalComparisons

                    UNSAFE The impure (==) and (!=)

                    val (==) : 'a -> 'a -> bool
                    val (!=) : 'a -> 'a -> bool
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/References/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/References/index.html index cfbc05d..2cc426a 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/References/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/References/index.html @@ -1,2 +1,2 @@ -References (less-power.Stdlib_components.References)

                    Module Stdlib_components.References

                    UNSAFE References

                    type 'a ref = 'a Stdlib.ref
                    val ref : 'a -> 'a ref
                    val (!) : 'a ref -> 'a
                    val (:=) : 'a ref -> 'a -> unit
                    val incr : int ref -> unit
                    val decr : int ref -> unit
                    +References (less-power.Stdlib_components.References)

                    Module Stdlib_components.References

                    UNSAFE References

                    type 'a ref = 'a Stdlib.ref
                    val ref : 'a -> 'a ref
                    val (!) : 'a ref -> 'a
                    val (:=) : 'a ref -> 'a -> unit
                    val incr : int ref -> unit
                    val decr : int ref -> unit
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/Result/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/Result/index.html index 7b6ed1a..17553d0 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/Result/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/Result/index.html @@ -1,2 +1,2 @@ -Result (less-power.Stdlib_components.Result)

                    Module Stdlib_components.Result

                    SAFE Result type

                    type ('a, 'b) result = ('a, 'b) Stdlib.result
                    +Result (less-power.Stdlib_components.Result)

                    Module Stdlib_components.Result

                    SAFE Result type

                    type ('a, 'b) result = ('a, 'b) Stdlib.result
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/Float/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/Float/index.html index 98425a9..df036eb 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/Float/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/Float/index.html @@ -1,2 +1,2 @@ -Float (less-power.Stdlib_components.SafeAliases.Float)

                    Module SafeAliases.Float

                    As module type of Float, but without Array and ArrayLabels.

                    val zero : float
                    val one : float
                    val minus_one : float
                    val neg : float -> float
                    val add : float -> float -> float
                    val sub : float -> float -> float
                    val mul : float -> float -> float
                    val div : float -> float -> float
                    val fma : float -> float -> float -> float
                    val rem : float -> float -> float
                    val succ : float -> float
                    val pred : float -> float
                    val abs : float -> float
                    val infinity : float
                    val neg_infinity : float
                    val nan : float
                    val signaling_nan : float
                    val quiet_nan : float
                    val pi : float
                    val max_float : float
                    val min_float : float
                    val epsilon : float
                    val is_finite : float -> bool
                    val is_infinite : float -> bool
                    val is_nan : float -> bool
                    val is_integer : float -> bool
                    val of_int : int -> float
                    val to_int : float -> int
                    val of_string : string -> float
                    val of_string_opt : string -> float option
                    val to_string : float -> string
                    type fpclass = Stdlib.Float.fpclass
                    val classify_float : float -> fpclass
                    val pow : float -> float -> float
                    val sqrt : float -> float
                    val cbrt : float -> float
                    val exp : float -> float
                    val exp2 : float -> float
                    val log : float -> float
                    val log10 : float -> float
                    val log2 : float -> float
                    val expm1 : float -> float
                    val log1p : float -> float
                    val cos : float -> float
                    val sin : float -> float
                    val tan : float -> float
                    val acos : float -> float
                    val asin : float -> float
                    val atan : float -> float
                    val atan2 : float -> float -> float
                    val hypot : float -> float -> float
                    val cosh : float -> float
                    val sinh : float -> float
                    val tanh : float -> float
                    val acosh : float -> float
                    val asinh : float -> float
                    val atanh : float -> float
                    val erf : float -> float
                    val erfc : float -> float
                    val trunc : float -> float
                    val round : float -> float
                    val ceil : float -> float
                    val floor : float -> float
                    val next_after : float -> float -> float
                    val copy_sign : float -> float -> float
                    val sign_bit : float -> bool
                    val frexp : float -> float * int
                    val ldexp : float -> int -> float
                    val modf : float -> float * float
                    type t = float
                    val compare : t -> t -> int
                    val equal : t -> t -> bool
                    val min : t -> t -> t
                    val max : float -> float -> float
                    val min_max : float -> float -> float * float
                    val min_num : t -> t -> t
                    val max_num : t -> t -> t
                    val min_max_num : float -> float -> float * float
                    val seeded_hash : int -> t -> int
                    val hash : t -> int
                    +Float (less-power.Stdlib_components.SafeAliases.Float)

                    Module SafeAliases.Float

                    As module type of Float, but without Array and ArrayLabels.

                    val zero : float
                    val one : float
                    val minus_one : float
                    val neg : float -> float
                    val add : float -> float -> float
                    val sub : float -> float -> float
                    val mul : float -> float -> float
                    val div : float -> float -> float
                    val fma : float -> float -> float -> float
                    val rem : float -> float -> float
                    val succ : float -> float
                    val pred : float -> float
                    val abs : float -> float
                    val infinity : float
                    val neg_infinity : float
                    val nan : float
                    val signaling_nan : float
                    val quiet_nan : float
                    val pi : float
                    val max_float : float
                    val min_float : float
                    val epsilon : float
                    val is_finite : float -> bool
                    val is_infinite : float -> bool
                    val is_nan : float -> bool
                    val is_integer : float -> bool
                    val of_int : int -> float
                    val to_int : float -> int
                    val of_string : string -> float
                    val of_string_opt : string -> float option
                    val to_string : float -> string
                    type fpclass = Stdlib.Float.fpclass
                    val classify_float : float -> fpclass
                    val pow : float -> float -> float
                    val sqrt : float -> float
                    val cbrt : float -> float
                    val exp : float -> float
                    val exp2 : float -> float
                    val log : float -> float
                    val log10 : float -> float
                    val log2 : float -> float
                    val expm1 : float -> float
                    val log1p : float -> float
                    val cos : float -> float
                    val sin : float -> float
                    val tan : float -> float
                    val acos : float -> float
                    val asin : float -> float
                    val atan : float -> float
                    val atan2 : float -> float -> float
                    val hypot : float -> float -> float
                    val cosh : float -> float
                    val sinh : float -> float
                    val tanh : float -> float
                    val acosh : float -> float
                    val asinh : float -> float
                    val atanh : float -> float
                    val erf : float -> float
                    val erfc : float -> float
                    val trunc : float -> float
                    val round : float -> float
                    val ceil : float -> float
                    val floor : float -> float
                    val next_after : float -> float -> float
                    val copy_sign : float -> float -> float
                    val sign_bit : float -> bool
                    val frexp : float -> float * int
                    val ldexp : float -> int -> float
                    val modf : float -> float * float
                    type t = float
                    val compare : t -> t -> int
                    val equal : t -> t -> bool
                    val min : t -> t -> t
                    val max : float -> float -> float
                    val min_max : float -> float -> float * float
                    val min_num : t -> t -> t
                    val max_num : t -> t -> t
                    val min_max_num : float -> float -> float * float
                    val seeded_hash : int -> t -> int
                    val hash : t -> int
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/MoreLabels/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/MoreLabels/index.html index c701689..7b4cf89 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/MoreLabels/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/MoreLabels/index.html @@ -1,2 +1,2 @@ -MoreLabels (less-power.Stdlib_components.SafeAliases.MoreLabels)

                    Module SafeAliases.MoreLabels

                    module Map = Stdlib.MoreLabels.Map
                    module Set = Stdlib.MoreLabels.Set
                    +MoreLabels (less-power.Stdlib_components.SafeAliases.MoreLabels)

                    Module SafeAliases.MoreLabels

                    module Map = Stdlib.MoreLabels.Map
                    module Set = Stdlib.MoreLabels.Set
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/Printexc/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/Printexc/index.html index 8932782..e6fc95a 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/Printexc/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/Printexc/index.html @@ -1,2 +1,2 @@ -Printexc (less-power.Stdlib_components.SafeAliases.Printexc)

                    Module SafeAliases.Printexc

                    type t = Stdlib.Printexc.t
                    val to_string_default : exn -> string
                    +Printexc (less-power.Stdlib_components.SafeAliases.Printexc)

                    Module SafeAliases.Printexc

                    type t = Stdlib.Printexc.t
                    val to_string_default : exn -> string
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/Printf/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/Printf/index.html index 5d527c7..7d55c6f 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/Printf/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/Printf/index.html @@ -1,2 +1,2 @@ -Printf (less-power.Stdlib_components.SafeAliases.Printf)

                    Module SafeAliases.Printf

                    val sprintf : ('a, unit, string) Stdlib.format -> 'a
                    val ksprintf : (string -> 'a) -> ('b, unit, string, 'a) Stdlib.format4 -> 'b
                    +Printf (less-power.Stdlib_components.SafeAliases.Printf)

                    Module SafeAliases.Printf

                    val sprintf : ('a, unit, string) Stdlib.format -> 'a
                    val ksprintf : (string -> 'a) -> ('b, unit, string, 'a) Stdlib.format4 -> 'b
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/Scanf/Scanning/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/Scanf/Scanning/index.html index ba912c7..fce6435 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/Scanf/Scanning/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/Scanf/Scanning/index.html @@ -1,2 +1,2 @@ -Scanning (less-power.Stdlib_components.SafeAliases.Scanf.Scanning)

                    Module Scanf.Scanning

                    type in_channel = Stdlib.Scanf.Scanning.in_channel
                    type scanbuf = Stdlib.Scanf.Scanning.in_channel
                    +Scanning (less-power.Stdlib_components.SafeAliases.Scanf.Scanning)

                    Module Scanf.Scanning

                    type in_channel = Stdlib.Scanf.Scanning.in_channel
                    type scanbuf = Stdlib.Scanf.Scanning.in_channel
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/Scanf/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/Scanf/index.html index 412ab59..dc329ab 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/Scanf/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/Scanf/index.html @@ -1,5 +1,5 @@ -Scanf (less-power.Stdlib_components.SafeAliases.Scanf)

                    Module SafeAliases.Scanf

                    module Scanning : sig ... end
                    type ('a, 'b, 'c, 'd) scanner = ('a, 'b, 'c, 'd) Stdlib.Scanf.scanner
                    type ('a, 'b, 'c, 'd) scanner_opt = ('a, 'b, 'c, 'd) Stdlib.Scanf.scanner_opt
                    exception Scan_failure of string
                    val sscanf : string -> ('a, 'b, 'c, 'd) Stdlib.Scanf.scanner
                    val sscanf_opt : string -> ('a, 'b, 'c, 'd) Stdlib.Scanf.scanner_opt
                    val sscanf_format : +Scanf (less-power.Stdlib_components.SafeAliases.Scanf)

                    Module SafeAliases.Scanf

                    module Scanning : sig ... end
                    type ('a, 'b, 'c, 'd) scanner = ('a, 'b, 'c, 'd) Stdlib.Scanf.scanner
                    type ('a, 'b, 'c, 'd) scanner_opt = ('a, 'b, 'c, 'd) Stdlib.Scanf.scanner_opt
                    exception Scan_failure of string
                    val sscanf : string -> ('a, 'b, 'c, 'd) Stdlib.Scanf.scanner
                    val sscanf_opt : string -> ('a, 'b, 'c, 'd) Stdlib.Scanf.scanner_opt
                    val sscanf_format : string -> ('a, 'b, 'c, 'd, 'e, 'f) Stdlib.format6 -> (('a, 'b, 'c, 'd, 'e, 'f) Stdlib.format6 -> 'g) -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/Seq/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/Seq/index.html index a0ced55..9fd5f93 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/Seq/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/Seq/index.html @@ -1,2 +1,2 @@ -Seq (less-power.Stdlib_components.SafeAliases.Seq)

                    Module SafeAliases.Seq

                    As module type of Seq, but without once, Forced_twice and to_dispenser.

                    type 'a t = 'a Stdlib.Seq.t
                    and +'a node = 'a Stdlib.Seq.node
                    val is_empty : 'a t -> bool
                    val uncons : 'a t -> ('a * 'a t) option
                    val length : 'a t -> int
                    val iter : ('a -> unit) -> 'a t -> unit
                    val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
                    val iteri : (int -> 'a -> unit) -> 'a t -> unit
                    val fold_lefti : ('b -> int -> 'a -> 'b) -> 'b -> 'a t -> 'b
                    val for_all : ('a -> bool) -> 'a t -> bool
                    val exists : ('a -> bool) -> 'a t -> bool
                    val find : ('a -> bool) -> 'a t -> 'a option
                    val find_index : ('a -> bool) -> 'a t -> int option
                    val find_map : ('a -> 'b option) -> 'a t -> 'b option
                    val find_mapi : (int -> 'a -> 'b option) -> 'a t -> 'b option
                    val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit
                    val fold_left2 : ('a -> 'b -> 'c -> 'a) -> 'a -> 'b t -> 'c t -> 'a
                    val for_all2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool
                    val exists2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool
                    val equal : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool
                    val compare : ('a -> 'b -> int) -> 'a t -> 'b t -> int
                    val empty : 'a t
                    val return : 'a -> 'a t
                    val cons : 'a -> 'a t -> 'a t
                    val init : int -> (int -> 'a) -> 'a t
                    val unfold : ('b -> ('a * 'b) option) -> 'b -> 'a t
                    val repeat : 'a -> 'a t
                    val forever : (unit -> 'a) -> 'a t
                    val cycle : 'a t -> 'a t
                    val iterate : ('a -> 'a) -> 'a -> 'a t
                    val map : ('a -> 'b) -> 'a t -> 'b t
                    val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t
                    val filter : ('a -> bool) -> 'a t -> 'a t
                    val filter_map : ('a -> 'b option) -> 'a t -> 'b t
                    val scan : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b t
                    val take : int -> 'a t -> 'a t
                    val drop : int -> 'a t -> 'a t
                    val take_while : ('a -> bool) -> 'a t -> 'a t
                    val drop_while : ('a -> bool) -> 'a t -> 'a t
                    val group : ('a -> 'a -> bool) -> 'a t -> 'a t t
                    val memoize : 'a t -> 'a t
                    val transpose : 'a t t -> 'a t t
                    val append : 'a t -> 'a t -> 'a t
                    val concat : 'a t t -> 'a t
                    val flat_map : ('a -> 'b t) -> 'a t -> 'b t
                    val concat_map : ('a -> 'b t) -> 'a t -> 'b t
                    val zip : 'a t -> 'b t -> ('a * 'b) t
                    val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
                    val interleave : 'a t -> 'a t -> 'a t
                    val sorted_merge : ('a -> 'a -> int) -> 'a t -> 'a t -> 'a t
                    val product : 'a t -> 'b t -> ('a * 'b) t
                    val map_product : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
                    val unzip : ('a * 'b) t -> 'a t * 'b t
                    val split : ('a * 'b) t -> 'a t * 'b t
                    val partition_map : ('a -> ('b, 'c) Stdlib.Either.t) -> 'a t -> 'b t * 'c t
                    val partition : ('a -> bool) -> 'a t -> 'a t * 'a t
                    val of_dispenser : (unit -> 'a option) -> 'a t
                    val ints : int -> int t
                    +Seq (less-power.Stdlib_components.SafeAliases.Seq)

                    Module SafeAliases.Seq

                    As module type of Seq, but without once, Forced_twice and to_dispenser.

                    type 'a t = 'a Stdlib.Seq.t
                    and +'a node = 'a Stdlib.Seq.node
                    val is_empty : 'a t -> bool
                    val uncons : 'a t -> ('a * 'a t) option
                    val length : 'a t -> int
                    val iter : ('a -> unit) -> 'a t -> unit
                    val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
                    val iteri : (int -> 'a -> unit) -> 'a t -> unit
                    val fold_lefti : ('b -> int -> 'a -> 'b) -> 'b -> 'a t -> 'b
                    val for_all : ('a -> bool) -> 'a t -> bool
                    val exists : ('a -> bool) -> 'a t -> bool
                    val find : ('a -> bool) -> 'a t -> 'a option
                    val find_index : ('a -> bool) -> 'a t -> int option
                    val find_map : ('a -> 'b option) -> 'a t -> 'b option
                    val find_mapi : (int -> 'a -> 'b option) -> 'a t -> 'b option
                    val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit
                    val fold_left2 : ('a -> 'b -> 'c -> 'a) -> 'a -> 'b t -> 'c t -> 'a
                    val for_all2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool
                    val exists2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool
                    val equal : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool
                    val compare : ('a -> 'b -> int) -> 'a t -> 'b t -> int
                    val empty : 'a t
                    val return : 'a -> 'a t
                    val cons : 'a -> 'a t -> 'a t
                    val init : int -> (int -> 'a) -> 'a t
                    val unfold : ('b -> ('a * 'b) option) -> 'b -> 'a t
                    val repeat : 'a -> 'a t
                    val forever : (unit -> 'a) -> 'a t
                    val cycle : 'a t -> 'a t
                    val iterate : ('a -> 'a) -> 'a -> 'a t
                    val map : ('a -> 'b) -> 'a t -> 'b t
                    val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t
                    val filter : ('a -> bool) -> 'a t -> 'a t
                    val filter_map : ('a -> 'b option) -> 'a t -> 'b t
                    val scan : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b t
                    val take : int -> 'a t -> 'a t
                    val drop : int -> 'a t -> 'a t
                    val take_while : ('a -> bool) -> 'a t -> 'a t
                    val drop_while : ('a -> bool) -> 'a t -> 'a t
                    val group : ('a -> 'a -> bool) -> 'a t -> 'a t t
                    val memoize : 'a t -> 'a t
                    val transpose : 'a t t -> 'a t t
                    val append : 'a t -> 'a t -> 'a t
                    val concat : 'a t t -> 'a t
                    val flat_map : ('a -> 'b t) -> 'a t -> 'b t
                    val concat_map : ('a -> 'b t) -> 'a t -> 'b t
                    val zip : 'a t -> 'b t -> ('a * 'b) t
                    val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
                    val interleave : 'a t -> 'a t -> 'a t
                    val sorted_merge : ('a -> 'a -> int) -> 'a t -> 'a t -> 'a t
                    val product : 'a t -> 'b t -> ('a * 'b) t
                    val map_product : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
                    val unzip : ('a * 'b) t -> 'a t * 'b t
                    val split : ('a * 'b) t -> 'a t * 'b t
                    val partition_map : ('a -> ('b, 'c) Stdlib.Either.t) -> 'a t -> 'b t * 'c t
                    val partition : ('a -> bool) -> 'a t -> 'a t * 'a t
                    val of_dispenser : (unit -> 'a option) -> 'a t
                    val ints : int -> int t
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/StdLabels/String/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/StdLabels/String/index.html index 0a143ae..4826d66 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/StdLabels/String/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/StdLabels/String/index.html @@ -1,2 +1,2 @@ -String (less-power.Stdlib_components.SafeAliases.StdLabels.String)

                    Module StdLabels.String

                    type t = Stdlib.String.t
                    val make : int -> char -> string
                    val init : int -> f:(int -> char) -> string
                    val empty : string
                    val length : string -> int
                    val get : string -> int -> char
                    val concat : sep:string -> string list -> string
                    val cat : string -> string -> string
                    val equal : t -> t -> bool
                    val compare : t -> t -> int
                    val starts_with : prefix:string -> string -> bool
                    val ends_with : suffix:string -> string -> bool
                    val contains_from : string -> int -> char -> bool
                    val rcontains_from : string -> int -> char -> bool
                    val contains : string -> char -> bool
                    val sub : string -> pos:int -> len:int -> string
                    val split_on_char : sep:char -> string -> string list
                    val map : f:(char -> char) -> string -> string
                    val mapi : f:(int -> char -> char) -> string -> string
                    val fold_left : f:('a -> char -> 'a) -> init:'a -> string -> 'a
                    val fold_right : f:(char -> 'a -> 'a) -> string -> init:'a -> 'a
                    val for_all : f:(char -> bool) -> string -> bool
                    val exists : f:(char -> bool) -> string -> bool
                    val trim : string -> string
                    val escaped : string -> string
                    val uppercase_ascii : string -> string
                    val lowercase_ascii : string -> string
                    val capitalize_ascii : string -> string
                    val uncapitalize_ascii : string -> string
                    val iter : f:(char -> unit) -> string -> unit
                    val iteri : f:(int -> char -> unit) -> string -> unit
                    val index_from : string -> int -> char -> int
                    val index_from_opt : string -> int -> char -> int option
                    val rindex_from : string -> int -> char -> int
                    val rindex_from_opt : string -> int -> char -> int option
                    val index : string -> char -> int
                    val index_opt : string -> char -> int option
                    val rindex : string -> char -> int
                    val rindex_opt : string -> char -> int option
                    val to_seq : t -> char Stdlib.Seq.t
                    val to_seqi : t -> (int * char) Stdlib.Seq.t
                    val of_seq : char Stdlib.Seq.t -> t
                    val get_utf_8_uchar : t -> int -> Stdlib.Uchar.utf_decode
                    val is_valid_utf_8 : t -> bool
                    val get_utf_16be_uchar : t -> int -> Stdlib.Uchar.utf_decode
                    val is_valid_utf_16be : t -> bool
                    val get_utf_16le_uchar : t -> int -> Stdlib.Uchar.utf_decode
                    val is_valid_utf_16le : t -> bool
                    val get_uint8 : string -> int -> int
                    val get_int8 : string -> int -> int
                    val get_uint16_ne : string -> int -> int
                    val get_uint16_be : string -> int -> int
                    val get_uint16_le : string -> int -> int
                    val get_int16_ne : string -> int -> int
                    val get_int16_be : string -> int -> int
                    val get_int16_le : string -> int -> int
                    val get_int32_ne : string -> int -> int32
                    val hash : t -> int
                    val seeded_hash : int -> t -> int
                    val get_int32_be : string -> int -> int32
                    val get_int32_le : string -> int -> int32
                    val get_int64_ne : string -> int -> int64
                    val get_int64_be : string -> int -> int64
                    val get_int64_le : string -> int -> int64
                    +String (less-power.Stdlib_components.SafeAliases.StdLabels.String)

                    Module StdLabels.String

                    type t = Stdlib.String.t
                    val make : int -> char -> string
                    val init : int -> f:(int -> char) -> string
                    val empty : string
                    val length : string -> int
                    val get : string -> int -> char
                    val concat : sep:string -> string list -> string
                    val cat : string -> string -> string
                    val equal : t -> t -> bool
                    val compare : t -> t -> int
                    val starts_with : prefix:string -> string -> bool
                    val ends_with : suffix:string -> string -> bool
                    val contains_from : string -> int -> char -> bool
                    val rcontains_from : string -> int -> char -> bool
                    val contains : string -> char -> bool
                    val sub : string -> pos:int -> len:int -> string
                    val split_on_char : sep:char -> string -> string list
                    val map : f:(char -> char) -> string -> string
                    val mapi : f:(int -> char -> char) -> string -> string
                    val fold_left : f:('a -> char -> 'a) -> init:'a -> string -> 'a
                    val fold_right : f:(char -> 'a -> 'a) -> string -> init:'a -> 'a
                    val for_all : f:(char -> bool) -> string -> bool
                    val exists : f:(char -> bool) -> string -> bool
                    val trim : string -> string
                    val escaped : string -> string
                    val uppercase_ascii : string -> string
                    val lowercase_ascii : string -> string
                    val capitalize_ascii : string -> string
                    val uncapitalize_ascii : string -> string
                    val iter : f:(char -> unit) -> string -> unit
                    val iteri : f:(int -> char -> unit) -> string -> unit
                    val index_from : string -> int -> char -> int
                    val index_from_opt : string -> int -> char -> int option
                    val rindex_from : string -> int -> char -> int
                    val rindex_from_opt : string -> int -> char -> int option
                    val index : string -> char -> int
                    val index_opt : string -> char -> int option
                    val rindex : string -> char -> int
                    val rindex_opt : string -> char -> int option
                    val to_seq : t -> char Stdlib.Seq.t
                    val to_seqi : t -> (int * char) Stdlib.Seq.t
                    val of_seq : char Stdlib.Seq.t -> t
                    val get_utf_8_uchar : t -> int -> Stdlib.Uchar.utf_decode
                    val is_valid_utf_8 : t -> bool
                    val get_utf_16be_uchar : t -> int -> Stdlib.Uchar.utf_decode
                    val is_valid_utf_16be : t -> bool
                    val get_utf_16le_uchar : t -> int -> Stdlib.Uchar.utf_decode
                    val is_valid_utf_16le : t -> bool
                    val get_uint8 : string -> int -> int
                    val get_int8 : string -> int -> int
                    val get_uint16_ne : string -> int -> int
                    val get_uint16_be : string -> int -> int
                    val get_uint16_le : string -> int -> int
                    val get_int16_ne : string -> int -> int
                    val get_int16_be : string -> int -> int
                    val get_int16_le : string -> int -> int
                    val get_int32_ne : string -> int -> int32
                    val hash : t -> int
                    val seeded_hash : int -> t -> int
                    val get_int32_be : string -> int -> int32
                    val get_int32_le : string -> int -> int32
                    val get_int64_ne : string -> int -> int64
                    val get_int64_be : string -> int -> int64
                    val get_int64_le : string -> int -> int64
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/StdLabels/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/StdLabels/index.html index 613b74e..f399c9a 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/StdLabels/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/StdLabels/index.html @@ -1,2 +1,2 @@ -StdLabels (less-power.Stdlib_components.SafeAliases.StdLabels)

                    Module SafeAliases.StdLabels

                    module List : module type of Stdlib.StdLabels.List
                    module String : sig ... end
                    +StdLabels (less-power.Stdlib_components.SafeAliases.StdLabels)

                    Module SafeAliases.StdLabels

                    module List : module type of Stdlib.StdLabels.List
                    module String : sig ... end
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/String/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/String/index.html index 6b24833..fd85134 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/String/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/String/index.html @@ -1,2 +1,2 @@ -String (less-power.Stdlib_components.SafeAliases.String)

                    Module SafeAliases.String

                    As module type of String, but without some unsafe buffer-related functions.

                    type t = Stdlib.String.t
                    val make : int -> char -> string
                    val init : int -> (int -> char) -> string
                    val empty : string
                    val length : string -> int
                    val get : string -> int -> char
                    val concat : string -> string list -> string
                    val cat : string -> string -> string
                    val equal : t -> t -> bool
                    val compare : t -> t -> int
                    val starts_with : prefix:string -> string -> bool
                    val ends_with : suffix:string -> string -> bool
                    val contains_from : string -> int -> char -> bool
                    val rcontains_from : string -> int -> char -> bool
                    val contains : string -> char -> bool
                    val sub : string -> int -> int -> string
                    val split_on_char : char -> string -> string list
                    val map : (char -> char) -> string -> string
                    val mapi : (int -> char -> char) -> string -> string
                    val fold_left : ('a -> char -> 'a) -> 'a -> string -> 'a
                    val fold_right : (char -> 'a -> 'a) -> string -> 'a -> 'a
                    val for_all : (char -> bool) -> string -> bool
                    val exists : (char -> bool) -> string -> bool
                    val trim : string -> string
                    val escaped : string -> string
                    val uppercase_ascii : string -> string
                    val lowercase_ascii : string -> string
                    val capitalize_ascii : string -> string
                    val uncapitalize_ascii : string -> string
                    val iter : (char -> unit) -> string -> unit
                    val iteri : (int -> char -> unit) -> string -> unit
                    val index_from : string -> int -> char -> int
                    val index_from_opt : string -> int -> char -> int option
                    val rindex_from : string -> int -> char -> int
                    val rindex_from_opt : string -> int -> char -> int option
                    val index : string -> char -> int
                    val index_opt : string -> char -> int option
                    val rindex : string -> char -> int
                    val rindex_opt : string -> char -> int option
                    val to_seq : t -> char Stdlib.Seq.t
                    val to_seqi : t -> (int * char) Stdlib.Seq.t
                    val of_seq : char Stdlib.Seq.t -> t
                    val get_utf_8_uchar : t -> int -> Stdlib.Uchar.utf_decode
                    val is_valid_utf_8 : t -> bool
                    val get_utf_16be_uchar : t -> int -> Stdlib.Uchar.utf_decode
                    val is_valid_utf_16be : t -> bool
                    val get_utf_16le_uchar : t -> int -> Stdlib.Uchar.utf_decode
                    val is_valid_utf_16le : t -> bool
                    val get_uint8 : string -> int -> int
                    val get_int8 : string -> int -> int
                    val get_uint16_ne : string -> int -> int
                    val get_uint16_be : string -> int -> int
                    val get_uint16_le : string -> int -> int
                    val get_int16_ne : string -> int -> int
                    val get_int16_be : string -> int -> int
                    val get_int16_le : string -> int -> int
                    val get_int32_ne : string -> int -> int32
                    val hash : t -> int
                    val seeded_hash : int -> t -> int
                    val get_int32_be : string -> int -> int32
                    val get_int32_le : string -> int -> int32
                    val get_int64_ne : string -> int -> int64
                    val get_int64_be : string -> int -> int64
                    val get_int64_le : string -> int -> int64
                    +String (less-power.Stdlib_components.SafeAliases.String)

                    Module SafeAliases.String

                    As module type of String, but without some unsafe buffer-related functions.

                    type t = Stdlib.String.t
                    val make : int -> char -> string
                    val init : int -> (int -> char) -> string
                    val empty : string
                    val length : string -> int
                    val get : string -> int -> char
                    val concat : string -> string list -> string
                    val cat : string -> string -> string
                    val equal : t -> t -> bool
                    val compare : t -> t -> int
                    val starts_with : prefix:string -> string -> bool
                    val ends_with : suffix:string -> string -> bool
                    val contains_from : string -> int -> char -> bool
                    val rcontains_from : string -> int -> char -> bool
                    val contains : string -> char -> bool
                    val sub : string -> int -> int -> string
                    val split_on_char : char -> string -> string list
                    val map : (char -> char) -> string -> string
                    val mapi : (int -> char -> char) -> string -> string
                    val fold_left : ('a -> char -> 'a) -> 'a -> string -> 'a
                    val fold_right : (char -> 'a -> 'a) -> string -> 'a -> 'a
                    val for_all : (char -> bool) -> string -> bool
                    val exists : (char -> bool) -> string -> bool
                    val trim : string -> string
                    val escaped : string -> string
                    val uppercase_ascii : string -> string
                    val lowercase_ascii : string -> string
                    val capitalize_ascii : string -> string
                    val uncapitalize_ascii : string -> string
                    val iter : (char -> unit) -> string -> unit
                    val iteri : (int -> char -> unit) -> string -> unit
                    val index_from : string -> int -> char -> int
                    val index_from_opt : string -> int -> char -> int option
                    val rindex_from : string -> int -> char -> int
                    val rindex_from_opt : string -> int -> char -> int option
                    val index : string -> char -> int
                    val index_opt : string -> char -> int option
                    val rindex : string -> char -> int
                    val rindex_opt : string -> char -> int option
                    val to_seq : t -> char Stdlib.Seq.t
                    val to_seqi : t -> (int * char) Stdlib.Seq.t
                    val of_seq : char Stdlib.Seq.t -> t
                    val get_utf_8_uchar : t -> int -> Stdlib.Uchar.utf_decode
                    val is_valid_utf_8 : t -> bool
                    val get_utf_16be_uchar : t -> int -> Stdlib.Uchar.utf_decode
                    val is_valid_utf_16be : t -> bool
                    val get_utf_16le_uchar : t -> int -> Stdlib.Uchar.utf_decode
                    val is_valid_utf_16le : t -> bool
                    val get_uint8 : string -> int -> int
                    val get_int8 : string -> int -> int
                    val get_uint16_ne : string -> int -> int
                    val get_uint16_be : string -> int -> int
                    val get_uint16_le : string -> int -> int
                    val get_int16_ne : string -> int -> int
                    val get_int16_be : string -> int -> int
                    val get_int16_le : string -> int -> int
                    val get_int32_ne : string -> int -> int32
                    val hash : t -> int
                    val seeded_hash : int -> t -> int
                    val get_int32_be : string -> int -> int32
                    val get_int32_le : string -> int -> int32
                    val get_int64_ne : string -> int -> int64
                    val get_int64_be : string -> int -> int64
                    val get_int64_le : string -> int -> int64
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/StringLabels/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/StringLabels/index.html index d59b6b0..b099d76 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/StringLabels/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/StringLabels/index.html @@ -1,2 +1,2 @@ -StringLabels (less-power.Stdlib_components.SafeAliases.StringLabels)

                    Module SafeAliases.StringLabels

                    type t = Stdlib.String.t
                    val make : int -> char -> string
                    val init : int -> f:(int -> char) -> string
                    val empty : string
                    val length : string -> int
                    val get : string -> int -> char
                    val concat : sep:string -> string list -> string
                    val cat : string -> string -> string
                    val equal : t -> t -> bool
                    val compare : t -> t -> int
                    val starts_with : prefix:string -> string -> bool
                    val ends_with : suffix:string -> string -> bool
                    val contains_from : string -> int -> char -> bool
                    val rcontains_from : string -> int -> char -> bool
                    val contains : string -> char -> bool
                    val sub : string -> pos:int -> len:int -> string
                    val split_on_char : sep:char -> string -> string list
                    val map : f:(char -> char) -> string -> string
                    val mapi : f:(int -> char -> char) -> string -> string
                    val fold_left : f:('a -> char -> 'a) -> init:'a -> string -> 'a
                    val fold_right : f:(char -> 'a -> 'a) -> string -> init:'a -> 'a
                    val for_all : f:(char -> bool) -> string -> bool
                    val exists : f:(char -> bool) -> string -> bool
                    val trim : string -> string
                    val escaped : string -> string
                    val uppercase_ascii : string -> string
                    val lowercase_ascii : string -> string
                    val capitalize_ascii : string -> string
                    val uncapitalize_ascii : string -> string
                    val iter : f:(char -> unit) -> string -> unit
                    val iteri : f:(int -> char -> unit) -> string -> unit
                    val index_from : string -> int -> char -> int
                    val index_from_opt : string -> int -> char -> int option
                    val rindex_from : string -> int -> char -> int
                    val rindex_from_opt : string -> int -> char -> int option
                    val index : string -> char -> int
                    val index_opt : string -> char -> int option
                    val rindex : string -> char -> int
                    val rindex_opt : string -> char -> int option
                    val to_seq : t -> char Stdlib.Seq.t
                    val to_seqi : t -> (int * char) Stdlib.Seq.t
                    val of_seq : char Stdlib.Seq.t -> t
                    val get_utf_8_uchar : t -> int -> Stdlib.Uchar.utf_decode
                    val is_valid_utf_8 : t -> bool
                    val get_utf_16be_uchar : t -> int -> Stdlib.Uchar.utf_decode
                    val is_valid_utf_16be : t -> bool
                    val get_utf_16le_uchar : t -> int -> Stdlib.Uchar.utf_decode
                    val is_valid_utf_16le : t -> bool
                    val get_uint8 : string -> int -> int
                    val get_int8 : string -> int -> int
                    val get_uint16_ne : string -> int -> int
                    val get_uint16_be : string -> int -> int
                    val get_uint16_le : string -> int -> int
                    val get_int16_ne : string -> int -> int
                    val get_int16_be : string -> int -> int
                    val get_int16_le : string -> int -> int
                    val get_int32_ne : string -> int -> int32
                    val hash : t -> int
                    val seeded_hash : int -> t -> int
                    val get_int32_be : string -> int -> int32
                    val get_int32_le : string -> int -> int32
                    val get_int64_ne : string -> int -> int64
                    val get_int64_be : string -> int -> int64
                    val get_int64_le : string -> int -> int64
                    +StringLabels (less-power.Stdlib_components.SafeAliases.StringLabels)

                    Module SafeAliases.StringLabels

                    type t = Stdlib.String.t
                    val make : int -> char -> string
                    val init : int -> f:(int -> char) -> string
                    val empty : string
                    val length : string -> int
                    val get : string -> int -> char
                    val concat : sep:string -> string list -> string
                    val cat : string -> string -> string
                    val equal : t -> t -> bool
                    val compare : t -> t -> int
                    val starts_with : prefix:string -> string -> bool
                    val ends_with : suffix:string -> string -> bool
                    val contains_from : string -> int -> char -> bool
                    val rcontains_from : string -> int -> char -> bool
                    val contains : string -> char -> bool
                    val sub : string -> pos:int -> len:int -> string
                    val split_on_char : sep:char -> string -> string list
                    val map : f:(char -> char) -> string -> string
                    val mapi : f:(int -> char -> char) -> string -> string
                    val fold_left : f:('a -> char -> 'a) -> init:'a -> string -> 'a
                    val fold_right : f:(char -> 'a -> 'a) -> string -> init:'a -> 'a
                    val for_all : f:(char -> bool) -> string -> bool
                    val exists : f:(char -> bool) -> string -> bool
                    val trim : string -> string
                    val escaped : string -> string
                    val uppercase_ascii : string -> string
                    val lowercase_ascii : string -> string
                    val capitalize_ascii : string -> string
                    val uncapitalize_ascii : string -> string
                    val iter : f:(char -> unit) -> string -> unit
                    val iteri : f:(int -> char -> unit) -> string -> unit
                    val index_from : string -> int -> char -> int
                    val index_from_opt : string -> int -> char -> int option
                    val rindex_from : string -> int -> char -> int
                    val rindex_from_opt : string -> int -> char -> int option
                    val index : string -> char -> int
                    val index_opt : string -> char -> int option
                    val rindex : string -> char -> int
                    val rindex_opt : string -> char -> int option
                    val to_seq : t -> char Stdlib.Seq.t
                    val to_seqi : t -> (int * char) Stdlib.Seq.t
                    val of_seq : char Stdlib.Seq.t -> t
                    val get_utf_8_uchar : t -> int -> Stdlib.Uchar.utf_decode
                    val is_valid_utf_8 : t -> bool
                    val get_utf_16be_uchar : t -> int -> Stdlib.Uchar.utf_decode
                    val is_valid_utf_16be : t -> bool
                    val get_utf_16le_uchar : t -> int -> Stdlib.Uchar.utf_decode
                    val is_valid_utf_16le : t -> bool
                    val get_uint8 : string -> int -> int
                    val get_int8 : string -> int -> int
                    val get_uint16_ne : string -> int -> int
                    val get_uint16_be : string -> int -> int
                    val get_uint16_le : string -> int -> int
                    val get_int16_ne : string -> int -> int
                    val get_int16_be : string -> int -> int
                    val get_int16_le : string -> int -> int
                    val get_int32_ne : string -> int -> int32
                    val hash : t -> int
                    val seeded_hash : int -> t -> int
                    val get_int32_be : string -> int -> int32
                    val get_int32_le : string -> int -> int32
                    val get_int64_ne : string -> int -> int64
                    val get_int64_be : string -> int -> int64
                    val get_int64_le : string -> int -> int64
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/index.html index 571983e..3899d84 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/SafeAliases/index.html @@ -1,2 +1,2 @@ -SafeAliases (less-power.Stdlib_components.SafeAliases)

                    Module Stdlib_components.SafeAliases

                    SAFE Safe modules from the standard library, and unsafe modules restricted to their safe functions.

                    module Bool = Stdlib.Bool
                    module Char = Stdlib.Char
                    module Complex = Stdlib.Complex
                    module Either = Stdlib.Either
                    module Float : sig ... end

                    As module type of Float, but without Array and ArrayLabels.

                    module Fun = Stdlib.Fun
                    module Int = Stdlib.Int
                    module Int32 = Stdlib.Int32
                    module Int64 = Stdlib.Int64
                    module Lazy = Stdlib.Lazy
                    module List = Stdlib.List
                    module ListLabels = Stdlib.ListLabels
                    module Map = Stdlib.Map
                    module MoreLabels : sig ... end
                    module Nativeint = Stdlib.Nativeint
                    module Option = Stdlib.Option
                    module Printexc : sig ... end
                    module Printf : sig ... end
                    module Result = Stdlib.Result
                    module Scanf : sig ... end
                    module Seq : sig ... end

                    As module type of Seq, but without once, Forced_twice and to_dispenser.

                    module Set = Stdlib.Set
                    module StdLabels : sig ... end
                    module String : sig ... end

                    As module type of String, but without some unsafe buffer-related functions.

                    module StringLabels : sig ... end
                    module Uchar = Stdlib.Uchar
                    module Unit = Stdlib.Unit
                    +SafeAliases (less-power.Stdlib_components.SafeAliases)

                    Module Stdlib_components.SafeAliases

                    SAFE Safe modules from the standard library, and unsafe modules restricted to their safe functions.

                    module Bool = Stdlib.Bool
                    module Char = Stdlib.Char
                    module Complex = Stdlib.Complex
                    module Either = Stdlib.Either
                    module Float : sig ... end

                    As module type of Float, but without Array and ArrayLabels.

                    module Fun = Stdlib.Fun
                    module Int = Stdlib.Int
                    module Int32 = Stdlib.Int32
                    module Int64 = Stdlib.Int64
                    module Lazy = Stdlib.Lazy
                    module List = Stdlib.List
                    module ListLabels = Stdlib.ListLabels
                    module Map = Stdlib.Map
                    module MoreLabels : sig ... end
                    module Nativeint = Stdlib.Nativeint
                    module Option = Stdlib.Option
                    module Printexc : sig ... end
                    module Printf : sig ... end
                    module Result = Stdlib.Result
                    module Scanf : sig ... end
                    module Seq : sig ... end

                    As module type of Seq, but without once, Forced_twice and to_dispenser.

                    module Set = Stdlib.Set
                    module StdLabels : sig ... end
                    module String : sig ... end

                    As module type of String, but without some unsafe buffer-related functions.

                    module StringLabels : sig ... end
                    module Uchar = Stdlib.Uchar
                    module Unit = Stdlib.Unit
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/Stdlib_safe/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/Stdlib_safe/index.html index 57cfe3a..13496ea 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/Stdlib_safe/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/Stdlib_safe/index.html @@ -1,5 +1,5 @@ -Stdlib_safe (less-power.Stdlib_components.Stdlib_safe)

                    Module Stdlib_components.Stdlib_safe

                    SAFE Everything safe from the standard library, including everything safe from sub-modules of Stdlib.

                    include module type of struct include Exceptions end
                    val raise : exn -> 'a
                    val raise_notrace : exn -> 'a
                    val failwith : string -> 'a
                    val invalid_arg : string -> 'a
                    exception Exit
                    exception Match_failure of string * int * int
                    exception Assert_failure of string * int * int
                    exception Invalid_argument of string
                    exception Failure of string
                    exception Not_found
                    exception Out_of_memory
                    exception Stack_overflow
                    exception Sys_error of string
                    exception End_of_file
                    exception Division_by_zero
                    exception Sys_blocked_io
                    exception Undefined_recursive_module of string * int * int
                    include module type of struct include Composition end
                    val (|>) : 'a -> ('a -> 'b) -> 'b
                    val (@@) : ('a -> 'b) -> 'a -> 'b
                    include module type of struct include Debugging end
                    val __LOC__ : string
                    val __FILE__ : string
                    val __LINE__ : int
                    val __MODULE__ : string
                    val __POS__ : string * int * int * int
                    val __FUNCTION__ : string
                    val __LOC_OF__ : 'a -> string * 'a
                    val __LINE_OF__ : 'a -> int * 'a
                    val __POS_OF__ : 'a -> (string * int * int * int) * 'a
                    include module type of struct include Comparisons end
                    val (=) : 'a -> 'a -> bool
                    val (<>) : 'a -> 'a -> bool
                    val (<) : 'a -> 'a -> bool
                    val (>) : 'a -> 'a -> bool
                    val (<=) : 'a -> 'a -> bool
                    val (>=) : 'a -> 'a -> bool
                    val compare : 'a -> 'a -> int
                    val min : 'a -> 'b -> 'c
                    val max : 'a -> 'b -> 'c
                    include module type of struct include BooleanOperations end
                    val not : bool -> bool
                    val (&&) : bool -> bool -> bool
                    val (||) : bool -> bool -> bool
                    include module type of struct include IntegerOperations end
                    val (~-) : int -> int
                    val (~+) : int -> int
                    val succ : int -> int
                    val pred : int -> int
                    val (+) : int -> int -> int
                    val (-) : int -> int -> int
                    val (*) : int -> int -> int
                    val (/) : int -> int -> int
                    val (mod) : int -> int -> int
                    val abs : int -> int
                    val (land) : int -> int -> int
                    val (lor) : int -> int -> int
                    val (lxor) : int -> int -> int
                    val lnot : int -> int
                    val (lsl) : int -> int -> int
                    val (lsr) : int -> int -> int
                    val (asr) : int -> int -> int
                    val max_int : int
                    val min_int : int
                    include module type of struct include FloatingPointOperations end
                    val (~-.) : float -> float
                    val (~+.) : float -> float
                    val (+.) : float -> float -> float
                    val (-.) : float -> float -> float
                    val (*.) : float -> float -> float
                    val (/.) : float -> float -> float
                    val (**) : float -> float -> float
                    val exp : float -> float
                    val expm1 : float -> float
                    val acos : float -> float
                    val asin : float -> float
                    val atan : float -> float
                    val atan2 : float -> float -> float
                    val hypot : float -> float -> float
                    val cos : float -> float
                    val cosh : float -> float
                    val acosh : float -> float
                    val log : float -> float
                    val log10 : float -> float
                    val log1p : float -> float
                    val sin : float -> float
                    val sinh : float -> float
                    val asinh : float -> float
                    val sqrt : float -> float
                    val tan : float -> float
                    val tanh : float -> float
                    val atanh : float -> float
                    val ceil : float -> float
                    val floor : float -> float
                    val abs_float : float -> float
                    val copysign : float -> float -> float
                    val mod_float : float -> float -> float
                    val frexp : float -> float * int
                    val ldexp : float -> int -> float
                    val modf : float -> float * float
                    val float : int -> float
                    val float_of_int : int -> float
                    val truncate : float -> int
                    val int_of_float : float -> int
                    val infinity : float
                    val neg_infinity : float
                    val nan : float
                    val max_float : float
                    val min_float : float
                    val epsilon_float : float
                    type fpclass = Stdlib.fpclass
                    val classify_float : float -> fpclass
                    include module type of struct include StringOperations end
                    val (^) : string -> string -> string
                    include module type of struct include CharOperations end
                    val int_of_char : char -> int
                    val char_of_int : int -> char
                    include module type of struct include UnitOperations end
                    val ignore : 'a -> unit
                    include module type of struct include PairOperations end
                    val fst : ('a * 'b) -> 'a
                    val snd : ('a * 'b) -> 'b
                    include module type of struct include Result end
                    type ('a, 'b) result = ('a, 'b) Stdlib.result
                    include module type of struct include StringConversion end
                    val string_of_bool : bool -> string
                    val bool_of_string : string -> bool
                    val bool_of_string_opt : string -> bool option
                    val string_of_int : int -> string
                    val int_of_string : string -> int
                    val int_of_string_opt : string -> int option
                    val valid_float_lexem : string -> string
                    val string_of_float : float -> string
                    val float_of_string : string -> float
                    val float_of_string_opt : string -> float option
                    include module type of struct include ListOperations end
                    val (@) : 'a list -> 'a list -> 'a list
                    include module type of struct include Formats end
                    type ('a, 'b, 'c, 'd, 'e, 'f) format6 = ('a, 'b, 'c, 'd, 'e, 'f) Stdlib.format6
                    type ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'd) Stdlib.format4
                    type ('a, 'b, 'c) format = ('a, 'b, 'c) Stdlib.format
                    val string_of_format : ('a, 'b, 'c, 'd, 'e, 'f) Stdlib.format6 -> string
                    val format_of_string : +Stdlib_safe (less-power.Stdlib_components.Stdlib_safe)

                    Module Stdlib_components.Stdlib_safe

                    SAFE Everything safe from the standard library, including everything safe from sub-modules of Stdlib.

                    include module type of struct include Exceptions end
                    val raise : exn -> 'a
                    val raise_notrace : exn -> 'a
                    val failwith : string -> 'a
                    val invalid_arg : string -> 'a
                    exception Exit
                    exception Match_failure of string * int * int
                    exception Assert_failure of string * int * int
                    exception Invalid_argument of string
                    exception Failure of string
                    exception Not_found
                    exception Out_of_memory
                    exception Stack_overflow
                    exception Sys_error of string
                    exception End_of_file
                    exception Division_by_zero
                    exception Sys_blocked_io
                    exception Undefined_recursive_module of string * int * int
                    include module type of struct include Composition end
                    val (|>) : 'a -> ('a -> 'b) -> 'b
                    val (@@) : ('a -> 'b) -> 'a -> 'b
                    include module type of struct include Debugging end
                    val __LOC__ : string
                    val __FILE__ : string
                    val __LINE__ : int
                    val __MODULE__ : string
                    val __POS__ : string * int * int * int
                    val __FUNCTION__ : string
                    val __LOC_OF__ : 'a -> string * 'a
                    val __LINE_OF__ : 'a -> int * 'a
                    val __POS_OF__ : 'a -> (string * int * int * int) * 'a
                    include module type of struct include Comparisons end
                    val (=) : 'a -> 'a -> bool
                    val (<>) : 'a -> 'a -> bool
                    val (<) : 'a -> 'a -> bool
                    val (>) : 'a -> 'a -> bool
                    val (<=) : 'a -> 'a -> bool
                    val (>=) : 'a -> 'a -> bool
                    val compare : 'a -> 'a -> int
                    val min : 'a -> 'a -> 'a
                    val max : 'a -> 'a -> 'a
                    include module type of struct include BooleanOperations end
                    val not : bool -> bool
                    val (&&) : bool -> bool -> bool
                    val (||) : bool -> bool -> bool
                    include module type of struct include IntegerOperations end
                    val (~-) : int -> int
                    val (~+) : int -> int
                    val succ : int -> int
                    val pred : int -> int
                    val (+) : int -> int -> int
                    val (-) : int -> int -> int
                    val (*) : int -> int -> int
                    val (/) : int -> int -> int
                    val (mod) : int -> int -> int
                    val abs : int -> int
                    val (land) : int -> int -> int
                    val (lor) : int -> int -> int
                    val (lxor) : int -> int -> int
                    val lnot : int -> int
                    val (lsl) : int -> int -> int
                    val (lsr) : int -> int -> int
                    val (asr) : int -> int -> int
                    val max_int : int
                    val min_int : int
                    include module type of struct include FloatingPointOperations end
                    val (~-.) : float -> float
                    val (~+.) : float -> float
                    val (+.) : float -> float -> float
                    val (-.) : float -> float -> float
                    val (*.) : float -> float -> float
                    val (/.) : float -> float -> float
                    val (**) : float -> float -> float
                    val exp : float -> float
                    val expm1 : float -> float
                    val acos : float -> float
                    val asin : float -> float
                    val atan : float -> float
                    val atan2 : float -> float -> float
                    val hypot : float -> float -> float
                    val cos : float -> float
                    val cosh : float -> float
                    val acosh : float -> float
                    val log : float -> float
                    val log10 : float -> float
                    val log1p : float -> float
                    val sin : float -> float
                    val sinh : float -> float
                    val asinh : float -> float
                    val sqrt : float -> float
                    val tan : float -> float
                    val tanh : float -> float
                    val atanh : float -> float
                    val ceil : float -> float
                    val floor : float -> float
                    val abs_float : float -> float
                    val copysign : float -> float -> float
                    val mod_float : float -> float -> float
                    val frexp : float -> float * int
                    val ldexp : float -> int -> float
                    val modf : float -> float * float
                    val float : int -> float
                    val float_of_int : int -> float
                    val truncate : float -> int
                    val int_of_float : float -> int
                    val infinity : float
                    val neg_infinity : float
                    val nan : float
                    val max_float : float
                    val min_float : float
                    val epsilon_float : float
                    type fpclass = Stdlib.fpclass
                    val classify_float : float -> fpclass
                    include module type of struct include StringOperations end
                    val (^) : string -> string -> string
                    include module type of struct include CharOperations end
                    val int_of_char : char -> int
                    val char_of_int : int -> char
                    include module type of struct include UnitOperations end
                    val ignore : 'a -> unit
                    include module type of struct include PairOperations end
                    val fst : ('a * 'b) -> 'a
                    val snd : ('a * 'b) -> 'b
                    include module type of struct include Result end
                    type ('a, 'b) result = ('a, 'b) Stdlib.result
                    include module type of struct include StringConversion end
                    val string_of_bool : bool -> string
                    val bool_of_string : string -> bool
                    val bool_of_string_opt : string -> bool option
                    val string_of_int : int -> string
                    val int_of_string : string -> int
                    val int_of_string_opt : string -> int option
                    val valid_float_lexem : string -> string
                    val string_of_float : float -> string
                    val float_of_string : string -> float
                    val float_of_string_opt : string -> float option
                    include module type of struct include ListOperations end
                    val (@) : 'a list -> 'a list -> 'a list
                    include module type of struct include Formats end
                    type ('a, 'b, 'c, 'd, 'e, 'f) format6 = ('a, 'b, 'c, 'd, 'e, 'f) Stdlib.format6
                    type ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'd) Stdlib.format4
                    type ('a, 'b, 'c) format = ('a, 'b, 'c) Stdlib.format
                    val string_of_format : ('a, 'b, 'c, 'd, 'e, 'f) Stdlib.format6 -> string
                    val format_of_string : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> ('a, 'b, 'c, 'd, 'e, 'f) format6
                    val (^^) : ('a, 'b, 'c, 'd, 'e, 'f) Stdlib.format6 -> diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/StringConversion/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/StringConversion/index.html index 89e35db..b6e8eeb 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/StringConversion/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/StringConversion/index.html @@ -1,2 +1,2 @@ -StringConversion (less-power.Stdlib_components.StringConversion)

                    Module Stdlib_components.StringConversion

                    SAFE String conversion functions

                    val string_of_bool : bool -> string
                    val bool_of_string : string -> bool
                    val bool_of_string_opt : string -> bool option
                    val string_of_int : int -> string
                    val int_of_string : string -> int
                    val int_of_string_opt : string -> int option
                    val valid_float_lexem : string -> string
                    val string_of_float : float -> string
                    val float_of_string : string -> float
                    val float_of_string_opt : string -> float option
                    +StringConversion (less-power.Stdlib_components.StringConversion)

                    Module Stdlib_components.StringConversion

                    SAFE String conversion functions

                    val string_of_bool : bool -> string
                    val bool_of_string : string -> bool
                    val bool_of_string_opt : string -> bool option
                    val string_of_int : int -> string
                    val int_of_string : string -> int
                    val int_of_string_opt : string -> int option
                    val valid_float_lexem : string -> string
                    val string_of_float : float -> string
                    val float_of_string : string -> float
                    val float_of_string_opt : string -> float option
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/StringOperations/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/StringOperations/index.html index 1cdd60d..904b50f 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/StringOperations/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/StringOperations/index.html @@ -1,2 +1,2 @@ -StringOperations (less-power.Stdlib_components.StringOperations)

                    Module Stdlib_components.StringOperations

                    SAFE String operations -- more in Stdlib module String

                    val (^) : string -> string -> string
                    +StringOperations (less-power.Stdlib_components.StringOperations)

                    Module Stdlib_components.StringOperations

                    SAFE String operations -- more in Stdlib module String

                    val (^) : string -> string -> string
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/UnitOperations/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/UnitOperations/index.html index 7275381..d9c078a 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/UnitOperations/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/UnitOperations/index.html @@ -1,2 +1,2 @@ -UnitOperations (less-power.Stdlib_components.UnitOperations)

                    Module Stdlib_components.UnitOperations

                    SAFE Unit operations

                    val ignore : 'a -> unit
                    +UnitOperations (less-power.Stdlib_components.UnitOperations)

                    Module Stdlib_components.UnitOperations

                    SAFE Unit operations

                    val ignore : 'a -> unit
                    diff --git a/sig-builder-no-typ-dup/less-power/Stdlib_components/index.html b/sig-builder-no-typ-dup/less-power/Stdlib_components/index.html index af3d61c..538f45f 100644 --- a/sig-builder-no-typ-dup/less-power/Stdlib_components/index.html +++ b/sig-builder-no-typ-dup/less-power/Stdlib_components/index.html @@ -1,2 +1,2 @@ -Stdlib_components (less-power.Stdlib_components)

                    Module Stdlib_components

                    Adapted from Stdlib, with different components in different modules. In particular, a safe (pure) subset of OCaml features can be enabled by opening a subset of modules defined here.

                    module Exceptions : sig ... end

                    SAFE raise primitives and standard exceptions

                    module Composition : sig ... end

                    SAFE Composition operators

                    module Debugging : sig ... end

                    SAFE Debugging macros

                    module Comparisons : sig ... end

                    SAFE Polymorphic comparisons. Does not include the impure (==) and (!=), which are in PhysicalComparisons.

                    module PhysicalComparisons : sig ... end

                    UNSAFE The impure (==) and (!=)

                    module BooleanOperations : sig ... end

                    SAFE Boolean operations

                    module IntegerOperations : sig ... end

                    SAFE Integer operations

                    module FloatingPointOperations : sig ... end

                    SAFE Floating-point operations

                    module StringOperations : sig ... end

                    SAFE String operations -- more in Stdlib module String

                    module CharOperations : sig ... end

                    SAFE Character operations -- more in module Char

                    module UnitOperations : sig ... end

                    SAFE Unit operations

                    module PairOperations : sig ... end

                    SAFE Pair operations

                    module References : sig ... end

                    UNSAFE References

                    module Result : sig ... end

                    SAFE Result type

                    module StringConversion : sig ... end

                    SAFE String conversion functions

                    module ListOperations : sig ... end

                    SAFE List operations -- more in module List

                    module IOOperations : sig ... end

                    UNSAFE I/O operations. This is regular, unmocked, IO.

                    module Formats : sig ... end

                    SAFE Formats

                    module Exit : sig ... end

                    UNSAFE Functions exiting the program at_exit, exit

                    module SafeAliases : sig ... end

                    SAFE Safe modules from the standard library, and unsafe modules restricted to their safe functions.

                    module Stdlib_safe : sig ... end

                    SAFE Everything safe from the standard library, including everything safe from sub-modules of Stdlib.

                    +Stdlib_components (less-power.Stdlib_components)

                    Module Stdlib_components

                    Adapted from Stdlib, with different components in different modules. In particular, a safe (pure) subset of OCaml features can be enabled by opening a subset of modules defined here.

                    module Exceptions : sig ... end

                    SAFE raise primitives and standard exceptions

                    module Composition : sig ... end

                    SAFE Composition operators

                    module Debugging : sig ... end

                    SAFE Debugging macros

                    module Comparisons : sig ... end

                    SAFE Polymorphic comparisons. Does not include the impure (==) and (!=), which are in PhysicalComparisons.

                    module PhysicalComparisons : sig ... end

                    UNSAFE The impure (==) and (!=)

                    module BooleanOperations : sig ... end

                    SAFE Boolean operations

                    module IntegerOperations : sig ... end

                    SAFE Integer operations

                    module FloatingPointOperations : sig ... end

                    SAFE Floating-point operations

                    module StringOperations : sig ... end

                    SAFE String operations -- more in Stdlib module String

                    module CharOperations : sig ... end

                    SAFE Character operations -- more in module Char

                    module UnitOperations : sig ... end

                    SAFE Unit operations

                    module PairOperations : sig ... end

                    SAFE Pair operations

                    module References : sig ... end

                    UNSAFE References

                    module Result : sig ... end

                    SAFE Result type

                    module StringConversion : sig ... end

                    SAFE String conversion functions

                    module ListOperations : sig ... end

                    SAFE List operations -- more in module List

                    module IOOperations : sig ... end

                    UNSAFE I/O operations. This is regular, unmocked, IO.

                    module Formats : sig ... end

                    SAFE Formats

                    module Exit : sig ... end

                    UNSAFE Functions exiting the program at_exit, exit

                    module SafeAliases : sig ... end

                    SAFE Safe modules from the standard library, and unsafe modules restricted to their safe functions.

                    module Stdlib_safe : sig ... end

                    SAFE Everything safe from the standard library, including everything safe from sub-modules of Stdlib.

                    diff --git a/sig-builder-no-typ-dup/less-power/Test_lib/Grading/index.html b/sig-builder-no-typ-dup/less-power/Test_lib/Grading/index.html index a37f7cd..04a6379 100644 --- a/sig-builder-no-typ-dup/less-power/Test_lib/Grading/index.html +++ b/sig-builder-no-typ-dup/less-power/Test_lib/Grading/index.html @@ -1,5 +1,5 @@ -Grading (less-power.Test_lib.Grading)

                    Module Test_lib.Grading

                    Provide a grade from a list of passed/failed tests and a grading scheme. Provides functionality to load tests from a JUnit XML file, tidy them up, and write the grading result back to a JUnit XML file.

                    Grading

                    type 'a clamp = {
                    1. min : 'a;
                    2. max : 'a;
                    }

                    A range of values, inclusive.

                    val clamp : 'a clamp -> 'a -> 'a

                    clamp { min = x; max = y } z constrains z between x and y.

                    val clamp_opt : 'a clamp option -> 'a -> 'a

                    clamp None x is x, otherwise as clamp.

                    type grading_result = {
                    1. text : string;
                    2. points : int;
                    3. max_points : int;
                    }

                    The result of grading a list of tests.

                    type tests = (string * bool) list

                    Pairs of test_name, passed.

                    type testsuites = tests list

                    A group of testsuites (e.g. as extracted from a single JUnit XML file)

                    type grading_criterion =
                    1. | Passed of string
                      (*

                      Did the given test pass?

                      *)
                    2. | Failed of string
                      (*

                      Did the given test fail?

                      *)
                    3. | Not of grading_criterion
                      (*

                      Negation (logical not).

                      *)
                    4. | OneOf of grading_criterion list
                      (*

                      Disjunction (logical or).

                      *)
                    5. | AllOf of grading_criterion list
                      (*

                      Conjunction (logical and).

                      *)
                    6. | Constant of bool
                      (*

                      Logical constant.

                      *)

                    Logical formulas over test results.

                    Passed and Failed values may use wildcards:

                    • Trailing colon, e.g. a:b:c:: matches anything of which it is a prefix, e.g. a:b:c:d:e and a:b:c.
                    • Star as name, e.g. a:*:c: matches any name in place of *, e.g. a:mmm:c.

                    Both may be combined, e.g. a:*:c: matches a:mm:c and a:nn:c:d. A name is considered to be any string that does not contain a :. You are responsible for enforcing this convention yourself, it is not enforced by OUnit, for example.

                    For a Passed value to evaluate to true, all tests matched by the wildcard need to pass, and for Failed all need to fail. If you want the inverse behavior (at least one matched test needs to pass/fail), use Not: Not (Failed "a:*:") means "not all matched tests failed", which is logically equivalent to "at least one matched test passed". For this, you can use any_passed and any_failed.

                    It is an error to reference a test that does not exist. In the presence of wildcards, at least one test must match.

                    Logical implication: implies a c = OneOf [Not a; c].

                    val any_passed : string -> grading_criterion

                    If a test case contains a wildcard, the behavior is to require that all tests that match pass (or that all tests fail). Use any_passed (and any_failed) to instead check that at least one test that matches passed (or at least one test that matches failed).

                    val any_failed : string -> grading_criterion
                    val evaluate_criterion : tests -> grading_criterion -> bool

                    Evaluate the logical formula over the assignment of test names to boolean pass/fail values.

                    val string_of_grading_criterion : ?indent:int -> grading_criterion -> string
                    type grading =
                    1. | Points of {
                      1. title : string;
                      2. points : int;
                      3. test_case : grading_criterion;
                      4. reason : tests -> grading_criterion -> string;
                      }
                      (*

                      If the criterion test_case evaluates to true, assign a grade of points, otherwise 0.

                      *)
                    2. | Group of {
                      1. title : string;
                      2. items : grading list;
                      3. max_points : int clamp option;
                      4. skip : string option;
                        (*

                        If skip = Some r, skip this group (assign a grade of 0) with the reason r.

                        *)
                      }
                      (*

                      A group of grading schemes. Assign the sum of grades from the sub-items, with an optional minimum/maximum number of points.

                      *)
                    3. | Conditional of {
                      1. condition : grading_criterion;
                      2. message : string;
                      3. content : grading;
                      }
                      (*

                      Assign a grade according to content if the condition evaluates to true, otherwise 0.

                      *)

                    Grading scheme. Defines how to assign a numeric grade for a given set of test results.

                    exception No_reason
                    val points : +Grading (less-power.Test_lib.Grading)

                    Module Test_lib.Grading

                    Provide a grade from a list of passed/failed tests and a grading scheme. Provides functionality to load tests from a JUnit XML file, tidy them up, and write the grading result back to a JUnit XML file.

                    Grading

                    type 'a clamp = {
                    1. min : 'a;
                    2. max : 'a;
                    }

                    A range of values, inclusive.

                    val clamp : 'a clamp -> 'a -> 'a

                    clamp { min = x; max = y } z constrains z between x and y.

                    val clamp_opt : 'a clamp option -> 'a -> 'a

                    clamp None x is x, otherwise as clamp.

                    type grading_result = {
                    1. text : string;
                    2. points : int;
                    3. max_points : int;
                    }

                    The result of grading a list of tests.

                    type tests = (string * bool) list

                    Pairs of test_name, passed.

                    type testsuites = tests list

                    A group of testsuites (e.g. as extracted from a single JUnit XML file)

                    type grading_criterion =
                    1. | Passed of string
                      (*

                      Did the given test pass?

                      *)
                    2. | Failed of string
                      (*

                      Did the given test fail?

                      *)
                    3. | Not of grading_criterion
                      (*

                      Negation (logical not).

                      *)
                    4. | OneOf of grading_criterion list
                      (*

                      Disjunction (logical or).

                      *)
                    5. | AllOf of grading_criterion list
                      (*

                      Conjunction (logical and).

                      *)
                    6. | Constant of bool
                      (*

                      Logical constant.

                      *)

                    Logical formulas over test results.

                    Passed and Failed values may use wildcards:

                    • Trailing colon, e.g. a:b:c:: matches anything of which it is a prefix, e.g. a:b:c:d:e and a:b:c.
                    • Star as name, e.g. a:*:c: matches any name in place of *, e.g. a:mmm:c.

                    Both may be combined, e.g. a:*:c: matches a:mm:c and a:nn:c:d. A name is considered to be any string that does not contain a :. You are responsible for enforcing this convention yourself, it is not enforced by OUnit, for example.

                    For a Passed value to evaluate to true, all tests matched by the wildcard need to pass, and for Failed all need to fail. If you want the inverse behavior (at least one matched test needs to pass/fail), use Not: Not (Failed "a:*:") means "not all matched tests failed", which is logically equivalent to "at least one matched test passed". For this, you can use any_passed and any_failed.

                    It is an error to reference a test that does not exist. In the presence of wildcards, at least one test must match.

                    Logical implication: implies a c = OneOf [Not a; c].

                    val any_passed : string -> grading_criterion

                    If a test case contains a wildcard, the behavior is to require that all tests that match pass (or that all tests fail). Use any_passed (and any_failed) to instead check that at least one test that matches passed (or at least one test that matches failed).

                    val any_failed : string -> grading_criterion
                    val evaluate_criterion : tests -> grading_criterion -> bool

                    Evaluate the logical formula over the assignment of test names to boolean pass/fail values.

                    val string_of_grading_criterion : ?indent:int -> grading_criterion -> string
                    type grading =
                    1. | Points of {
                      1. title : string;
                      2. points : int;
                      3. test_case : grading_criterion;
                      4. reason : tests -> grading_criterion -> string;
                      }
                      (*

                      If the criterion test_case evaluates to true, assign a grade of points, otherwise 0.

                      *)
                    2. | Group of {
                      1. title : string;
                      2. items : grading list;
                      3. max_points : int clamp option;
                      4. skip : string option;
                        (*

                        If skip = Some r, skip this group (assign a grade of 0) with the reason r.

                        *)
                      }
                      (*

                      A group of grading schemes. Assign the sum of grades from the sub-items, with an optional minimum/maximum number of points.

                      *)
                    3. | Conditional of {
                      1. condition : grading_criterion;
                      2. message : string;
                      3. content : grading;
                      }
                      (*

                      Assign a grade according to content if the condition evaluates to true, otherwise 0.

                      *)

                    Grading scheme. Defines how to assign a numeric grade for a given set of test results.

                    exception No_reason
                    val points : ?skip:grading_criterion -> ?reason:(tests -> grading_criterion -> string option) -> ?penalty:bool -> diff --git a/sig-builder-no-typ-dup/less-power/Test_lib/OUnit_util/index.html b/sig-builder-no-typ-dup/less-power/Test_lib/OUnit_util/index.html index 79d9151..a75ce42 100644 --- a/sig-builder-no-typ-dup/less-power/Test_lib/OUnit_util/index.html +++ b/sig-builder-no-typ-dup/less-power/Test_lib/OUnit_util/index.html @@ -1,5 +1,5 @@ -OUnit_util (less-power.Test_lib.OUnit_util)

                    Module Test_lib.OUnit_util

                    Utilities for converting from QCheck to OUnit, and other OUnit-related functionality.

                    val default_qcheck_timeout : Mtime.span
                    val default_rand : Stdlib.Random.State.t
                    val of_qcheck : ?timeout:Mtime.span -> QCheck2.Test.t -> OUnitTest.test

                    Convert a QCheck test to OUnit, overwriting the timeout. Automatically prevents excessive shrinking from timing out tests, by interrupting shrinking and showing the smallest value found so far once the timeout expires.

                    val map_test : +OUnit_util (less-power.Test_lib.OUnit_util)

                    Module Test_lib.OUnit_util

                    Utilities for converting from QCheck to OUnit, and other OUnit-related functionality.

                    val default_qcheck_timeout : Mtime.span
                    val default_rand : Stdlib.Random.State.t
                    val of_qcheck : ?timeout:Mtime.span -> QCheck2.Test.t -> OUnitTest.test

                    Convert a QCheck test to OUnit, overwriting the timeout. Automatically prevents excessive shrinking from timing out tests, by interrupting shrinking and showing the smallest value found so far once the timeout expires.

                    val map_test : ?name:(string -> string) -> ?test_fun:(OUnitTest.test_fun -> OUnitTest.test_fun) -> ?test_length:(OUnitTest.test_length -> OUnitTest.test_length) -> diff --git a/sig-builder-no-typ-dup/less-power/Test_lib/QCheck_util/index.html b/sig-builder-no-typ-dup/less-power/Test_lib/QCheck_util/index.html index ed0115c..1ca398c 100644 --- a/sig-builder-no-typ-dup/less-power/Test_lib/QCheck_util/index.html +++ b/sig-builder-no-typ-dup/less-power/Test_lib/QCheck_util/index.html @@ -1,28 +1,28 @@ -QCheck_util (less-power.Test_lib.QCheck_util)

                    Module Test_lib.QCheck_util

                    Helpers for QCheck-based tests.

                    val default_computation_timeout : Mtime.span
                    val is_user_fail : exn -> string option

                    Workaround to check if an exception is QCheck2.Test.User_fail, since that exception is not exposed.

                    val assert_equal : +QCheck_util (less-power.Test_lib.QCheck_util)

                    Module Test_lib.QCheck_util

                    Helpers for QCheck-based tests.

                    val default_computation_timeout : Mtime.span
                    val is_user_fail : exn -> string option

                    Workaround to check if an exception is QCheck2.Test.User_fail, since that exception is not exposed.

                    val assert_equal : ?context:string -> ?timeout:Mtime.span -> eq:('a -> 'b -> 'c option) -> - printers:(('d -> string) * ('e -> string)) -> - (unit -> 'f) -> - (unit -> 'g) -> - ('h, string) Stdlib.result

                    Check if values are equal. Report a failure message as Error if not. This monadic form is useful for properties that check nested functions, i.e. calling submission code contains functions that should once again be called.

                    Note: with timeout, uses Common.Util.timeout_unix, and thus nesting (within expected_f or actual_f) will not work as expected.

                    • parameter context

                      Add this string as context before failure message

                    • parameter eq

                      Check for equality, return Some x if equal or None if not

                    • returns

                      The result of eq, if not None, as Ok.

                    val lift_eq : ('a -> 'b -> bool) -> 'c -> 'd -> unit option

                    Turn an equality function into the form required for assert_equal.

                    val assert_equal' : - ?eq:('a -> 'b -> unit option) -> - printer:('b -> string) -> + printers:(('a -> string) * ('b -> string)) -> + (unit -> 'a) -> + (unit -> 'b) -> + ('c, string) Stdlib.result

                    Check if values are equal. Report a failure message as Error if not. This monadic form is useful for properties that check nested functions, i.e. calling submission code contains functions that should once again be called.

                    Note: with timeout, uses Common.Util.timeout_unix, and thus nesting (within expected_f or actual_f) will not work as expected.

                    • parameter context

                      Add this string as context before failure message

                    • parameter eq

                      Check for equality, return Some x if equal or None if not

                    • returns

                      The result of eq, if not None, as Ok.

                    val lift_eq : ('a -> 'b -> bool) -> 'a -> 'b -> unit option

                    Turn an equality function into the form required for assert_equal.

                    val assert_equal' : + ?eq:('a -> 'a -> unit option) -> + printer:('a -> string) -> ?context:string -> ?timeout:Mtime.span -> (unit -> 'a) -> - (unit -> 'b) -> + (unit -> 'a) -> (unit, string) Stdlib.result

                    Like assert_equal, but when the types to compare are the same.

                    val fail_reportf_notrace : ('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> - 'c
                    val fail_report_notrace : string -> 'a
                    val report_result : ('a, string) Stdlib.result -> bool

                    After performing one or more comparisons with assert_equal, report a failure as a QCheck failure, or just return true otherwise.

                    val make_test_singles : + 'a
                    val fail_report_notrace : string -> 'a
                    val report_result : ('a, string) Stdlib.result -> bool

                    After performing one or more comparisons with assert_equal, report a failure as a QCheck failure, or just return true otherwise.

                    val make_test_singles : ?name:string -> ?print:'a QCheck2.Print.t -> - 'a0 list -> - ('a1 -> bool) -> + 'a list -> + ('a -> bool) -> QCheck2.Test.t

                    Check a property against multiple, fixed inputs.

                    val make_test_single : ?name:string -> ?print:'a QCheck2.Print.t -> - 'b -> + 'a -> ('a -> bool) -> QCheck2.Test.t

                    Check a property against a fixed input.

                    diff --git a/sig-builder-no-typ-dup/less-power/Test_lib/Test_util/index.html b/sig-builder-no-typ-dup/less-power/Test_lib/Test_util/index.html index 02d1273..6edd41b 100644 --- a/sig-builder-no-typ-dup/less-power/Test_lib/Test_util/index.html +++ b/sig-builder-no-typ-dup/less-power/Test_lib/Test_util/index.html @@ -1,2 +1,2 @@ -Test_util (less-power.Test_lib.Test_util)

                    Module Test_lib.Test_util

                    val equal_unordered : ?eq:('a -> 'b -> bool) -> 'c list -> 'b list -> bool

                    Check if two lists contain the same items with the same multiplicities, but in any order. Consider items equal if eq x y (default: x = y) holds.

                    +Test_util (less-power.Test_lib.Test_util)

                    Module Test_lib.Test_util

                    val equal_unordered : ?eq:('a -> 'a -> bool) -> 'a list -> 'a list -> bool

                    Check if two lists contain the same items with the same multiplicities, but in any order. Consider items equal if eq x y (default: x = y) holds.

                    diff --git a/sig-builder-no-typ-dup/less-power/Test_lib/index.html b/sig-builder-no-typ-dup/less-power/Test_lib/index.html index 8033253..37c4887 100644 --- a/sig-builder-no-typ-dup/less-power/Test_lib/index.html +++ b/sig-builder-no-typ-dup/less-power/Test_lib/index.html @@ -1,2 +1,2 @@ -Test_lib (less-power.Test_lib)

                    Module Test_lib

                    Library of common functionality for writing tests.

                    module Grading : sig ... end

                    Provide a grade from a list of passed/failed tests and a grading scheme. Provides functionality to load tests from a JUnit XML file, tidy them up, and write the grading result back to a JUnit XML file.

                    module OUnit_util : sig ... end

                    Utilities for converting from QCheck to OUnit, and other OUnit-related functionality.

                    module QCheck_util : sig ... end

                    Helpers for QCheck-based tests.

                    module Test_util : sig ... end
                    +Test_lib (less-power.Test_lib)

                    Module Test_lib

                    Library of common functionality for writing tests.

                    module Grading : sig ... end

                    Provide a grade from a list of passed/failed tests and a grading scheme. Provides functionality to load tests from a JUnit XML file, tidy them up, and write the grading result back to a JUnit XML file.

                    module OUnit_util : sig ... end

                    Utilities for converting from QCheck to OUnit, and other OUnit-related functionality.

                    module QCheck_util : sig ... end

                    Helpers for QCheck-based tests.

                    module Test_util : sig ... end
                    diff --git a/sig-builder-no-typ-dup/less-power/Test_runner/Entry_point/index.html b/sig-builder-no-typ-dup/less-power/Test_runner/Entry_point/index.html index 18714e3..a260ed1 100644 --- a/sig-builder-no-typ-dup/less-power/Test_runner/Entry_point/index.html +++ b/sig-builder-no-typ-dup/less-power/Test_runner/Entry_point/index.html @@ -1,5 +1,5 @@ -Entry_point (less-power.Test_runner.Entry_point)

                    Module Test_runner.Entry_point

                    Entry points for creating test driver executables from a task tree.

                    val build_root : string Cmdliner.Term.t
                    val safe : bool Cmdliner.Term.t
                    val mtime_s : Mtime.span Cmdliner.Arg.conv
                    val mk_timeout : +Entry_point (less-power.Test_runner.Entry_point)

                    Module Test_runner.Entry_point

                    Entry points for creating test driver executables from a task tree.

                    val build_root : string Cmdliner.Term.t
                    val safe : bool Cmdliner.Term.t
                    val mtime_s : Mtime.span Cmdliner.Arg.conv
                    val mk_timeout : names:string list -> task:string -> default:Mtime.span -> @@ -12,7 +12,7 @@ when_:string -> names:string list -> default:float -> - float Cmdliner.Term.t
                    val exercise_start : float Cmdliner.Term.t
                    val exercise_end : float Cmdliner.Term.t
                    val term_of_runner : (Std_task.cfg -> 'a) -> 'b Cmdliner.Term.t
                    val build_report_junit : ?time:Mtime.span -> string option -> Junit.t

                    Testcase.error if message is Some _, otherwise Testcase.pass

                    val task_runner : + float Cmdliner.Term.t
                    val exercise_start : float Cmdliner.Term.t
                    val exercise_end : float Cmdliner.Term.t
                    val term_of_runner : (Std_task.cfg -> 'a) -> 'a Cmdliner.Term.t
                    val build_report_junit : ?time:Mtime.span -> string option -> Junit.t

                    Testcase.error if message is Some _, otherwise Testcase.pass

                    val task_runner : ?build_report_path:string -> ?report_success_details:bool -> (Std_task.cfg -> (unit, unit) Task.tree) -> @@ -22,4 +22,4 @@ ?report_success_details:bool -> ?exit:(Cmdliner.Cmd.Exit.code -> 'a) -> (Std_task.cfg -> (unit, unit) Task.tree) -> - 'b
                    + 'a
                    diff --git a/sig-builder-no-typ-dup/less-power/Test_runner/Std_task/Messages/index.html b/sig-builder-no-typ-dup/less-power/Test_runner/Std_task/Messages/index.html index 2cffccc..c6024cf 100644 --- a/sig-builder-no-typ-dup/less-power/Test_runner/Std_task/Messages/index.html +++ b/sig-builder-no-typ-dup/less-power/Test_runner/Std_task/Messages/index.html @@ -1,2 +1,2 @@ -Messages (less-power.Test_runner.Std_task.Messages)

                    Module Std_task.Messages

                    val submission_error : string
                    val test_failure : string
                    +Messages (less-power.Test_runner.Std_task.Messages)

                    Module Std_task.Messages

                    val submission_error : string
                    val test_failure : string
                    diff --git a/sig-builder-no-typ-dup/less-power/Test_runner/Std_task/index.html b/sig-builder-no-typ-dup/less-power/Test_runner/Std_task/index.html index 931058d..5e02ddd 100644 --- a/sig-builder-no-typ-dup/less-power/Test_runner/Std_task/index.html +++ b/sig-builder-no-typ-dup/less-power/Test_runner/Std_task/index.html @@ -1,10 +1,10 @@ -Std_task (less-power.Test_runner.Std_task)

                    Module Test_runner.Std_task

                    Common tasks and tasks for the standard test setup.

                    val f : ('a, unit, string) Stdlib.format -> 'a

                    Common tasks

                    Check if the directory contains a symlink. The directory itself may be a symlink.

                    module Messages : sig ... end
                    type cfg = {
                    1. build_root : FilePath.filename;
                      (*

                      relative paths are OK

                      *)
                    2. safe : bool;
                    3. build_timeout : Mtime.span;
                    4. test_timeout : Mtime.span;
                    5. probe_timeout : Mtime.span;
                    6. timestamp_now : float option;
                      (*

                      Override current time, UTC

                      *)
                    7. exercise_start : float;
                      (*

                      UTC time

                      *)
                    8. exercise_end : float;
                      (*

                      UTC time

                      *)
                    }
                    val write_file_pp : +Std_task (less-power.Test_runner.Std_task)

                    Module Test_runner.Std_task

                    Common tasks and tasks for the standard test setup.

                    val f : ('a, unit, string) Stdlib.format -> 'a

                    Common tasks

                    Check if the directory contains a symlink. The directory itself may be a symlink.

                    module Messages : sig ... end
                    type cfg = {
                    1. build_root : FilePath.filename;
                      (*

                      relative paths are OK

                      *)
                    2. safe : bool;
                    3. build_timeout : Mtime.span;
                    4. test_timeout : Mtime.span;
                    5. probe_timeout : Mtime.span;
                    6. timestamp_now : float option;
                      (*

                      Override current time, UTC

                      *)
                    7. exercise_start : float;
                      (*

                      UTC time

                      *)
                    8. exercise_end : float;
                      (*

                      UTC time

                      *)
                    }
                    val write_file_pp : ?label:string -> cfg -> string -> (Stdlib.Format.formatter -> 'a -> unit) -> - ('b, unit) Task.tree
                    val write_file_f : + ('a, unit) Task.tree
                    val write_file_f : ?label:string -> cfg -> string -> diff --git a/sig-builder-no-typ-dup/less-power/Test_runner/Task/index.html b/sig-builder-no-typ-dup/less-power/Test_runner/Task/index.html index 4a26905..e219c1b 100644 --- a/sig-builder-no-typ-dup/less-power/Test_runner/Task/index.html +++ b/sig-builder-no-typ-dup/less-power/Test_runner/Task/index.html @@ -1,17 +1,17 @@ -Task (less-power.Test_runner.Task)

                    Module Test_runner.Task

                    Set up, build, and run tests using first-class tasks.

                    Tasks define actions to run when testing submissions. Examples include building student code, checking for forbidden syntax elements, or running the generated test executable.

                    This module provides tasks as trees (type tree), so tasks can be more easily re-used and composed.

                    Running tasks automatically handles exceptions and timeouts.

                    Task trees and task lists

                    type ('a, 'b) tree = {
                    1. label : string option;
                    2. timeout : Mtime.span option;
                    3. task : 'a -> 'b k;
                    }

                    A single task, possibly with subtasks (see k).

                    and _ k =
                    1. | Cont : 'a * ('a, 'b) tasks -> 'b k

                    Task continuation of type 'b k: Upon completion, a task produces a value of some type 'a, and a list of subtasks from 'a to 'b.

                    and (_, _) tasks =
                    1. | Nil : ('a, 'a) tasks
                    2. | Cons : ('a, 'b) tree * ('b, 'c) tasks -> ('a, 'c) tasks

                    A list of tasks, which start by accepting a value of type 'a and produce a result of type 'b.

                    val tree : +Task (less-power.Test_runner.Task)

                    Module Test_runner.Task

                    Set up, build, and run tests using first-class tasks.

                    Tasks define actions to run when testing submissions. Examples include building student code, checking for forbidden syntax elements, or running the generated test executable.

                    This module provides tasks as trees (type tree), so tasks can be more easily re-used and composed.

                    Running tasks automatically handles exceptions and timeouts.

                    Task trees and task lists

                    type ('a, 'b) tree = {
                    1. label : string option;
                    2. timeout : Mtime.span option;
                    3. task : 'a -> 'b k;
                    }

                    A single task, possibly with subtasks (see k).

                    and _ k =
                    1. | Cont : 'a * ('a, 'b) tasks -> 'b k

                    Task continuation of type 'b k: Upon completion, a task produces a value of some type 'a, and a list of subtasks from 'a to 'b.

                    and (_, _) tasks =
                    1. | Nil : ('a, 'a) tasks
                    2. | Cons : ('a, 'b) tree * ('b, 'c) tasks -> ('a, 'c) tasks

                    A list of tasks, which start by accepting a value of type 'a and produce a result of type 'b.

                    val tree : ?label:string -> ?timeout:Mtime.span -> ('a -> 'b k) -> - ('c, 'd) tree
                    val nil : ('a, 'a) tasks
                    val (@:>) : ('a, 'b) tree -> ('b, 'c) tasks -> ('a, 'c) tasks
                    val cons : ('a, 'b) tree -> ('b, 'c) tasks -> ('a, 'c) tasks
                    val app : 'a 'b 'c. ('a, 'b) tasks -> ('b, 'c) tasks -> ('a, 'c) tasks

                    Join two lists of tasks.

                    val of_list : ('a, 'b) tree list -> ('b, 'c) tasks

                    Create a task list from a regular list. All tasks must have the same input and output type (e.g. unit); if that is not desired, use the tasks constructors directly.

                    val singleton : ('a, 'b) tree -> ('a, 'c) tasks
                    val snoc : ('a, 'b) tasks -> ('c, 'd) tree -> ('a, 'e) tasks
                    val then_ : ('a, 'b) tree -> ('c, 'd) tree -> ('c, 'e) tasks

                    then_ t2 t1 is the task list [t1; t2]

                    val with_ : + ('a, 'b) tree
                    val nil : ('a, 'a) tasks
                    val (@:>) : ('a, 'b) tree -> ('b, 'c) tasks -> ('a, 'c) tasks
                    val cons : ('a, 'b) tree -> ('b, 'c) tasks -> ('a, 'c) tasks
                    val app : 'a 'b 'c. ('a, 'b) tasks -> ('b, 'c) tasks -> ('a, 'c) tasks

                    Join two lists of tasks.

                    val of_list : ('a, 'a) tree list -> ('a, 'a) tasks

                    Create a task list from a regular list. All tasks must have the same input and output type (e.g. unit); if that is not desired, use the tasks constructors directly.

                    val singleton : ('a, 'b) tree -> ('a, 'b) tasks
                    val snoc : ('a, 'b) tasks -> ('b, 'c) tree -> ('a, 'c) tasks
                    val then_ : ('a, 'b) tree -> ('c, 'a) tree -> ('c, 'b) tasks

                    then_ t2 t1 is the task list [t1; t2]

                    val with_ : ?timeout:Mtime.span -> ?label:string -> ('a, 'b) tree -> - ('c, 'd) tree
                    type (_, _) unsnoc =
                    1. | Unsnoc : ('a, 'b) tasks * ('b, 'c) tree -> ('a, 'c) unsnoc
                      (*

                      Unsnoc ts lst is the list snoc ts lst, but split into ts and lst. The list ts contains all elements of the list except the last one, and lst is the last element.

                      *)
                    val unsnoc : 'a 'b 'c. ('a, 'b) tree -> ('b, 'c) tasks -> ('a, 'c) unsnoc

                    unsnoc t1 ts splits the non-empty list cons t1 ts into its initial elements and final element, see unsnoc.

                    Task runner

                    Task failures

                    exception Task_failure of Stdlib.Format.formatter -> unit
                    type task_failure =
                    1. | Timed_out
                    2. | Exception_raised of exn
                    3. | Task_failed of Stdlib.Format.formatter -> unit
                    val pp_task_failure : Stdlib.Format.formatter -> task_failure -> unit
                    val failf : ('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'c

                    Calling failf "..." ... will raise an exception that aborts the task runner with a formatted message.

                    val fail : string -> 'a

                    Like failf, but with a plain string.

                    Task results

                    type summary = {
                    1. label : string option;
                    2. elapsed_task : Mtime.span;
                      (*

                      does not include subtasks

                      *)
                    3. elapsed_total : Mtime.span;
                      (*

                      includes subtasks

                      *)
                    4. subtasks : summary list;
                    }

                    Runner implementation

                    type 'a st_in = {
                    1. x : 'a;
                    2. timeout : Mtime.span option;
                    }
                    type 'a st_out = ('a, task_failure) Stdlib.result

                    If the last task completed successfully with a value of x, then Ok x. Otherwise the failure reason of the task that failed.

                    val update_state_in : 'a -> Mtime.span -> 'b st_in -> 'c st_in
                    val run_tasks : 'a 'b. 'a st_in -> ('a, 'b) tasks -> 'b st_out * summary list

                    Run a list of tasks.

                    val run_tree : 'a 'b. 'a st_in -> ('a, 'b) tree -> 'b st_out * summary

                    Run a tree of tasks.

                    val run : ?timeout:Mtime.span -> ('a, 'b) tree -> 'c -> 'b st_out * summary

                    run ~timeout t x runs the task tree t with the initial input x, and the given timeout (default: no timeout).

                    Task helpers

                    val task1 : ?timeout:Mtime.span -> ?label:string -> ('a -> 'b) -> ('c, 'd) tree

                    Run a single function as a task, without any subtasks

                    val group : + ('a, 'b) tree
                    type (_, _) unsnoc =
                    1. | Unsnoc : ('a, 'b) tasks * ('b, 'c) tree -> ('a, 'c) unsnoc
                      (*

                      Unsnoc ts lst is the list snoc ts lst, but split into ts and lst. The list ts contains all elements of the list except the last one, and lst is the last element.

                      *)
                    val unsnoc : 'a 'b 'c. ('a, 'b) tree -> ('b, 'c) tasks -> ('a, 'c) unsnoc

                    unsnoc t1 ts splits the non-empty list cons t1 ts into its initial elements and final element, see unsnoc.

                    Task runner

                    Task failures

                    exception Task_failure of Stdlib.Format.formatter -> unit
                    type task_failure =
                    1. | Timed_out
                    2. | Exception_raised of exn
                    3. | Task_failed of Stdlib.Format.formatter -> unit
                    val pp_task_failure : Stdlib.Format.formatter -> task_failure -> unit
                    val failf : ('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'a

                    Calling failf "..." ... will raise an exception that aborts the task runner with a formatted message.

                    val fail : string -> 'a

                    Like failf, but with a plain string.

                    Task results

                    type summary = {
                    1. label : string option;
                    2. elapsed_task : Mtime.span;
                      (*

                      does not include subtasks

                      *)
                    3. elapsed_total : Mtime.span;
                      (*

                      includes subtasks

                      *)
                    4. subtasks : summary list;
                    }

                    Runner implementation

                    type 'a st_in = {
                    1. x : 'a;
                    2. timeout : Mtime.span option;
                    }
                    type 'a st_out = ('a, task_failure) Stdlib.result

                    If the last task completed successfully with a value of x, then Ok x. Otherwise the failure reason of the task that failed.

                    val update_state_in : 'a -> Mtime.span -> 'b st_in -> 'a st_in
                    val run_tasks : 'a 'b. 'a st_in -> ('a, 'b) tasks -> 'b st_out * summary list

                    Run a list of tasks.

                    val run_tree : 'a 'b. 'a st_in -> ('a, 'b) tree -> 'b st_out * summary

                    Run a tree of tasks.

                    val run : ?timeout:Mtime.span -> ('a, 'b) tree -> 'a -> 'b st_out * summary

                    run ~timeout t x runs the task tree t with the initial input x, and the given timeout (default: no timeout).

                    Task helpers

                    val task1 : ?timeout:Mtime.span -> ?label:string -> ('a -> 'b) -> ('a, 'b) tree

                    Run a single function as a task, without any subtasks

                    val group : ?timeout:Mtime.span -> ?label:string -> ('a, 'b) tasks -> - ('c, 'd) tree

                    Create a task tree from a list of tasks, the task itself will do nothing but return the list of subtasks.

                    val then_map_k : 'a 'b. ('a -> 'b) -> 'a k -> 'b k
                    val then_map : 'a 'b 'c. ('b -> 'c) -> ('a, 'b) tree -> ('a, 'c) tree

                    Modify the final result of a task tree, without creating an additional task. Note: since f runs inside the final task, its side-effects should be minimal: any exceptions will be raised inside an existing task, and the existing task's timeout will include f. If that is undesirable, run f inside a new subtask with then_subtask.

                    val then_subtask : ('a, 'b) tree -> ('c, 'd) tree -> ('e, 'f) tree
                    val ignore : ('a, 'b) tree -> ('a, unit) tree

                    Ignore the result of a task (replace it with ()).

                    val first_map : ('a -> 'b) -> ('c, 'd) tree -> ('e, 'f) tree
                    val first_const : 'a -> ('b, 'c) tree -> ('d, 'c) tree
                    val first_ignore : (unit, 'a) tree -> ('b, 'a) tree
                    val pure : 'a -> ('b, 'c) tree
                    val accumulator : ('a -> 'b -> 'c) -> (unit, 'd) tree -> ('e, 'f) tree
                    val spawning : ('a -> (unit, 'b) tasks) -> ('c, 'd) tree

                    spawning k runs as the list of tasks produced by applying k to the task's input

                    val accumulating : + ('a, 'b) tree

                    Create a task tree from a list of tasks, the task itself will do nothing but return the list of subtasks.

                    val then_map_k : 'a 'b. ('a -> 'b) -> 'a k -> 'b k
                    val then_map : 'a 'b 'c. ('b -> 'c) -> ('a, 'b) tree -> ('a, 'c) tree

                    Modify the final result of a task tree, without creating an additional task. Note: since f runs inside the final task, its side-effects should be minimal: any exceptions will be raised inside an existing task, and the existing task's timeout will include f. If that is undesirable, run f inside a new subtask with then_subtask.

                    val then_subtask : ('a, 'b) tree -> ('c, 'a) tree -> ('c, 'b) tree
                    val ignore : ('a, 'b) tree -> ('a, unit) tree

                    Ignore the result of a task (replace it with ()).

                    val first_map : ('a -> 'b) -> ('b, 'c) tree -> ('a, 'c) tree
                    val first_const : 'a -> ('a, 'b) tree -> ('c, 'b) tree
                    val first_ignore : (unit, 'a) tree -> ('b, 'a) tree
                    val pure : 'a -> ('b, 'a) tree
                    val accumulator : ('a -> 'b -> 'c) -> (unit, 'b) tree -> ('a, 'c) tree
                    val spawning : ('a -> (unit, 'b) tasks) -> ('a, 'b) tree

                    spawning k runs as the list of tasks produced by applying k to the task's input

                    val accumulating : ('a -> 'b -> 'a) -> - (unit, 'c) tree list -> - ('a0, 'a1) tree list

                    accumulating f ts uses f to combine the output of each task into a running accumulator value

                    val collecting : (unit, 'a) tree list -> ('b list, 'b list) tree list

                    collecting ts pushes the outputs of each task onto a list

                    val collecting' : (unit, 'a) tree list -> ('b, 'c list) tasks

                    collecting' is like collecting, except with an empty initial list and a final List.rev step so that the results are in order; the result is a tasks rather than a list

                    val pp_summary : failure:bool -> ?show_anon:bool -> unit -> summary Fmt.t
                    val pp_state_out : 'a Fmt.t -> Stdlib.Format.formatter -> 'b st_out -> unit
                    + (unit, 'b) tree list -> + ('a, 'a) tree list

                    accumulating f ts uses f to combine the output of each task into a running accumulator value

                    val collecting : (unit, 'a) tree list -> ('a list, 'a list) tree list

                    collecting ts pushes the outputs of each task onto a list

                    val collecting' : (unit, 'a) tree list -> ('b, 'a list) tasks

                    collecting' is like collecting, except with an empty initial list and a final List.rev step so that the results are in order; the result is a tasks rather than a list

                    val pp_summary : failure:bool -> ?show_anon:bool -> unit -> summary Fmt.t
                    val pp_state_out : 'a Fmt.t -> Stdlib.Format.formatter -> 'a st_out -> unit
                    diff --git a/sig-builder-no-typ-dup/less-power/Test_runner/index.html b/sig-builder-no-typ-dup/less-power/Test_runner/index.html index d1d9bb0..7ae4b1d 100644 --- a/sig-builder-no-typ-dup/less-power/Test_runner/index.html +++ b/sig-builder-no-typ-dup/less-power/Test_runner/index.html @@ -1,2 +1,2 @@ -Test_runner (less-power.Test_runner)

                    Module Test_runner

                    Library for creating a runner, which then drives the testing process.

                    module Task : sig ... end

                    Set up, build, and run tests using first-class tasks.

                    module Std_task : sig ... end

                    Common tasks and tasks for the standard test setup.

                    module Entry_point : sig ... end

                    Entry points for creating test driver executables from a task tree.

                    module P_run = Common.P_run

                    Re-export of Common.P_run. Tasks spawning subprocesses can use parts of this module.

                    +Test_runner (less-power.Test_runner)

                    Module Test_runner

                    Library for creating a runner, which then drives the testing process.

                    module Task : sig ... end

                    Set up, build, and run tests using first-class tasks.

                    module Std_task : sig ... end

                    Common tasks and tasks for the standard test setup.

                    module Entry_point : sig ... end

                    Entry points for creating test driver executables from a task tree.

                    module P_run = Common.P_run

                    Re-export of Common.P_run. Tasks spawning subprocesses can use parts of this module.

                    diff --git a/sig-builder-no-typ-dup/less-power/Thread_counter/Counter/index.html b/sig-builder-no-typ-dup/less-power/Thread_counter/Counter/index.html index 905f115..436882a 100644 --- a/sig-builder-no-typ-dup/less-power/Thread_counter/Counter/index.html +++ b/sig-builder-no-typ-dup/less-power/Thread_counter/Counter/index.html @@ -1,10 +1,10 @@ -Counter (less-power.Thread_counter.Counter)

                    Module Thread_counter.Counter

                    val lock_if : bool -> Stdlib.Mutex.t -> (unit, 'a, 'a) Common.Ctx_util.t

                    Note: we enforce that spawned threads don't raise uncaught exceptions, which in theory changes the semantics of threads. The value of being able to report stray exceptions outweighs the slim chance anyone would rely on being able to ignore exceptions in threads.

                    type 'a finished =
                    1. | Return of 'a
                    2. | Uncaught of Common.Util.exn_info
                    3. | Overflow of int
                    type 'a state =
                    1. | Running
                    2. | Finished of 'a finished
                    type 'a group = {
                    1. mutable state : 'a state;
                    2. finished : Stdlib.Condition.t;
                    3. mutable thread_count : int;
                    4. thread_limit : int option;
                    5. owner : t;
                    }
                    and g =
                    1. | G : 'a group -> g
                    and t = {
                    1. mut : Stdlib.Mutex.t;
                    2. groups : g ThreadH.t;
                    }
                    val finish : ?lock:bool -> 'a group -> 'b finished -> unit
                    val try_finish : 'a group -> 'a finished -> unit
                    val try_return : 'a group -> 'b -> unit
                    val spawn_thread : +Counter (less-power.Thread_counter.Counter)

                    Module Thread_counter.Counter

                    val lock_if : bool -> Stdlib.Mutex.t -> (unit, 'a, 'a) Common.Ctx_util.t

                    Note: we enforce that spawned threads don't raise uncaught exceptions, which in theory changes the semantics of threads. The value of being able to report stray exceptions outweighs the slim chance anyone would rely on being able to ignore exceptions in threads.

                    type 'a finished =
                    1. | Return of 'a
                    2. | Uncaught of Common.Util.exn_info
                    3. | Overflow of int
                    type 'a state =
                    1. | Running
                    2. | Finished of 'a finished
                    type 'a group = {
                    1. mutable state : 'a state;
                    2. finished : Stdlib.Condition.t;
                    3. mutable thread_count : int;
                    4. thread_limit : int option;
                    5. owner : t;
                    }
                    and g =
                    1. | G : 'a group -> g
                    and t = {
                    1. mut : Stdlib.Mutex.t;
                    2. groups : g ThreadH.t;
                    }
                    val finish : ?lock:bool -> 'a group -> 'a finished -> unit
                    val try_finish : 'a group -> 'a finished -> unit
                    val try_return : 'a group -> 'a -> unit
                    val spawn_thread : ?lock:bool -> ?group:'a group -> t -> ('b -> unit) -> - 'c -> + 'b -> Thread.t
                    val create_counter : unit -> t
                    val create_group : ?thread_limit:int -> t -> 'a group
                    val get_thread_count : 'a group -> int
                    val join_group : leftover_thread_limit:int -> timeout:Mtime.span -> @@ -13,20 +13,20 @@ ?thread_limit:int -> t -> ('a -> 'b) -> - 'c -> + 'a -> ('b, Common.Util.exn_info) Stdlib.result group

                    Create a group that runs the given function, then sets the return value as the return value of the group.

                    val collect_thread_group : ?leftover_limit:(int * Mtime.span) -> 'a group -> - 'b finished * int

                    Wait for a group to finish then join its threads (join_group).

                    val check_thread_group_result : + 'a finished * int

                    Wait for a group to finish then join its threads (join_group).

                    val check_thread_group_result : ?leftover_limit:(int * Mtime.span) -> ('a, Common.Util.exn_info) Stdlib.result finished -> int -> - ('b, thread_group_err list) Stdlib.result

                    Check the return value of collect_thread_group

                    val run_in_thread_group : + ('a, thread_group_err list) Stdlib.result

                    Check the return value of collect_thread_group

                    val run_in_thread_group : ?thread_limit:int -> ?leftover_limit:(int * Mtime.span) -> t -> ('a -> 'b) -> - 'c -> - ('d, thread_group_err list) Stdlib.result
                    val string_of_thread_group_err : thread_group_err -> string
                    val string_of_thread_group_errs : thread_group_err list -> string
                    exception ThreadGroupErrs of thread_group_err list
                    val thread_group_result_to_exn : + 'a -> + ('b, thread_group_err list) Stdlib.result
                    val string_of_thread_group_err : thread_group_err -> string
                    val string_of_thread_group_errs : thread_group_err list -> string
                    exception ThreadGroupErrs of thread_group_err list
                    val thread_group_result_to_exn : ('a, thread_group_err list) Stdlib.result -> - 'b
                    + 'a
                    diff --git a/sig-builder-no-typ-dup/less-power/Thread_counter/CounterInstance/Thread/index.html b/sig-builder-no-typ-dup/less-power/Thread_counter/CounterInstance/Thread/index.html index ec5ccb4..1c55cca 100644 --- a/sig-builder-no-typ-dup/less-power/Thread_counter/CounterInstance/Thread/index.html +++ b/sig-builder-no-typ-dup/less-power/Thread_counter/CounterInstance/Thread/index.html @@ -1,7 +1,7 @@ -Thread (less-power.Thread_counter.CounterInstance.Thread)

                    Module CounterInstance.Thread

                    Like Stdlib.Thread, but with counted threads

                    include module type of struct include Thread end
                    type t = Thread.t
                    val self : unit -> t
                    val id : t -> int
                    exception Exit
                    val exit : unit -> unit
                    • deprecated Use 'raise Thread.Exit' instead.
                    val delay : float -> unit
                    val join : t -> unit
                    val yield : unit -> unit
                    val wait_timed_read : Unix.file_descr -> float -> bool
                    • deprecated Use Unix.select instead.
                    val wait_timed_write : Unix.file_descr -> float -> bool
                    • deprecated Use Unix.select instead.
                    val select : +Thread (less-power.Thread_counter.CounterInstance.Thread)

                    Module CounterInstance.Thread

                    Like Stdlib.Thread, but with counted threads

                    include module type of struct include Thread end
                    type t = Thread.t
                    val self : unit -> t
                    val id : t -> int
                    exception Exit
                    val exit : unit -> unit
                    • deprecated Use 'raise Thread.Exit' instead.
                    val delay : float -> unit
                    val join : t -> unit
                    val yield : unit -> unit
                    val wait_timed_read : Unix.file_descr -> float -> bool
                    • deprecated Use Unix.select instead.
                    val wait_timed_write : Unix.file_descr -> float -> bool
                    • deprecated Use Unix.select instead.
                    val select : Unix.file_descr list -> Unix.file_descr list -> Unix.file_descr list -> float -> - Unix.file_descr list * Unix.file_descr list * Unix.file_descr list
                    • deprecated Use Unix.select instead.
                    val wait_pid : int -> int * Unix.process_status
                    • deprecated Use Unix.waitpid instead.
                    val sigmask : Unix.sigprocmask_command -> int list -> int list
                    val wait_signal : int list -> int
                    val default_uncaught_exception_handler : exn -> unit
                    val set_uncaught_exception_handler : (exn -> unit) -> unit
                    val create : ('a -> 'b) -> 'c -> Thread.t
                    + Unix.file_descr list * Unix.file_descr list * Unix.file_descr list
                    • deprecated Use Unix.select instead.
                    val wait_pid : int -> int * Unix.process_status
                    • deprecated Use Unix.waitpid instead.
                    val sigmask : Unix.sigprocmask_command -> int list -> int list
                    val wait_signal : int list -> int
                    val default_uncaught_exception_handler : exn -> unit
                    val set_uncaught_exception_handler : (exn -> unit) -> unit
                    val create : ('a -> 'b) -> 'a -> Thread.t
                    diff --git a/sig-builder-no-typ-dup/less-power/Thread_counter/CounterInstance/index.html b/sig-builder-no-typ-dup/less-power/Thread_counter/CounterInstance/index.html index 3366c88..fc9ea4d 100644 --- a/sig-builder-no-typ-dup/less-power/Thread_counter/CounterInstance/index.html +++ b/sig-builder-no-typ-dup/less-power/Thread_counter/CounterInstance/index.html @@ -1,2 +1,2 @@ -CounterInstance (less-power.Thread_counter.CounterInstance)

                    Module Thread_counter.CounterInstance

                    Parameters

                    Signature

                    val instance : Counter.t
                    module Thread : sig ... end

                    Like Stdlib.Thread, but with counted threads

                    +CounterInstance (less-power.Thread_counter.CounterInstance)

                    Module Thread_counter.CounterInstance

                    Parameters

                    Signature

                    val instance : Counter.t
                    module Thread : sig ... end

                    Like Stdlib.Thread, but with counted threads

                    diff --git a/sig-builder-no-typ-dup/less-power/Thread_counter/Debug/index.html b/sig-builder-no-typ-dup/less-power/Thread_counter/Debug/index.html index a582147..5753373 100644 --- a/sig-builder-no-typ-dup/less-power/Thread_counter/Debug/index.html +++ b/sig-builder-no-typ-dup/less-power/Thread_counter/Debug/index.html @@ -1,2 +1,2 @@ -Debug (less-power.Thread_counter.Debug)

                    Module Thread_counter.Debug

                    val disabled_ : ('a, Stdlib.out_channel, 'b, unit) Stdlib.format4 -> 'c
                    val enabled_ : ('a, unit, string, unit) Stdlib.format4 -> 'b
                    val d_ : ('a, Stdlib.out_channel, 'b, unit) Stdlib.format4 -> 'a
                    val i_ : ('a, unit, string, unit) Stdlib.format4 -> 'a
                    +Debug (less-power.Thread_counter.Debug)

                    Module Thread_counter.Debug

                    val disabled_ : ('a, Stdlib.out_channel, 'b, unit) Stdlib.format4 -> 'a
                    val enabled_ : ('a, unit, string, unit) Stdlib.format4 -> 'a
                    val d_ : ('a, Stdlib.out_channel, 'b, unit) Stdlib.format4 -> 'a
                    val i_ : ('a, unit, string, unit) Stdlib.format4 -> 'a
                    diff --git a/sig-builder-no-typ-dup/less-power/Thread_counter/ThreadH/index.html b/sig-builder-no-typ-dup/less-power/Thread_counter/ThreadH/index.html index 74013c0..4b1f354 100644 --- a/sig-builder-no-typ-dup/less-power/Thread_counter/ThreadH/index.html +++ b/sig-builder-no-typ-dup/less-power/Thread_counter/ThreadH/index.html @@ -1,2 +1,2 @@ -ThreadH (less-power.Thread_counter.ThreadH)

                    Module Thread_counter.ThreadH

                    type key = Thread.t
                    type !'a t
                    val create : int -> 'a t
                    val clear : 'a t -> unit
                    val reset : 'a t -> unit
                    val copy : 'a t -> 'a t
                    val add : 'a t -> key -> 'a -> unit
                    val remove : 'a t -> key -> unit
                    val find : 'a t -> key -> 'a
                    val find_opt : 'a t -> key -> 'a option
                    val find_all : 'a t -> key -> 'a list
                    val replace : 'a t -> key -> 'a -> unit
                    val mem : 'a t -> key -> bool
                    val iter : (key -> 'a -> unit) -> 'a t -> unit
                    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
                    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
                    val length : 'a t -> int
                    val stats : 'a t -> Stdlib__Hashtbl.statistics
                    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
                    val to_seq_keys : 'a t -> key Stdlib.Seq.t
                    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
                    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
                    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
                    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
                    +ThreadH (less-power.Thread_counter.ThreadH)

                    Module Thread_counter.ThreadH

                    type key = Thread.t
                    type !'a t
                    val create : int -> 'a t
                    val clear : 'a t -> unit
                    val reset : 'a t -> unit
                    val copy : 'a t -> 'a t
                    val add : 'a t -> key -> 'a -> unit
                    val remove : 'a t -> key -> unit
                    val find : 'a t -> key -> 'a
                    val find_opt : 'a t -> key -> 'a option
                    val find_all : 'a t -> key -> 'a list
                    val replace : 'a t -> key -> 'a -> unit
                    val mem : 'a t -> key -> bool
                    val iter : (key -> 'a -> unit) -> 'a t -> unit
                    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
                    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
                    val length : 'a t -> int
                    val stats : 'a t -> Stdlib__Hashtbl.statistics
                    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
                    val to_seq_keys : 'a t -> key Stdlib.Seq.t
                    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
                    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
                    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
                    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
                    diff --git a/sig-builder-no-typ-dup/less-power/Thread_counter/index.html b/sig-builder-no-typ-dup/less-power/Thread_counter/index.html index 890e50e..7de0016 100644 --- a/sig-builder-no-typ-dup/less-power/Thread_counter/index.html +++ b/sig-builder-no-typ-dup/less-power/Thread_counter/index.html @@ -1,5 +1,2 @@ -Thread_counter (less-power.Thread_counter)

                    Module Thread_counter

                    val add_err : - 'e -> - ('a, 'e0 list) Stdlib.result -> - ('b, 'e0 list) Stdlib.result
                    module Debug : sig ... end
                    module ThreadH : sig ... end
                    module Counter : sig ... end
                    module CounterInstance () : sig ... end
                    +Thread_counter (less-power.Thread_counter)

                    Module Thread_counter

                    val add_err : 'e -> ('a, 'e list) Stdlib.result -> ('b, 'e list) Stdlib.result
                    module Debug : sig ... end
                    module ThreadH : sig ... end
                    module Counter : sig ... end
                    module CounterInstance () : sig ... end
                    diff --git a/sig-builder-no-typ-dup/less-power/Threads_alerts/Event_alerting/index.html b/sig-builder-no-typ-dup/less-power/Threads_alerts/Event_alerting/index.html index 9aa9fe8..12924e0 100644 --- a/sig-builder-no-typ-dup/less-power/Threads_alerts/Event_alerting/index.html +++ b/sig-builder-no-typ-dup/less-power/Threads_alerts/Event_alerting/index.html @@ -1,2 +1,2 @@ -Event_alerting (less-power.Threads_alerts.Event_alerting)

                    Module Threads_alerts.Event_alerting

                    type 'a channel = 'a Event.channel
                    type 'a event = 'a Event.event
                    include sig ... end
                    val new_channel : unit -> 'a channel

                    Return a new channel.

                    val send : 'a channel -> 'a -> unit event

                    send ch v returns the event consisting in sending the value v over the channel ch. The result value of this event is ().

                    val receive : 'a channel -> 'a event

                    receive ch returns the event consisting in receiving a value from the channel ch. The result value of this event is the value received.

                    val always : 'a -> 'a event

                    always v returns an event that is always ready for synchronization. The result value of this event is v.

                    val choose : 'a event list -> 'a event

                    choose evl returns the event that is the alternative of all the events in the list evl.

                    val wrap : 'a event -> ('a -> 'b) -> 'b event

                    wrap ev fn returns the event that performs the same communications as ev, then applies the post-processing function fn on the return value.

                    val wrap_abort : 'a event -> (unit -> unit) -> 'a event

                    wrap_abort ev fn returns the event that performs the same communications as ev, but if it is not selected the function fn is called after the synchronization.

                    val guard : (unit -> 'a event) -> 'a event

                    guard fn returns the event that, when synchronized, computes fn() and behaves as the resulting event. This enables computing events with side-effects at the time of the synchronization operation.

                    val sync : 'a event -> 'a

                    'Synchronize' on an event: offer all the communication possibilities specified in the event to the outside world, and block until one of the communications succeed. The result value of that communication is returned.

                    val select : 'a event list -> 'a

                    'Synchronize' on an alternative of events. select evl is shorthand for sync(choose evl).

                    val poll : 'a event -> 'a option

                    Non-blocking version of Event.sync: offer all the communication possibilities specified in the event to the outside world, and if one can take place immediately, perform it and return Some r where r is the result value of that communication. Otherwise, return None without blocking.

                    +Event_alerting (less-power.Threads_alerts.Event_alerting)

                    Module Threads_alerts.Event_alerting

                    type 'a channel = 'a Event.channel
                    type 'a event = 'a Event.event
                    include sig ... end
                    val new_channel : unit -> 'a channel

                    Return a new channel.

                    val send : 'a channel -> 'a -> unit event

                    send ch v returns the event consisting in sending the value v over the channel ch. The result value of this event is ().

                    val receive : 'a channel -> 'a event

                    receive ch returns the event consisting in receiving a value from the channel ch. The result value of this event is the value received.

                    val always : 'a -> 'a event

                    always v returns an event that is always ready for synchronization. The result value of this event is v.

                    val choose : 'a event list -> 'a event

                    choose evl returns the event that is the alternative of all the events in the list evl.

                    val wrap : 'a event -> ('a -> 'b) -> 'b event

                    wrap ev fn returns the event that performs the same communications as ev, then applies the post-processing function fn on the return value.

                    val wrap_abort : 'a event -> (unit -> unit) -> 'a event

                    wrap_abort ev fn returns the event that performs the same communications as ev, but if it is not selected the function fn is called after the synchronization.

                    val guard : (unit -> 'a event) -> 'a event

                    guard fn returns the event that, when synchronized, computes fn() and behaves as the resulting event. This enables computing events with side-effects at the time of the synchronization operation.

                    val sync : 'a event -> 'a

                    'Synchronize' on an event: offer all the communication possibilities specified in the event to the outside world, and block until one of the communications succeed. The result value of that communication is returned.

                    val select : 'a event list -> 'a

                    'Synchronize' on an alternative of events. select evl is shorthand for sync(choose evl).

                    val poll : 'a event -> 'a option

                    Non-blocking version of Event.sync: offer all the communication possibilities specified in the event to the outside world, and if one can take place immediately, perform it and return Some r where r is the result value of that communication. Otherwise, return None without blocking.

                    diff --git a/sig-builder-no-typ-dup/less-power/Threads_alerts/Thread_alerting/index.html b/sig-builder-no-typ-dup/less-power/Threads_alerts/Thread_alerting/index.html index cfb5db8..bdb0bc0 100644 --- a/sig-builder-no-typ-dup/less-power/Threads_alerts/Thread_alerting/index.html +++ b/sig-builder-no-typ-dup/less-power/Threads_alerts/Thread_alerting/index.html @@ -1,5 +1,5 @@ -Thread_alerting (less-power.Threads_alerts.Thread_alerting)

                    Module Threads_alerts.Thread_alerting

                    type t = Thread.t
                    include sig ... end
                    val create : ('a -> 'b) -> 'a -> t

                    Thread.create funct arg creates a new thread of control, in which the function application funct arg is executed concurrently with the other threads of the domain. The application of Thread.create returns the handle of the newly created thread. The new thread terminates when the application funct arg returns, either normally or by raising the Thread.Exit exception or by raising any other uncaught exception. In the last case, the uncaught exception is printed on standard error, but not propagated back to the parent thread. Similarly, the result of the application funct arg is discarded and not directly accessible to the parent thread.

                    See also Domain.spawn if you want parallel execution instead.

                    val self : unit -> t

                    Return the handle for the thread currently executing.

                    val id : t -> int

                    Return the identifier of the given thread. A thread identifier is an integer that identifies uniquely the thread. It can be used to build data structures indexed by threads.

                    exception Exit

                    Exception raised by user code to initiate termination of the current thread. In a thread created by Thread.create funct arg, if the Thread.Exit exception reaches the top of the application funct arg, it has the effect of terminating the current thread silently. In other contexts, there is no implicit handling of the Thread.Exit exception.

                    val exit : unit -> unit

                    Raise the Thread.Exit exception. In a thread created by Thread.create, this will cause the thread to terminate prematurely, unless the thread function handles the exception itself. Fun.protect finalizers and catch-all exception handlers will be executed.

                    To make it clear that an exception is raised and will trigger finalizers and catch-all exception handlers, it is recommended to write raise Thread.Exit instead of Thread.exit ().

                    • before 5.0

                      A different implementation was used, not based on raising an exception, and not running finalizers and catch-all handlers. The previous implementation had a different behavior when called outside of a thread created by Thread.create.

                    • deprecated Use 'raise Thread.Exit' instead.
                    val delay : float -> unit

                    delay d suspends the execution of the calling thread for d seconds. The other program threads continue to run during this time.

                    val join : t -> unit

                    join th suspends the execution of the calling thread until the thread th has terminated.

                    val yield : unit -> unit

                    Re-schedule the calling thread without suspending it. This function can be used to give scheduling hints, telling the scheduler that now is a good time to switch to other threads.

                    val default_uncaught_exception_handler : exn -> unit

                    Thread.default_uncaught_exception_handler will print the thread's id, exception and backtrace (if available).

                    val wait_timed_read : Unix.file_descr -> float -> bool

                    See Thread.wait_timed_write.

                    • deprecated Use Unix.select instead.
                    • alert unsafe This function is not permitted
                    val wait_timed_write : Unix.file_descr -> float -> bool

                    Suspend the execution of the calling thread until at least one character or EOF is available for reading (wait_timed_read) or one character can be written without blocking (wait_timed_write) on the given Unix file descriptor. Wait for at most the amount of time given as second argument (in seconds). Return true if the file descriptor is ready for input/output and false if the timeout expired. The same functionality can be achieved with Unix.select.

                    • deprecated Use Unix.select instead.
                    • alert unsafe This function is not permitted
                    val select : +Thread_alerting (less-power.Threads_alerts.Thread_alerting)

                    Module Threads_alerts.Thread_alerting

                    type t = Thread.t
                    include sig ... end
                    val create : ('a -> 'b) -> 'a -> t

                    Thread.create funct arg creates a new thread of control, in which the function application funct arg is executed concurrently with the other threads of the domain. The application of Thread.create returns the handle of the newly created thread. The new thread terminates when the application funct arg returns, either normally or by raising the Thread.Exit exception or by raising any other uncaught exception. In the last case, the uncaught exception is printed on standard error, but not propagated back to the parent thread. Similarly, the result of the application funct arg is discarded and not directly accessible to the parent thread.

                    See also Domain.spawn if you want parallel execution instead.

                    val self : unit -> t

                    Return the handle for the thread currently executing.

                    val id : t -> int

                    Return the identifier of the given thread. A thread identifier is an integer that identifies uniquely the thread. It can be used to build data structures indexed by threads.

                    exception Exit

                    Exception raised by user code to initiate termination of the current thread. In a thread created by Thread.create funct arg, if the Thread.Exit exception reaches the top of the application funct arg, it has the effect of terminating the current thread silently. In other contexts, there is no implicit handling of the Thread.Exit exception.

                    val exit : unit -> unit

                    Raise the Thread.Exit exception. In a thread created by Thread.create, this will cause the thread to terminate prematurely, unless the thread function handles the exception itself. Fun.protect finalizers and catch-all exception handlers will be executed.

                    To make it clear that an exception is raised and will trigger finalizers and catch-all exception handlers, it is recommended to write raise Thread.Exit instead of Thread.exit ().

                    • before 5.0

                      A different implementation was used, not based on raising an exception, and not running finalizers and catch-all handlers. The previous implementation had a different behavior when called outside of a thread created by Thread.create.

                    • deprecated Use 'raise Thread.Exit' instead.
                    val delay : float -> unit

                    delay d suspends the execution of the calling thread for d seconds. The other program threads continue to run during this time.

                    val join : t -> unit

                    join th suspends the execution of the calling thread until the thread th has terminated.

                    val yield : unit -> unit

                    Re-schedule the calling thread without suspending it. This function can be used to give scheduling hints, telling the scheduler that now is a good time to switch to other threads.

                    val default_uncaught_exception_handler : exn -> unit

                    Thread.default_uncaught_exception_handler will print the thread's id, exception and backtrace (if available).

                    val wait_timed_read : Unix.file_descr -> float -> bool

                    See Thread.wait_timed_write.

                    • deprecated Use Unix.select instead.
                    • alert unsafe This function is not permitted
                    val wait_timed_write : Unix.file_descr -> float -> bool

                    Suspend the execution of the calling thread until at least one character or EOF is available for reading (wait_timed_read) or one character can be written without blocking (wait_timed_write) on the given Unix file descriptor. Wait for at most the amount of time given as second argument (in seconds). Return true if the file descriptor is ready for input/output and false if the timeout expired. The same functionality can be achieved with Unix.select.

                    • deprecated Use Unix.select instead.
                    • alert unsafe This function is not permitted
                    val select : Unix.file_descr list -> Unix.file_descr list -> Unix.file_descr list -> diff --git a/sig-builder-no-typ-dup/less-power/Threads_alerts/index.html b/sig-builder-no-typ-dup/less-power/Threads_alerts/index.html index 6b48169..a8b9ac2 100644 --- a/sig-builder-no-typ-dup/less-power/Threads_alerts/index.html +++ b/sig-builder-no-typ-dup/less-power/Threads_alerts/index.html @@ -1,2 +1,2 @@ -Threads_alerts (less-power.Threads_alerts)

                    Module Threads_alerts

                    Like Stdlib_alerts, but for threads. This is separate to avoid an unnecessary dependency on the threads library

                    module type Thread_alerting = sig ... end
                    module type Event_alerting = sig ... end
                    +Threads_alerts (less-power.Threads_alerts)

                    Module Threads_alerts

                    Like Stdlib_alerts, but for threads. This is separate to avoid an unnecessary dependency on the threads library

                    module type Thread_alerting = sig ... end
                    module type Event_alerting = sig ... end
                    diff --git a/sig-builder-no-typ-dup/less-power/Threads_alerts/module-type-Event_alerting/index.html b/sig-builder-no-typ-dup/less-power/Threads_alerts/module-type-Event_alerting/index.html index 1b9cb25..3f4bef1 100644 --- a/sig-builder-no-typ-dup/less-power/Threads_alerts/module-type-Event_alerting/index.html +++ b/sig-builder-no-typ-dup/less-power/Threads_alerts/module-type-Event_alerting/index.html @@ -1,2 +1,2 @@ -Event_alerting (less-power.Threads_alerts.Event_alerting)

                    Module type Threads_alerts.Event_alerting

                    type 'a channel = 'a Event.channel
                    type 'a event = 'a Event.event
                    include sig ... end
                    val new_channel : unit -> 'a channel

                    Return a new channel.

                    val send : 'a channel -> 'a -> unit event

                    send ch v returns the event consisting in sending the value v over the channel ch. The result value of this event is ().

                    val receive : 'a channel -> 'a event

                    receive ch returns the event consisting in receiving a value from the channel ch. The result value of this event is the value received.

                    val always : 'a -> 'a event

                    always v returns an event that is always ready for synchronization. The result value of this event is v.

                    val choose : 'a event list -> 'a event

                    choose evl returns the event that is the alternative of all the events in the list evl.

                    val wrap : 'a event -> ('a -> 'b) -> 'b event

                    wrap ev fn returns the event that performs the same communications as ev, then applies the post-processing function fn on the return value.

                    val wrap_abort : 'a event -> (unit -> unit) -> 'a event

                    wrap_abort ev fn returns the event that performs the same communications as ev, but if it is not selected the function fn is called after the synchronization.

                    val guard : (unit -> 'a event) -> 'a event

                    guard fn returns the event that, when synchronized, computes fn() and behaves as the resulting event. This enables computing events with side-effects at the time of the synchronization operation.

                    val sync : 'a event -> 'a

                    'Synchronize' on an event: offer all the communication possibilities specified in the event to the outside world, and block until one of the communications succeed. The result value of that communication is returned.

                    val select : 'a event list -> 'a

                    'Synchronize' on an alternative of events. select evl is shorthand for sync(choose evl).

                    val poll : 'a event -> 'a option

                    Non-blocking version of Event.sync: offer all the communication possibilities specified in the event to the outside world, and if one can take place immediately, perform it and return Some r where r is the result value of that communication. Otherwise, return None without blocking.

                    +Event_alerting (less-power.Threads_alerts.Event_alerting)

                    Module type Threads_alerts.Event_alerting

                    type 'a channel = 'a Event.channel
                    type 'a event = 'a Event.event
                    include sig ... end
                    val new_channel : unit -> 'a channel

                    Return a new channel.

                    val send : 'a channel -> 'a -> unit event

                    send ch v returns the event consisting in sending the value v over the channel ch. The result value of this event is ().

                    val receive : 'a channel -> 'a event

                    receive ch returns the event consisting in receiving a value from the channel ch. The result value of this event is the value received.

                    val always : 'a -> 'a event

                    always v returns an event that is always ready for synchronization. The result value of this event is v.

                    val choose : 'a event list -> 'a event

                    choose evl returns the event that is the alternative of all the events in the list evl.

                    val wrap : 'a event -> ('a -> 'b) -> 'b event

                    wrap ev fn returns the event that performs the same communications as ev, then applies the post-processing function fn on the return value.

                    val wrap_abort : 'a event -> (unit -> unit) -> 'a event

                    wrap_abort ev fn returns the event that performs the same communications as ev, but if it is not selected the function fn is called after the synchronization.

                    val guard : (unit -> 'a event) -> 'a event

                    guard fn returns the event that, when synchronized, computes fn() and behaves as the resulting event. This enables computing events with side-effects at the time of the synchronization operation.

                    val sync : 'a event -> 'a

                    'Synchronize' on an event: offer all the communication possibilities specified in the event to the outside world, and block until one of the communications succeed. The result value of that communication is returned.

                    val select : 'a event list -> 'a

                    'Synchronize' on an alternative of events. select evl is shorthand for sync(choose evl).

                    val poll : 'a event -> 'a option

                    Non-blocking version of Event.sync: offer all the communication possibilities specified in the event to the outside world, and if one can take place immediately, perform it and return Some r where r is the result value of that communication. Otherwise, return None without blocking.

                    diff --git a/sig-builder-no-typ-dup/less-power/Threads_alerts/module-type-Thread_alerting/index.html b/sig-builder-no-typ-dup/less-power/Threads_alerts/module-type-Thread_alerting/index.html index a951323..8285352 100644 --- a/sig-builder-no-typ-dup/less-power/Threads_alerts/module-type-Thread_alerting/index.html +++ b/sig-builder-no-typ-dup/less-power/Threads_alerts/module-type-Thread_alerting/index.html @@ -1,5 +1,5 @@ -Thread_alerting (less-power.Threads_alerts.Thread_alerting)

                    Module type Threads_alerts.Thread_alerting

                    type t = Thread.t
                    include sig ... end
                    val create : ('a -> 'b) -> 'a -> t

                    Thread.create funct arg creates a new thread of control, in which the function application funct arg is executed concurrently with the other threads of the domain. The application of Thread.create returns the handle of the newly created thread. The new thread terminates when the application funct arg returns, either normally or by raising the Thread.Exit exception or by raising any other uncaught exception. In the last case, the uncaught exception is printed on standard error, but not propagated back to the parent thread. Similarly, the result of the application funct arg is discarded and not directly accessible to the parent thread.

                    See also Domain.spawn if you want parallel execution instead.

                    val self : unit -> t

                    Return the handle for the thread currently executing.

                    val id : t -> int

                    Return the identifier of the given thread. A thread identifier is an integer that identifies uniquely the thread. It can be used to build data structures indexed by threads.

                    exception Exit

                    Exception raised by user code to initiate termination of the current thread. In a thread created by Thread.create funct arg, if the Thread.Exit exception reaches the top of the application funct arg, it has the effect of terminating the current thread silently. In other contexts, there is no implicit handling of the Thread.Exit exception.

                    val exit : unit -> unit

                    Raise the Thread.Exit exception. In a thread created by Thread.create, this will cause the thread to terminate prematurely, unless the thread function handles the exception itself. Fun.protect finalizers and catch-all exception handlers will be executed.

                    To make it clear that an exception is raised and will trigger finalizers and catch-all exception handlers, it is recommended to write raise Thread.Exit instead of Thread.exit ().

                    • before 5.0

                      A different implementation was used, not based on raising an exception, and not running finalizers and catch-all handlers. The previous implementation had a different behavior when called outside of a thread created by Thread.create.

                    • deprecated Use 'raise Thread.Exit' instead.
                    val delay : float -> unit

                    delay d suspends the execution of the calling thread for d seconds. The other program threads continue to run during this time.

                    val join : t -> unit

                    join th suspends the execution of the calling thread until the thread th has terminated.

                    val yield : unit -> unit

                    Re-schedule the calling thread without suspending it. This function can be used to give scheduling hints, telling the scheduler that now is a good time to switch to other threads.

                    val default_uncaught_exception_handler : exn -> unit

                    Thread.default_uncaught_exception_handler will print the thread's id, exception and backtrace (if available).

                    val wait_timed_read : Unix.file_descr -> float -> bool

                    See Thread.wait_timed_write.

                    • deprecated Use Unix.select instead.
                    • alert unsafe This function is not permitted
                    val wait_timed_write : Unix.file_descr -> float -> bool

                    Suspend the execution of the calling thread until at least one character or EOF is available for reading (wait_timed_read) or one character can be written without blocking (wait_timed_write) on the given Unix file descriptor. Wait for at most the amount of time given as second argument (in seconds). Return true if the file descriptor is ready for input/output and false if the timeout expired. The same functionality can be achieved with Unix.select.

                    • deprecated Use Unix.select instead.
                    • alert unsafe This function is not permitted
                    val select : +Thread_alerting (less-power.Threads_alerts.Thread_alerting)

                    Module type Threads_alerts.Thread_alerting

                    type t = Thread.t
                    include sig ... end
                    val create : ('a -> 'b) -> 'a -> t

                    Thread.create funct arg creates a new thread of control, in which the function application funct arg is executed concurrently with the other threads of the domain. The application of Thread.create returns the handle of the newly created thread. The new thread terminates when the application funct arg returns, either normally or by raising the Thread.Exit exception or by raising any other uncaught exception. In the last case, the uncaught exception is printed on standard error, but not propagated back to the parent thread. Similarly, the result of the application funct arg is discarded and not directly accessible to the parent thread.

                    See also Domain.spawn if you want parallel execution instead.

                    val self : unit -> t

                    Return the handle for the thread currently executing.

                    val id : t -> int

                    Return the identifier of the given thread. A thread identifier is an integer that identifies uniquely the thread. It can be used to build data structures indexed by threads.

                    exception Exit

                    Exception raised by user code to initiate termination of the current thread. In a thread created by Thread.create funct arg, if the Thread.Exit exception reaches the top of the application funct arg, it has the effect of terminating the current thread silently. In other contexts, there is no implicit handling of the Thread.Exit exception.

                    val exit : unit -> unit

                    Raise the Thread.Exit exception. In a thread created by Thread.create, this will cause the thread to terminate prematurely, unless the thread function handles the exception itself. Fun.protect finalizers and catch-all exception handlers will be executed.

                    To make it clear that an exception is raised and will trigger finalizers and catch-all exception handlers, it is recommended to write raise Thread.Exit instead of Thread.exit ().

                    • before 5.0

                      A different implementation was used, not based on raising an exception, and not running finalizers and catch-all handlers. The previous implementation had a different behavior when called outside of a thread created by Thread.create.

                    • deprecated Use 'raise Thread.Exit' instead.
                    val delay : float -> unit

                    delay d suspends the execution of the calling thread for d seconds. The other program threads continue to run during this time.

                    val join : t -> unit

                    join th suspends the execution of the calling thread until the thread th has terminated.

                    val yield : unit -> unit

                    Re-schedule the calling thread without suspending it. This function can be used to give scheduling hints, telling the scheduler that now is a good time to switch to other threads.

                    val default_uncaught_exception_handler : exn -> unit

                    Thread.default_uncaught_exception_handler will print the thread's id, exception and backtrace (if available).

                    val wait_timed_read : Unix.file_descr -> float -> bool

                    See Thread.wait_timed_write.

                    • deprecated Use Unix.select instead.
                    • alert unsafe This function is not permitted
                    val wait_timed_write : Unix.file_descr -> float -> bool

                    Suspend the execution of the calling thread until at least one character or EOF is available for reading (wait_timed_read) or one character can be written without blocking (wait_timed_write) on the given Unix file descriptor. Wait for at most the amount of time given as second argument (in seconds). Return true if the file descriptor is ready for input/output and false if the timeout expired. The same functionality can be achieved with Unix.select.

                    • deprecated Use Unix.select instead.
                    • alert unsafe This function is not permitted
                    val select : Unix.file_descr list -> Unix.file_descr list -> Unix.file_descr list -> diff --git a/sig-builder-no-typ-dup/less-power/index.html b/sig-builder-no-typ-dup/less-power/index.html index 7d5bcdc..9470e57 100644 --- a/sig-builder-no-typ-dup/less-power/index.html +++ b/sig-builder-no-typ-dup/less-power/index.html @@ -1,2 +1,2 @@ -index (less-power.index)

                    Less Power

                    Framework for sandboxed testing of OCaml code.

                    This framework consists of a number of libraries and executables for testing untrusted OCaml code. Designed for running programming exercises fully automatically and at scale.

                    Components

                    The following public components are included in the package:

                    • Ast_check AST checker.
                    • Test_lib Library of common functionality for writing tests.
                    • Test_runner Library for creating a runner, which then drives the testing process.

                    Stdlib variants and overrides:

                    • Stdlib_alerts Variants of Stdlib, but with signature items that can be restricted annotated with alerts.
                    • Stdlib_components Adapted from Stdlib, with different components in different modules. In particular, a safe (pure) subset of OCaml features can be enabled by opening a subset of modules defined here.
                    • Std_overrides Ready-to-use modules for replacing the default pervasives, using -open.

                    Internal Components

                    The following components are intended for use within framework code only:

                    • Common Functionality common to multiple components.
                    +index (less-power.index)

                    Less Power

                    Framework for sandboxed testing of OCaml code.

                    This framework consists of a number of libraries and executables for testing untrusted OCaml code. Designed for running programming exercises fully automatically and at scale.

                    Components

                    The following public components are included in the package:

                    • Ast_check AST checker.
                    • Test_lib Library of common functionality for writing tests.
                    • Test_runner Library for creating a runner, which then drives the testing process.

                    Stdlib variants and overrides:

                    • Stdlib_alerts Variants of Stdlib, but with signature items that can be restricted annotated with alerts.
                    • Stdlib_components Adapted from Stdlib, with different components in different modules. In particular, a safe (pure) subset of OCaml features can be enabled by opening a subset of modules defined here.
                    • Std_overrides Ready-to-use modules for replacing the default pervasives, using -open.

                    Internal Components

                    The following components are intended for use within framework code only:

                    • Common Functionality common to multiple components.
                    diff --git a/sig-builder-no-typ-dup/less-power/variants_and_overrides.html b/sig-builder-no-typ-dup/less-power/variants_and_overrides.html index 6c41a35..3f78515 100644 --- a/sig-builder-no-typ-dup/less-power/variants_and_overrides.html +++ b/sig-builder-no-typ-dup/less-power/variants_and_overrides.html @@ -1,2 +1,2 @@ -variants_and_overrides (less-power.variants_and_overrides)

                    Stdlib Variants and Overrides

                    Modules and tools for overriding which standard library values are available to student code.

                    Stdlib variants

                    Variants of Stdlib. These are modules that contain values like ( = ) and further modules like List.

                    • Stdlib_alerts Variants of Stdlib, but with signature items that can be restricted annotated with alerts.
                    • Stdlib_components Adapted from Stdlib, with different components in different modules. In particular, a safe (pure) subset of OCaml features can be enabled by opening a subset of modules defined here.

                    Prefer Stdlib_alerts for new code. Unlike Stdlib_components, it provides feedback beyond just Error: Unbound value if a prohibited item is used.

                    Modules for opening at the top level

                    Modules that are intended to be opened at the top level (what the compiler calls "pervasives"). Usually this contains a module called Stdlib, as well as the contents of that module (e.g. via open). It may also contain e.g. a module called Thread.

                    • Std_overrides Ready-to-use modules for replacing the default pervasives, using -open.

                    Implementation modules

                    • Signature_builder Library and PPX rewriter for building interfaces from existing interfaces by selectively adding and removing interface items.
                    +variants_and_overrides (less-power.variants_and_overrides)

                    Stdlib Variants and Overrides

                    Modules and tools for overriding which standard library values are available to student code.

                    Stdlib variants

                    Variants of Stdlib. These are modules that contain values like ( = ) and further modules like List.

                    • Stdlib_alerts Variants of Stdlib, but with signature items that can be restricted annotated with alerts.
                    • Stdlib_components Adapted from Stdlib, with different components in different modules. In particular, a safe (pure) subset of OCaml features can be enabled by opening a subset of modules defined here.

                    Prefer Stdlib_alerts for new code. Unlike Stdlib_components, it provides feedback beyond just Error: Unbound value if a prohibited item is used.

                    Modules for opening at the top level

                    Modules that are intended to be opened at the top level (what the compiler calls "pervasives"). Usually this contains a module called Stdlib, as well as the contents of that module (e.g. via open). It may also contain e.g. a module called Thread.

                    • Std_overrides Ready-to-use modules for replacing the default pervasives, using -open.

                    Implementation modules

                    • Signature_builder Library and PPX rewriter for building interfaces from existing interfaces by selectively adding and removing interface items.
                    diff --git a/sig-builder-no-typ-dup/odoc.support/odoc.css b/sig-builder-no-typ-dup/odoc.support/odoc.css index 71148de..15240b5 100644 --- a/sig-builder-no-typ-dup/odoc.support/odoc.css +++ b/sig-builder-no-typ-dup/odoc.support/odoc.css @@ -1,7 +1,7 @@ @charset "UTF-8"; /* Copyright (c) 2016 The odoc contributors. All rights reserved. Distributed under the ISC license, see terms at the end of the file. - odoc 2.4.2 */ + odoc 2.4.3 */ /* Fonts */ /* noticia-text-regular - latin */