package ppx_seq

  1. Overview
  2. Docs
Seq literals ppx for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

0.2.tar.gz
md5=6de710e3be3c6ff4c69e3cb932f05467
sha256=6f83c627e9ee91d0f7d85675fbb85f169c0489d1221227a6b23fd97b9ccd0b0f
sha512=62897fe5249880b811f1bbef0c42eaa148d1060d9046312a9cd5979eeeea9a13e19efc6701cdcb1c436b4d6554f31a16a057bbc1bbad6a4e432daecc930171e8

Description

Simple unintrusive ppx rewriter that offers Seq literals. It offers List-like syntax in the form of [%seq a; b; c...]

Tags

syntax

Published: 29 Jan 2022

README

README

ppx_seq
-------

simple unintrusive ppx rewriter that provides easy-to-construct sequence syntax

this rewriter aims to facilitate the use of Seq module, especially after the
excellent additions to it starting from OCaml 4.14


usage:

seq literals which can be used in any expression

  [%seq 1; 2; 3] => - : int Seq.t = <fun>
  [%seq.empty] => - : 'a Seq.t = <fun>

play around with the rewriter in your favourite toplevel like so

  $ ocaml $(ocamlfind printppx ppx_seq) [options...] # without project
  # #use_output "dune top" # within a project that depends on ppx_seq

ocamlfind is only used for convenience, so you can use ppx directly.. e.g.
  -ppx '/usr/lib/ppx_seq/ppx.exe -as-ppx'
without depending on ocamlfind.

and of course, you can depend on it as a rewriter by adding the following to
your dune file
  (executable/library/test...
   ...
   (preprocess (pps ppx_seq)))
..or using ocamlfind, or directly, as both explained above

Dependencies (3)

  1. ppxlib >= "0.23"
  2. dune >= "2.9"
  3. ocaml >= "4.04.2"

Dev Dependencies (2)

  1. odoc with-doc
  2. seq with-test

Used by

None

Conflicts

None

OCaml

Innovation. Community. Security.