diff --git a/README.md b/README.md index fac10eed57..45c096b44a 100644 --- a/README.md +++ b/README.md @@ -13,11 +13,11 @@ notes contain a few details specific to Ocaml. ### Local setup -**Prerequesites** +**Prerequisites** -* OCaml `5.1` -* opam -* make +- OCaml `5.1` +- opam +- make ```sh git clone https://github.com/exercism/ocaml.git @@ -41,12 +41,11 @@ make test
Container setup +**Prerequisites** -**Prerequesites** - -* VSCode -* VSCode Remote Containers extension -* Docker +- VSCode +- VSCode Remote Containers extension +- Docker ```sh git clone https://github.com/exercism/ocaml.git @@ -71,7 +70,7 @@ make test ## Adding an Exercise -The [contributing guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md) provides guidance on +The [contributing guide](https://github.com/exercism/docs/blob/main/building/tracks/README.md) provides guidance on how to add a new exercise, or port an existing exercise from another language track. This is a brief guide, with specifics for the OCaml track. @@ -120,6 +119,6 @@ You should base your tests off this data, in order to provide consistency across If you find this documentation is inaccurate or incomplete, or can be improved in any way, please don't hesitate to raise an [issue](https://github.com/exercism/ocaml/issues) or submit a pull request. - ### OCaml icon + The [OCaml](https://ocaml.org) logo is released under the [Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/) license. diff --git a/docs/INSTALLATION.md b/docs/INSTALLATION.md index bcfa830ecc..93c8df4ad9 100644 --- a/docs/INSTALLATION.md +++ b/docs/INSTALLATION.md @@ -15,25 +15,27 @@ To work on the exercises, you will need these pieces of software: opam switch ``` - Switch to that version. If, for example, the latest version is 4.08.0, you will run: + If you already have a switch for OCaml 5.1, either load that by running `opam switch `, or create a new switch by running: ```bash - opam switch 4.08.0 + opam switch create exercism 5.1.1 ``` -3. Install extended standard libraries and test libraries + The name `exercism` here is optional, but naming your switches is a good practice. - Some exercises use only the OCaml standard library, and some use the - extended libraries by Jane Street called Base and Core\_kernel. +3. Install extended standard libraries and test libraries - The test library is called OUnit, and some exercises additionally use the - QCheck library for property-based tests. + Run the following to install the dependencies required by this track: ```bash opam install base core_kernel ounit qcheck ``` -4. Install and use interactive shell + Some exercises use only the OCaml standard library, and some use the extended libraries by Jane Street called Base and Core_kernel. + The test library is called OUnit, and some exercises additionally use the QCheck library for property-based tests. + Running the above command will install these libraries. + +4. Install and use interactive shell (optional) A summary of [Setting up and using `utop`](https://dev.realworldocaml.org/install.html): @@ -48,3 +50,10 @@ To work on the exercises, you will need these pieces of software: #require "base";; open Base ``` + +5. Install tools in VS Code (optional) + + If you use VS Code: + + - Install the OCaml language server from [here](https://github.com/ocaml/ocaml-lsp). + - Install the OCaml VS Code extension from [here](https://marketplace.visualstudio.com/items?itemName=ocamllabs.ocaml-platform), or search for `OCaml Platform` by Ocaml Labs.