package fmlib_browser

  1. Overview
  2. Docs

Module Fmlib_browser.CommandSource

Commands to be executed as a result of an update operation.

An elementary command consists of a Task to be executed.

Sourcetype _ t

msg t is the type of a command generating an object of type msg to inject it into the update function of the application.

Sourceval none : _ t

An empty command.

Sourceval batch : 'm t list -> 'm t

batch lst A list of commands to be executed.

Sourceval perform : ('m, Task.empty) Task.t -> 'm t

perform task Perform the non failing task and send the message generated by the task to the application.

Sourceval attempt : (('a, 'e) result -> 'm) -> ('a, 'e) Task.t -> 'm t

attemp f task Attempt the possibly failing task and map the result via the function f into a message to send to the application.

OCaml

Innovation. Community. Security.