package opam-file-format

  1. Overview
  2. Docs

items str orig_its its converts its to string, while attempting to preserve the layout and comments of the original str for unmodified elements. The function assumes that str parses to the items orig_its.

  • raises Invalid_argument

    if "opam-version" is greater than "2.0" and not solely the first item in either list.

opamfile f converts f to string, respecting the layout and comments in the corresponding on-disk file for unmodified items. format_from can be specified instead of using the filename specified in f.

  • raises Invalid_argument

    if "opam-version" is greater than "2.0" and not solely the first item in the list. Note that any errors in the file raise OpamLexer.Error as normal.

OCaml

Innovation. Community. Security.