package validate

  1. Overview
  2. Docs
OCaml library enabling efficient data validation through PPX derivers and a suite of annotation-based validators

Install

Dune Dependency

Authors

Maintainers

Sources

validate-0.2.0.tbz
sha256=1654b5cce9c367a56127094dced317f865c9562599f209f70506a32b6b65154b
sha512=467ea81c0be6057ae5b8702f739e4d4f87e2707d2e09e12abd981cc2836b0f13ebab308c68954e64ea3ce89850aa0ac6df7944b596f70287fb99bdf326edcd46

doc/src/ppx_derive_validate/utils.ml.html

Source file utils.ml

1
2
3
4
5
6
7
8
open Ppxlib
open Ast_helper

let rec expr_list loc = function
  | [] -> Exp.construct { txt = Lident "[]"; loc } None
  | x :: xs ->
      Exp.construct { txt = Lident "::"; loc }
        (Some (Exp.tuple [ x; expr_list loc xs ]))
OCaml

Innovation. Community. Security.