diff options
| author | soubiran | 2007-02-21 13:54:58 +0000 |
|---|---|---|
| committer | soubiran | 2007-02-21 13:54:58 +0000 |
| commit | cfa3aa27f1141fe732a473efd0cff794694c63bb (patch) | |
| tree | 3904eb887185d18375c6d93e68c314a7c464868c /kernel/mod_typing.ml | |
| parent | dc7f5e8bbd6fb7da277ee89278211105157b2041 (diff) | |
Fixed the pseudo-cicularity problem due to the with operator on Module Type.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9662 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'kernel/mod_typing.ml')
| -rw-r--r-- | kernel/mod_typing.ml | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/kernel/mod_typing.ml b/kernel/mod_typing.ml index 824d2e4eb5..e9bca90650 100644 --- a/kernel/mod_typing.ml +++ b/kernel/mod_typing.ml @@ -63,7 +63,8 @@ let rec translate_modtype env mte = and merge_with env mtb with_decl = let msid,sig_b = match (Modops.scrape_modtype env mtb) with - | MTBsig(msid,sig_b) -> msid,sig_b + | MTBsig(msid,sig_b) -> let msid'=(refresh_msid msid) in + msid',(subst_signature_msid msid (MPself(msid')) sig_b) | _ -> error_signature_expected mtb in let id,idl = match with_decl with @@ -116,15 +117,6 @@ and merge_with env mtb with_decl = | _ -> error_not_a_module (string_of_label l) in let mtb = type_modpath env' mp in - (* 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 - Circularity _ -> error_circular_with_module id - end; let cst = try check_subtypes env' mtb old.msb_modtype with Failure _ -> error_with_incorrect (label_of_id id) in |
