package ppx_seq

  1. Overview
  2. Docs
Seq literals ppx for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

0.3.2.tar.gz
md5=dca5b027638ecaecf5229174b8492757
sha256=a3687a6b1491eb8e23ccb104d4864b2e4c13eeb44cb8848e60cba990dba1081e
sha512=0b165dd5450a157cdb950b5bf14c1f33c795efcfc4c145f552a4a07965a7239edd41a0647c2c33193e919145ad17035ad7ca166655a92c3c4f3ac846b11fe172

Description

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

Tags

syntax

Published: 27 Jun 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


install:

the package is provided in opam.ocaml.org, just issue the following

  $ opam install ppx_seq

you can also build it locally with dune

  $ dune build
  $ dune install

if you want to work on a dev version, you can use `opam pin` on this repository


usage:

play around with the rewriter in your favourite toplevel like so

  # without project, in shell
  $ ocaml $(ocamlfind printppx ppx_seq) [options...]

  # or
  $ ocaml -ppx 'ocamlfind ppx_seq/ppx.exe -as-ppx' [options...]

  (* or, in a toplevel and with ocamlfind *)
  # #require "ppx_seq"

  (* within a project that depends on ppx_seq *)
  # #use_output "dune top"

compile executables with the rewriter as a preprocessor like so

  # a shortcut is provided when compiling, not invoking a toplevel
  $ ocamlfind (c|opt) -package ppx_seq [options...]

  # ocamlfind is only used for convenience, so you can use ppx directly.. e.g.
  $ ocaml[c|opt] -ppx '..../lib/ppx_seq/ppx.exe -as-ppx' [options...]

  ;; or in a dune file
  (executable/library/test...
   ...
   (preprocess (pps ppx_seq)))

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