Back
Close

Introduction to Reason Compilation

[CG]Nick
2,736 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"
/* 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
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants