package opam-client
Install
    
    dune-project
 Dependency
Authors
- 
  
    
    VVincent Bernardoff <vb@luminar.eu.org>
- 
  
    
    RRaja Boujbel <raja.boujbel@ocamlpro.com>
- 
  
    
    RRoberto Di Cosmo <roberto@dicosmo.org>
- 
  
    
    TThomas Gazagnaire <thomas@gazagnaire.org>
- 
  
    
    LLouis Gesbert <louis.gesbert@ocamlpro.com>
- 
  
    
    FFabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
- 
  
    
    AAnil Madhavapeddy <anil@recoil.org>
- 
  
    
    GGuillem Rieu <guillem.rieu@ocamlpro.com>
- 
  
    
    RRalf Treinen <ralf.treinen@pps.jussieu.fr>
- 
  
    
    FFrederic Tuong <tuong@users.gforge.inria.fr>
Maintainers
Sources
md5=e1202a21d669d460b9fa852e39f0502e
    
    
  sha512=fb46bc8f12e49c2da95c5f8669f55fb93710ee826827538852c3091ec2c714c082137373fa9e1ad3f53f107b1fae6c2abd0b6e5f84f7756bd3b38e57978f080e
    
    
  doc/opam-client/OpamSwitchCommand/index.html
Module OpamSwitchCommandSource
Functions handling the "opam switch" subcommand
val create : 
  OpamStateTypes.rw OpamStateTypes.global_state ->
  rt:'a OpamStateTypes.repos_state ->
  ?synopsis:string ->
  ?repos:OpamTypes.repository_name list ->
  update_config:bool ->
  invariant:OpamTypes.formula ->
  OpamTypes.switch ->
  (OpamStateTypes.rw OpamStateTypes.switch_state ->
    'ret * OpamStateTypes.rw OpamStateTypes.switch_state) ->
  'ret * OpamStateTypes.rw OpamStateTypes.switch_stateCreates and configures a new switch. The given global_state is unlocked once done. update_config sets the switch as current globally, unless it is external.
post can be used to run guarded operations after the switch creation (cleanup will be proposed to the user if they fail). You probably want to call install_compiler there.
val install_compiler : 
  ?additional_installs:OpamTypes.atom list ->
  ?deps_only:bool ->
  ?ask:bool ->
  OpamStateTypes.rw OpamStateTypes.switch_state ->
  OpamStateTypes.rw OpamStateTypes.switch_stateUsed to initially install a compiler's base packages, according to its invariant. ask triggers prompting the user as for normal installs; defaults to false.
val import : 
  OpamStateTypes.rw OpamStateTypes.switch_state ->
  OpamFile.SwitchExport.t OpamFile.t option ->
  OpamStateTypes.rw OpamStateTypes.switch_stateImport a file which contains the packages to install.
val export : 
  'a OpamStateTypes.repos_state ->
  ?freeze:bool ->
  ?full:bool ->
  ?switch:OpamTypes.switch ->
  OpamFile.SwitchExport.t OpamFile.t option ->
  unitExport 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. The export will be extended with a map of all extra-files. If freeze is specified and true, VCS urls will be frozen to the specific commit ID. If None is provided as file argument, the export is done to stdout.
val remove : 
  OpamStateTypes.rw OpamStateTypes.global_state ->
  ?confirm:bool ->
  OpamTypes.switch ->
  OpamStateTypes.rw OpamStateTypes.global_stateRemove 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 ->
  unitChanges the currently active switch
val reinstall : 
  OpamStateTypes.rw OpamStateTypes.switch_state ->
  OpamStateTypes.rw OpamStateTypes.switch_stateReinstall the given compiler switch.
val set_invariant_raw : 
  OpamStateTypes.rw OpamStateTypes.switch_state ->
  OpamTypes.formula ->
  OpamStateTypes.rw OpamStateTypes.switch_stateUpdates the switch invariant and the associated config files, and writes the config file unless show or dry_run are activated globally. Low-level function, see set_invariant for the user-facing function.
val set_invariant : 
  ?force:bool ->
  OpamStateTypes.rw OpamStateTypes.switch_state ->
  OpamTypes.formula ->
  OpamStateTypes.rw OpamStateTypes.switch_stateSets the packages configured as the current switch compiler base, after some checks and messages.
Display the current compiler switch.
List all the available compiler switches.
val get_compiler_packages : 
  ?repos:OpamTypes.repository_name list ->
  'a OpamStateTypes.repos_state ->
  OpamTypes.package_setReturns all available compiler packages from a repo state
val guess_compiler_invariant : 
  ?repos:OpamTypes.repository_name list ->
  'a OpamStateTypes.repos_state ->
  string list ->
  OpamFormula.tGuess a real compiler spec from a list of strings, which may refer to packages with optional version constraints, or just versions. This uses some heuristics.