aboutsummaryrefslogtreecommitdiffhomepage
path: root/checker/checker.ml
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-11-29 14:41:42 +0100
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-11-29 14:47:42 +0100
commit8ddc9cbd13ffc22a5895560102852506c9b1ece3 (patch)
tree13941c1a6c24752e163ce7b7f972d7f2931552be /checker/checker.ml
parent46c3ab137fe6705293e8a44624e2a564cde1d55a (diff)
Mark the -I option in coqchk as deprecated and merge it with -Q.
It is not doing the same thing as coqtop, and the corresponding coqtop semantics is irrelevant in the checker as the latter does not rely on ML code.
Diffstat (limited to 'checker/checker.ml')
-rw-r--r--checker/checker.ml20
1 files changed, 9 insertions, 11 deletions
diff --git a/checker/checker.ml b/checker/checker.ml
index cc285d5e4..596d42b66 100644
--- a/checker/checker.ml
+++ b/checker/checker.ml
@@ -96,17 +96,13 @@ let add_rec_path ~unix_path ~coq_root =
(* By the option -include -I or -R of the command line *)
let includes = ref []
-let push_include (s, alias) = includes := (s,alias,false) :: !includes
-let push_rec_include (s, alias) = includes := (s,alias,true) :: !includes
+let push_include (s, alias) = includes := (s,alias) :: !includes
let set_default_include d =
push_include (d, Check.default_root_prefix)
let set_include d p =
let p = dirpath_of_string p in
push_include (d,p)
-let set_rec_include d p =
- let p = dirpath_of_string p in
- push_rec_include(d,p)
(* Initializes the LoadPath *)
let init_load_path () =
@@ -132,8 +128,7 @@ let init_load_path () =
add_path ~unix_path:"." ~coq_root:Check.default_root_prefix;
(* additional loadpath, given with -I -include -R options *)
List.iter
- (fun (unix_path, coq_root, reci) ->
- if reci then add_rec_path ~unix_path ~coq_root else add_path ~unix_path ~coq_root)
+ (fun (unix_path, coq_root) -> add_rec_path ~unix_path ~coq_root)
(List.rev !includes);
includes := []
@@ -311,6 +306,9 @@ let explain_exn = function
report ())
| e -> CErrors.print e (* for anomalies and other uncaught exceptions *)
+let deprecated flag =
+ Feedback.msg_warning (str "Deprecated flag " ++ quote (str flag))
+
let parse_args argv =
let rec parse = function
| [] -> ()
@@ -324,15 +322,15 @@ let parse_args argv =
Flags.coqlib_spec := true;
parse rem
- | ("-I"|"-include") :: d :: "-as" :: p :: rem -> set_include d p; parse rem
+ | ("-I"|"-include") :: d :: "-as" :: p :: rem -> deprecated "-I"; set_include d p; parse rem
| ("-I"|"-include") :: d :: "-as" :: [] -> usage ()
- | ("-I"|"-include") :: d :: rem -> set_default_include d; parse rem
+ | ("-I"|"-include") :: d :: rem -> deprecated "-I"; set_default_include d; parse rem
| ("-I"|"-include") :: [] -> usage ()
- | "-Q" :: d :: p :: rem -> set_rec_include d p;parse rem
+ | "-Q" :: d :: p :: rem -> set_include d p;parse rem
| "-Q" :: ([] | [_]) -> usage ()
- | "-R" :: d :: p :: rem -> set_rec_include d p;parse rem
+ | "-R" :: d :: p :: rem -> set_include d p;parse rem
| "-R" :: ([] | [_]) -> usage ()
| "-debug" :: rem -> set_debug (); parse rem