package dune-private-libs

  1. Overview
  2. Docs
Private libraries of Dune

Install

Dune Dependency

Authors

Maintainers

Sources

dune-2.5.1.tbz
sha256=8f77d3a87f208e0d7cccaa1c48c4bb1bb87d62d07c3f25e9b8ba298e028ce52b
sha512=f209f12ced10c1abf8782bdb0143f4cec77795f7174d2cc75130afb1e01550b01f2f77b9e3ec4888efdad83d2f9878d179b39126f824f4e522f3ef4da34bf27e

doc/dune-private-libs.dune-lang/Dune_lang/Syntax/index.html

Module Dune_lang.Syntax

Management of syntaxes

module Version : sig ... end
type t
module Error : sig ... end
module Warning : sig ... end
val create : name:string -> desc:string -> (Version.t * [ `Since of Version.t ]) list -> t

create ~name ~desc supported_versions defines a new syntax. supported_version is the list of all the supported versions paired with the versions of the dune lang in which they where introduced. desc is used to describe what this syntax represent in error messages.

val name : t -> string

Return the name of the syntax.

val check_supported : dune_lang_ver:Version.t -> t -> (Stdune.Loc.t * Version.t) -> unit

Check that the given version is supported and raise otherwise.

val greatest_supported_version : ?dune_lang_ver:Version.t -> t -> Version.t option

S-expression parsing

High-level functions

val deleted_in : ?extra_info:string -> t -> Version.t -> (unit, _) Decoder.parser

Indicate the field/constructor being parsed was deleted in the given version

val deprecated_in : ?extra_info:string -> t -> Version.t -> (unit, _) Decoder.parser

Indicate the field/constructor being parsed was deprecated in the given version

val renamed_in : t -> Version.t -> to_:string -> (unit, _) Decoder.parser

Indicate the field/constructor being parsed was renamed in the given version

val since : ?fatal:bool -> t -> Version.t -> (unit, _) Decoder.parser

Indicate the field/constructor being parsed was introduced in the given version. When fatal is false, simply emit a warning instead of error. fatal defaults to true.

Low-level functions

val set : t -> Version.t -> ('a, 'k) Decoder.parser -> ('a, 'k) Decoder.parser
val get_exn : t -> (Version.t, 'k) Decoder.parser
OCaml

Innovation. Community. Security.