diff options
author | Matej Kosik <matej.kosik@inria.fr> | 2016-08-13 18:11:22 +0200 |
---|---|---|
committer | Matej Kosik <matej.kosik@inria.fr> | 2016-08-24 21:12:29 +0200 |
commit | a5d336774c7b5342c8d873d43c9b92bae42b43e7 (patch) | |
tree | 1a1e4e6868c32222f94ee59257163d7d774ec9d0 /library/decls.ml | |
parent | d5d80dfc0f773fd6381ee4efefc74804d103fe4e (diff) |
CLEANUP: minor readability improvements
mainly concerning referring to "Context.{Rel,Named}.get_{id,value,type}" functions.
If multiple modules define a function with a same name, e.g.:
Context.{Rel,Named}.get_type
those calls were prefixed with a corresponding prefix
to make sure that it is obvious which function is being called.
Diffstat (limited to 'library/decls.ml')
-rw-r--r-- | library/decls.ml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/library/decls.ml b/library/decls.ml index 6e21880f1..2952c258a 100644 --- a/library/decls.ml +++ b/library/decls.ml @@ -14,6 +14,8 @@ open Names open Decl_kinds open Libnames +module NamedDecl = Context.Named.Declaration + (** Datas associated to section variables and local definitions *) type variable_data = @@ -46,20 +48,18 @@ let constant_kind kn = Cmap.find kn !csttab (** Miscellaneous functions. *) -open Context.Named.Declaration - let initialize_named_context_for_proof () = let sign = Global.named_context () in List.fold_right (fun d signv -> - let id = get_id d in - let d = if variable_opacity id then LocalAssum (id, get_type d) else d in + let id = NamedDecl.get_id d in + let d = if variable_opacity id then NamedDecl.LocalAssum (id, NamedDecl.get_type d) else d in Environ.push_named_context_val d signv) sign Environ.empty_named_context_val let last_section_hyps dir = Context.Named.fold_outside (fun d sec_ids -> - let id = get_id d in + let id = NamedDecl.get_id d in try if DirPath.equal dir (variable_path id) then id::sec_ids else sec_ids with Not_found -> sec_ids) (Environ.named_context (Global.env())) |