From 1522b9899b669f4fdd0fc9be1963c5e96d81a13f Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Sat, 7 Apr 2018 18:43:40 +0200 Subject: Fixes #7192 (Print Assumptions does not enter implementation of submodules). We fix it by looking manually for the implementation at each level of nesting rather than using the signature for the n first levels and looking for the implementation only in the n+1-th level. --- library/global.ml | 3 +++ library/global.mli | 2 ++ 2 files changed, 5 insertions(+) (limited to 'library') diff --git a/library/global.ml b/library/global.ml index 6083c4079..dcb20a280 100644 --- a/library/global.ml +++ b/library/global.ml @@ -259,6 +259,9 @@ let is_type_in_type r = | IndRef ind -> Environ.type_in_type_ind ind env | ConstructRef cstr -> Environ.type_in_type_ind (inductive_of_constructor cstr) env +let current_modpath () = + Safe_typing.current_modpath (safe_env ()) + let current_dirpath () = Safe_typing.current_dirpath (safe_env ()) diff --git a/library/global.mli b/library/global.mli index 015f4d582..b82039a0c 100644 --- a/library/global.mli +++ b/library/global.mli @@ -157,6 +157,8 @@ val set_strategy : Constant.t Names.tableKey -> Conv_oracle.level -> unit (* Modifies the global state, registering new universes *) +val current_modpath : unit -> ModPath.t + val current_dirpath : unit -> DirPath.t val with_global : (Environ.env -> DirPath.t -> 'a Univ.in_universe_context_set) -> 'a -- cgit v1.2.3