Let+ syntax backported to OCaml >= 4.02

How do we use future_syntax with other ppx? For example, I am trying to use future_syntax with ppx_let but getting an error from dune.

$ cat dune
(executable
 (name test_let_syntax)
 (preprocess
  (future_syntax)
  (pps lwt_ppx ppx_let))
 (libraries lwt_ppx uri lwt lwt.unix str))

$ cat test.ml
let (let*) = Lwt.bind

let () = 
  let* line = Lwt_io.(read_line stdin) in 
  Lwt_io.printlf("%s", line)

The above is giving me the compilation error as below,

File "src/dune", line 7, characters 2-23:
7 |   (pps lwt_ppx ppx_let))
      ^^^^^^^^^^^^^^^^^^^^^
Error: Too many argument for preprocess

What gives?

1 Like