Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Loading and handling of the global state of an opam root
val load : 'a OpamStateTypes.lock -> 'a OpamStateTypes.global_state
Loads the global state (from the opam root obtained through OpamStateConfig.(!r.root)
)
val with_ :
'a OpamStateTypes.lock ->
('a OpamStateTypes.global_state -> 'b) ->
'b
Loads the global state as load
, and calls the given function while keeping it locked (as per the lock
argument), releasing the lock afterwards
val all_installed : 'a OpamStateTypes.global_state -> OpamTypes.package_set
The set of all installed packages, in any switch
val fold_switches :
(OpamTypes.switch -> OpamTypes.switch_selections -> 'a -> 'a) ->
'b OpamStateTypes.global_state ->
'a ->
'a
val installed_versions :
'a OpamStateTypes.global_state ->
OpamTypes.name ->
OpamTypes.switch list OpamTypes.package_map
Returns the map of installed instances of the package name towards the list of switches they are installed in
val repos_list :
'a OpamStateTypes.global_state ->
OpamTypes.repository_name list
Default list of repositories to get packages from, ordered by decreasing priority. This can be overriden by switch-specific selections, and does not have to include all configured repositories.
val unlock :
'a OpamStateTypes.global_state ->
OpamStateTypes.unlocked OpamStateTypes.global_state
Releases any locks on the given global_state
val with_write_lock :
?dontblock:bool ->
'a OpamStateTypes.global_state ->
(OpamStateTypes.rw OpamStateTypes.global_state ->
OpamStateTypes.rw OpamStateTypes.global_state) ->
'a OpamStateTypes.global_state
Calls the provided function, ensuring a temporary write lock on the given global state
val write : OpamStateTypes.rw OpamStateTypes.global_state -> unit
Writes back the global configuration file ~/.opam/config