Possibly silly question: I’ve been browsing OCaml libraries (e.g. Bastet) but I’m new to both OCaml and ReScript. Is there a syntax converter from OCaml to ReScript? Then I could compare the same code samples side by side.
You can use path/to/rescript convert <fileName.ml>
(Or use the -all
flag).
A clunky workaround to copy-paste things just in the browser I still occasionally use:
- paste ml into Reason · Reason lets you write simple, fast and quality type safe code while leveraging both the JavaScript & OCaml ecosystems.
- copy converted reasonml code
- paste reasonml code into https://rescript-lang.org/try?ext=re&version=v9.1.2
- change settings to use
res
2 Likes
Sounds good – many thanks.