File: opam_file.mli

package info (click to toggle)
ocaml-dune 2.7.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 14,064 kB
  • sloc: ml: 70,777; lisp: 466; ansic: 241; sh: 209; makefile: 119; python: 38; cpp: 17; javascript: 6
file content (40 lines) | stat: -rw-r--r-- 920 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
(** Parsing and interpretation of opam files *)

open! Stdune
open OpamParserTypes

(** Type of opam files *)
type t = opamfile

(** Load a file *)
val load : Path.t -> t

(** Extracts a field *)
val get_field : t -> string -> value option

(** Parse the contents of an opam file *)
val parse : Lexing.lexbuf -> t

(** Parse just a value *)
val parse_value : Lexing.lexbuf -> value

(** Replace all [pos] value by a triplet [(fname, line, absolute_offset)] *)
val absolutify_positions : file_contents:string -> opamfile -> opamfile

val nopos : OpamParserTypes.pos

val existing_variables : t -> String.Set.t

module Create : sig
  open OpamParserTypes

  val string : string -> value

  val list : ('a -> value) -> 'a list -> value

  val string_list : string list -> value

  val normalise_field_order : (string * value) list -> (string * value) list

  val of_bindings : (string * value) list -> file:Path.t -> t
end