diff options
author | coq <coq@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2002-12-09 14:23:54 +0000 |
---|---|---|
committer | coq <coq@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2002-12-09 14:23:54 +0000 |
commit | 6da9a56628903d0bc2ab6a336af822f362517c4f (patch) | |
tree | e0ae5f32406a7a777827371a0a5bfae45a735acb /library | |
parent | 5cabd686fcb61633d372b1414c5a3759136ed28d (diff) |
Corrections de gestion des univers et modules + meilleure gestions des noms uniques
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@3405 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'library')
-rw-r--r-- | library/declaremods.ml | 4 | ||||
-rw-r--r-- | library/global.ml | 8 | ||||
-rw-r--r-- | library/global.mli | 4 | ||||
-rw-r--r-- | library/nameops.ml | 3 |
4 files changed, 9 insertions, 10 deletions
diff --git a/library/declaremods.ml b/library/declaremods.ml index 7b6c7ec1b..7321801d2 100644 --- a/library/declaremods.ml +++ b/library/declaremods.ml @@ -438,7 +438,7 @@ let start_module interp_modtype id args res_o = let arg_entries = List.concat (List.rev arg_entries_revlist) in let res_entry_o = option_app (interp_modtype env) res_o in - let mp = Global.start_module (Lib.module_dp()) id arg_entries res_entry_o in + let mp = Global.start_module id arg_entries res_entry_o in let mbids = List.map fst arg_entries in openmod_info:=(mbids,res_entry_o); @@ -560,7 +560,7 @@ let start_modtype interp_modtype id args = in let arg_entries = List.concat (List.rev arg_entries_revlist) in - let mp = Global.start_modtype (Lib.module_dp()) id arg_entries in + let mp = Global.start_modtype id arg_entries in let mbids = List.map fst arg_entries in openmodtype_info := mbids; diff --git a/library/global.ml b/library/global.ml index cdebc52f5..4824f0b2f 100644 --- a/library/global.ml +++ b/library/global.ml @@ -69,9 +69,9 @@ let add_constraints c = global_env := add_constraints c !global_env -let start_module dir id params mtyo = +let start_module id params mtyo = let l = label_of_id id in - let mp,newenv = start_module dir l params mtyo !global_env in + let mp,newenv = start_module l params mtyo !global_env in global_env := newenv; mp @@ -82,9 +82,9 @@ let end_module id = mp -let start_modtype dir id params = +let start_modtype id params = let l = label_of_id id in - let mp,newenv = start_modtype dir l params !global_env in + let mp,newenv = start_modtype l params !global_env in global_env := newenv; mp diff --git a/library/global.mli b/library/global.mli index 4a215167a..72d3731df 100644 --- a/library/global.mli +++ b/library/global.mli @@ -57,7 +57,7 @@ val add_constraints : constraints -> unit of the started module / module type *) val start_module : - dir_path -> identifier -> (mod_bound_id * module_type_entry) list + identifier -> (mod_bound_id * module_type_entry) list -> module_type_entry option -> module_path @@ -65,7 +65,7 @@ val end_module : identifier -> module_path val start_modtype : - dir_path -> identifier -> (mod_bound_id * module_type_entry) list + identifier -> (mod_bound_id * module_type_entry) list -> module_path val end_modtype : diff --git a/library/nameops.ml b/library/nameops.ml index a61ba754b..7a4b67b84 100644 --- a/library/nameops.ml +++ b/library/nameops.ml @@ -147,8 +147,7 @@ let next_name_away name l = let pr_lab l = str (string_of_label l) -let default_module_name = id_of_string "Top" -let default_module = make_dirpath [default_module_name] +let default_module = Names.initial_dir (* = ["Top"] *) (*s Roots of the space of absolute names *) let coq_root = id_of_string "Coq" |