Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -41,12 +41,11 @@ make test
<details>
<summary>Container setup</summary>

**Prerequisites**

**Prerequesites**

* VSCode
* VSCode Remote Containers extension
* Docker
- VSCode
- VSCode Remote Containers extension
- Docker

```sh
git clone https://github.com/exercism/ocaml.git
Expand All @@ -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.
Expand Down Expand Up @@ -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.
23 changes: 15 additions & 8 deletions docs/INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,26 @@ 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 <switch-name>`, 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 script to install the dependencies required by this track:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is opam a script? I wasn't really sure ... alternatively, we could leave out the word script like this:

Suggested change
Run the script to install the dependencies required by this track:
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.

4. Install and use interactive shell (optional)

A summary of [Setting up and using `utop`](https://dev.realworldocaml.org/install.html):

Expand All @@ -48,3 +49,9 @@ To work on the exercises, you will need these pieces of software:
#require "base";;
open Base
```

5. Install IDE related tools (optional)

The following relates to using VS Code as your code editor. Adjust accordingly.
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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the items here mainly relate to VS Code, we could mention it in the heading. For example:

Suggested change
5. Install IDE related tools (optional)
The following relates to using VS Code as your code editor. Adjust accordingly.
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.
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 the [marketplace](https://marketplace.visualstudio.com/items?itemName=ocamllabs.ocaml-platform), or search for `OCaml Platform` by Ocaml Labs.