diff --git a/dev/lwt/Lwt/index.html b/dev/lwt/Lwt/index.html index c3795c40..9910e9cd 100644 --- a/dev/lwt/Lwt/index.html +++ b/dev/lwt/Lwt/index.html @@ -194,7 +194,7 @@ let () = Lwt_io.printl line end -(* ocamlfind opt -linkpkg -thread -package lwt_ppx,lwt.unix code.ml && ./a.out *)

In this version, if I/O in show_nag fails with an exception, the exception is printed by Lwt.async, and then the program exits.

The general rule for when to use Lwt.async is:

val async_exception_hook : (exn -> unit) ref

Reference to a function, to be called on an "unhandled" exception.

This reference is used by Lwt.async, Lwt.on_cancel, Lwt.on_success, Lwt.on_failure, Lwt.on_termination, Lwt.on_any, Lwt_react.of_stream, and the deprecated Lwt.ignore_result.

The initial, default implementation prints the exception, then terminates the process with non-zero exit status, as if the exception had reached the top level of the program:

let () = Lwt.async (fun () -> raise Exit)
+(* ocamlfind opt -linkpkg -thread -package lwt_ppx,lwt.unix code.ml && ./a.out *)

In this version, if I/O in show_nag fails with an exception, the exception is printed by Lwt.async, and then the program exits.

The general rule for when to use Lwt.async is:

val async_exception_hook : (exn -> unit) Stdlib.ref

Reference to a function, to be called on an "unhandled" exception.

This reference is used by Lwt.async, Lwt.on_cancel, Lwt.on_success, Lwt.on_failure, Lwt.on_termination, Lwt.on_any, Lwt_react.of_stream, and the deprecated Lwt.ignore_result.

The initial, default implementation prints the exception, then terminates the process with non-zero exit status, as if the exception had reached the top level of the program:

let () = Lwt.async (fun () -> raise Exit)
 
 (* ocamlfind opt -linkpkg -package lwt code.ml && ./a.out *)

produces in the output:

Fatal error: exception Stdlib.Exit

If you are writing an application, you are welcome to reassign the reference, and replace the function with something more appropriate for your needs.

If you are writing a library, you should leave this reference alone. Its behavior should be determined by the application.

Concurrency

Multiple wait

val both : 'a t -> 'b t -> ('a * 'b) t

Lwt.both p_1 p_2 returns a promise that is pending until both promises p_1 and p_2 become resolved.

let () =
   let p_1 =
@@ -281,7 +281,7 @@ let () =
     (fun line -> Lwt.return (int_of_string line))

As with Lwt.bind, sequences of calls to Lwt.map result in excessive indentation and parentheses. The recommended syntactic sugar for avoiding this is the >|= operator, which comes from module Lwt.Infix:

open Lwt.Infix
 
 let read_int : unit -> int Lwt.t = fun () ->
-  Lwt_io.(read_line stdin) >|= int_of_string

The detailed operation follows. For consistency with the promises in Lwt.bind, the two promises involved are named p_1 and p_3:

Lwt.map returns a promise p_3. p_3 starts out pending. It is resolved as follows:

val on_success : 'a t -> ('a -> unit) -> unit

Lwt.on_success p f makes it so that f will run when p is fulfilled.

It is similar to Lwt.bind, except no new promises are created. f is a plain, arbitrary function attached to p, to perform some side effect.

If f raises an exception, it is passed to !Lwt.async_exception_hook. By default, this will terminate the process.

val on_failure : _ t -> (exn -> unit) -> unit

Lwt.on_failure p f makes it so that f will run when p is rejected.

It is similar to Lwt.catch, except no new promises are created.

If f raises an exception, it is passed to !Lwt.async_exception_hook. By default, this will terminate the process.

val on_termination : _ t -> (unit -> unit) -> unit

Lwt.on_termination p f makes it so that f will run when p is resolved – that is, fulfilled or rejected.

It is similar to Lwt.finalize, except no new promises are created.

If f raises an exception, it is passed to !Lwt.async_exception_hook. By default, this will terminate the process.

val on_any : 'a t -> ('a -> unit) -> (exn -> unit) -> unit

Lwt.on_any p f g makes it so that:

It is similar to Lwt.try_bind, except no new promises are created.

If f or g raise an exception, the exception is passed to !Lwt.async_exception_hook. By default, this will terminate the process.

Infix operators

module Infix : sig ... end

This module provides several infix operators for making programming with Lwt more convenient.

module Let_syntax : sig ... end
module Syntax : sig ... end

Pre-allocated promises

val return_unit : unit t

Lwt.return_unit is defined as Lwt.return (), but this definition is evaluated only once, during initialization of module Lwt, at the beginning of your program.

This means the promise is allocated only once. By contrast, each time Lwt.return () is evaluated, it allocates a new promise.

It is recommended to use Lwt.return_unit only where you know the allocations caused by an instance of Lwt.return () are a performance bottleneck. Generally, the cost of I/O tends to dominate the cost of Lwt.return () anyway.

In future Lwt, we hope to perform this optimization, of using a single, pre-allocated promise, automatically, wherever Lwt.return () is written.

val return_none : _ option t

Lwt.return_none is like Lwt.return_unit, but for Lwt.return None.

val return_nil : _ list t

Lwt.return_nil is like Lwt.return_unit, but for Lwt.return [].

val return_true : bool t

Lwt.return_true is like Lwt.return_unit, but for Lwt.return true.

val return_false : bool t

Lwt.return_false is like Lwt.return_unit, but for Lwt.return false.

Trivial promises

val return_some : 'a -> 'a option t

Counterpart to Lwt.return_none. However, unlike Lwt.return_none, this function performs no optimization. This is because it takes an argument, so it cannot be evaluated at initialization time, at which time the argument is not yet available.

val return_ok : 'a -> ('a, _) result t

Like Lwt.return_some, this function performs no optimization.

val return_error : 'e -> (_, 'e) result t

Like Lwt.return_some, this function performs no optimization.

val fail_with : string -> _ t

Lwt.fail_with s is an abbreviation for

Lwt.fail (Stdlib.Failure s)

In most cases, it is better to use failwith s from the standard library. See Lwt.fail for an explanation.

val fail_invalid_arg : string -> _ t

Lwt.invalid_arg s is an abbreviation for

Lwt.fail (Stdlib.Invalid_argument s)

In most cases, it is better to use invalid_arg s from the standard library. See Lwt.fail for an explanation.

Result type

A resolved promise of type 'a Lwt.t is either fulfilled with a value of type 'a, or rejected with an exception.

This corresponds to the cases of a ('a, exn)Stdlib.result: fulfilled corresponds to Ok of 'a, and rejected corresponds to Error of exn.

For Lwt programming with result where the Error constructor can carry arbitrary error types, see module Lwt_result.

val of_result : ('a, exn) result -> 'a t

Lwt.of_result r converts an r to a resolved promise.

val wakeup_later_result : 'a u -> ('a, exn) result -> unit

Lwt.wakeup_later_result r result resolves the pending promise p associated to resolver r, according to result:

If p is not pending, Lwt.wakeup_later_result raises Stdlib.Invalid_argument _, except if p is canceled. If p is canceled, Lwt.wakeup_later_result has no effect.

State query

type 'a state =
  1. | Return of 'a
  2. | Fail of exn
  3. | Sleep
val state : 'a t -> 'a state

Lwt.state p evaluates to the current state of promise p:

The constructor names are historical holdovers.

Deprecated

Implicit callback arguments

Using this mechanism is discouraged, because it is non-syntactic, and because it manipulates hidden state in module Lwt. It is recommended instead to pass additional values explicitly in tuples, or maintain explicit associative maps for them.

type 'a key

Keys into the implicit callback argument map, for implicit arguments of type 'a option.

The keys are abstract, but they are basically integers that are all distinct from each other.

See Lwt.with_value.

val new_key : unit -> 'a key

Creates a fresh implicit callback argument key.

The key is distinct from any other key created by the current process. The value None of type 'a option is immediately associated with the key.

See Lwt.with_value.

val get : 'a key -> 'a option

Retrieves the value currently associated with the given implicit callback argument key.

See Lwt.with_value.

val with_value : 'a key -> 'a option -> (unit -> 'b) -> 'b

Lwt.with_value k v f sets k to v in Lwt's internal implicit callback argument map, then runs f (), then restores the previous value associated with k.

Lwt maintains a single, global map, that can be used to “pass” extra arguments to callbacks:

let () =
+  Lwt_io.(read_line stdin) >|= int_of_string

The detailed operation follows. For consistency with the promises in Lwt.bind, the two promises involved are named p_1 and p_3:

Lwt.map returns a promise p_3. p_3 starts out pending. It is resolved as follows:

val on_success : 'a t -> ('a -> unit) -> unit

Lwt.on_success p f makes it so that f will run when p is fulfilled.

It is similar to Lwt.bind, except no new promises are created. f is a plain, arbitrary function attached to p, to perform some side effect.

If f raises an exception, it is passed to !Lwt.async_exception_hook. By default, this will terminate the process.

val on_failure : _ t -> (exn -> unit) -> unit

Lwt.on_failure p f makes it so that f will run when p is rejected.

It is similar to Lwt.catch, except no new promises are created.

If f raises an exception, it is passed to !Lwt.async_exception_hook. By default, this will terminate the process.

val on_termination : _ t -> (unit -> unit) -> unit

Lwt.on_termination p f makes it so that f will run when p is resolved – that is, fulfilled or rejected.

It is similar to Lwt.finalize, except no new promises are created.

If f raises an exception, it is passed to !Lwt.async_exception_hook. By default, this will terminate the process.

val on_any : 'a t -> ('a -> unit) -> (exn -> unit) -> unit

Lwt.on_any p f g makes it so that:

It is similar to Lwt.try_bind, except no new promises are created.

If f or g raise an exception, the exception is passed to !Lwt.async_exception_hook. By default, this will terminate the process.

Infix operators

module Infix : sig ... end

This module provides several infix operators for making programming with Lwt more convenient.

module Let_syntax : sig ... end
module Syntax : sig ... end

Pre-allocated promises

val return_unit : unit t

Lwt.return_unit is defined as Lwt.return (), but this definition is evaluated only once, during initialization of module Lwt, at the beginning of your program.

This means the promise is allocated only once. By contrast, each time Lwt.return () is evaluated, it allocates a new promise.

It is recommended to use Lwt.return_unit only where you know the allocations caused by an instance of Lwt.return () are a performance bottleneck. Generally, the cost of I/O tends to dominate the cost of Lwt.return () anyway.

In future Lwt, we hope to perform this optimization, of using a single, pre-allocated promise, automatically, wherever Lwt.return () is written.

val return_none : _ option t

Lwt.return_none is like Lwt.return_unit, but for Lwt.return None.

val return_nil : _ list t

Lwt.return_nil is like Lwt.return_unit, but for Lwt.return [].

val return_true : bool t

Lwt.return_true is like Lwt.return_unit, but for Lwt.return true.

val return_false : bool t

Lwt.return_false is like Lwt.return_unit, but for Lwt.return false.

Trivial promises

val return_some : 'a -> 'a option t

Counterpart to Lwt.return_none. However, unlike Lwt.return_none, this function performs no optimization. This is because it takes an argument, so it cannot be evaluated at initialization time, at which time the argument is not yet available.

val return_ok : 'a -> ('a, _) Stdlib.result t

Like Lwt.return_some, this function performs no optimization.

val return_error : 'e -> (_, 'e) Stdlib.result t

Like Lwt.return_some, this function performs no optimization.

val fail_with : string -> _ t

Lwt.fail_with s is an abbreviation for

Lwt.fail (Stdlib.Failure s)

In most cases, it is better to use failwith s from the standard library. See Lwt.fail for an explanation.

val fail_invalid_arg : string -> _ t

Lwt.invalid_arg s is an abbreviation for

Lwt.fail (Stdlib.Invalid_argument s)

In most cases, it is better to use invalid_arg s from the standard library. See Lwt.fail for an explanation.

Result type

A resolved promise of type 'a Lwt.t is either fulfilled with a value of type 'a, or rejected with an exception.

This corresponds to the cases of a ('a, exn)Stdlib.result: fulfilled corresponds to Ok of 'a, and rejected corresponds to Error of exn.

For Lwt programming with result where the Error constructor can carry arbitrary error types, see module Lwt_result.

val of_result : ('a, exn) Stdlib.result -> 'a t

Lwt.of_result r converts an r to a resolved promise.

val wakeup_later_result : 'a u -> ('a, exn) Stdlib.result -> unit

Lwt.wakeup_later_result r result resolves the pending promise p associated to resolver r, according to result:

If p is not pending, Lwt.wakeup_later_result raises Stdlib.Invalid_argument _, except if p is canceled. If p is canceled, Lwt.wakeup_later_result has no effect.

State query

type 'a state =
  1. | Return of 'a
  2. | Fail of exn
  3. | Sleep
val state : 'a t -> 'a state

Lwt.state p evaluates to the current state of promise p:

The constructor names are historical holdovers.

Deprecated

Implicit callback arguments

Using this mechanism is discouraged, because it is non-syntactic, and because it manipulates hidden state in module Lwt. It is recommended instead to pass additional values explicitly in tuples, or maintain explicit associative maps for them.

type 'a key

Keys into the implicit callback argument map, for implicit arguments of type 'a option.

The keys are abstract, but they are basically integers that are all distinct from each other.

See Lwt.with_value.

val new_key : unit -> 'a key

Creates a fresh implicit callback argument key.

The key is distinct from any other key created by the current process. The value None of type 'a option is immediately associated with the key.

See Lwt.with_value.

val get : 'a key -> 'a option

Retrieves the value currently associated with the given implicit callback argument key.

See Lwt.with_value.

val with_value : 'a key -> 'a option -> (unit -> 'b) -> 'b

Lwt.with_value k v f sets k to v in Lwt's internal implicit callback argument map, then runs f (), then restores the previous value associated with k.

Lwt maintains a single, global map, that can be used to “pass” extra arguments to callbacks:

let () =
   let k : string Lwt.key = Lwt.new_key () in
 
   let say_hello () =
@@ -298,7 +298,7 @@ let read_int : unit -> int Lwt.t = fun () ->
     end
   end
 
-(* ocamlfind opt -linkpkg -thread -package lwt_ppx,lwt.unix code.ml && ./a.out *)

Note that the string Hello world! was passed to say_hello through the key k. Meanwhile, the only explicit argument of the callback say_hello is ().

The way this works is functions like Lwt.bind take a snapshot of the implicit argument map. Later, right before the callback is run, the map is restored to that snapshot. In other words, the map has the same state inside the callback as it did at the time the callback was registered.

To be more precise:

The Lwt functions that take snapshots of the implicit callback argument map are exactly those which attach callbacks to promises: Lwt.bind and its variants >>= and let%lwt, Lwt.map and its variant >|=, Lwt.catch and its variant try%lwt, Lwt.finalize and its variant %lwt.finally, Lwt.try_bind, Lwt.on_success, Lwt.on_failure, Lwt.on_termination, and Lwt.on_any.

Lwt.with_value should only be called in the main thread, i.e. do not call it inside Lwt_preemptive.detach.

Immediate resolving

val wakeup : 'a u -> 'a -> unit

Lwt.wakeup r v is like Lwt.wakeup_later r v, except it guarantees that callbacks associated with r will be called immediately, deeper on the current stack.

In contrast, Lwt.wakeup_later may call callbacks immediately, or may queue them for execution on a shallower stack – though still before the next time Lwt blocks the process on I/O.

Using this function is discouraged, because calling it in a loop can exhaust the stack. The loop might be difficult to detect or predict, due to combined mutually-recursive calls between multiple modules and libraries.

Also, trying to use this function to guarantee the timing of callback calls for synchronization purposes is discouraged. This synchronization effect is obscure to readers. It is better to use explicit promises, or Lwt_mutex, Lwt_condition, and/or Lwt_mvar.

val wakeup_exn : _ u -> exn -> unit

Lwt.wakeup_exn r exn is like Lwt.wakeup_later_exn r exn, but has the same problems as Lwt.wakeup.

val wakeup_result : 'a u -> ('a, exn) result -> unit

Lwt.wakeup_result r result is like Lwt.wakeup_later_result r result, but has the same problems as Lwt.wakeup.

Linked lists of promises

val add_task_r : 'a u Lwt_sequence.t -> 'a t

Lwt.add_task_r sequence is equivalent to

let p, r = Lwt.task () in
+(* ocamlfind opt -linkpkg -thread -package lwt_ppx,lwt.unix code.ml && ./a.out *)

Note that the string Hello world! was passed to say_hello through the key k. Meanwhile, the only explicit argument of the callback say_hello is ().

The way this works is functions like Lwt.bind take a snapshot of the implicit argument map. Later, right before the callback is run, the map is restored to that snapshot. In other words, the map has the same state inside the callback as it did at the time the callback was registered.

To be more precise:

The Lwt functions that take snapshots of the implicit callback argument map are exactly those which attach callbacks to promises: Lwt.bind and its variants >>= and let%lwt, Lwt.map and its variant >|=, Lwt.catch and its variant try%lwt, Lwt.finalize and its variant %lwt.finally, Lwt.try_bind, Lwt.on_success, Lwt.on_failure, Lwt.on_termination, and Lwt.on_any.

Lwt.with_value should only be called in the main thread, i.e. do not call it inside Lwt_preemptive.detach.

Immediate resolving

val wakeup : 'a u -> 'a -> unit

Lwt.wakeup r v is like Lwt.wakeup_later r v, except it guarantees that callbacks associated with r will be called immediately, deeper on the current stack.

In contrast, Lwt.wakeup_later may call callbacks immediately, or may queue them for execution on a shallower stack – though still before the next time Lwt blocks the process on I/O.

Using this function is discouraged, because calling it in a loop can exhaust the stack. The loop might be difficult to detect or predict, due to combined mutually-recursive calls between multiple modules and libraries.

Also, trying to use this function to guarantee the timing of callback calls for synchronization purposes is discouraged. This synchronization effect is obscure to readers. It is better to use explicit promises, or Lwt_mutex, Lwt_condition, and/or Lwt_mvar.

val wakeup_exn : _ u -> exn -> unit

Lwt.wakeup_exn r exn is like Lwt.wakeup_later_exn r exn, but has the same problems as Lwt.wakeup.

val wakeup_result : 'a u -> ('a, exn) Stdlib.result -> unit

Lwt.wakeup_result r result is like Lwt.wakeup_later_result r result, but has the same problems as Lwt.wakeup.

Linked lists of promises

val add_task_r : 'a u Lwt_sequence.t -> 'a t

Lwt.add_task_r sequence is equivalent to

let p, r = Lwt.task () in
 let node = Lwt_sequence.add_r r sequence in
 Lwt.on_cancel p (fun () -> Lwt_sequence.remove node);
 p
val add_task_l : 'a u Lwt_sequence.t -> 'a t

Like Lwt.add_task_r, but the equivalent code calls Lwt_sequence.add_l instead.

Yielding

val pause : unit -> unit t

Lwt.pause () creates a pending promise that is fulfilled after Lwt finishes calling all currently ready callbacks, i.e. it is fulfilled on the next “tick.”

Putting the rest of your computation into a callback of Lwt.pause () creates a “yield” that gives other callbacks a chance to run first.

For example, to break up a long-running computation, allowing I/O to be handled between chunks:

let () =
diff --git a/dev/lwt/Lwt_result/index.html b/dev/lwt/Lwt_result/index.html
index d8248cde..074fd4ac 100644
--- a/dev/lwt/Lwt_result/index.html
+++ b/dev/lwt/Lwt_result/index.html
@@ -1,2 +1,2 @@
 
-Lwt_result (lwt.Lwt_result)

Module Lwt_result

Explicit error handling

  • since 2.6.0

This module provides helpers for values of type ('a, 'b) result Lwt.t. The module is experimental and may change in the future.

type (+'a, +'b) t = ('a, 'b) result Lwt.t
val return : 'a -> ('a, _) t
val fail : 'b -> (_, 'b) t
val lift : ('a, 'b) result -> ('a, 'b) t
val ok : 'a Lwt.t -> ('a, _) t
val error : 'b Lwt.t -> (_, 'b) t
  • since 5.6.0
val catch : (unit -> 'a Lwt.t) -> ('a, exn) t

catch x behaves like return y if x () evaluates to y, and like fail e if x () raises e

val get_exn : ('a, exn) t -> 'a Lwt.t

get_exn is the opposite of catch: it unwraps the result type, returning the value in case of success, calls Lwt.fail in case of error.

val map : ('a -> 'b) -> ('a, 'e) t -> ('b, 'e) t
val map_error : ('e1 -> 'e2) -> ('a, 'e1) t -> ('a, 'e2) t
  • since 5.6.0
val bind : ('a, 'e) t -> ('a -> ('b, 'e) t) -> ('b, 'e) t
val bind_error : ('a, 'e1) t -> ('e1 -> ('a, 'e2) t) -> ('a, 'e2) t
  • since 5.6.0
val bind_lwt : ('a, 'e) t -> ('a -> 'b Lwt.t) -> ('b, 'e) t
val bind_lwt_error : ('a, 'e1) t -> ('e1 -> 'e2 Lwt.t) -> ('a, 'e2) t
  • since 5.6.0
val bind_result : ('a, 'e) t -> ('a -> ('b, 'e) result) -> ('b, 'e) t
val both : ('a, 'e) t -> ('b, 'e) t -> ('a * 'b, 'e) t

Lwt.both p_1 p_2 returns a promise that is pending until both promises p_1 and p_2 become resolved. If only p_1 is Error e, the promise is resolved with Error e, If only p_2 is Error e, the promise is resolved with Error e, If both p_1 and p_2 resolve with Error _, the promise is resolved with the error that occurred first.

val iter : ('a -> unit Lwt.t) -> ('a, 'e) t -> unit Lwt.t

iter f r is f v if r is a promise resolved with Ok v, and Lwt.return_unit otherwise.

  • since Lwt 5.6.0
val iter_error : ('e -> unit Lwt.t) -> ('a, 'e) t -> unit Lwt.t

iter_error f r is f v if r is a promise resolved with Error v, and Lwt.return_unit otherwise.

  • since Lwt 5.6.0
module Infix : sig ... end
module Let_syntax : sig ... end
module Syntax : sig ... end
include module type of Infix
val (>|=) : ('a, 'e) t -> ('a -> 'b) -> ('b, 'e) t
val (>>=) : ('a, 'e) t -> ('a -> ('b, 'e) t) -> ('b, 'e) t

Deprecated

val map_err : ('e1 -> 'e2) -> ('a, 'e1) t -> ('a, 'e2) t
  • deprecated

    Alias to map_error since 5.6.0.

val bind_lwt_err : ('a, 'e1) t -> ('e1 -> 'e2 Lwt.t) -> ('a, 'e2) t
  • deprecated

    Alias to bind_lwt_error since 5.6.0.

+Lwt_result (lwt.Lwt_result)

Module Lwt_result

Explicit error handling

  • since 2.6.0

This module provides helpers for values of type ('a, 'b) result Lwt.t. The module is experimental and may change in the future.

type (+'a, +'b) t = ('a, 'b) Stdlib.result Lwt.t
val return : 'a -> ('a, _) t
val fail : 'b -> (_, 'b) t
val lift : ('a, 'b) Stdlib.result -> ('a, 'b) t
val ok : 'a Lwt.t -> ('a, _) t
val error : 'b Lwt.t -> (_, 'b) t
  • since 5.6.0
val catch : (unit -> 'a Lwt.t) -> ('a, exn) t

catch x behaves like return y if x () evaluates to y, and like fail e if x () raises e

val get_exn : ('a, exn) t -> 'a Lwt.t

get_exn is the opposite of catch: it unwraps the result type, returning the value in case of success, calls Lwt.fail in case of error.

val map : ('a -> 'b) -> ('a, 'e) t -> ('b, 'e) t
val map_error : ('e1 -> 'e2) -> ('a, 'e1) t -> ('a, 'e2) t
  • since 5.6.0
val bind : ('a, 'e) t -> ('a -> ('b, 'e) t) -> ('b, 'e) t
val bind_error : ('a, 'e1) t -> ('e1 -> ('a, 'e2) t) -> ('a, 'e2) t
  • since 5.6.0
val bind_lwt : ('a, 'e) t -> ('a -> 'b Lwt.t) -> ('b, 'e) t
val bind_lwt_error : ('a, 'e1) t -> ('e1 -> 'e2 Lwt.t) -> ('a, 'e2) t
  • since 5.6.0
val bind_result : ('a, 'e) t -> ('a -> ('b, 'e) Stdlib.result) -> ('b, 'e) t
val both : ('a, 'e) t -> ('b, 'e) t -> ('a * 'b, 'e) t

Lwt.both p_1 p_2 returns a promise that is pending until both promises p_1 and p_2 become resolved. If only p_1 is Error e, the promise is resolved with Error e, If only p_2 is Error e, the promise is resolved with Error e, If both p_1 and p_2 resolve with Error _, the promise is resolved with the error that occurred first.

val iter : ('a -> unit Lwt.t) -> ('a, 'e) t -> unit Lwt.t

iter f r is f v if r is a promise resolved with Ok v, and Lwt.return_unit otherwise.

  • since Lwt 5.6.0
val iter_error : ('e -> unit Lwt.t) -> ('a, 'e) t -> unit Lwt.t

iter_error f r is f v if r is a promise resolved with Error v, and Lwt.return_unit otherwise.

  • since Lwt 5.6.0
module Infix : sig ... end
module Let_syntax : sig ... end
module Syntax : sig ... end
include module type of Infix
val (>|=) : ('a, 'e) t -> ('a -> 'b) -> ('b, 'e) t
val (>>=) : ('a, 'e) t -> ('a -> ('b, 'e) t) -> ('b, 'e) t

Deprecated

val map_err : ('e1 -> 'e2) -> ('a, 'e1) t -> ('a, 'e2) t
  • deprecated

    Alias to map_error since 5.6.0.

val bind_lwt_err : ('a, 'e1) t -> ('e1 -> 'e2 Lwt.t) -> ('a, 'e2) t
  • deprecated

    Alias to bind_lwt_error since 5.6.0.

diff --git a/dev/moonpool/Moonpool/Background_thread/For_runner_implementors/index.html b/dev/moonpool/Moonpool/Background_thread/For_runner_implementors/index.html index 681bb222..3a8c3d19 100644 --- a/dev/moonpool/Moonpool/Background_thread/For_runner_implementors/index.html +++ b/dev/moonpool/Moonpool/Background_thread/For_runner_implementors/index.html @@ -5,4 +5,5 @@ shutdown:(wait:bool -> unit -> unit) -> run_async:(ls:Task_local_storage.storage -> task -> unit) -> unit -> - t

Create a new runner.

NOTE: the runner should support DLA and Suspend_ on OCaml 5.x, so that Fork_join and other 5.x features work properly.

val k_cur_runner : t option ref Moonpool_private.Thread_local_storage_.key

Key that should be used by each runner to store itself in TLS on every thread it controls, so that tasks running on these threads can access the runner. This is necessary for get_current_runner to work.

+ t

Create a new runner.

NOTE: the runner should support DLA and Suspend_ on OCaml 5.x, so that Fork_join and other 5.x features work properly.

val k_cur_runner : + t option Stdlib.ref Moonpool_private.Thread_local_storage_.key

Key that should be used by each runner to store itself in TLS on every thread it controls, so that tasks running on these threads can access the runner. This is necessary for get_current_runner to work.

diff --git a/dev/moonpool/Moonpool/Fifo_pool/For_runner_implementors/index.html b/dev/moonpool/Moonpool/Fifo_pool/For_runner_implementors/index.html index a0601776..46d9d1d5 100644 --- a/dev/moonpool/Moonpool/Fifo_pool/For_runner_implementors/index.html +++ b/dev/moonpool/Moonpool/Fifo_pool/For_runner_implementors/index.html @@ -5,4 +5,5 @@ shutdown:(wait:bool -> unit -> unit) -> run_async:(ls:Task_local_storage.storage -> task -> unit) -> unit -> - t

Create a new runner.

NOTE: the runner should support DLA and Suspend_ on OCaml 5.x, so that Fork_join and other 5.x features work properly.

val k_cur_runner : t option ref Moonpool_private.Thread_local_storage_.key

Key that should be used by each runner to store itself in TLS on every thread it controls, so that tasks running on these threads can access the runner. This is necessary for get_current_runner to work.

+ t

Create a new runner.

NOTE: the runner should support DLA and Suspend_ on OCaml 5.x, so that Fork_join and other 5.x features work properly.

val k_cur_runner : + t option Stdlib.ref Moonpool_private.Thread_local_storage_.key

Key that should be used by each runner to store itself in TLS on every thread it controls, so that tasks running on these threads can access the runner. This is necessary for get_current_runner to work.

diff --git a/dev/moonpool/Moonpool/Immediate_runner/For_runner_implementors/index.html b/dev/moonpool/Moonpool/Immediate_runner/For_runner_implementors/index.html index 31922564..864fa70b 100644 --- a/dev/moonpool/Moonpool/Immediate_runner/For_runner_implementors/index.html +++ b/dev/moonpool/Moonpool/Immediate_runner/For_runner_implementors/index.html @@ -5,4 +5,5 @@ shutdown:(wait:bool -> unit -> unit) -> run_async:(ls:Task_local_storage.storage -> task -> unit) -> unit -> - t

Create a new runner.

NOTE: the runner should support DLA and Suspend_ on OCaml 5.x, so that Fork_join and other 5.x features work properly.

val k_cur_runner : t option ref Moonpool_private.Thread_local_storage_.key

Key that should be used by each runner to store itself in TLS on every thread it controls, so that tasks running on these threads can access the runner. This is necessary for get_current_runner to work.

+ t

Create a new runner.

NOTE: the runner should support DLA and Suspend_ on OCaml 5.x, so that Fork_join and other 5.x features work properly.

val k_cur_runner : + t option Stdlib.ref Moonpool_private.Thread_local_storage_.key

Key that should be used by each runner to store itself in TLS on every thread it controls, so that tasks running on these threads can access the runner. This is necessary for get_current_runner to work.

diff --git a/dev/moonpool/Moonpool/Runner/For_runner_implementors/index.html b/dev/moonpool/Moonpool/Runner/For_runner_implementors/index.html index 0f9c5247..ea136777 100644 --- a/dev/moonpool/Moonpool/Runner/For_runner_implementors/index.html +++ b/dev/moonpool/Moonpool/Runner/For_runner_implementors/index.html @@ -5,4 +5,5 @@ shutdown:(wait:bool -> unit -> unit) -> run_async:(ls:Task_local_storage.storage -> task -> unit) -> unit -> - t

Create a new runner.

NOTE: the runner should support DLA and Suspend_ on OCaml 5.x, so that Fork_join and other 5.x features work properly.

val k_cur_runner : t option ref Moonpool_private.Thread_local_storage_.key

Key that should be used by each runner to store itself in TLS on every thread it controls, so that tasks running on these threads can access the runner. This is necessary for get_current_runner to work.

+ t

Create a new runner.

NOTE: the runner should support DLA and Suspend_ on OCaml 5.x, so that Fork_join and other 5.x features work properly.

val k_cur_runner : + t option Stdlib.ref Moonpool_private.Thread_local_storage_.key

Key that should be used by each runner to store itself in TLS on every thread it controls, so that tasks running on these threads can access the runner. This is necessary for get_current_runner to work.

diff --git a/dev/moonpool/Moonpool/Ws_pool/For_runner_implementors/index.html b/dev/moonpool/Moonpool/Ws_pool/For_runner_implementors/index.html index 6ed2b7b2..47737bd2 100644 --- a/dev/moonpool/Moonpool/Ws_pool/For_runner_implementors/index.html +++ b/dev/moonpool/Moonpool/Ws_pool/For_runner_implementors/index.html @@ -5,4 +5,5 @@ shutdown:(wait:bool -> unit -> unit) -> run_async:(ls:Task_local_storage.storage -> task -> unit) -> unit -> - t

Create a new runner.

NOTE: the runner should support DLA and Suspend_ on OCaml 5.x, so that Fork_join and other 5.x features work properly.

val k_cur_runner : t option ref Moonpool_private.Thread_local_storage_.key

Key that should be used by each runner to store itself in TLS on every thread it controls, so that tasks running on these threads can access the runner. This is necessary for get_current_runner to work.

+ t

Create a new runner.

NOTE: the runner should support DLA and Suspend_ on OCaml 5.x, so that Fork_join and other 5.x features work properly.

val k_cur_runner : + t option Stdlib.ref Moonpool_private.Thread_local_storage_.key

Key that should be used by each runner to store itself in TLS on every thread it controls, so that tasks running on these threads can access the runner. This is necessary for get_current_runner to work.

diff --git a/dev/ocaml/Build_path_prefix_map/index.html b/dev/ocaml/Build_path_prefix_map/index.html index 3e107dfd..86521377 100644 --- a/dev/ocaml/Build_path_prefix_map/index.html +++ b/dev/ocaml/Build_path_prefix_map/index.html @@ -1,2 +1,2 @@ -Build_path_prefix_map (ocaml.Build_path_prefix_map)

Module Build_path_prefix_map

Rewrite paths for reproducible builds

Warning: this module is unstable and part of compiler-libs.

type path = string
type path_prefix = string
type error_message = string
val encode_prefix : path_prefix -> string
val decode_prefix : string -> (path_prefix, error_message) result
type pair = {
  1. target : path_prefix;
  2. source : path_prefix;
}
val encode_pair : pair -> string
val decode_pair : string -> (pair, error_message) result
type map = pair option list
val encode_map : map -> string
val decode_map : string -> (map, error_message) result
val rewrite_opt : map -> path -> path option

rewrite_opt map path tries to find a source in map that is a prefix of the input path. If it succeeds, it replaces this prefix with the corresponding target. If it fails, it just returns None.

val rewrite : map -> path -> path
+Build_path_prefix_map (ocaml.Build_path_prefix_map)

Module Build_path_prefix_map

Rewrite paths for reproducible builds

Warning: this module is unstable and part of compiler-libs.

type path = string
type path_prefix = string
type error_message = string
val encode_prefix : path_prefix -> string
val decode_prefix : string -> (path_prefix, error_message) Stdlib.result
type pair = {
  1. target : path_prefix;
  2. source : path_prefix;
}
val encode_pair : pair -> string
val decode_pair : string -> (pair, error_message) Stdlib.result
type map = pair option list
val encode_map : map -> string
val decode_map : string -> (map, error_message) Stdlib.result
val rewrite_opt : map -> path -> path option

rewrite_opt map path tries to find a source in map that is a prefix of the input path. If it succeeds, it replaces this prefix with the corresponding target. If it fails, it just returns None.

val rewrite : map -> path -> path
diff --git a/dev/ocaml/Bytesections/index.html b/dev/ocaml/Bytesections/index.html index ea0c8508..762b5cdd 100644 --- a/dev/ocaml/Bytesections/index.html +++ b/dev/ocaml/Bytesections/index.html @@ -1,2 +1,2 @@ -Bytesections (ocaml.Bytesections)

Module Bytesections

Recording sections written to a bytecode executable file

val init_record : out_channel -> unit
val record : out_channel -> string -> unit
val write_toc_and_trailer : out_channel -> unit

Reading sections from a bytecode executable file

val read_toc : in_channel -> unit
exception Bad_magic_number
val toc : unit -> (string * int) list
val seek_section : in_channel -> string -> int
val read_section_string : in_channel -> string -> string
val read_section_struct : in_channel -> string -> 'a
val pos_first_section : in_channel -> int
val reset : unit -> unit
+Bytesections (ocaml.Bytesections)

Module Bytesections

Recording sections written to a bytecode executable file

val init_record : Stdlib.out_channel -> unit
val record : Stdlib.out_channel -> string -> unit
val write_toc_and_trailer : Stdlib.out_channel -> unit

Reading sections from a bytecode executable file

val read_toc : Stdlib.in_channel -> unit
exception Bad_magic_number
val toc : unit -> (string * int) list
val seek_section : Stdlib.in_channel -> string -> int
val read_section_string : Stdlib.in_channel -> string -> string
val read_section_struct : Stdlib.in_channel -> string -> 'a
val pos_first_section : Stdlib.in_channel -> int
val reset : unit -> unit
diff --git a/dev/ocaml/Config/index.html b/dev/ocaml/Config/index.html index 0e901303..ead9c609 100644 --- a/dev/ocaml/Config/index.html +++ b/dev/ocaml/Config/index.html @@ -1,2 +1,2 @@ -Config (ocaml.Config)

Module Config

System configuration

Warning: this module is unstable and part of compiler-libs.

val version : string

The current version number of the system

val bindir : string

The directory containing the binary programs

val standard_library : string

The directory containing the standard libraries

val ccomp_type : string

The "kind" of the C compiler, assembler and linker used: one of "cc" (for Unix-style C compilers) "msvc" (for Microsoft Visual C++ and MASM)

val c_compiler : string

The compiler to use for compiling C files

val c_output_obj : string

Name of the option of the C compiler for specifying the output file

val c_has_debug_prefix_map : bool

Whether the C compiler supports -fdebug-prefix-map

val as_has_debug_prefix_map : bool

Whether the assembler supports --debug-prefix-map

val ocamlc_cflags : string

The flags ocamlc should pass to the C compiler

val ocamlc_cppflags : string

The flags ocamlc should pass to the C preprocessor

val ocamlopt_cflags : string
  • deprecated

    ocamlc_cflags should be used instead. The flags ocamlopt should pass to the C compiler

val ocamlopt_cppflags : string
  • deprecated

    ocamlc_cppflags should be used instead. The flags ocamlopt should pass to the C preprocessor

val bytecomp_c_libraries : string

The C libraries to link with custom runtimes

val native_c_libraries : string

The C libraries to link with native-code programs

val native_pack_linker : string

The linker to use for packaging (ocamlopt -pack) and for partial links (ocamlopt -output-obj).

val mkdll : string

The linker command line to build dynamic libraries.

val mkexe : string

The linker command line to build executables.

val mkmaindll : string

The linker command line to build main programs as dlls.

val default_rpath : string

Option to add a directory to be searched for libraries at runtime (used by ocamlmklib)

val mksharedlibrpath : string

Option to add a directory to be searched for shared libraries at runtime (used by ocamlmklib)

val ar : string

Name of the ar command, or "" if not needed (MSVC)

val interface_suffix : string ref

Suffix for interface file names

val exec_magic_number : string

Magic number for bytecode executable files

val cmi_magic_number : string

Magic number for compiled interface files

val cmo_magic_number : string

Magic number for object bytecode files

val cma_magic_number : string

Magic number for archive files

val cmx_magic_number : string

Magic number for compilation unit descriptions

val cmxa_magic_number : string

Magic number for libraries of compilation unit descriptions

val ast_intf_magic_number : string

Magic number for file holding an interface syntax tree

val ast_impl_magic_number : string

Magic number for file holding an implementation syntax tree

val cmxs_magic_number : string

Magic number for dynamically-loadable plugins

val cmt_magic_number : string

Magic number for compiled interface files

val linear_magic_number : string

Magic number for Linear internal representation files

val max_tag : int

Biggest tag that can be stored in the header of a regular block.

val lazy_tag : int

Normally the same as Obj.lazy_tag. Separate definition because of technical reasons for bootstrapping.

val max_young_wosize : int

Maximal size of arrays that are directly allocated in the minor heap

val stack_threshold : int

Size in words of safe area at bottom of VM stack, see runtime/caml/config.h

val stack_safety_margin : int

Size in words of the safety margin between the bottom of the stack and the stack pointer. This margin can be used by intermediate computations of some instructions, or the event handler.

val architecture : string

Name of processor type for the native-code compiler

val model : string

Name of processor submodel for the native-code compiler

val system : string

Name of operating system for the native-code compiler

val asm : string

The assembler (and flags) to use for assembling ocamlopt-generated code.

val asm_cfi_supported : bool

Whether assembler understands CFI directives

val with_frame_pointers : bool

Whether assembler should maintain frame pointers

val ext_obj : string

Extension for object files, e.g. .o under Unix.

val ext_asm : string

Extension for assembler files, e.g. .s under Unix.

val ext_lib : string

Extension for library files, e.g. .a under Unix.

val ext_dll : string

Extension for dynamically-loaded libraries, e.g. .so under Unix.

val ext_exe : string

Extension for executable programs, e.g. .exe under Windows.

  • since 4.12.0
val default_executable_name : string

Name of executable produced by linking if none is given with -o, e.g. a.out under Unix.

val systhread_supported : bool

Whether the system thread library is implemented

val flexdll_dirs : string list

Directories needed for the FlexDLL objects

val host : string

Whether the compiler is a cross-compiler

val target : string

Whether the compiler is a cross-compiler

val flambda : bool

Whether the compiler was configured for flambda

val with_flambda_invariants : bool

Whether the invariants checks for flambda are enabled

val with_cmm_invariants : bool

Whether the invariants checks for Cmm are enabled

val profinfo : bool

Whether the compiler was configured for profiling

val profinfo_width : int

How many bits are to be used in values' headers for profiling information

val flat_float_array : bool

Whether the compiler and runtime automagically flatten float arrays

val function_sections : bool

Whether the compiler was configured to generate each function in a separate section

val windows_unicode : bool

Whether Windows Unicode runtime is enabled

val naked_pointers : bool

Whether the runtime supports naked pointers

  • since 4.14.0
val supports_shared_libraries : bool

Whether shared libraries are supported

  • since 4.08.0
val afl_instrument : bool

Whether afl-fuzz instrumentation is generated by default

val print_config : out_channel -> unit

Access to configuration values

val config_var : string -> string option

the configuration value of a variable, if it exists

+Config (ocaml.Config)

Module Config

System configuration

Warning: this module is unstable and part of compiler-libs.

val version : string

The current version number of the system

val bindir : string

The directory containing the binary programs

val standard_library : string

The directory containing the standard libraries

val ccomp_type : string

The "kind" of the C compiler, assembler and linker used: one of "cc" (for Unix-style C compilers) "msvc" (for Microsoft Visual C++ and MASM)

val c_compiler : string

The compiler to use for compiling C files

val c_output_obj : string

Name of the option of the C compiler for specifying the output file

val c_has_debug_prefix_map : bool

Whether the C compiler supports -fdebug-prefix-map

val as_has_debug_prefix_map : bool

Whether the assembler supports --debug-prefix-map

val ocamlc_cflags : string

The flags ocamlc should pass to the C compiler

val ocamlc_cppflags : string

The flags ocamlc should pass to the C preprocessor

val ocamlopt_cflags : string
  • deprecated

    ocamlc_cflags should be used instead. The flags ocamlopt should pass to the C compiler

val ocamlopt_cppflags : string
  • deprecated

    ocamlc_cppflags should be used instead. The flags ocamlopt should pass to the C preprocessor

val bytecomp_c_libraries : string

The C libraries to link with custom runtimes

val native_c_libraries : string

The C libraries to link with native-code programs

val native_pack_linker : string

The linker to use for packaging (ocamlopt -pack) and for partial links (ocamlopt -output-obj).

val mkdll : string

The linker command line to build dynamic libraries.

val mkexe : string

The linker command line to build executables.

val mkmaindll : string

The linker command line to build main programs as dlls.

val default_rpath : string

Option to add a directory to be searched for libraries at runtime (used by ocamlmklib)

val mksharedlibrpath : string

Option to add a directory to be searched for shared libraries at runtime (used by ocamlmklib)

val ar : string

Name of the ar command, or "" if not needed (MSVC)

val interface_suffix : string Stdlib.ref

Suffix for interface file names

val exec_magic_number : string

Magic number for bytecode executable files

val cmi_magic_number : string

Magic number for compiled interface files

val cmo_magic_number : string

Magic number for object bytecode files

val cma_magic_number : string

Magic number for archive files

val cmx_magic_number : string

Magic number for compilation unit descriptions

val cmxa_magic_number : string

Magic number for libraries of compilation unit descriptions

val ast_intf_magic_number : string

Magic number for file holding an interface syntax tree

val ast_impl_magic_number : string

Magic number for file holding an implementation syntax tree

val cmxs_magic_number : string

Magic number for dynamically-loadable plugins

val cmt_magic_number : string

Magic number for compiled interface files

val linear_magic_number : string

Magic number for Linear internal representation files

val max_tag : int

Biggest tag that can be stored in the header of a regular block.

val lazy_tag : int

Normally the same as Obj.lazy_tag. Separate definition because of technical reasons for bootstrapping.

val max_young_wosize : int

Maximal size of arrays that are directly allocated in the minor heap

val stack_threshold : int

Size in words of safe area at bottom of VM stack, see runtime/caml/config.h

val stack_safety_margin : int

Size in words of the safety margin between the bottom of the stack and the stack pointer. This margin can be used by intermediate computations of some instructions, or the event handler.

val architecture : string

Name of processor type for the native-code compiler

val model : string

Name of processor submodel for the native-code compiler

val system : string

Name of operating system for the native-code compiler

val asm : string

The assembler (and flags) to use for assembling ocamlopt-generated code.

val asm_cfi_supported : bool

Whether assembler understands CFI directives

val with_frame_pointers : bool

Whether assembler should maintain frame pointers

val ext_obj : string

Extension for object files, e.g. .o under Unix.

val ext_asm : string

Extension for assembler files, e.g. .s under Unix.

val ext_lib : string

Extension for library files, e.g. .a under Unix.

val ext_dll : string

Extension for dynamically-loaded libraries, e.g. .so under Unix.

val ext_exe : string

Extension for executable programs, e.g. .exe under Windows.

  • since 4.12.0
val default_executable_name : string

Name of executable produced by linking if none is given with -o, e.g. a.out under Unix.

val systhread_supported : bool

Whether the system thread library is implemented

val flexdll_dirs : string list

Directories needed for the FlexDLL objects

val host : string

Whether the compiler is a cross-compiler

val target : string

Whether the compiler is a cross-compiler

val flambda : bool

Whether the compiler was configured for flambda

val with_flambda_invariants : bool

Whether the invariants checks for flambda are enabled

val with_cmm_invariants : bool

Whether the invariants checks for Cmm are enabled

val profinfo : bool

Whether the compiler was configured for profiling

val profinfo_width : int

How many bits are to be used in values' headers for profiling information

val flat_float_array : bool

Whether the compiler and runtime automagically flatten float arrays

val function_sections : bool

Whether the compiler was configured to generate each function in a separate section

val windows_unicode : bool

Whether Windows Unicode runtime is enabled

val naked_pointers : bool

Whether the runtime supports naked pointers

  • since 4.14.0
val supports_shared_libraries : bool

Whether shared libraries are supported

  • since 4.08.0
val afl_instrument : bool

Whether afl-fuzz instrumentation is generated by default

val print_config : Stdlib.out_channel -> unit

Access to configuration values

val config_var : string -> string option

the configuration value of a variable, if it exists

diff --git a/dev/ocaml/Config_boot/index.html b/dev/ocaml/Config_boot/index.html index 268f216b..74da8c9e 100644 --- a/dev/ocaml/Config_boot/index.html +++ b/dev/ocaml/Config_boot/index.html @@ -1,2 +1,2 @@ -Config_boot (ocaml.Config_boot)

Module Config_boot

System configuration

Warning: this module is unstable and part of compiler-libs.

val version : string

The current version number of the system

val bindir : string

The directory containing the binary programs

val standard_library : string

The directory containing the standard libraries

val ccomp_type : string

The "kind" of the C compiler, assembler and linker used: one of "cc" (for Unix-style C compilers) "msvc" (for Microsoft Visual C++ and MASM)

val c_compiler : string

The compiler to use for compiling C files

val c_output_obj : string

Name of the option of the C compiler for specifying the output file

val c_has_debug_prefix_map : bool

Whether the C compiler supports -fdebug-prefix-map

val as_has_debug_prefix_map : bool

Whether the assembler supports --debug-prefix-map

val ocamlc_cflags : string

The flags ocamlc should pass to the C compiler

val ocamlc_cppflags : string

The flags ocamlc should pass to the C preprocessor

val ocamlopt_cflags : string
  • deprecated

    ocamlc_cflags should be used instead. The flags ocamlopt should pass to the C compiler

val ocamlopt_cppflags : string
  • deprecated

    ocamlc_cppflags should be used instead. The flags ocamlopt should pass to the C preprocessor

val bytecomp_c_libraries : string

The C libraries to link with custom runtimes

val native_c_libraries : string

The C libraries to link with native-code programs

val native_pack_linker : string

The linker to use for packaging (ocamlopt -pack) and for partial links (ocamlopt -output-obj).

val mkdll : string

The linker command line to build dynamic libraries.

val mkexe : string

The linker command line to build executables.

val mkmaindll : string

The linker command line to build main programs as dlls.

val default_rpath : string

Option to add a directory to be searched for libraries at runtime (used by ocamlmklib)

val mksharedlibrpath : string

Option to add a directory to be searched for shared libraries at runtime (used by ocamlmklib)

val ar : string

Name of the ar command, or "" if not needed (MSVC)

val interface_suffix : string ref

Suffix for interface file names

val exec_magic_number : string

Magic number for bytecode executable files

val cmi_magic_number : string

Magic number for compiled interface files

val cmo_magic_number : string

Magic number for object bytecode files

val cma_magic_number : string

Magic number for archive files

val cmx_magic_number : string

Magic number for compilation unit descriptions

val cmxa_magic_number : string

Magic number for libraries of compilation unit descriptions

val ast_intf_magic_number : string

Magic number for file holding an interface syntax tree

val ast_impl_magic_number : string

Magic number for file holding an implementation syntax tree

val cmxs_magic_number : string

Magic number for dynamically-loadable plugins

val cmt_magic_number : string

Magic number for compiled interface files

val linear_magic_number : string

Magic number for Linear internal representation files

val max_tag : int

Biggest tag that can be stored in the header of a regular block.

val lazy_tag : int

Normally the same as Obj.lazy_tag. Separate definition because of technical reasons for bootstrapping.

val max_young_wosize : int

Maximal size of arrays that are directly allocated in the minor heap

val stack_threshold : int

Size in words of safe area at bottom of VM stack, see runtime/caml/config.h

val stack_safety_margin : int

Size in words of the safety margin between the bottom of the stack and the stack pointer. This margin can be used by intermediate computations of some instructions, or the event handler.

val architecture : string

Name of processor type for the native-code compiler

val model : string

Name of processor submodel for the native-code compiler

val system : string

Name of operating system for the native-code compiler

val asm : string

The assembler (and flags) to use for assembling ocamlopt-generated code.

val asm_cfi_supported : bool

Whether assembler understands CFI directives

val with_frame_pointers : bool

Whether assembler should maintain frame pointers

val ext_obj : string

Extension for object files, e.g. .o under Unix.

val ext_asm : string

Extension for assembler files, e.g. .s under Unix.

val ext_lib : string

Extension for library files, e.g. .a under Unix.

val ext_dll : string

Extension for dynamically-loaded libraries, e.g. .so under Unix.

val ext_exe : string

Extension for executable programs, e.g. .exe under Windows.

  • since 4.12.0
val default_executable_name : string

Name of executable produced by linking if none is given with -o, e.g. a.out under Unix.

val systhread_supported : bool

Whether the system thread library is implemented

val flexdll_dirs : string list

Directories needed for the FlexDLL objects

val host : string

Whether the compiler is a cross-compiler

val target : string

Whether the compiler is a cross-compiler

val flambda : bool

Whether the compiler was configured for flambda

val with_flambda_invariants : bool

Whether the invariants checks for flambda are enabled

val with_cmm_invariants : bool

Whether the invariants checks for Cmm are enabled

val profinfo : bool

Whether the compiler was configured for profiling

val profinfo_width : int

How many bits are to be used in values' headers for profiling information

val flat_float_array : bool

Whether the compiler and runtime automagically flatten float arrays

val function_sections : bool

Whether the compiler was configured to generate each function in a separate section

val windows_unicode : bool

Whether Windows Unicode runtime is enabled

val naked_pointers : bool

Whether the runtime supports naked pointers

  • since 4.14.0
val supports_shared_libraries : bool

Whether shared libraries are supported

  • since 4.08.0
val afl_instrument : bool

Whether afl-fuzz instrumentation is generated by default

val print_config : out_channel -> unit

Access to configuration values

val config_var : string -> string option

the configuration value of a variable, if it exists

+Config_boot (ocaml.Config_boot)

Module Config_boot

System configuration

Warning: this module is unstable and part of compiler-libs.

val version : string

The current version number of the system

val bindir : string

The directory containing the binary programs

val standard_library : string

The directory containing the standard libraries

val ccomp_type : string

The "kind" of the C compiler, assembler and linker used: one of "cc" (for Unix-style C compilers) "msvc" (for Microsoft Visual C++ and MASM)

val c_compiler : string

The compiler to use for compiling C files

val c_output_obj : string

Name of the option of the C compiler for specifying the output file

val c_has_debug_prefix_map : bool

Whether the C compiler supports -fdebug-prefix-map

val as_has_debug_prefix_map : bool

Whether the assembler supports --debug-prefix-map

val ocamlc_cflags : string

The flags ocamlc should pass to the C compiler

val ocamlc_cppflags : string

The flags ocamlc should pass to the C preprocessor

val ocamlopt_cflags : string
  • deprecated

    ocamlc_cflags should be used instead. The flags ocamlopt should pass to the C compiler

val ocamlopt_cppflags : string
  • deprecated

    ocamlc_cppflags should be used instead. The flags ocamlopt should pass to the C preprocessor

val bytecomp_c_libraries : string

The C libraries to link with custom runtimes

val native_c_libraries : string

The C libraries to link with native-code programs

val native_pack_linker : string

The linker to use for packaging (ocamlopt -pack) and for partial links (ocamlopt -output-obj).

val mkdll : string

The linker command line to build dynamic libraries.

val mkexe : string

The linker command line to build executables.

val mkmaindll : string

The linker command line to build main programs as dlls.

val default_rpath : string

Option to add a directory to be searched for libraries at runtime (used by ocamlmklib)

val mksharedlibrpath : string

Option to add a directory to be searched for shared libraries at runtime (used by ocamlmklib)

val ar : string

Name of the ar command, or "" if not needed (MSVC)

val interface_suffix : string Stdlib.ref

Suffix for interface file names

val exec_magic_number : string

Magic number for bytecode executable files

val cmi_magic_number : string

Magic number for compiled interface files

val cmo_magic_number : string

Magic number for object bytecode files

val cma_magic_number : string

Magic number for archive files

val cmx_magic_number : string

Magic number for compilation unit descriptions

val cmxa_magic_number : string

Magic number for libraries of compilation unit descriptions

val ast_intf_magic_number : string

Magic number for file holding an interface syntax tree

val ast_impl_magic_number : string

Magic number for file holding an implementation syntax tree

val cmxs_magic_number : string

Magic number for dynamically-loadable plugins

val cmt_magic_number : string

Magic number for compiled interface files

val linear_magic_number : string

Magic number for Linear internal representation files

val max_tag : int

Biggest tag that can be stored in the header of a regular block.

val lazy_tag : int

Normally the same as Obj.lazy_tag. Separate definition because of technical reasons for bootstrapping.

val max_young_wosize : int

Maximal size of arrays that are directly allocated in the minor heap

val stack_threshold : int

Size in words of safe area at bottom of VM stack, see runtime/caml/config.h

val stack_safety_margin : int

Size in words of the safety margin between the bottom of the stack and the stack pointer. This margin can be used by intermediate computations of some instructions, or the event handler.

val architecture : string

Name of processor type for the native-code compiler

val model : string

Name of processor submodel for the native-code compiler

val system : string

Name of operating system for the native-code compiler

val asm : string

The assembler (and flags) to use for assembling ocamlopt-generated code.

val asm_cfi_supported : bool

Whether assembler understands CFI directives

val with_frame_pointers : bool

Whether assembler should maintain frame pointers

val ext_obj : string

Extension for object files, e.g. .o under Unix.

val ext_asm : string

Extension for assembler files, e.g. .s under Unix.

val ext_lib : string

Extension for library files, e.g. .a under Unix.

val ext_dll : string

Extension for dynamically-loaded libraries, e.g. .so under Unix.

val ext_exe : string

Extension for executable programs, e.g. .exe under Windows.

  • since 4.12.0
val default_executable_name : string

Name of executable produced by linking if none is given with -o, e.g. a.out under Unix.

val systhread_supported : bool

Whether the system thread library is implemented

val flexdll_dirs : string list

Directories needed for the FlexDLL objects

val host : string

Whether the compiler is a cross-compiler

val target : string

Whether the compiler is a cross-compiler

val flambda : bool

Whether the compiler was configured for flambda

val with_flambda_invariants : bool

Whether the invariants checks for flambda are enabled

val with_cmm_invariants : bool

Whether the invariants checks for Cmm are enabled

val profinfo : bool

Whether the compiler was configured for profiling

val profinfo_width : int

How many bits are to be used in values' headers for profiling information

val flat_float_array : bool

Whether the compiler and runtime automagically flatten float arrays

val function_sections : bool

Whether the compiler was configured to generate each function in a separate section

val windows_unicode : bool

Whether Windows Unicode runtime is enabled

val naked_pointers : bool

Whether the runtime supports naked pointers

  • since 4.14.0
val supports_shared_libraries : bool

Whether shared libraries are supported

  • since 4.08.0
val afl_instrument : bool

Whether afl-fuzz instrumentation is generated by default

val print_config : Stdlib.out_channel -> unit

Access to configuration values

val config_var : string -> string option

the configuration value of a variable, if it exists

diff --git a/dev/ocaml/Config_main/index.html b/dev/ocaml/Config_main/index.html index c80b5dc4..67b24b7b 100644 --- a/dev/ocaml/Config_main/index.html +++ b/dev/ocaml/Config_main/index.html @@ -1,2 +1,2 @@ -Config_main (ocaml.Config_main)

Module Config_main

System configuration

Warning: this module is unstable and part of compiler-libs.

val version : string

The current version number of the system

val bindir : string

The directory containing the binary programs

val standard_library : string

The directory containing the standard libraries

val ccomp_type : string

The "kind" of the C compiler, assembler and linker used: one of "cc" (for Unix-style C compilers) "msvc" (for Microsoft Visual C++ and MASM)

val c_compiler : string

The compiler to use for compiling C files

val c_output_obj : string

Name of the option of the C compiler for specifying the output file

val c_has_debug_prefix_map : bool

Whether the C compiler supports -fdebug-prefix-map

val as_has_debug_prefix_map : bool

Whether the assembler supports --debug-prefix-map

val ocamlc_cflags : string

The flags ocamlc should pass to the C compiler

val ocamlc_cppflags : string

The flags ocamlc should pass to the C preprocessor

val ocamlopt_cflags : string
  • deprecated

    ocamlc_cflags should be used instead. The flags ocamlopt should pass to the C compiler

val ocamlopt_cppflags : string
  • deprecated

    ocamlc_cppflags should be used instead. The flags ocamlopt should pass to the C preprocessor

val bytecomp_c_libraries : string

The C libraries to link with custom runtimes

val native_c_libraries : string

The C libraries to link with native-code programs

val native_pack_linker : string

The linker to use for packaging (ocamlopt -pack) and for partial links (ocamlopt -output-obj).

val mkdll : string

The linker command line to build dynamic libraries.

val mkexe : string

The linker command line to build executables.

val mkmaindll : string

The linker command line to build main programs as dlls.

val default_rpath : string

Option to add a directory to be searched for libraries at runtime (used by ocamlmklib)

val mksharedlibrpath : string

Option to add a directory to be searched for shared libraries at runtime (used by ocamlmklib)

val ar : string

Name of the ar command, or "" if not needed (MSVC)

val interface_suffix : string ref

Suffix for interface file names

val exec_magic_number : string

Magic number for bytecode executable files

val cmi_magic_number : string

Magic number for compiled interface files

val cmo_magic_number : string

Magic number for object bytecode files

val cma_magic_number : string

Magic number for archive files

val cmx_magic_number : string

Magic number for compilation unit descriptions

val cmxa_magic_number : string

Magic number for libraries of compilation unit descriptions

val ast_intf_magic_number : string

Magic number for file holding an interface syntax tree

val ast_impl_magic_number : string

Magic number for file holding an implementation syntax tree

val cmxs_magic_number : string

Magic number for dynamically-loadable plugins

val cmt_magic_number : string

Magic number for compiled interface files

val linear_magic_number : string

Magic number for Linear internal representation files

val max_tag : int

Biggest tag that can be stored in the header of a regular block.

val lazy_tag : int

Normally the same as Obj.lazy_tag. Separate definition because of technical reasons for bootstrapping.

val max_young_wosize : int

Maximal size of arrays that are directly allocated in the minor heap

val stack_threshold : int

Size in words of safe area at bottom of VM stack, see runtime/caml/config.h

val stack_safety_margin : int

Size in words of the safety margin between the bottom of the stack and the stack pointer. This margin can be used by intermediate computations of some instructions, or the event handler.

val architecture : string

Name of processor type for the native-code compiler

val model : string

Name of processor submodel for the native-code compiler

val system : string

Name of operating system for the native-code compiler

val asm : string

The assembler (and flags) to use for assembling ocamlopt-generated code.

val asm_cfi_supported : bool

Whether assembler understands CFI directives

val with_frame_pointers : bool

Whether assembler should maintain frame pointers

val ext_obj : string

Extension for object files, e.g. .o under Unix.

val ext_asm : string

Extension for assembler files, e.g. .s under Unix.

val ext_lib : string

Extension for library files, e.g. .a under Unix.

val ext_dll : string

Extension for dynamically-loaded libraries, e.g. .so under Unix.

val ext_exe : string

Extension for executable programs, e.g. .exe under Windows.

  • since 4.12.0
val default_executable_name : string

Name of executable produced by linking if none is given with -o, e.g. a.out under Unix.

val systhread_supported : bool

Whether the system thread library is implemented

val flexdll_dirs : string list

Directories needed for the FlexDLL objects

val host : string

Whether the compiler is a cross-compiler

val target : string

Whether the compiler is a cross-compiler

val flambda : bool

Whether the compiler was configured for flambda

val with_flambda_invariants : bool

Whether the invariants checks for flambda are enabled

val with_cmm_invariants : bool

Whether the invariants checks for Cmm are enabled

val profinfo : bool

Whether the compiler was configured for profiling

val profinfo_width : int

How many bits are to be used in values' headers for profiling information

val flat_float_array : bool

Whether the compiler and runtime automagically flatten float arrays

val function_sections : bool

Whether the compiler was configured to generate each function in a separate section

val windows_unicode : bool

Whether Windows Unicode runtime is enabled

val naked_pointers : bool

Whether the runtime supports naked pointers

  • since 4.14.0
val supports_shared_libraries : bool

Whether shared libraries are supported

  • since 4.08.0
val afl_instrument : bool

Whether afl-fuzz instrumentation is generated by default

val print_config : out_channel -> unit

Access to configuration values

val config_var : string -> string option

the configuration value of a variable, if it exists

+Config_main (ocaml.Config_main)

Module Config_main

System configuration

Warning: this module is unstable and part of compiler-libs.

val version : string

The current version number of the system

val bindir : string

The directory containing the binary programs

val standard_library : string

The directory containing the standard libraries

val ccomp_type : string

The "kind" of the C compiler, assembler and linker used: one of "cc" (for Unix-style C compilers) "msvc" (for Microsoft Visual C++ and MASM)

val c_compiler : string

The compiler to use for compiling C files

val c_output_obj : string

Name of the option of the C compiler for specifying the output file

val c_has_debug_prefix_map : bool

Whether the C compiler supports -fdebug-prefix-map

val as_has_debug_prefix_map : bool

Whether the assembler supports --debug-prefix-map

val ocamlc_cflags : string

The flags ocamlc should pass to the C compiler

val ocamlc_cppflags : string

The flags ocamlc should pass to the C preprocessor

val ocamlopt_cflags : string
  • deprecated

    ocamlc_cflags should be used instead. The flags ocamlopt should pass to the C compiler

val ocamlopt_cppflags : string
  • deprecated

    ocamlc_cppflags should be used instead. The flags ocamlopt should pass to the C preprocessor

val bytecomp_c_libraries : string

The C libraries to link with custom runtimes

val native_c_libraries : string

The C libraries to link with native-code programs

val native_pack_linker : string

The linker to use for packaging (ocamlopt -pack) and for partial links (ocamlopt -output-obj).

val mkdll : string

The linker command line to build dynamic libraries.

val mkexe : string

The linker command line to build executables.

val mkmaindll : string

The linker command line to build main programs as dlls.

val default_rpath : string

Option to add a directory to be searched for libraries at runtime (used by ocamlmklib)

val mksharedlibrpath : string

Option to add a directory to be searched for shared libraries at runtime (used by ocamlmklib)

val ar : string

Name of the ar command, or "" if not needed (MSVC)

val interface_suffix : string Stdlib.ref

Suffix for interface file names

val exec_magic_number : string

Magic number for bytecode executable files

val cmi_magic_number : string

Magic number for compiled interface files

val cmo_magic_number : string

Magic number for object bytecode files

val cma_magic_number : string

Magic number for archive files

val cmx_magic_number : string

Magic number for compilation unit descriptions

val cmxa_magic_number : string

Magic number for libraries of compilation unit descriptions

val ast_intf_magic_number : string

Magic number for file holding an interface syntax tree

val ast_impl_magic_number : string

Magic number for file holding an implementation syntax tree

val cmxs_magic_number : string

Magic number for dynamically-loadable plugins

val cmt_magic_number : string

Magic number for compiled interface files

val linear_magic_number : string

Magic number for Linear internal representation files

val max_tag : int

Biggest tag that can be stored in the header of a regular block.

val lazy_tag : int

Normally the same as Obj.lazy_tag. Separate definition because of technical reasons for bootstrapping.

val max_young_wosize : int

Maximal size of arrays that are directly allocated in the minor heap

val stack_threshold : int

Size in words of safe area at bottom of VM stack, see runtime/caml/config.h

val stack_safety_margin : int

Size in words of the safety margin between the bottom of the stack and the stack pointer. This margin can be used by intermediate computations of some instructions, or the event handler.

val architecture : string

Name of processor type for the native-code compiler

val model : string

Name of processor submodel for the native-code compiler

val system : string

Name of operating system for the native-code compiler

val asm : string

The assembler (and flags) to use for assembling ocamlopt-generated code.

val asm_cfi_supported : bool

Whether assembler understands CFI directives

val with_frame_pointers : bool

Whether assembler should maintain frame pointers

val ext_obj : string

Extension for object files, e.g. .o under Unix.

val ext_asm : string

Extension for assembler files, e.g. .s under Unix.

val ext_lib : string

Extension for library files, e.g. .a under Unix.

val ext_dll : string

Extension for dynamically-loaded libraries, e.g. .so under Unix.

val ext_exe : string

Extension for executable programs, e.g. .exe under Windows.

  • since 4.12.0
val default_executable_name : string

Name of executable produced by linking if none is given with -o, e.g. a.out under Unix.

val systhread_supported : bool

Whether the system thread library is implemented

val flexdll_dirs : string list

Directories needed for the FlexDLL objects

val host : string

Whether the compiler is a cross-compiler

val target : string

Whether the compiler is a cross-compiler

val flambda : bool

Whether the compiler was configured for flambda

val with_flambda_invariants : bool

Whether the invariants checks for flambda are enabled

val with_cmm_invariants : bool

Whether the invariants checks for Cmm are enabled

val profinfo : bool

Whether the compiler was configured for profiling

val profinfo_width : int

How many bits are to be used in values' headers for profiling information

val flat_float_array : bool

Whether the compiler and runtime automagically flatten float arrays

val function_sections : bool

Whether the compiler was configured to generate each function in a separate section

val windows_unicode : bool

Whether Windows Unicode runtime is enabled

val naked_pointers : bool

Whether the runtime supports naked pointers

  • since 4.14.0
val supports_shared_libraries : bool

Whether shared libraries are supported

  • since 4.08.0
val afl_instrument : bool

Whether afl-fuzz instrumentation is generated by default

val print_config : Stdlib.out_channel -> unit

Access to configuration values

val config_var : string -> string option

the configuration value of a variable, if it exists

diff --git a/dev/ocaml/Local_store/index.html b/dev/ocaml/Local_store/index.html index f7031b80..0e9e7a3d 100644 --- a/dev/ocaml/Local_store/index.html +++ b/dev/ocaml/Local_store/index.html @@ -1,2 +1,2 @@ -Local_store (ocaml.Local_store)

Module Local_store

This module provides some facilities for creating references (and hash tables) which can easily be snapshoted and restored to an arbitrary version.

It is used throughout the frontend (read: typechecker), to register all (well, hopefully) the global state. Thus making it easy for tools like Merlin to go back and forth typechecking different files.

Creators

val s_ref : 'a -> 'a ref

Similar to Stdlib.ref, except the allocated reference is registered into the store.

val s_table : ('a -> 'b) -> 'a -> 'b ref

Used to register hash tables. Those also need to be placed into refs to be easily swapped out, but one can't just "snapshot" the initial value to create fresh instances, so instead an initializer is required.

Use it like this:

let my_table = s_table Hashtbl.create 42

State management

Note: all the following functions are currently unused inside the compiler codebase. Merlin is their only user at the moment.

type store
val fresh : unit -> store

Returns a fresh instance of the store.

The first time this function is called, it snapshots the value of all the registered references, later calls to fresh will return instances initialized to those values.

val with_store : store -> (unit -> 'a) -> 'a

with_store s f resets all the registered references to the value they have in s for the run of f. If f updates any of the registered refs, s is updated to remember those changes.

val reset : unit -> unit

Resets all the references to the initial snapshot (i.e. to the same values that new instances start with).

val is_bound : unit -> bool

Returns true when a store is active (i.e. when called from the callback passed to with_store), false otherwise.

+Local_store (ocaml.Local_store)

Module Local_store

This module provides some facilities for creating references (and hash tables) which can easily be snapshoted and restored to an arbitrary version.

It is used throughout the frontend (read: typechecker), to register all (well, hopefully) the global state. Thus making it easy for tools like Merlin to go back and forth typechecking different files.

Creators

val s_ref : 'a -> 'a Stdlib.ref

Similar to Stdlib.ref, except the allocated reference is registered into the store.

val s_table : ('a -> 'b) -> 'a -> 'b Stdlib.ref

Used to register hash tables. Those also need to be placed into refs to be easily swapped out, but one can't just "snapshot" the initial value to create fresh instances, so instead an initializer is required.

Use it like this:

let my_table = s_table Hashtbl.create 42

State management

Note: all the following functions are currently unused inside the compiler codebase. Merlin is their only user at the moment.

type store
val fresh : unit -> store

Returns a fresh instance of the store.

The first time this function is called, it snapshots the value of all the registered references, later calls to fresh will return instances initialized to those values.

val with_store : store -> (unit -> 'a) -> 'a

with_store s f resets all the registered references to the value they have in s for the run of f. If f updates any of the registered refs, s is updated to remember those changes.

val reset : unit -> unit

Resets all the references to the initial snapshot (i.e. to the same values that new instances start with).

val is_bound : unit -> bool

Returns true when a store is active (i.e. when called from the callback passed to with_store), false otherwise.

diff --git a/dev/ocaml/Odoc_comments_global/index.html b/dev/ocaml/Odoc_comments_global/index.html index 83acbc3f..9d486e29 100644 --- a/dev/ocaml/Odoc_comments_global/index.html +++ b/dev/ocaml/Odoc_comments_global/index.html @@ -1,2 +1,2 @@ -Odoc_comments_global (ocaml.Odoc_comments_global)

Module Odoc_comments_global

val nb_chars : int ref
val authors : string list ref
val version : string option ref
val sees : string list ref
val since : string option ref
val before : (string * string) list ref
val deprecated : string option ref
val params : (string * string) list ref
val raised_exceptions : (string * string) list ref
val return_value : string option ref
val customs : (string * string) list ref
val init : unit -> unit
+Odoc_comments_global (ocaml.Odoc_comments_global)

Module Odoc_comments_global

val nb_chars : int Stdlib.ref
val authors : string list Stdlib.ref
val version : string option Stdlib.ref
val sees : string list Stdlib.ref
val since : string option Stdlib.ref
val before : (string * string) list Stdlib.ref
val deprecated : string option Stdlib.ref
val params : (string * string) list Stdlib.ref
val raised_exceptions : (string * string) list Stdlib.ref
val return_value : string option Stdlib.ref
val customs : (string * string) list Stdlib.ref
val init : unit -> unit
diff --git a/dev/ocaml/Odoc_config/index.html b/dev/ocaml/Odoc_config/index.html index 05c8352b..390ea76f 100644 --- a/dev/ocaml/Odoc_config/index.html +++ b/dev/ocaml/Odoc_config/index.html @@ -1,2 +1,2 @@ -Odoc_config (ocaml.Odoc_config)

Module Odoc_config

val custom_generators_path : string
val print_warnings : bool ref
+Odoc_config (ocaml.Odoc_config)

Module Odoc_config

val custom_generators_path : string
val print_warnings : bool Stdlib.ref
diff --git a/dev/ocaml/Profiling/index.html b/dev/ocaml/Profiling/index.html index c645e862..d4080488 100644 --- a/dev/ocaml/Profiling/index.html +++ b/dev/ocaml/Profiling/index.html @@ -1,2 +1,2 @@ -Profiling (ocaml.Profiling)

Module Profiling

val counters : (string * (string * int array)) list ref
val incr : int array -> int -> unit
+Profiling (ocaml.Profiling)

Module Profiling

val counters : (string * (string * int array)) list Stdlib.ref
val incr : int array -> int -> unit
diff --git a/dev/ocaml/Terminfo/index.html b/dev/ocaml/Terminfo/index.html index de93ab13..29dda9a2 100644 --- a/dev/ocaml/Terminfo/index.html +++ b/dev/ocaml/Terminfo/index.html @@ -1,2 +1,2 @@ -Terminfo (ocaml.Terminfo)

Module Terminfo

Basic interface to the terminfo database

Warning: this module is unstable and part of compiler-libs.

type status =
  1. | Uninitialised
  2. | Bad_term
  3. | Good_term
val setup : out_channel -> status
val num_lines : out_channel -> int
val backup : out_channel -> int -> unit
val standout : out_channel -> bool -> unit
val resume : out_channel -> int -> unit
+Terminfo (ocaml.Terminfo)

Module Terminfo

Basic interface to the terminfo database

Warning: this module is unstable and part of compiler-libs.

type status =
  1. | Uninitialised
  2. | Bad_term
  3. | Good_term
val setup : Stdlib.out_channel -> status
val num_lines : Stdlib.out_channel -> int
val backup : Stdlib.out_channel -> int -> unit
val standout : Stdlib.out_channel -> bool -> unit
val resume : Stdlib.out_channel -> int -> unit
diff --git a/dev/ocaml/X86_gas/index.html b/dev/ocaml/X86_gas/index.html index 11989fec..40e59fee 100644 --- a/dev/ocaml/X86_gas/index.html +++ b/dev/ocaml/X86_gas/index.html @@ -1,2 +1,2 @@ -X86_gas (ocaml.X86_gas)

Module X86_gas

Emit assembly instructions for gas.

val generate_asm : out_channel -> X86_ast.asm_line list -> unit
+X86_gas (ocaml.X86_gas)

Module X86_gas

Emit assembly instructions for gas.

val generate_asm : Stdlib.out_channel -> X86_ast.asm_line list -> unit
diff --git a/dev/ocaml/X86_masm/index.html b/dev/ocaml/X86_masm/index.html index 89b3e764..19666015 100644 --- a/dev/ocaml/X86_masm/index.html +++ b/dev/ocaml/X86_masm/index.html @@ -1,2 +1,2 @@ -X86_masm (ocaml.X86_masm)

Module X86_masm

Emit assembly instructions for MASM (Intel syntax).

val generate_asm : out_channel -> X86_ast.asm_line list -> unit
+X86_masm (ocaml.X86_masm)

Module X86_masm

Emit assembly instructions for MASM (Intel syntax).

val generate_asm : Stdlib.out_channel -> X86_ast.asm_line list -> unit