diff options
author | ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2013-05-08 19:55:23 +0000 |
---|---|---|
committer | ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2013-05-08 19:55:23 +0000 |
commit | d63320ceb1c56710f5e953742dd5d6cf43aacbdf (patch) | |
tree | 9a6eec0f6e330270aab09af8ae9c744282dc8a82 /library | |
parent | c9467e5684f9a71cb82ddc72b5b9d501b32b5c5e (diff) |
Uniformizing the [if_warn] flag used for warning printing and put
it into the standard logger instead.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16491 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'library')
-rw-r--r-- | library/goptions.ml | 4 | ||||
-rw-r--r-- | library/library.ml | 2 | ||||
-rw-r--r-- | library/loadpath.ml | 2 | ||||
-rw-r--r-- | library/nametab.ml | 2 |
4 files changed, 4 insertions, 6 deletions
diff --git a/library/goptions.ml b/library/goptions.ml index 597c23b7d..80539a156 100644 --- a/library/goptions.ml +++ b/library/goptions.ml @@ -314,12 +314,12 @@ let set_int_option_value_gen locality = set_option_value locality check_int_value let set_bool_option_value_gen locality key v = try set_option_value locality check_bool_value key v - with UserError (_,s) -> Flags.if_warn msg_warning s + with UserError (_,s) -> msg_warning s let set_string_option_value_gen locality = set_option_value locality check_string_value let unset_option_value_gen locality key = try set_option_value locality check_unset_value key () - with UserError (_,s) -> Flags.if_warn msg_warning s + with UserError (_,s) -> msg_warning s let set_int_option_value = set_int_option_value_gen None let set_bool_option_value = set_bool_option_value_gen None diff --git a/library/library.ml b/library/library.ml index e1ef4515d..52d3a5d1d 100644 --- a/library/library.ml +++ b/library/library.ml @@ -424,7 +424,7 @@ let rec_intern_by_filename_only id f = (* We check no other file containing same library is loaded *) if library_is_loaded m.library_name then begin - Flags.if_warn msg_warning + msg_warning (pr_dirpath m.library_name ++ str " is already loaded from file " ++ str (library_full_filename m.library_name)); m.library_name, [] diff --git a/library/loadpath.ml b/library/loadpath.ml index 873703aff..60799a8a7 100644 --- a/library/loadpath.ml +++ b/library/loadpath.ml @@ -74,7 +74,7 @@ let add_load_path phys_path isroot coq_path = begin (* Assume the user is concerned by library naming *) if not (DirPath.equal dir Nameops.default_root_prefix) then - Flags.if_warn msg_warning + msg_warning (str phys_path ++ strbrk " was previously bound to " ++ pr_dirpath dir ++ strbrk "; it is remapped to " ++ pr_dirpath coq_path); diff --git a/library/nametab.ml b/library/nametab.ml index 12cad7f55..9f2bede75 100644 --- a/library/nametab.ml +++ b/library/nametab.ml @@ -120,7 +120,6 @@ struct | Absolute (n,_) -> (* This is an absolute name, we must keep it otherwise it may become unaccessible forever *) - Flags.if_warn msg_warning (str ("Trying to mask the absolute name \"" ^ U.to_string n ^ "\"!")); tree.path @@ -160,7 +159,6 @@ let rec push_exactly uname o level tree = function | Absolute (n,_) -> (* This is an absolute name, we must keep it otherwise it may become unaccessible forever *) - Flags.if_warn msg_warning (str ("Trying to mask the absolute name \"" ^ U.to_string n ^ "\"!")); tree.path |