aboutsummaryrefslogtreecommitdiffhomepage
path: root/library
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-05-04 13:30:00 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-05-04 13:33:08 +0200
commita6de02fcfde76f49b10d8481a2423692fa105756 (patch)
tree344a2e7114b8cb9cc0e54d8d801b4f7cdf5d6d7b /library
parentc81228e693dea839f648ddc95f7cedec22d6a47a (diff)
parent174fd1f853f47d24b350a53e7f186ab37829dc2a (diff)
Merge branch 'v8.5'
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 4c9c40a73..701c15e14 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