package opam-format

  1. Overview
  2. Docs

doc/opam-format/OpamFile/index.html

Module OpamFileSource

Handles all OPAM file formats as record types and submodules, conversion to and from syntax

Functions to read and write OPAM configuration files in a typed way

Sourcetype 'a t = private OpamTypes.filename

Associate a type to a filename through a phantom type

Sourcetype 'a typed_file = 'a t
Sourceval make : OpamTypes.filename -> 'a t
Sourceval filename : 'a t -> OpamTypes.filename
Sourceval to_string : 'a t -> string
Sourceval exists : 'a t -> bool
Sourcemodule type IO_FILE = sig ... end

All Configuration files satisfy this signature

Sourcemodule type BestEffortRead = sig ... end
Sourcemodule Lines : IO_FILE with type t = string list list

Lines of space-separated words.

Sourcemodule Wrappers : sig ... end

Command wrappers for package scripts

Sourcemodule Config : sig ... end

Configuration file: $opam/config

Sourcemodule InitConfig : sig ... end

Init config file /etc/opamrc

Sourcemodule Descr : sig ... end

Package descriptions: $opam/descr/

Sourcemodule URL : sig ... end
Sourcemodule OPAM : sig ... end

OPAM files

Sourcemodule Aliases : IO_FILE with type t = string OpamTypes.switch_map

Compiler aliases: $opam/aliases. Deprecated, used only for migration

Sourcemodule LegacyState : sig ... end

Switch state file as table, also used for import/export. This includes compiler and root packages information, as well as pinned packages and their target (but not their local metadata).

Sourcemodule SwitchSelections : sig ... end

A newer format for switch state, using the opam file syntax rather than a table. This is more readable and extensible.

Sourcemodule SwitchExport : sig ... end

An extended version of SwitchSelections that can include full opam files as package "name" {} sections, for storing overlays

A simple list of packages and versions: (used for the older $opam/$switch/{installed,installed_roots}, still needed to migrate from 1.2 repository, and for reinstall)

Sourcemodule Environment : sig ... end

Cached environment updates (<switch>/environment)

Sourcemodule Comp : sig ... end

Compiler version $opam/compilers/. Deprecated, only used to upgrade old data

Configuration files

Sourcemodule Dot_install : sig ... end

.install files

Sourcemodule Changes : sig ... end

.changes files, bound to the OpamDirTrack module

Sourcemodule Dot_config : sig ... end

.config files

Repository files

Association between package names and repositories

Sourcemodule Repo_config_legacy : sig ... end

Repository config: $opam/repo/$repo/config. Deprecated, for migration only

Sourcemodule Repos_config : sig ... end
Sourcemodule Switch_config : sig ... end
Sourcemodule Pinned_legacy : sig ... end

Pinned package files (only used for migration from 1.2, the inclusive State module is now used instead)

Sourcemodule Repo : sig ... end

Repository metadata

Sourcemodule Stats : sig ... end
Sourcemodule Syntax : sig ... end

Helper module for manipulation of the raw syntax (opamfile) format. (the specific file handling modules are derived from this one)

OCaml

Innovation. Community. Security.