Introduction to Reason Compilation

[Nick]
85 views

Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content

3 - Compile Many Files, Automatically, in the Right Order

We can't manually sort the source files each time there's a dependency change. Let's automate it! Read run.sh.

"Run"
1
2
3
4
5
6
7
/* Note that `myDep.re` becomes the module `MyDep`. In OCaml and Reason syntax, a module is upper-cased. */
/* We now have 2 dependencies, where MyDep2 also depends on myDep. So the compilation order should be [myDep,
myDep2, test] */
print_endline MyDep.secret;
print_endline MyDep2.secret;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content