I’m wondering if there is something like C’s #ifdef
, so we can do something like:
#ifdef ReScript
... code for ReScript compiler ...
#else
... code for ocaml compiler ...
#endif
This is for situations where I need to define a function; in the ReScript case, using the JS./ API, and in the OCaml case, using Base/Core; so I’d like some type of conditional flag to include/exclude code in *.ml files, based on whether it is ReScript or OCaml doing the compiling.