Friendly Syntax & Toolchain Powered by OCaml
OCaml Emacs Lisp VimL Shell Makefile Python Standard ML
Latest commit f18549c Jan 22, 2017 @IwanKaramazow IwanKaramazow committed with chenglou Break payloads of extension nodes IfNeed (#999)
* Break payloads of extension nodes IfNeed

* Clean up code, reuse existing makeSpacedBreakableInlineList fun
Permalink
Failed to load latest commit information.
docker Update Dockerfile (#972) Jan 19, 2017
docs [Docs] Add nuclide-languge-reason to list of things to enable for atom Jan 21, 2017
editorSupport Deprecating explicit --use-stdin (#943) Jan 9, 2017
formatTest Break payloads of extension nodes IfNeed (#999) Jan 22, 2017
miscTests Deprecating explicit --use-stdin (#943) Jan 9, 2017
pkg Remove atom-reason (#910) Dec 19, 2016
src Break payloads of extension nodes IfNeed (#999) Jan 22, 2017
.gitattributes Docs into master (#700) Sep 8, 2016
.gitignore JSX: type dom elements (#928) Jan 1, 2017
.merlin Add MenhirLib to .merlin (#984) Jan 19, 2017
.npmignore Npmignore our tests Dec 12, 2016
.travis.yml update travis to add notification Oct 7, 2016
CHANGELOG.md Initial Commit Feb 20, 2016
DEVELOPING.md Update DEVELOPING.md May 25, 2016
LICENSE.txt Initial Commit Feb 20, 2016
Makefile Add version number to refmt --version output (#986) Jan 19, 2017
ORIGINS.md [atom-reason] AtomReason -> atom-reason (#369) Apr 22, 2016
PATENTS.txt Initial Commit Feb 20, 2016
README.md Better wordings for reason install in readme Jan 11, 2017
_tags Remove dependency on Re (#895) Dec 17, 2016
descr Initial Commit Feb 20, 2016
myocamlbuild.ml Make rebuild support ocamlc (#727) Aug 29, 2016
opam Remove Merlin from opam (#922) Dec 29, 2016
opam.in Remove Merlin from opam (#922) Dec 29, 2016
package.json Remove dependency on Re (#895) Dec 17, 2016
package.json.in Remove Merlin from opam (#922) Dec 29, 2016
package.ml Add version number to refmt --version output (#986) Jan 19, 2017
package.ml.in Add version number to refmt --version output (#986) Jan 19, 2017
upgradeSyntax.sh Deprecating explicit --use-stdin (#943) Jan 9, 2017

README.md

Reason: Build Systems Rapidly Build Status

  • Approachable syntax.
  • Powerful, automatic source code formatting.
  • Adopt incrementally with JavaScript/C interop.
  • Ahead-of-time compilation to assembly - without a language level VM.
  • Rapidly develop and share projects.

Install Via npm

npm version > 3.0 is required - install here.

Reason Project

Installing the ReasonProject starter kit using npm is the easiest way to get started with Reason. It will install the master Reason branch and all of the dependencies for you into a local directory based sandbox. It even includes the compiler, IDE support, and REPL. Simply delete the directory when you're done and it's gone from your computer.

git clone https://github.com/reasonml/ReasonProject.git
cd ReasonProject
npm install
npm start

While it's installing, read about how to use ReasonProject to compile your simple project and use its built-in editor support and top level.

Rebel

The ReasonProject uses a very simple build system called rebuild that comes with Reason, and is enough to start a small project. For large-scale development, we are currently developing a build and namespacing workflow called rebel, which is built on jenga. It is an early work in progress, but you can also try it out via RebelExampleProject. rebel currently takes a long time to compile the first time it's used, so for getting started quickly, use ReasonProject instead.

rebel features:

  • Easy to use bucklescript integration (currently broken)
  • Easy to use js_of_ocaml integration.
  • Automatic namespacing based on your package.json package name.
  • Automatic generation of .merlin files (soon).
  • Powered by jenga, a fast, parallel, recoverable build system.
  • Uses modern compiler features such as "module aliases" for faster compilation of projects.

Installing via OPAM

The OPAM installation doesn't use the isolated directory based sandbox model that ExampleProject does, but if you are very familiar with opam, you should be able to work out conflicts in the global switch, or create a new switch for the purpose of using Reason.

# On OSX, install opam via Homebrew:
brew update
brew install opam
# On Linux, see here (you will need opam >= 1.2.2): http://opam.ocaml.org/doc/Install.html

opam init
# Add this to your ~/.bashrc (or ~/.zshrc):
#   eval $(opam config env)

opam update
opam switch 4.02.3
eval $(opam config env)
opam install reason

Testing OPAM installation.

Test the installation by compiling the following program:

echo 'print_string "Hello world"' > Hello.re

rebuild Hello.native # Automatically generates Hello.native from Hello.re

./Hello.native

Get Started Now

Check out the docs which guide you through the basic syntax and toolchain features.

Contribute back to that documentation in the docs folder.

Community

Get in touch! We're on IRC freenode #reasonml, and Discord.

Contributing To Development

# On OSX, install opam via Homebrew:
brew update
brew install opam
# On Linux, see here (you will need opam >= 1.2.2): http://opam.ocaml.org/doc/Install.html

opam init
# Add this to your ~/.bashrc (or ~/.zshrc):
#   eval $(opam config env)

opam update
opam switch 4.02.3
eval $(opam config env)
git clone git@github.com:facebook/reason.git
cd reason
opam pin add -y reason .

License

New content is licensed under the MIT license, works that are forked from other projects are under their original licenses. MIT license

Editor plugins (which have also been forked) in the editorSupport/ directory include their own licenses.