Skip to content
/ reasonml-starter Public template

ReasonML starter template. With esy and dune.

License

Notifications You must be signed in to change notification settings

mxthevs/reasonml-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

reasonml-template

ReasonML

Opinionated ReasonML starter template. With esy and dune.

Dune by default assumes that all the source code lays on the same directory as the dune file. If you want to have subdirs inside lib then you have to have a separated dune file for each of them. But this template comes with (include_subdirs unqualified) as a dune option. Which allows having others subdirs inside lib without having to setup them as separated libraries. If you do not want this behaviour just remove this line.

Prerequisites

esy

A package manager for the OCaml ecosystem. It can install packages from opam and from npm.

It also automatically resolves transitive dependencies, and generates a lock file containing their versions to make it easier to replicate your setup on multiple machines without storing the downloaded dependencies.

npm i -g esy

Or, if you're using yarn

yarn global add esy

Up and running

Install the dependencies with esy:

esy

Build the project:

esy build

Run the example binary:

esy x ReasonStarter <dividend> <divisor>

Using rtop

Using the utop REPL is a little bit different when using Reason syntax. We have a especial library for that: rtop. In this boilerplate you have two ways of accessing the REPL:

esy x rtop

Or:

esy utop

Which will bring up the OCaml utop, then, inside of it you should be able to use the #require directive to get into rtop itself:

utop # #require "rtop";;
Reason #

About

ReasonML starter template. With esy and dune.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages