OCaml: Apply formatting
This commit is contained in:
parent
ce3859f62c
commit
bb1cd19000
12 changed files with 145 additions and 74 deletions
|
|
@ -1,9 +1,11 @@
|
|||
let interpret (past: Schema.schema) (input: string list): Schema.schema =
|
||||
let interpret (past : Schema.schema) (input : string list) : Schema.schema =
|
||||
let future : Schema.schema =
|
||||
{ past with output = { past.output with main = "" } }
|
||||
in
|
||||
|
||||
let future: Schema.schema = { past with output = { past.output with main = "" } } in
|
||||
|
||||
let say (message: string): Schema.schema =
|
||||
{ future with output = { future.output with main = message }} in
|
||||
let say (message : string) : Schema.schema =
|
||||
{ future with output = { future.output with main = message } }
|
||||
in
|
||||
|
||||
(*
|
||||
TODO: return a schema with orders, instead of calling side-effects
|
||||
|
|
@ -18,12 +20,14 @@ let interpret (past: Schema.schema) (input: string list): Schema.schema =
|
|||
say (Schema.format_version future.meta.version)
|
||||
| ("help" | "-h" | "--help") :: _ -> say future.meta.help.long
|
||||
| head :: _ ->
|
||||
{ future with
|
||||
output = {
|
||||
future.output with main =
|
||||
("Unrecognized command: " ^ head ^ "\n"
|
||||
^ future.meta.help.short)
|
||||
{
|
||||
future with
|
||||
output =
|
||||
{
|
||||
future.output with
|
||||
main =
|
||||
"Unrecognized command: " ^ head ^ "\n" ^ future.meta.help.short;
|
||||
};
|
||||
meta = { future.meta with status = 1 };
|
||||
meta = { future.meta with status = 1 };
|
||||
}
|
||||
| _ -> future
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue