package dune-private-libs

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Create a standard set of functions from a base pair of to/from string converters

Parameters

Signature

type t = S.t

An interface for types that are convertible from/to strings.

val of_string : string -> t

of_string should only be used on strings that are known to represent a valid t.

val to_string : t -> string
val parse_string_exn : (Stdune.Loc.t * string) -> t
val to_dyn : t -> Stdune.Dyn.t
val of_string_opt : string -> t option
val of_string_user_error : (Stdune.Loc.t * string) -> (t, Stdune.User_message.t) Stdune.result
val conv : (string -> (t, [> `Msg of string ]) Stdune.result) * (Format.formatter -> t -> unit)

From&to string conversions, for use with Cmdliner.Arg.conv

include Dune_lang.Conv.S with type t := t
val decode : t Dune_lang.Decoder.t
val encode : t Dune_lang.Encoder.t
val decode_loc : (Stdune.Loc.t * t) Dune_lang.Decoder.t
OCaml

Innovation. Community. Security.