Warning: this file may not contain the most up-to-date information. You should
refer to index.html instead.

src
│
├── core                                Generic standard and system library
│   │   [ opam-core lib ]
│   ├── opamVersion.ml                  (generated) Current OPAM version
│   ├── opamCoreConfig.ml               Configuration options for this lib (record, global reference and setter)
│   ├── opamVersionCompare.ml           Version comparison function used throughout. From the Dose suite.
│   ├── opamJson.ml                     Wrapper on Jsonm; only needed for some debug options
│   ├── opamStd.ml                      Generic stdlib functions (String, List, Option, Sys submodules...)
│   ├── opamConsole.ml                  Console output, ANSI color, logging and user querying
│   ├── opamCompat.ml                   Compatibility layer for different OCaml versions
│   │   # system handling
│   ├── opamProcess.ml                  Process and job handling, with logs, termination status, etc.
│   ├── opamSystem.ml                   Bindings of lots of filesystem and system operations
│   ├── opamFilename.ml                 Higher level file and directory name manipulation AND file operations, wrappers on OpamSystem using the filename type
│   ├── opamParallel.ml                 Parallel execution of jobs following a directed graph
│   ├── opamUrl.ml                      URL parsing and printing, with support for our different backends
|   |   # Windows support
│   ├── opamStubsTypes.ml               Types in the stubs definitions (shared between both implementations)
│   └── opamStubs.ml                    C stubs for Windows. A "dummy" alternate is provided for Unix, which doesn't require any C code
│
├── format                              Definition of OPAM datastructures and its file interface
│   │   [ opam-format lib ]
│   ├── opamFormatConfig.ml             Configuration options for this lib (record, global reference and setter)
│   ├── opamTypes.mli                   Definitions of many types used throughout
│   ├── opamTypesBase.ml                Helper functions on the base types. Often opened
│   │   # basic types, used as keys
│   ├── opamCompiler.ml                 The compiler type (string, version pairs)
│   ├── opamPackage.ml                  The package type, and package name type (name+version, values often called "nv" in the code)
│   ├── opamRepositoryName.ml           The repository type
│   ├── opamSwitch.ml                   The switch type
│   ├── opamVariable.ml                 OPAM variables with scope (global or module)
│   │   # more advanced types
│   ├── opamFilter.ml                   Formulas on variables, as used in opam files build scripts
│   ├── opamFormula.ml                  Formulas on packages, opt. with sub-formulas on versions, and conversion functions
│   │   # file format
│   ├── opamLineLexer.mll               A simple lexer to list of lines, which are lists of words
│   ├── opamLexer.mll                   OPAM config file lexer
│   ├── opamParser.mly                  OPAM config file generic type parser
│   ├── opamFormat.ml                   OPAM config files syntax and conversion tools, printing
│   └── opamFile.ml                     Handles all OPAM file formats as record types and submodules, conversion to and from syntax
│
├── repository                          Handling of remote sources
│   │   [ opam-repository lib ]
│   ├── opamRepositoryConfig.ml         Configuration options for this lib (record, global reference, setter, initialisation)
│   ├── opamRepositoryBackend.ml        Signature for repository handlers and some helpers for the repository type
│   ├── opamRepositoryPath.ml           Defines the file hierarchy in repositories
│   ├── opamDownload.ml                 Configuration init and handling of downloading commands
│   ├── opamHTTP.ml                     Main HTTP backend
│   ├── opamLocal.ml                    Rsync backend, for local or ssh sources
│   ├── opamVCS.ml                      Layer for handling version control sources
│   ├── opamDarcs.ml                    Darcs support (through OpamVCS)
│   ├── opamGit.ml                      Git support (through OpamVCS)
│   ├── opamHg.ml                       Mercurial support (through OpamVCS)
│   └── opamRepository.ml               Operations on repositories (update, fetch...) based on the above backends
│
├── solver                              Solver and Cudf interaction
│   │   [ opam-solver lib ]
│   ├── opamSolverConfig.ml             Configuration options for this lib (record, global reference, setter, initialisation)
│   ├── opamActionGraph.ml              Handles graphs of actions (package changes), based on ocamlgraph
│   ├── opamCudfSolver.ml               Bindings to CUDF solvers
│   ├── opamCudf.ml                     Solver interaction, conversion of answer to solution
│   └── opamSolver.ml                   Entry point, conversion of universe to cudf, dependencies computation
│
├── state                               Handling of the ~/.opam hierarchy and actions on it
│   │   [ opam-state lib ]
│   ├── opamStateConfig.ml              Configuration options for this lib (record, global reference, setter, initialisation)
│   ├── opamPath.ml                     Defines the file hierarchy in ~/.opam
│   ├── opamScript.ml                   (generated) Shell config scripts as OCaml strings
│   ├── opamStateTypes.mli              Defines the types holding global, repository and switch states
│   ├── opamGlobalState.ml              Loading and handling of the global state of an opam root
│   ├── opamRepositoryState.ml          loading and handling of the repository state of an opam root (i.e. what is in ~/.opam/repo)
│   ├── opamSwitchState.ml              Loading and querying a switch state
│   ├── opamPackageVar.ml               Resolution and handling of opam variables + filters
│   ├── opamFileTools.ml                Generic tools for handling package metadata
│   ├── opamSwitchAction.ml             Switch-related actions and changes
│   ├── opamEnv.ml                      Process environment setup and handling, shell configuration
│   ├── opamPinned.ml                   Specific query and handling of pinned packages
│   ├── opamUpdate.ml                   Synchronisation and downloading of repositories and package sources
│   ├── opamSolution.ml                 Interface with the solver, processing of full solutions through actions
│   └── opamAction.ml                   Handles concrete actions on packages, like installations and removals
│
├── stubs                               C stubs. This library is built on Windows-only and automatically pulled into opam-core if needed
│   ├── opamInject.c                    Code for process injection shared between opamWindows.c and opam-putenv.c
│   ├── opamWindows.c                   C stubs themselves
│   └── opamWin32Stubs.ml               OCaml external declarations for the stubs
│
├── client                              Everything related to the OPAM state, installation and front-end
│   │   [ opam-client lib ]
│   ├── opamClientConfig.ml             Configuration options for this lib (record, global reference, setter, initialisation), plus helper for global setup
│   ├── opamConfigCommand.ml            Functions for the "opam config" subcommand
│   ├── opamPinCommand.ml               Functions for the "opam pin" subcommand
│   ├── opamRepositoryCommand.ml        Functions for the "opam repository" subcommand
│   ├── opamSwitchCommand.ml            Functions for the "opam switch" subcommand
│   ├── opamListCommand.ml              Functions for the "opam list" subcommand
│   ├── opamClient.ml                   High-level execution of user-facing functions like "upgrade", and wrappers around the *Command modules
│   ├── opamGitVersion.mli              (generated) Current git version of OPAM
│   ├── opamArg.ml                      Command-line argument parsers and helpers
│   │   [ opam exe ]
│   └── opamMain.ml                     Main, including cmdliner command handling
│
└── tools
    │   [ opam-admin tool ]
    ├── opam_mk_repo.ml                 Repo index and archives generation
    ├── opam_depexts_change.ml          Operation on external dependencies in a repo
    ├── opam_findlib.ml                 Automatically add some findlib information to a repo
    ├── opam_rename.ml                  Package renaming
    ├── opam_stats.ml                   Repo stats & graphs generation
    ├── opam_repo_check.ml              Check the repo for errors
    ├── opam_admin.ml                   Source of the opam-admin tool, main
    │   [ other stand-alone tools ]
    ├── opam_admin_top.ml               Tiny library for admin-scripts, included in opam-admin.top
    ├── opam-putenv.c                   Tiny C tool used on Windows for cross-architecture process injection
    ├── opam_check.ml                   Tiny tool used in internal checks ("make tests")
    ├── opam_installer.ml               Handles OPAM's ".install" files
    └── opamlfind.ml                    Experimental ocamlfind wrapper tool
