package opam-file-format

  1. Overview
  2. Docs

Module FullPos.NormaliseSource

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 String.compare)
  • 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
Sourceval escape_string : string -> string
OCaml

Innovation. Community. Security.