package opam-file-format

  1. Overview
  2. Docs

opam normalised file format, for signatures.

  • each top-level field on a single line
  • newlines are LF-encoded (including on Windows)
  • file ends with a newline
  • spaces only after fieldname:, between elements in lists, before braced options, between operators and their operands
  • fields are sorted lexicographically by field name (using
  • newlines in strings turned to '\n', backslashes and double quotes escaped
  • no comments (they don't appear in the internal file format anyway)
  • fields containing an empty list, or a singleton list containing an empty list, are not printed at all
val escape_string : string -> string
val value : OpamParserTypes.FullPos.value -> string
val items : OpamParserTypes.FullPos.opamfile_item list -> string
val opamfile : OpamParserTypes.FullPos.opamfile -> string

Innovation. Community. Security.