From 9a9d45e7d23eb1e10c69cc139d61d0881536345c Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Mon, 27 Aug 2018 14:42:36 +0300 Subject: [PATCH] Make types in Dir_contents more private Make records privates and add internal signature to Library_modules Signed-off-by: Rudi Grinberg --- src/dir_contents.ml | 10 +++++++++- src/dir_contents.mli | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/dir_contents.ml b/src/dir_contents.ml index 57a8cc62..f41bb265 100644 --- a/src/dir_contents.ml +++ b/src/dir_contents.ml @@ -163,7 +163,15 @@ end = struct modules end -module Library_modules = struct +module Library_modules : sig + type t = private + { modules : Module.t Module.Name.Map.t + ; alias_module : Module.t option + ; main_module_name : Module.Name.t + } + + val make : Library.t -> dir:Path.t -> Module.t Module.Name.Map.t -> t +end = struct type t = { modules : Module.t Module.Name.Map.t ; alias_module : Module.t option diff --git a/src/dir_contents.mli b/src/dir_contents.mli index 08ef8d03..4d28c9ec 100644 --- a/src/dir_contents.mli +++ b/src/dir_contents.mli @@ -17,7 +17,7 @@ val dir : t -> Path.t val text_files : t -> String.Set.t module Library_modules : sig - type t = + type t = private { modules : Module.t Module.Name.Map.t ; alias_module : Module.t option ; main_module_name : Module.Name.t @@ -42,7 +42,7 @@ val mlds : t -> Dune_file.Documentation.t -> Path.t list val get : Super_context.t -> dir:Path.t -> t -type kind = +type kind = private | Standalone | Group_root of t list Lazy.t (** Sub-directories part of the group *) | Group_part of t