Module Mlang.Cli
Command line arguments parsing
val mlang_t : (string list -> bool -> bool -> string list -> bool -> string -> bool -> string option -> string option -> string -> string option -> string option -> bool -> string option -> string -> bool -> bool -> bool -> string option -> string option -> float option -> bool -> string list option -> (string * string) option -> 'a) -> 'a Cmdliner.Term.t
Mlang binary command-line arguments parsing function
Flags and parameters
type value_sort
=
|
RegularFloat
|
MPFR of int
bitsize of the floats
|
BigInt of int
precision of the fixed point
|
Interval
|
Rational
According on the
value_sort
, a specific interpreter will be called with the right kind of floating-point value
type round_ops
=
|
RODefault
|
ROMulti
|
ROMainframe of int
size of type long, either 32 or 64
Rounding operations to use in the interpreter. They correspond to the rounding operations used by the DGFiP calculator in different execution contexts.
- RODefault: rounding operations used in the PC/single-thread context
- ROMulti: rouding operations used in the PC/multi-thread context
- ROMainframe rounding operations used in the mainframe context
val var_info_flag : bool Stdlib.ref
Print infomation about variables declared, defined ou used incorrectly
val var_info_debug : string list Stdlib.ref
Prints even more information but only about some variables members of a list
val value_sort : value_sort Stdlib.ref
val round_ops : round_ops Stdlib.ref
val set_all_arg_refs : string list -> bool -> bool -> string list -> bool -> string -> bool -> string option -> bool -> bool -> value_sort -> round_ops -> unit
val add_prefix_to_each_line : string -> (int -> string) -> string
add_prefix_to_each_line msg prefix
will print msg but each line with line numberi
starts with the stringprefix i
Printers
val var_info_print : ('a, Stdlib.Format.formatter, unit, unit) Stdlib.format4 -> 'a
val debug_print : ?endline:string -> ('a, Stdlib.Format.formatter, unit, unit) Stdlib.format4 -> 'a
val warning_print : ('a, Stdlib.Format.formatter, unit, unit) Stdlib.format4 -> 'a
val error_print : ('a, Stdlib.Format.formatter, unit, unit) Stdlib.format4 -> 'a
val result_print : ('a, Stdlib.Format.formatter, unit, unit) Stdlib.format4 -> 'a
val create_progress_bar : string -> (string -> unit) * (string -> unit)
Returns two functions: the first one,
current_progress
, has to be called during the progress loop and the other one,finish
, has to be called at the end of the progressive task.