Exists Scratch/snap/blockly for ocaml/js?

I’m 99.99% confident the answer is no, but just want to ask anyway.

Is there an OCaml implementing of something like MIT Scratch / Berkeley Snap / Google Blockly ?

The gist of it is “visual programming with templated blocks”

Ideally, it’d be something based on Incremental/Bonsai, but I’d be happy for any OCaml impl.

Clarification: I’m looking for an implementation in OCaml, not merely OCaml bindings. In particular, I’m looking for code to read , learn from, and modify.

The closest thing I can think of is Hazel, an experimental programming environment for a basic ML language implemented in OCaml and Reason. It’s not really block-based in the sense of having a drag and drop interface, but like block-based environments it uses differently shaped blocks to represent different kinds of syntax and is structured so that syntax errors (in the sense of programs which aren’t syntactically valid and so cannot be interpreted) are impossible.


@Joel: This looks really interesting. Thanks for sharing.

Aside: Is there a way to auto compile these *.re files to *.ml ? I want to see if there is a way to (manually) translate this to Vdom/incr_dom/bonsai.

Reason to ocaml syntax conversion can be done by refmt i think