What is the command to convert between different syntaxs (*.re <-> *.res <-> *.ml)?

What is the command to convert a file or a whole project from *.re to *.res (or even *.ml)?

I remember seeing it months ago but can’t seem to find it now.

Thanks!

You can find the command in the docs here.

node_modules/.bin/bsc -format MyFile.re > MyFile.res

The -format parameter accepts all types of files: ml, res, re.

There is no “edit in inline” mode, that’s why you need to pipe stdout to your target file instead.

1 Like