Introduction to Reason Compilation
[CG]Nick
12.8K views
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;
1
let secret = "hello";
1
let secret = MyDep.secret ^ " world";
1
cd step3
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.