Skip to content

Commit 7e3fba3

Browse files
authored
Remove dead code in Modules (#12635)
* refactor: remove unused function [Modules.With_vlib.main_module_name] Signed-off-by: Rudi Grinberg <[email protected]>
1 parent be54d96 commit 7e3fba3

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

src/dune_rules/modules.ml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,19 +1029,6 @@ module With_vlib = struct
10291029
| Impl { impl = _; vlib; _ } -> lib_interface vlib
10301030
;;
10311031

1032-
let main_module_name =
1033-
let main_module_name t =
1034-
match t.modules with
1035-
| Singleton m -> Some (Module.name m)
1036-
| Unwrapped _ -> None
1037-
| Wrapped w -> Some w.group.name
1038-
| Stdlib w -> Some w.main_module_name
1039-
in
1040-
function
1041-
| Modules t -> main_module_name t
1042-
| Impl { vlib; impl = _; _ } -> main_module_name vlib
1043-
;;
1044-
10451032
let impl =
10461033
let empty = lazy Module_name.Unique.Map.empty in
10471034
fun impl ~vlib ->

src/dune_rules/modules.mli

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,6 @@ module With_vlib : sig
101101
(** Returns all the compatibility modules. *)
102102
val wrapped_compat : t -> Module.Name_map.t
103103

104-
(** Returns the main module name if it exists. It exist for libraries with
105-
[(wrapped true)] or one module libraries. *)
106-
val main_module_name : t -> Module_name.t option
107-
108104
val version_installed : t -> src_root:Path.t -> install_dir:Path.t -> t
109105
val alias_for : t -> Module.t -> Module.t list
110106
val local_open : t -> Module.t -> Module_name.t list

0 commit comments

Comments
 (0)