Module Odig.Cobj.Cma

module Cma: sig .. end
cma files.


Cma


type t = Odig.Cobj.cma 
The type for cma files.
val read : Fpath.t -> (Odig.Cobj.cma, [ `Msg of string ]) Pervasives.result
read f reads a cma file from f.
val name : Odig.Cobj.cma -> string
name cma is cma's basename.
val cmos : Odig.Cobj.cma -> Odig.Cobj.cmo list
cmos cma are the cmos contained in the cma.
val custom : Odig.Cobj.cma -> bool
custom cma is true if it requires custom mode linking.
val custom_cobjs : Odig.Cobj.cma -> string list
cma_custom_cobjs are C objects files needed for custom mode linking.
val custom_copts : Odig.Cobj.cma -> string list
cma_custom_copts are C link options for custom mode linking.
val dllibs : Odig.Cobj.cma -> string list
cma_dllibs are dynamically loaded C libraries for ocamlrun dynamic linking.
val path : Odig.Cobj.cma -> Fpath.t
path cma is the file path to the cma file.

Derived information

FIXME most of this can be removed.

val names : ?init:Odig.Cobj.Digest.t Astring.String.map ->
Odig.Cobj.cma -> Odig.Cobj.Digest.t Astring.String.map
names ~init cma adds to init (defaults to String.Map.empty) the module names defined by cma mapped to their cmi digests. If a name already exists in init it is overriden.
val cmi_digests : ?init:string Odig.Cobj.Digest.map ->
Odig.Cobj.cma -> string Odig.Cobj.Digest.map
cmi_digests ~init cma adds to init (defaults to Digest.Map.empty) the cmi digests of the modules defined by cma mapped to their module name. If a digest already exists in init it is overriden.
val to_cmi_deps : ?init:Odig.Cobj.dep list -> Odig.Cobj.cma -> Odig.Cobj.dep list
to_cmi_deps ~init cma adds to init (default to []) the module names and cmi digests of the modules defined by cma.
val cmi_deps : ?conflict:(string -> keep:Odig.Cobj.Digest.t -> Odig.Cobj.Digest.t -> unit) ->
Odig.Cobj.cma -> Odig.Cobj.dep list
cmi_deps ~conflict cma is the list of cmi imported by the cmos in the library. The result excludes self-dependencies that is the set cmi_digest of digests that are implemented by the cma itself.

conflict is called if the module interface of a dependency sports two different digests in the archive. The default function logs a warning.