Idris2Doc : Web.MVC.Cmd

Web.MVC.Cmd

(source)

Definitions

record Cmd : Type -> Type
  A `Cmd` (abbreviation of "command") is a (typically effectful) computation
which might send an arbitrary number of events of type `e` to an event
handler synchronously or asynchronously.

Commands are used as the primary means of setting up (interactive) UI
components and running effectful computations.

Module `Web.MVC.View` provides various commands for creating, modifying
and deleting interactive DOM elements.

Module `Web.MVC.Animate` has commands for firing events at regular
intervals and for running animations.

Module `Web.MVC.Http` has commands for sending requests to and
firing events upon receiving responses from HTTP servers.

Totality: total
Visibility: public export
Constructor: 
C : ((e -> JSIO ()) -> JSIO ()) -> Cmd e

Projection: 
.run : Cmd e -> (e -> JSIO ()) -> JSIO ()

Hints:
Functor Cmd
Monoid (Cmd e)
Semigroup (Cmd e)
.run : Cmd e -> (e -> JSIO ()) -> JSIO ()
Totality: total
Visibility: public export
run : Cmd e -> (e -> JSIO ()) -> JSIO ()
Totality: total
Visibility: public export
batch : List (Cmd e) -> Cmd e
  Wraps a batch of commands in a single command by
installing each command sequentially.

This function is stack safe.

Totality: total
Visibility: export
cmd : JSIO e -> Cmd e
  Wrap an effectful computation in a command.

The produced result is fired synchronously.

Totality: total
Visibility: export
liftIO : IO e -> Cmd e
  Wrap an effectful computation in a command.

The produced result is fired synchronously.

Totality: total
Visibility: export
cmd_ : JSIO () -> Cmd e
  Wrap an effectful computation in a command.

This will never fire an event.

Totality: total
Visibility: export
liftIO_ : IO () -> Cmd e
  Wrap an effectful computation in a command.

This will never fire an event.

Totality: total
Visibility: export
pure : e -> Cmd e
  Fires the given event once, synchronously.

Totality: total
Visibility: export
noAction : Cmd e
  A command that produces no event.

This will never fire an event.

Totality: total
Visibility: export
cmdIf : Bool -> Lazy (Cmd e) -> Cmd e
  Use the given command conditionally.

If the boolean flag is `False`, this will return the
empty command (`noAction`).

Totality: total
Visibility: export
cmdIfJust : Maybe t -> (t -> Cmd e) -> Cmd e
  Convert a value in a `Maybe` to a `Cmd e`.

Returns the empty command in case of a `Nothing`.

Totality: total
Visibility: export