OCaml: Add simulate (dry run) configuration option
This commit is contained in:
parent
1f16024c9e
commit
9e9a9566db
5 changed files with 42 additions and 25 deletions
|
|
@ -5,15 +5,15 @@ type schema = Schema.schema
|
|||
type status = Exit of int | Unevaluated
|
||||
type command = { name : string; arguments : string list; status : status }
|
||||
|
||||
|
||||
let format (command : command) : string =
|
||||
command.name ^ " with arguments: "
|
||||
^ String.concat " " command.arguments
|
||||
^ " and result "
|
||||
^ " ("
|
||||
^
|
||||
match command.status with
|
||||
| Exit n -> str_int n
|
||||
| Unevaluated -> "Not evaluated"
|
||||
(match command.status with
|
||||
| Exit n -> "Exit status " ^ str_int n
|
||||
| Unevaluated -> "Not evaluated")
|
||||
^ ")"
|
||||
|
||||
let format_many (commands : command list) : string list =
|
||||
List.map format commands
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue