letters
letters copied to clipboard
Add support for older OCaml versions
The code uses syntax like let (let*) = Lwt.bind in
that is supported OCaml 4.08.1 onward. Luckily dune
has preprosessing support to enable this syntax with older compilers and we should use it so that we can support also older compiler versions.
More info: https://dune.readthedocs.io/en/stable/concepts.html?highlight=future_Syntax#future-syntax
This adds a dependency on https://github.com/ocaml-ppx/ocaml-syntax-shims though. Maybe you could get rid of let*
in this package?
This package is small enough that we could get rid of the let*
syntax. On the other hand, it improves readability of the code so it would be nice if we can keep it. What is the drawback of having the added dependency?
The added dependency is really small, it has no transitive dependencies. I am more concerned with the added compile step and the complexity it adds and the case when something doesn't work or doesn't work as expected.
The current use of let*
could be easily replaced with Lwt.map
without giving up too much of readability.
Note that colombe
uses the syntax extension too - but for an other purpose than lwt
. So, by transitivity, letters
requires ocaml-syntax-shims
.