aboutsummaryrefslogtreecommitdiffhomepage
path: root/library
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-05-03 14:22:04 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-05-03 14:33:23 +0200
commite7d54d7fe751e21001c6873fc6092b5adc8eb682 (patch)
tree8e56fe49bba5c1c59cc5eb8c97b3a7e78eb0d133 /library
parent443857fe1bbecf089eb40d522a71a014273c5a23 (diff)
Fix bug #4292: Unexpected functor objects.
Diffstat (limited to 'library')
-rw-r--r--library/declaremods.ml5
1 files changed, 4 insertions, 1 deletions
diff --git a/library/declaremods.ml b/library/declaremods.ml
index 043484151..651c76ae1 100644
--- a/library/declaremods.ml
+++ b/library/declaremods.ml
@@ -727,7 +727,10 @@ let declare_modtype interp_modast id args mtys (mty,ann) fs =
let arg_entries_r = intern_args interp_modast args in
let params = mk_params_entry arg_entries_r in
let env = Global.env () in
- let entry = params, fst (interp_modast env ModType mty) in
+ let mte, _ = interp_modast env ModType mty in
+ (* We check immediately that mte is well-formed *)
+ let _ = Mod_typing.translate_mse env None inl mte in
+ let entry = params, mte in
let sub_mty_l = build_subtypes interp_modast env mp arg_entries_r mtys in
let sobjs = get_functor_sobjs false env inl entry in
let subst = map_mp (get_module_path (snd entry)) mp empty_delta_resolver in