Module Async_command
Async.Command
is Core.Command
with additional Async functions.
include module type of sig ... end
module Arg_type = Core__Command.Arg_type
module Flag = Core__Command.Flag
module Anons = Core__Command.Anons
module Param = Core__Command.Param
module Let_syntax = Core__Command.Let_syntax
module Spec = Core__Command.Spec
type t
= Core_kernel__Command.t
type ('main, 'result) basic_spec_command
= summary:Core_kernel__.Import.string -> ?readme:(Core_kernel__.Import.unit -> Core_kernel__.Import.string) -> ('main, Core_kernel__.Import.unit -> 'result) Spec.t -> 'main -> t
val basic_spec : ('main, Core_kernel__.Import.unit) basic_spec_command
type 'result basic_command
= summary:Core_kernel__.Import.string -> ?readme:(Core_kernel__.Import.unit -> Core_kernel__.Import.string) -> (Core_kernel__.Import.unit -> 'result) Param.t -> t
val basic : Core_kernel__.Import.unit basic_command
val group : summary:Core_kernel__.Import.string -> ?readme:(Core_kernel__.Import.unit -> Core_kernel__.Import.string) -> ?preserve_subcommand_order:Core_kernel__.Import.unit -> ?body:(path:Core_kernel__.Import.string Core_kernel__.Import.list -> Core_kernel__.Import.unit) -> (Core_kernel__.Import.string * t) Core_kernel__.Import.list -> t
val lazy_group : summary:Core_kernel__.Import.string -> ?readme:(Core_kernel__.Import.unit -> Core_kernel__.Import.string) -> ?preserve_subcommand_order:Core_kernel__.Import.unit -> ?body:(path:Core_kernel__.Import.string Core_kernel__.Import.list -> Core_kernel__.Import.unit) -> (Core_kernel__.Import.string * t) Core_kernel__.Import.list Core_kernel.Lazy.t -> t
val exec : summary:Core_kernel__.Import.string -> ?readme:(Core_kernel__.Import.unit -> Core_kernel__.Import.string) -> ?child_subcommand:Core_kernel__.Import.string Core_kernel__.Import.list -> path_to_exe:[ `Absolute of Core_kernel__.Import.string | `Relative_to_argv0 of Core_kernel__.Import.string | `Relative_to_me of Core_kernel__.Import.string ] -> Core_kernel__.Import.unit -> t
val of_lazy : t Core_kernel.Lazy.t -> t
val summary : t -> Core_kernel__.Import.string
val exit : Core_kernel__.Import.int -> 'a
module Private = Core__Command.Private
val run : ?verbose_on_parse_error:bool -> ?version:string -> ?build_info:string -> ?argv:string list -> ?extend:(string list -> string list) -> t -> unit
module Path = Core__Command.Path
module Shape = Core__Command.Shape
module Deprecated = Core__Command.Deprecated
val async : unit Async_command__.Import.Deferred.t basic_command with_options
async
is likeCore.Command.basic
, except that the main function it expects returnsunit Deferred.t
, instead ofunit
.async
will also start the Async scheduler before main is run, and will stop the scheduler when main returns.async
also handles top-level exceptions by wrapping the user-supplied function in aMonitor.try_with
. If an exception is raised, it will print it to stderr and callshutdown 1
. Theextract_exn
argument is passed along toMonitor.try_with
; by default it isfalse
.
val async_spec : ('a, unit Async_command__.Import.Deferred.t) basic_spec_command with_options
val async_or_error : unit Async_command__.Import.Deferred.Or_error.t basic_command with_options
async_or_error
is likeasync
, except that the main function it expects may return an error, in which case it prints out the error message and shuts down with exit code 1.
val async_spec_or_error : ('a, unit Async_command__.Import.Deferred.Or_error.t) basic_spec_command with_options
type 'r staged
= ([ `Scheduler_started ] -> 'r) Core.Staged.t
module Staged : sig ... end