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)))