-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
52 lines (31 loc) · 1.26 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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)))