diff options
author | coq <coq@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2003-01-22 10:04:13 +0000 |
---|---|---|
committer | coq <coq@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2003-01-22 10:04:13 +0000 |
commit | 314333e2ce7c06293ab6e5292b2927afb75b6a6f (patch) | |
tree | 0af2af425e99e771a9279616850f660a97a1f60b /kernel/mod_typing.ml | |
parent | e4c997965f822488376fde2bb34285d3ec943a20 (diff) |
Bug 'with Module' corrige
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@3573 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'kernel/mod_typing.ml')
-rw-r--r-- | kernel/mod_typing.ml | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/kernel/mod_typing.ml b/kernel/mod_typing.ml index 7417b4261..8fee8481d 100644 --- a/kernel/mod_typing.ml +++ b/kernel/mod_typing.ml @@ -108,7 +108,15 @@ and merge_with env mtb with_decl = | _ -> error_not_a_module (string_of_label l) in let mtb = type_modpath env' mp in - (* here, we should assert that there is no msid in mtb *) + (* here, using assertions in substitutions, + we check that there is no msid bound in mtb *) + begin + try + let _ = subst_modtype (map_msid msid (MPself msid)) mtb in + () + with + Assert_failure _ -> error_circular_with_module id + end; let cst = check_subtypes env' mtb old.msb_modtype in let equiv = match old.msb_equiv with |