dc273e13e834 — Chris Cannam 6 years ago
Usage
1 files changed, 7 insertions(+), 1 deletions(-)

M test.sml
M test.sml +7 -1
@@ 26,7 26,13 @@ fun processFile filename =
     end
 
 fun usage () =
-    (TextIO.output (TextIO.stdErr, "Usage: test file.json\n");
+    (TextIO.output
+         (TextIO.stdErr,
+          "\nUsage: " ^ (CommandLine.name ()) ^
+          " [-i] file.json\n\n" ^
+          "Parse the named JSON file and serialise it again to stdout.\n\n" ^
+          "  -i   Indent the output for readability by humans. The default\n" ^
+          "       is to serialise it in a single line.\n\n");
      raise Fail "Incorrect arguments specified")
 
 fun handleArgs args =