diff options
author | Emilio Jesus Gallego Arias <e+git@x80.org> | 2017-11-13 18:43:02 +0100 |
---|---|---|
committer | Emilio Jesus Gallego Arias <e+git@x80.org> | 2017-11-13 18:45:41 +0100 |
commit | c571cdbbcac5cb4b4a5a19ab2f7ac51222316292 (patch) | |
tree | 2ec7070bc8d58ee4b6fd0734ea41964243a0f2ba /library | |
parent | 6bd240fce21c172680a0cec5346b66e08c76418a (diff) |
[api] Another large deprecation, `Nameops`
Diffstat (limited to 'library')
-rw-r--r-- | library/lib.ml | 13 | ||||
-rw-r--r-- | library/library.ml | 2 | ||||
-rw-r--r-- | library/nameops.mli | 19 |
3 files changed, 18 insertions, 16 deletions
diff --git a/library/lib.ml b/library/lib.ml index df9563e45..36292d367 100644 --- a/library/lib.ml +++ b/library/lib.ml @@ -9,6 +9,7 @@ open Pp open CErrors open Util +open Names open Libnames open Globnames open Nameops @@ -285,7 +286,7 @@ let start_mod is_type export id mp fs = else Nametab.exists_module dir in if exists then - user_err ~hdr:"open_module" (pr_id id ++ str " already exists"); + user_err ~hdr:"open_module" (Id.print id ++ str " already exists"); add_entry (make_oname id) (OpenedModule (is_type,export,prefix,fs)); lib_state := { !lib_state with path_prefix = prefix} ; prefix @@ -296,7 +297,7 @@ let start_modtype = start_mod true None let error_still_opened string oname = let id = basename (fst oname) in user_err - (str "The " ++ str string ++ str " " ++ pr_id id ++ str " is still opened.") + (str "The " ++ str string ++ str " " ++ Id.print id ++ str " is still opened.") let end_mod is_type = let oname,fs = @@ -337,8 +338,8 @@ let start_compilation s mp = let open_blocks_message es = let open_block_name = function - | oname, OpenedSection _ -> str "section " ++ pr_id (basename (fst oname)) - | oname, OpenedModule (ty,_,_,_) -> str (module_kind ty) ++ spc () ++ pr_id (basename (fst oname)) + | oname, OpenedSection _ -> str "section " ++ Id.print (basename (fst oname)) + | oname, OpenedModule (ty,_,_,_) -> str (module_kind ty) ++ spc () ++ Id.print (basename (fst oname)) | _ -> assert false in str "The " ++ pr_enum open_block_name es ++ spc () ++ str "need" ++ str (if List.length es == 1 then "s" else "") ++ str " to be closed." @@ -395,7 +396,7 @@ let find_opening_node id = let id' = basename (fst oname) in if not (Names.Id.equal id id') then user_err ~hdr:"Lib.find_opening_node" - (str "Last block to end has name " ++ pr_id id' ++ str "."); + (str "Last block to end has name " ++ Id.print id' ++ str "."); entry with Not_found -> user_err Pp.(str "There is nothing to end.") @@ -526,7 +527,7 @@ let open_section id = let dir = add_dirpath_suffix olddir id in let prefix = dir, (mp, add_dirpath_suffix oldsec id) in if Nametab.exists_section dir then - user_err ~hdr:"open_section" (pr_id id ++ str " already exists."); + user_err ~hdr:"open_section" (Id.print id ++ str " already exists."); let fs = Summary.freeze_summaries ~marshallable:`No in add_entry (make_oname id) (OpenedSection (prefix, fs)); (*Pushed for the lifetime of the section: removed by unfrozing the summary*) diff --git a/library/library.ml b/library/library.ml index 840fe563a..99ef66699 100644 --- a/library/library.ml +++ b/library/library.ml @@ -617,7 +617,7 @@ let check_coq_overwriting p id = let is_empty = match l with [] -> true | _ -> false in if not !Flags.boot && not is_empty && Id.equal (List.last l) coq_root then user_err - (str "Cannot build module " ++ pr_dirpath p ++ str "." ++ pr_id id ++ str "." ++ spc () ++ + (str "Cannot build module " ++ pr_dirpath p ++ str "." ++ Id.print id ++ str "." ++ spc () ++ str "it starts with prefix \"Coq\" which is reserved for the Coq library.") let start_library fo = diff --git a/library/nameops.mli b/library/nameops.mli index 26f300b61..60e5a90bb 100644 --- a/library/nameops.mli +++ b/library/nameops.mli @@ -90,33 +90,34 @@ module Name : sig end val out_name : Name.t -> Id.t -(** @deprecated Same as [Name.get_id] *) +[@@ocaml.deprecated "Same as [Name.get_id]"] val name_fold : (Id.t -> 'a -> 'a) -> Name.t -> 'a -> 'a -(** @deprecated Same as [Name.fold_right] *) +[@@ocaml.deprecated "Same as [Name.fold_right]"] val name_iter : (Id.t -> unit) -> Name.t -> unit -(** @deprecated Same as [Name.iter] *) +[@@ocaml.deprecated "Same as [Name.iter]"] val name_app : (Id.t -> Id.t) -> Name.t -> Name.t -(** @deprecated Same as [Name.map] *) +[@@ocaml.deprecated "Same as [Name.map]"] val name_fold_map : ('a -> Id.t -> 'a * Id.t) -> 'a -> Name.t -> 'a * Name.t -(** @deprecated Same as [Name.fold_left_map] *) +[@@ocaml.deprecated "Same as [Name.fold_left_map]"] val name_max : Name.t -> Name.t -> Name.t -(** @deprecated Same as [Name.pick] *) +[@@ocaml.deprecated "Same as [Name.pick]"] val name_cons : Name.t -> Id.t list -> Id.t list -(** @deprecated Same as [Name.cons] *) +[@@ocaml.deprecated "Same as [Name.cons]"] val pr_name : Name.t -> Pp.t -(** @deprecated Same as [Name.print] *) +[@@ocaml.deprecated "Same as [Name.print]"] val pr_id : Id.t -> Pp.t -(** @deprecated Same as [Names.Id.print] *) +[@@ocaml.deprecated "Same as [Names.Id.print]"] val pr_lab : Label.t -> Pp.t +[@@ocaml.deprecated "Same as [Names.Label.print]"] (** some preset paths *) |