*)
let main () =
- let uris = ref [] in
- Arg.parse []
- (fun uri -> uris := uri :: !uris)
+ let usage_msg =
"
-usage: proofChecker uri ...
+usage: proofChecker[.opt]
+The proof-checker reads from the stdin one URI at a time and proof-checks it.
-List of options:";
- uris := List.rev !uris;
- List.iter
- (function uri ->
- try
- CicTypeChecker.typecheck (UriManager.uri_of_string uri)
- with
- e -> print_newline () ; flush stdout ; raise e
- ) !uris
+List of options:"
+ in
+ Arg.parse []
+ (fun _ ->
+ begin
+ prerr_string "Error: no options expected.\n" ;
+ Arg.usage [] usage_msg ;
+ exit (-1)
+ end
+ ) usage_msg ;
+ while true do
+ begin
+ try
+ CicTypeChecker.typecheck (UriManager.uri_of_string (read_line ()))
+ with
+ e ->
+ print_newline() ;
+ flush stdout ;
+ raise e
+ end ;
+ print_endline "END"
+ done
;;
CicCooking.init() ;