package dunolint-lib

  1. Overview
  2. Docs
A library to create dunolint configs

Install

dune-project
 Dependency

Authors

Maintainers

Sources

dunolint-0.0.20260306.tbz
sha256=d92e0d705b661ea12b22dcc9bdd83815c507218c1de085d75140fd47bea0c5ec
sha512=fdf4fbb4906aba4aeab766dfa5202b64950c71c988b1b84363319dd05edb93b34142355f968a5687057977e40defdced20a2a17ee0614565096eb123655621f3

doc/dunolint-lib.vendor_vcs/Validated_string/Make/index.html

Module Validated_string.MakeSource

Make returns an interface that exposes the fact that t = string so this equality can be used by other functions in the implementation. However, the expected pattern is that such equality is hidden by the inclusion of S in the mli of a validated string.

Parameters

module _ : X

Signature

Sourceval to_string : string -> string

Given that t = string in the implementation, this function is just the identity.

Sourceval of_string : string -> (string, [ `Msg of string ]) Result.t

of_string str returns Ok str if X.invariant str = true, and an error otherwise. This is meant to be used to validate untrusted entries.

Sourceval v : string -> string

v str is a convenient wrapper to build a t or raise Invalid_argument. This is typically handy for applying on trusted literals.