Make Lib.Info.t abstract

It's not used outside the Lib module anyway

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
Rudi Grinberg 2018-08-31 15:42:01 +03:00
parent 6dedc68186
commit b01c22f9b7
2 changed files with 41 additions and 37 deletions

View File

@ -25,7 +25,46 @@ module Status = struct
| Installed | Public _ -> false
end
module Info = struct
module Info : sig
module Deps : sig
type t =
| Simple of (Loc.t * Lib_name.t) list
| Complex of Dune_file.Lib_dep.t list
val of_lib_deps : Dune_file.Lib_deps.t -> t
end
type t = private
{ loc : Loc.t
; kind : Dune_file.Library.Kind.t
; status : Status.t
; src_dir : Path.t
; obj_dir : Path.t
; version : string option
; synopsis : string option
; archives : Path.t list Mode.Dict.t
; plugins : Path.t list Mode.Dict.t
; foreign_archives : Path.t list Mode.Dict.t (** [.a/.lib/...] files *)
; jsoo_runtime : Path.t list
; requires : Deps.t
; ppx_runtime_deps : (Loc.t * Lib_name.t) list
; pps : (Loc.t * Dune_file.Pp.t) list
; optional : bool
; virtual_deps : (Loc.t * Lib_name.t) list
; dune_version : Syntax.Version.t option
; sub_systems : Dune_file.Sub_system_info.t Sub_system_name.Map.t
}
val of_library_stanza
: dir:Path.t
-> ext_lib:string
-> Dune_file.Library.t
-> t
val of_findlib_package : Findlib.Package.t -> t
val user_written_deps : t -> Dune_file.Lib_deps.t
end = struct
module Deps = struct
type t =
| Simple of (Loc.t * Lib_name.t) list

View File

@ -91,42 +91,7 @@ end
(** Information about a library *)
module Info : sig
module Deps : sig
type t =
| Simple of (Loc.t * Lib_name.t) list
| Complex of Dune_file.Lib_dep.t list
end
(** Raw description of a library, where dependencies are not
resolved. *)
type t =
{ loc : Loc.t
; kind : Dune_file.Library.Kind.t
; status : Status.t
; src_dir : Path.t
; obj_dir : Path.t
; version : string option
; synopsis : string option
; archives : Path.t list Mode.Dict.t
; plugins : Path.t list Mode.Dict.t
; foreign_archives : Path.t list Mode.Dict.t (** [.a/.lib/...] files *)
; jsoo_runtime : Path.t list
; requires : Deps.t
; ppx_runtime_deps : (Loc.t * Lib_name.t) list
; pps : (Loc.t * Dune_file.Pp.t) list
; optional : bool
; virtual_deps : (Loc.t * Lib_name.t) list
; dune_version : Syntax.Version.t option
; sub_systems : Dune_file.Sub_system_info.t Sub_system_name.Map.t
}
val of_library_stanza
: dir:Path.t
-> ext_lib:string
-> Dune_file.Library.t
-> t
val of_findlib_package : Findlib.Package.t -> t
type t
end
(** {1 Errors} *)