Skip to content

Commit

Permalink
-h and -v are not uniform (fix #117)
Browse files Browse the repository at this point in the history
  • Loading branch information
gares committed Oct 28, 2021
1 parent 9b71426 commit ac7fcd4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions elpi_REPL.ml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ let usage =
"\t-no-tc don't typecheck the program\n" ^
"\t-delay-problems-outside-pattern-fragment (deprecated, for Teyjus\n" ^
"\t compatibility)\n" ^
"\t-version prints the version of Elpi\n" ^
"\t--version prints the version of Elpi (also -v or -version)\n" ^
"\t--help prints this help (also -h or -help)\n" ^
API.Setup.usage ^
"\nDebug options (for debugging Elpi, not your program):\n" ^
"\t-print-accumulated-files prints files loaded via accumulate\n" ^
Expand Down Expand Up @@ -103,8 +104,8 @@ let _ =
| "-no-tc" :: rest -> typecheck := false; eat_options rest
| "-document-builtins" :: rest -> doc_builtins := true; eat_options rest
| "-D" :: var :: rest -> vars := API.Compile.StrSet.add var !vars; eat_options rest
| ("-h" | "--help") :: _ -> Printf.eprintf "%s" usage; exit 0
| "-version" :: _ -> Printf.printf "%s\n" "%%VERSION_NUM%%"; exit 0
| ("-h" | "--help" | "-help") :: _ -> Printf.eprintf "%s" usage; exit 0
| ("-v" | "--version" | "-version") :: _ -> Printf.printf "%s\n" "%%VERSION_NUM%%"; exit 0
| "--" :: rest -> rest
| x :: rest -> x :: eat_options rest
in
Expand Down

0 comments on commit ac7fcd4

Please sign in to comment.