Cmdlang_to_base.Translate
Translate cmdlang parsers to core.command.
The translation implemented in this module allows some configuration regarding the resulting command that you want to build. The goal of this configuration is to furnish assistance for complex multi-stages migrations from a backend to another.
It is currently experimental, not well tested or documented, and expected to change in the future.
module Config : sig ... end
val param :
'a Cmdlang.Command.Param.t ->
config:Config.t ->
'a Command.Arg_type.t
val arg : 'a Cmdlang.Command.Arg.t -> config:Config.t -> 'a Command.Param.t
val command_basic :
?config:Config.t ->
(Base.unit -> Base.unit) Cmdlang.Command.t ->
Command.t
val command_or_error :
?config:Config.t ->
(Base.unit -> Base.unit Base.Or_error.t) Cmdlang.Command.t ->
Command.t
val command_unit : ?config:Config.t -> Base.unit Cmdlang.Command.t -> Command.t
unit
can be a convenient helper during a migration, however note that it is probably not quite right, due to the body of the command being evaluated as an argument.
module Utils : sig ... end
module Private : sig ... end
This module is exported for testing purposes only. Its signature may change in breaking ways without any notice. Do not use.