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
|
||||
~f:(fun (m : Module.t) -> Option.is_none m.impl)
|
||||
in
|
||||
if Module.Name.Map.equal intf_only real_intf_only
|
||||
~equal:(fun a b -> Module.name a = Module.name b) then
|
||||
modules
|
||||
else begin
|
||||
if not (Module.Name.Map.equal intf_only real_intf_only
|
||||
~equal:(fun a b -> Module.name a = Module.name b)) then begin
|
||||
let should_be_listed, shouldn't_be_listed =
|
||||
Module.Name.Map.merge intf_only real_intf_only ~f:(fun name x y ->
|
||||
match x, y with
|
||||
|
@ -120,9 +118,9 @@ end = struct
|
|||
Loc.fail loc
|
||||
"Module %a has an implementation, it cannot be listed here"
|
||||
Module.Name.pp module_name
|
||||
end
|
||||
end;
|
||||
modules
|
||||
end
|
||||
end
|
||||
|
||||
module Library_modules = struct
|
||||
|
|
Loading…
Reference in New Issue