Merge pull request #1202 from rgrinberg/lib-info-abstract
Make Lib.Info.t abstract
This commit is contained in:
commit
7cd183877e
41
src/lib.ml
41
src/lib.ml
|
@ -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
|
||||
|
|
37
src/lib.mli
37
src/lib.mli
|
@ -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} *)
|
||||
|
|
Loading…
Reference in New Issue