aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel/mod_typing.ml
diff options
context:
space:
mode:
authorGravatar Matthieu Sozeau <matthieu.sozeau@inria.fr>2015-07-16 16:40:25 +0200
committerGravatar Matthieu Sozeau <matthieu.sozeau@inria.fr>2015-07-16 16:42:48 +0200
commitebb53e68cdc935a85c4da10852be4f7f3b492ee2 (patch)
treed2ce0abd3158e90aaf8076e13e57b436f4ea4b68 /kernel/mod_typing.ml
parent3bcc96d5ab6571a7810b68c340af7aa195ef76f4 (diff)
Modules: fix bug #4294
We were throwing away constraints from 'with Definition' in module type ascriptions.
Diffstat (limited to 'kernel/mod_typing.ml')
-rw-r--r--kernel/mod_typing.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/mod_typing.ml b/kernel/mod_typing.ml
index 26dd45f5f..4f20e5f62 100644
--- a/kernel/mod_typing.ml
+++ b/kernel/mod_typing.ml
@@ -307,7 +307,9 @@ let finalize_module env mp (sign,alg,reso,cst) restype = match restype with
{ res_mtb with
mod_mp = mp;
mod_expr = impl;
- mod_constraints = cst +++ cst' }
+ (** cst from module body typing, cst' from subtyping,
+ and constraints from module type. *)
+ mod_constraints = cst +++ cst' +++ res_mtb.mod_constraints }
let translate_module env mp inl = function
|MType (params,ty) ->