diff options
| author | soubiran | 2010-05-05 12:27:48 +0000 |
|---|---|---|
| committer | soubiran | 2010-05-05 12:27:48 +0000 |
| commit | 6d8d2c2f3941a9be486f225d9b62239a6a9113a1 (patch) | |
| tree | df1f6e65d581e8c5de3550e830bf9b39ed4d4dab /library | |
| parent | 9a822a9b927bb3516445779f7de99cf0ef43692e (diff) | |
Patch bug 2313.
Including a module or module type into the top module.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12994 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'library')
| -rw-r--r-- | library/lib.ml | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/library/lib.ml b/library/lib.ml index dcf7e70cd6..34be607fec 100644 --- a/library/lib.ml +++ b/library/lib.ml @@ -262,13 +262,19 @@ let is_opening_node = function _,(OpenedSection _ | OpenedModule _ | OpenedModtype _) -> true | _ -> false +let is_opening_node_or_lib = function + _,(CompilingLibrary _ | OpenedSection _ + | OpenedModule _ | OpenedModtype _) -> true + | _ -> false let current_mod_id () = - try match find_entry_p is_opening_node with + try match find_entry_p is_opening_node_or_lib with | oname,OpenedModule (_,_,fs) -> basename (fst oname) | oname,OpenedModtype (_,fs) -> basename (fst oname) + | oname,CompilingLibrary _ -> + basename (fst oname) | _ -> error "you are not in a module" with Not_found -> error "no opened modules" |
