Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

avoid warning just before an error happens using -no-alias-deps

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14797 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
  • Loading branch information...
commit c36565a6c6853a783952f6957350054f98b190b1 1 parent 4736382
Jacques Garrigue authored
View
4 typing/env.ml
@@ -1033,8 +1033,8 @@ let rec scrape_alias env ?path mty =
begin try
scrape_alias env (find_module path env).md_type ~path
with Not_found ->
- Location.prerr_warning Location.none
- (Warnings.No_cmi_file (Path.name path));
+ (*Location.prerr_warning Location.none
+ (Warnings.No_cmi_file (Path.name path));*)
mty
end
| mty, Some path ->
View
3  typing/typemod.ml
@@ -1026,7 +1026,8 @@ let wrap_constraint env arg mty explicit =
let rec type_module ?(alias=false) sttn funct_body anchor env smod =
match smod.pmod_desc with
Pmod_ident lid ->
- let path = Typetexp.lookup_module env smod.pmod_loc lid.txt in
+ let path =
+ Typetexp.lookup_module ~load:(not alias) env smod.pmod_loc lid.txt in
let md = { mod_desc = Tmod_ident (path, lid);
mod_type = Mty_alias path;
mod_env = env;
View
6 typing/typetexp.ml
@@ -241,20 +241,18 @@ let find_value env loc lid =
check_deprecated loc decl.val_attributes (Path.name path);
r
-let lookup_module_ ~load env loc lid =
+let lookup_module ?(load=false) env loc lid =
let (path, decl) as r =
find_component (fun lid env -> (Env.lookup_module ~load lid env, ()))
(fun lid -> Unbound_module lid) env loc lid
in path
let find_module env loc lid =
- let path = lookup_module_ true env loc lid in
+ let path = lookup_module ~load:true env loc lid in
let decl = Env.find_module path env in
check_deprecated loc decl.md_attributes (Path.name path);
(path, decl)
-let lookup_module = lookup_module_ ~load:false
-
let find_modtype env loc lid =
let (path, decl) as r =
find_component Env.lookup_modtype (fun lid -> Unbound_modtype lid)
View
2  typing/typetexp.mli
@@ -98,7 +98,7 @@ val find_class:
val find_module:
Env.t -> Location.t -> Longident.t -> Path.t * module_declaration
val lookup_module:
- Env.t -> Location.t -> Longident.t -> Path.t
+ ?load:bool -> Env.t -> Location.t -> Longident.t -> Path.t
val find_modtype:
Env.t -> Location.t -> Longident.t -> Path.t * modtype_declaration
val find_class_type:
Please sign in to comment.
Something went wrong with that request. Please try again.