aboutsummaryrefslogtreecommitdiffhomepage
path: root/library/declaremods.ml
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-05-09 18:37:29 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-05-09 18:40:35 +0200
commitcd9f2859e69d99aea5b29a6d677448a39a234b6f (patch)
tree500a8b0d1c36662f590c7956cf932663028186be /library/declaremods.ml
parent4114926d5bf60b014c363788d043c00184655da2 (diff)
parentaa6a7fc837f8148655c179e9a0b63c3044edfe71 (diff)
Merge branch 'v8.5'
Diffstat (limited to 'library/declaremods.ml')
-rw-r--r--library/declaremods.ml6
1 files changed, 5 insertions, 1 deletions
diff --git a/library/declaremods.ml b/library/declaremods.ml
index 701c15e14..f3f734aa0 100644
--- a/library/declaremods.ml
+++ b/library/declaremods.ml
@@ -642,7 +642,11 @@ let declare_module interp_modast id args res mexpr_o fs =
let env = Global.env () in
let mty_entry_o, subs, inl_res = match res with
| Enforce (mty,ann) ->
- Some (fst (interp_modast env ModType mty)), [], inl2intopt ann
+ let inl = inl2intopt ann 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
+ Some mte, [], inl
| Check mtys ->
None, build_subtypes interp_modast env mp arg_entries_r mtys,
default_inline ()