Get rid of useless find_internal' function

It was only used to define find_internal
This commit is contained in:
Rudi Grinberg 2018-02-08 11:58:40 +08:00
parent 763feda683
commit f083b6a2cd
1 changed files with 3 additions and 6 deletions

View File

@ -62,17 +62,14 @@ module Scope = struct
| exception (Findlib.Findlib _) -> None
| x -> Some x
let find_internal' t name =
match String_map.find name t.scope.libs with
let find_internal (t : t With_required_by.t) name =
match String_map.find name t.data.scope.libs with
| Some _ as some -> some
| None ->
match Hashtbl.find t.lib_db.by_public_name name with
match Hashtbl.find t.data.lib_db.by_public_name name with
| Some (Internal x) -> Some x
| _ -> None
let find_internal (t : t With_required_by.t) name =
find_internal' t.data name
let lib_is_available (t : t With_required_by.t) name =
match find_internal t name with
| Some (_, lib) -> String_map.mem lib.name t.data.lib_db.instalable_internal_libs