Introduction to Reason Compilation
[CG]Nick
13.8K views
Open Source Your Knowledge, Become a Contributor
Technology knowledge has to be shared and made accessible for free. Join the movement.
1 - Compile and Run a Single Reason File
OCaml's compiler has a nice, flexible pre-processing step described in run.sh
. 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, run.sh
, which, upon execution, compiles & runs the output.
"Run"
1
2
print_endline "hi";
Enter to Rename, Shift+Enter to Preview
1
cd step1
Enter to Rename, Shift+Enter to Preview
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content