GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing reasonml.github.io — Installation · Reason This page is a detailed explanation on how to install Reason with opam, both manually and using a template. There are other options available, such as esy, but we recommend using opam for the best experience. Check the esy installation page if you want to use esy instead. System requirements
Install the package manageropam (short for OCaml Package Manager) is a tool for managing packages and environments. If you haven't installed opam yet, please follow the instructions provided on the official website. Be aware that the initial setup might be notably slow due to compiler retrieval and build processes. Using a templateThis template serves as a solid foundation, integrating essential configurations and structure to expedite your development process. Simply follow the link to access the template and initiate your ReasonML project effortlessly. We recommend this method for beginners. Repository melange-re/melange-opam-template The template comes from the Melange team, since it's a common duo to use Reason with Melange. Melange is a compiler that emits JavaScript, from Reason code. You can find all the information about Melange in their docs: https://melange.re Setup a new environment manuallyopam needs to be initialized. This initialization will create a folder in
During
Create switchopam is now installed and configured. Before installing Reason, we need to create a switch which is set of packages that are installed in a given compiler version. This is similar to how nvm manages different versions of packages on a Node version.
For a comprehensive guide on how to create an opam switch, refer to the following link: ocaml.org/docs/installing-ocaml#create-an-opam-switch. Install reason
Once the installation of the Make sure you have installed the latest version of
Install the build systemWe introduced the build-system called
Hello worldTo wrap up the installation process, let's create a simple hello world project. With the basic setup done: Create a file
Create a file
Create an empty file Create a file
The Run the project (this will compile the project and run the executable):
If you want to build only:
What's Next?After you have successfully installed Reason, it's time to set up your editor to get access to all the nice features such as auto-completion. Later on you can check out the language basics to get a basic understanding of all the Reason language constructs. |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |