Associate the empty scope name to the anonymous scope

This commit is contained in:
Rudi Grinberg 2018-01-30 20:17:47 +08:00
parent 1013db83b5
commit dcb3845fc4
1 changed files with 4 additions and 1 deletions

View File

@ -289,7 +289,10 @@ let create findlib ~scopes ~root internal_libraries =
assert (not (Hashtbl.mem t.by_scope_name name));
Hashtbl.add t.by_scope_name ~key:name ~data:lib_scope;
);
Hashtbl.add t.by_internal_name ~key:scope.root ~data:lib_scope);
Hashtbl.add t.by_internal_name ~key:scope.root ~data:lib_scope
);
let anon_scope = internal_name_scope t ~dir:t.anonymous_root in
Hashtbl.add t.by_scope_name ~key:"" ~data:anon_scope;
List.iter internal_libraries ~f:(fun ((dir, lib) as internal) ->
let scope = internal_name_scope t ~dir in
scope.libs <- String_map.add scope.libs ~key:lib.Library.name ~data:internal;