aboutsummaryrefslogtreecommitdiffhomepage
path: root/library
diff options
context:
space:
mode:
authorGravatar ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7>2012-12-18 18:05:56 +0000
committerGravatar ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7>2012-12-18 18:05:56 +0000
commit6946bbbf2390024b3ded7654814104e709cce755 (patch)
tree643429de27ef09026b937c18a55075eb49b11fee /library
parentaa37087b8e7151ea96321a11012c1064210ef4ea (diff)
Modulification of mod_bound_id
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16098 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'library')
-rw-r--r--library/declaremods.ml10
-rw-r--r--library/declaremods.mli4
-rw-r--r--library/global.mli2
-rw-r--r--library/globnames.ml4
-rw-r--r--library/lib.ml4
5 files changed, 12 insertions, 12 deletions
diff --git a/library/declaremods.ml b/library/declaremods.ml
index 763aa5ffd..0d9ffb29e 100644
--- a/library/declaremods.ml
+++ b/library/declaremods.ml
@@ -86,7 +86,7 @@ type 'a annotated = ('a * funct_app_annot)
*)
type substitutive_objects =
- mod_bound_id list * module_path * lib_objects
+ MBId.t list * module_path * lib_objects
(* For each module, we store the following things:
@@ -124,7 +124,7 @@ let modtab_objects =
is a functor) and declared output type *)
let openmod_info =
ref ((MPfile(Dir_path.initial),[],None,[])
- : module_path * mod_bound_id list *
+ : module_path * MBId.t list *
(module_struct_entry * int option) option *
module_type_body list)
@@ -346,7 +346,7 @@ let modtypetab =
(* currently started interactive module type. We remember its arguments
if it is a functor type *)
let openmodtype_info =
- ref ([],[] : mod_bound_id list * module_type_body list)
+ ref ([],[] : MBId.t list * module_type_body list)
let _ = Summary.declare_summary "MODTYPE-INFO"
{ Summary.freeze_function = (fun () ->
@@ -529,7 +529,7 @@ let rec seb2mse = function
| _ -> failwith "seb2mse: received a non-atomic seb"
let process_module_seb_binding mbid seb =
- process_module_bindings [id_of_mbid mbid]
+ process_module_bindings [MBId.to_id mbid]
[mbid,
(seb2mse seb,
{ ann_inline = DefaultInline; ann_scope_subst = [] })]
@@ -537,7 +537,7 @@ let process_module_seb_binding mbid seb =
let intern_args interp_modtype (idl,(arg,ann)) =
let inl = inline_annot ann in
let lib_dir = Lib.library_dp() in
- let mbids = List.map (fun (_,id) -> make_mbid lib_dir id) idl in
+ let mbids = List.map (fun (_,id) -> MBId.make lib_dir id) idl in
let mty = interp_modtype (Global.env()) arg in
let dirs = List.map (fun (_,id) -> Dir_path.make [id]) idl in
let (mbi,mp_from,objs) = get_modtype_substobjs (Global.env())
diff --git a/library/declaremods.mli b/library/declaremods.mli
index 650b2cc81..1b661faef 100644
--- a/library/declaremods.mli
+++ b/library/declaremods.mli
@@ -152,8 +152,8 @@ val debug_print_modtab : unit -> Pp.std_ppcmds
(** For translator *)
val process_module_bindings : module_ident list ->
- (mod_bound_id * (module_struct_entry annotated)) list -> unit
+ (MBId.t * (module_struct_entry annotated)) list -> unit
(** For Printer *)
val process_module_seb_binding :
- mod_bound_id -> Declarations.struct_expr_body -> unit
+ MBId.t -> Declarations.struct_expr_body -> unit
diff --git a/library/global.mli b/library/global.mli
index d49dd836b..4908d35fb 100644
--- a/library/global.mli
+++ b/library/global.mli
@@ -71,7 +71,7 @@ val end_module : Summary.frozen ->Id.t ->
(module_struct_entry * inline) option -> module_path * delta_resolver
val add_module_parameter :
- mod_bound_id -> module_struct_entry -> inline -> delta_resolver
+ MBId.t -> module_struct_entry -> inline -> delta_resolver
val start_modtype : Id.t -> module_path
val end_modtype : Summary.frozen -> Id.t -> module_path
diff --git a/library/globnames.ml b/library/globnames.ml
index c37e370a3..ea002ef58 100644
--- a/library/globnames.ml
+++ b/library/globnames.ml
@@ -146,8 +146,8 @@ let decode_mind kn =
let rec dir_of_mp = function
| MPfile dir -> Dir_path.repr dir
| MPbound mbid ->
- let _,_,dp = repr_mbid mbid in
- let id = id_of_mbid mbid in
+ let _,_,dp = MBId.repr mbid in
+ let id = MBId.to_id mbid in
id::(Dir_path.repr dp)
| MPdot(mp,l) -> (Label.to_id l)::(dir_of_mp mp)
in
diff --git a/library/lib.ml b/library/lib.ml
index 9ac9b7c71..0f2f480cb 100644
--- a/library/lib.ml
+++ b/library/lib.ml
@@ -658,13 +658,13 @@ let rec split_mp mp =
| Names.MPdot (prfx, lbl) ->
let mprec, dprec = split_mp prfx in
mprec, Names.Dir_path.make (Names.Id.of_string (Names.Label.to_string lbl) :: (Names.Dir_path.repr dprec))
- | Names.MPbound mbid -> let (_, id, dp) = Names.repr_mbid mbid in library_dp(), Names.Dir_path.make [id]
+ | Names.MPbound mbid -> let (_, id, dp) = Names.MBId.repr mbid in library_dp(), Names.Dir_path.make [id]
let split_modpath mp =
let rec aux = function
| Names.MPfile dp -> dp, []
| Names.MPbound mbid ->
- library_dp (), [Names.id_of_mbid mbid]
+ library_dp (), [Names.MBId.to_id mbid]
| Names.MPdot (mp,l) -> let (mp', lab) = aux mp in
(mp', Names.Label.to_id l :: lab)
in