Introduction to Reason Compilation

Next: Step 2

1 - Compile and Run a Single Reason File

OCaml's compiler has a nice, flexible pre-processing step described in A Reason file is just an ordinary OCaml file that leverages that feature. Therefore, everything that semantically works in OCaml should, in theory, work in Reason, and vice-versa.

We start with a shell file,, which, upon execution, compiles & runs the output.

Create your playground on
This playground was created on, our hands-on, knowledge-sharing platform for developers.
Go to