Languages
ReasonML
Installing ReasonML on Ubuntu in TIDE
ReasonML
ReasonML is a syntax and toolchain powered by OCaml's type system that compiles to JavaScript or native binaries.
Installation
ReasonML can be installed via npm or using OPAM (OCaml Package Manager):
apt update
apt install -y nodejs npm opam
# Install Reason CLI tools via npm
npm install -g reason-cli
# Or via OPAM
opam init -a
opam install -y reasonVerification
Check that the Reason formatter and parser tool refmt is available:
refmt --versionCompilation & Execution
Create a hello.re file:
let () = print_endline("Hello, ReasonML in TIDE!");Format and compile using refmt and ocamlopt:
refmt hello.re
ocamlopt -pp "refmt --print binary" -impl hello.re -o hello
./hello