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.1.0.tbz
sha256=7b3e8978f003d5af74b182c476bbf829572000dd53e7d72ed98cecd4c4b26daf
sha512=ce9f0be079fff7a9250756384954e36e6b12376b5b1b7a75d7c88a14eb323758048faa906a47c7e36ed65854014c549457be6f4f4a6d9cce6be7c52f108b354c

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.