aboutsummaryrefslogtreecommitdiff
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rw-r--r--library/declaremods.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/declaremods.ml b/library/declaremods.ml
index 397104d7b5..6cae78bba4 100644
--- a/library/declaremods.ml
+++ b/library/declaremods.ml
@@ -475,10 +475,10 @@ let end_module id =
let substituted = subst_substobjs dir mp substobjs in
let node = in_module (None,substobjs,substituted) in
let objects =
- if keep = [] then
- special@[node]
+ if keep = [] || mbids <> [] then
+ special@[node] (* no keep objects or we are defining a functor *)
else
- special@[node;in_modkeep keep]
+ special@[node;in_modkeep keep] (* otherwise *)
in
let newoname = Lib.add_leaves id objects in