From daa3373748a896d0b5fc00c0d6b79f59e79a128d Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Thu, 6 Dec 2001 08:59:30 +0000 Subject: [PATCH] It now exits gracefully after an End-of-file. --- helm/proofChecker/Makefile | 4 ++-- helm/proofChecker/proofChecker.ml | 28 ++++++++++++++++------------ 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/helm/proofChecker/Makefile b/helm/proofChecker/Makefile index 8cea8c8dc..107d5699e 100644 --- a/helm/proofChecker/Makefile +++ b/helm/proofChecker/Makefile @@ -9,8 +9,8 @@ OCAMLDEP = ocamldep LIBRARIES = $(shell ocamlfind query -recursive -predicates "byte $(PREDICATES)" -format "%d/%a" $(REQUIRES)) LIBRARIES_OPT = $(shell ocamlfind query -recursive -predicates "native $(PREDICATES)" -format "%d/%a" $(REQUIRES)) -all: proofChecker -opt: proofChecker.opt +all: $(PROOFCHECKEROBJS) proofChecker +opt: $(PROOFCHECKEROBJS:.cmo=.cmx) proofChecker.opt DEPOBJS = proofChecker.ml diff --git a/helm/proofChecker/proofChecker.ml b/helm/proofChecker/proofChecker.ml index 1c7245164..d7cf69284 100644 --- a/helm/proofChecker/proofChecker.ml +++ b/helm/proofChecker/proofChecker.ml @@ -39,18 +39,22 @@ List of options:" 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 + try + while true do + begin + try + CicTypeChecker.typecheck (UriManager.uri_of_string (read_line ())) + with + End_of_file -> raise End_of_file + | e -> + print_newline() ; + flush stdout ; + raise e + end ; + print_endline "END" + done + with + End_of_file -> () ;; CicCooking.init() ; -- 2.39.2