Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Functions handling the "opam switch" subcommand
val install :
OpamStateTypes.rw OpamStateTypes.global_state ->
?rt:'a OpamStateTypes.repos_state ->
?synopsis:string ->
?repos:OpamTypes.repository_name list ->
update_config:bool ->
packages:OpamTypes.atom OpamTypes.conjunction ->
OpamTypes.switch ->
OpamStateTypes.unlocked OpamStateTypes.global_state
* OpamStateTypes.rw OpamStateTypes.switch_state
Install a new switch, with the given packages set as compiler. The given global_state
is unlocked as soon as possible, i.e. after registering the existence of the new switch. update_config
sets the switch as current globally, unless it is external
val install_compiler_packages :
OpamStateTypes.rw OpamStateTypes.switch_state ->
OpamTypes.atom OpamTypes.conjunction ->
OpamStateTypes.rw OpamStateTypes.switch_state
Install a compiler's base packages
val import :
OpamStateTypes.rw OpamStateTypes.switch_state ->
OpamFile.SwitchExport.t OpamFile.t option ->
OpamStateTypes.rw OpamStateTypes.switch_state
Import a file which contains the packages to install.
val export : ?full:bool -> OpamFile.SwitchExport.t OpamFile.t option -> unit
Export a file which contains the installed packages. If full is specified and true, export metadata of all installed packages (excluding overlay files) as part of the export. None
means export to stdout.
val remove :
OpamStateTypes.rw OpamStateTypes.global_state ->
?confirm:bool ->
OpamTypes.switch ->
OpamStateTypes.rw OpamStateTypes.global_state
Remove the given compiler switch, and returns the updated state (unchanged in case confirm
is true
and the user didn't confirm)
val switch :
'a OpamStateTypes.lock ->
OpamStateTypes.rw OpamStateTypes.global_state ->
OpamTypes.switch ->
'a OpamStateTypes.switch_state
Changes the currently active switch
val reinstall :
OpamStateTypes.rw OpamStateTypes.switch_state ->
OpamStateTypes.rw OpamStateTypes.switch_state
Reinstall the given compiler switch.
val set_compiler :
OpamStateTypes.rw OpamStateTypes.switch_state ->
(OpamTypes.name * OpamTypes.version option) list ->
OpamStateTypes.rw OpamStateTypes.switch_state
Sets the packages configured as the current switch compiler base
val list : 'a OpamStateTypes.global_state -> print_short:bool -> unit
List all the available compiler switches.
val get_compiler_packages :
?repos:OpamTypes.repository_name list ->
'a OpamStateTypes.repos_state ->
OpamTypes.package_set
Returns all available compiler packages from a repo state
val guess_compiler_package :
?repos:OpamTypes.repository_name list ->
'a OpamStateTypes.repos_state ->
string ->
OpamTypes.atom list
Guess the compiler from the switch name: within compiler packages, match name
against "pkg.version", "pkg", and, as a last resort, "version" (for compat with older opams, eg. 'opam switch 4.02.3')