Simplify returning modules in Dir_contents.eval
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
parent
55dbe740c6
commit
51ca4f7659
|
@ -64,10 +64,8 @@ end = struct
|
||||||
Module.Name.Map.filter modules
|
Module.Name.Map.filter modules
|
||||||
~f:(fun (m : Module.t) -> Option.is_none m.impl)
|
~f:(fun (m : Module.t) -> Option.is_none m.impl)
|
||||||
in
|
in
|
||||||
if Module.Name.Map.equal intf_only real_intf_only
|
if not (Module.Name.Map.equal intf_only real_intf_only
|
||||||
~equal:(fun a b -> Module.name a = Module.name b) then
|
~equal:(fun a b -> Module.name a = Module.name b)) then begin
|
||||||
modules
|
|
||||||
else begin
|
|
||||||
let should_be_listed, shouldn't_be_listed =
|
let should_be_listed, shouldn't_be_listed =
|
||||||
Module.Name.Map.merge intf_only real_intf_only ~f:(fun name x y ->
|
Module.Name.Map.merge intf_only real_intf_only ~f:(fun name x y ->
|
||||||
match x, y with
|
match x, y with
|
||||||
|
@ -120,9 +118,9 @@ end = struct
|
||||||
Loc.fail loc
|
Loc.fail loc
|
||||||
"Module %a has an implementation, it cannot be listed here"
|
"Module %a has an implementation, it cannot be listed here"
|
||||||
Module.Name.pp module_name
|
Module.Name.pp module_name
|
||||||
end;
|
end
|
||||||
modules
|
end;
|
||||||
end
|
modules
|
||||||
end
|
end
|
||||||
|
|
||||||
module Library_modules = struct
|
module Library_modules = struct
|
||||||
|
|
Loading…
Reference in New Issue