Prototype implementation of GCIC
First off, you need to clone the repository.
git clone https://github.com/pleiad/GCIC.git
# or alternatively
git clone [email protected]:pleiad/GCIC.git
We have added some tools to facilitate the development of Ocaml code. However, you are free to use whatever you want. We'll mention the ones we are currently using and that we have setup for the project.
Esy is a package manager for Reason and Ocaml, but also provides some sandboxing capabilities. You can start your own local environment just for this project, without needing Opam switches or contaminating your existing ones (Esy interacts well with opam and dune in any case!).
-
To start, install esy. This installation path requires npm, if you need some other option, consider checking esy's documentation.
npm install -g esy
-
Install dependencies by running the following command in your shell.
esy
-
Build the project.
esy make
-
Run it and test it out.
esy repl
Now you should be able to play with GCIC or start developing 🎉!
We have some additional commands to make it easier to develop in Ocaml.
- Hot rebuild (this keeps on running and building the project automatically).
esy watch
- Run the test suite.
esy test
- Run the tests with coverage and generate a Bisect report.
# This generates a _coverage folder, where you can then open the index.html file esy coverage && esy report
- Run the formatter and update files
esy format
For a better repl experience install rlwrap. This will provide you with multiple features, such as: auto-completion, history, search, etc. (check rlwrap's documentation for more info).
# OS X
brew install rlwrap
# Linux
apt install rlwrap
Then you can simply run the program as before esy repl
.
You should see the changes in effect immediately.
Nix is a declarative package manager.
-
To start, install nix. You can check nix's documentation for more information.
# Linux sh <(curl -L https://nixos.org/nix/install) --daemon # macOS sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume --daemon
-
Launch the development environment.
nix-shell
⚠️ Not currently working for OS X -
Run it and test it out.
gcic-repl
Now you should be able to play with GCIC or start developing 🎉!
We have some additional commands to make it easier to develop in Ocaml.
- Hot rebuild (this keeps on running and building the project automatically).
dune-watch
- Run the test suite.
dune-test
- Run the tests with coverage and generate a Bisect report.
# This generates a _coverage folder, where you can then open the index.html file dune-coverage
- Run the formatter and update files
dune-format