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.
4 - Small Break; Add Miscellaneous Files
Check point! This step will set up some common tools you'd use during Reason's development.
-
Merlin: check out the description here. We're writing a small
.merlin
file in this step. Read through the comments in the file; they're helpful. -
Reason has editor support for Atom, Vim, Emacs, etc. using Merlin. They're very nice-to-haves.
-
Ultimately, Reason will provide you an opinionated (but optional) build system that takes care of generating everything you're seeing here & more. Our goal for the opinionated build system is to:
- Enable a hassle-free onboarding experience, so that people don't have to fit the whole ecosystem & tooling & workflow in their head before starting their first
.re
file. - Enable nice features that are otherwise hard to have in an agnostic build & tooling ecosystem. For example, if your directory structure abides by some format we prefer, then we can make the documentation, repl bootstrapping, merlin and the rest work together.
- Enable a hassle-free onboarding experience, so that people don't have to fit the whole ecosystem & tooling & workflow in their head before starting their first
"Run"
1
2
3
4
5
6
7
8
print_endline MyDep.secret;
print_endline MyDep2.secret;
/* ^ Try typing `MyDep.s` */
/* It should have auto-completed `secret`. If it doesn't, make sure you've reloaded your editor? */
/* If you're using atom-reason, go to the plugin's setting page and put in the correct paths. */
/* TODO: describe this better. */
Enter to Rename, Shift+Enter to Preview
1
let secret = "hello";
Enter to Rename, Shift+Enter to Preview
1
let secret = MyDep.secret ^ " world";
Enter to Rename, Shift+Enter to Preview
1
cd step4
Enter to Rename, Shift+Enter to Preview
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content