Module Validated_intf

module Validated_intf: sig .. end
For making an abstract version of a type that ensures a validation check has passed.

Suppose one wants to have a type of positive integers:

      module Positive_int = Validated.Make (struct
        type t = int
        let here = _here_
        let validate = Int.validate_positive
      end)
    

With this, one is certain that any value of type Positive_int.t has passed Int.validate_positive.

One can call Positive_int.create_exn n to create a new positive int from an n, which will of course raise if n <= 0. One can call Positive_int.raw positive_int to get the int from a Positive_int.t.


val __pa_ounit_275876e34cf609db118f3d84b799a790 : string

For making an abstract version of a type that ensures a validation check has passed.

Suppose one wants to have a type of positive integers:

      module Positive_int = Validated.Make (struct
        type t = int
        let here = _here_
        let validate = Int.validate_positive
      end)
    

With this, one is certain that any value of type Positive_int.t has passed Int.validate_positive.

One can call Positive_int.create_exn n to create a new positive int from an n, which will of course raise if n <= 0. One can call Positive_int.raw positive_int to get the int from a Positive_int.t.

module type Raw = sig .. end
module type Raw_binable = sig .. end
module type Validated = sig .. end
module type Validated_binable = sig .. end
module type S = sig .. end

For making an abstract version of a type that ensures a validation check has passed.

Suppose one wants to have a type of positive integers:

      module Positive_int = Validated.Make (struct
        type t = int
        let here = _here_
        let validate = Int.validate_positive
      end)
    

With this, one is certain that any value of type Positive_int.t has passed Int.validate_positive.

One can call Positive_int.create_exn n to create a new positive int from an n, which will of course raise if n <= 0. One can call Positive_int.raw positive_int to get the int from a Positive_int.t.

here will appear in validation-failure error messages.