diff options
Diffstat (limited to 'kernel/safe_typing.ml')
-rw-r--r-- | kernel/safe_typing.ml | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/kernel/safe_typing.ml b/kernel/safe_typing.ml index 8a95c9fd2..c7bc76e57 100644 --- a/kernel/safe_typing.ml +++ b/kernel/safe_typing.ml @@ -76,7 +76,7 @@ type modvariant = | NONE | SIG of (* funsig params *) (mod_bound_id * module_type_body) list | STRUCT of (* functor params *) (mod_bound_id * module_type_body) list - | LIBRARY of dir_path + | LIBRARY of Dir_path.t type module_info = {modpath : module_path; @@ -90,7 +90,7 @@ let set_engagement_opt oeng env = Some eng -> set_engagement eng env | _ -> env -type library_info = dir_path * Digest.t +type library_info = Dir_path.t * Digest.t type safe_environment = { old : safe_environment; @@ -271,7 +271,7 @@ let add_constant dir l decl senv = | ConstantEntry ce -> translate_constant senv.env kn ce | GlobalRecipe r -> let cb = translate_recipe senv.env kn r in - if is_empty_dirpath dir then hcons_const_body cb else cb + if Dir_path.is_empty dir then hcons_const_body cb else cb in let senv' = add_field (l,SFBconst cb) (C kn) senv in let senv'' = match cb.const_body with @@ -482,10 +482,10 @@ let end_module l restype senv = let add senv ((l,elem) as field) = let new_name = match elem with | SFBconst _ -> - let kn = make_kn mp_sup empty_dirpath l in + let kn = make_kn mp_sup Dir_path.empty l in C (constant_of_delta_kn resolver kn) | SFBmind _ -> - let kn = make_kn mp_sup empty_dirpath l in + let kn = make_kn mp_sup Dir_path.empty l in I (mind_of_delta_kn resolver kn) | SFBmodule _ -> M | SFBmodtype _ -> MT (MPdot(senv.modinfo.modpath, l)) @@ -630,7 +630,7 @@ let set_engagement c senv = (* Libraries = Compiled modules *) type compiled_library = - dir_path * module_body * library_info list * engagement option + Dir_path.t * module_body * library_info list * engagement option (* We check that only initial state Require's were performed before [start_library] was called *) @@ -643,10 +643,10 @@ let start_library dir senv = if not (is_empty senv) then anomaly "Safe_typing.start_library: environment should be empty"; let dir_path,l = - match (repr_dirpath dir) with + match (Dir_path.repr dir) with [] -> anomaly "Empty dirpath in Safe_typing.start_library" | hd::tl -> - make_dirpath tl, label_of_id hd + Dir_path.make tl, label_of_id hd in let mp = MPfile dir in let modinfo = {modpath = mp; @@ -682,7 +682,7 @@ let export senv dir = begin match modinfo.variant with | LIBRARY dp -> - if not (dir_path_eq dir dp) then + if not (Dir_path.equal dir dp) then anomaly "We are not exporting the right library!" | _ -> anomaly "We are not exporting the library" @@ -710,9 +710,9 @@ let check_imports senv needed = let actual_stamp = List.assoc id imports in if not (String.equal stamp actual_stamp) then error - ("Inconsistent assumptions over module "^(string_of_dirpath id)^".") + ("Inconsistent assumptions over module "^(Dir_path.to_string id)^".") with Not_found -> - error ("Reference to unknown module "^(string_of_dirpath id)^".") + error ("Reference to unknown module "^(Dir_path.to_string id)^".") in List.iter check needed |