diff options
author | alainfrisch <alain@frisch.fr> | 2015-12-02 10:21:24 +0100 |
---|---|---|
committer | alainfrisch <alain@frisch.fr> | 2015-12-02 10:21:24 +0100 |
commit | 10fbfe7643ec376c095078d7fb2fbe46947d417b (patch) | |
tree | e0fbd60d5e6025869fb1fc257844d8b01c67339a /typing/typetexp.ml | |
parent | ded101210f4fef42cb808e79621c27230d7478d2 (diff) | |
download | ocaml-10fbfe7643ec376c095078d7fb2fbe46947d417b.tar.gz |
Pass location to Env.lookup_ functions explicitly.
Diffstat (limited to 'typing/typetexp.ml')
-rw-r--r-- | typing/typetexp.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/typing/typetexp.ml b/typing/typetexp.ml index 669ec0e76d..45383ffafe 100644 --- a/typing/typetexp.ml +++ b/typing/typetexp.ml @@ -256,9 +256,9 @@ let find_component lookup make_error env loc lid = try match lid with | Longident.Ldot (Longident.Lident "*predef*", s) -> - lookup (Longident.Lident s) Env.initial_safe_string + lookup ?loc:(Some loc) (Longident.Lident s) Env.initial_safe_string | _ -> - Env.lookup_loc loc (fun () -> lookup lid env) + lookup ?loc:(Some loc) lid env with Not_found -> narrow_unbound_lid_error env loc lid make_error | Env.Recmodule -> @@ -299,7 +299,7 @@ let find_value 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, ())) + find_component (fun ?loc lid env -> (Env.lookup_module ~load ?loc lid env, ())) (fun lid -> Unbound_module lid) env loc lid in path |