Open mk270 opened 10 years ago
Is it possible to use lwt AND the syntax extension at the same time?
I'm a bit late but maybe it could help someone... If you use the camlp4 extension (provided by lwt.syntax), you can write lwt x = ... in
instead of lwt.ppx's let%lwt x = ... in
.
Using ocamlfind, you can build your program this way:
ocamlfind ocamlopt -package pgocaml.syntax,lwt.syntax,lwt.unix -syntax camlp4o -linkpkg test.ml
I'm still interested in the use of postgres with ocaml and lwt, so would be happy to help out with improving the docs. My "OCaml week" is early December - I'll get in touch then
Maybe the most complicated thing in there is how the build process works (opam packages, ocamlfind packages, camlp4/ppx...). I'm not really sure whether this kind of explanation belongs to this particular project.
https://github.com/mk270/postgres-lwt-example/blob/master/main.ml