Skip to content

kayceesrk/learn-ocaml-workshop-2024

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learn OCaml Workshop

This repo contains exercises to help you get started developing in OCaml.

Installation

1. Install the opam package manager

On Linux, macOS, *BSD

$ bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)"
$ opam init -ya
$ eval $(opam env)

On Windows

$ wiget install Git.git
$ winget install OCaml.opam
$ opam init -ya

2. Setup the OCaml development environment and dependencies

opam install ocaml-lsp-server odoc ocamlformat utop async core js_of_ocaml js_of_ocaml-ppx merlin ocp-indent

3. Setup the editor

Exercises

The directory 01-exercises contains a number of exercises to get you started with OCaml. Each one has some expect-tests embedded in it. Get started with

$ cd 01-exercises
$ dune build

And then, for each <problem_dir> under 01-exercises, do:

$ cd <problem_dir>
$ dune runtest 

dune runtest builds and runs the inline tests. Look at the test output and compiler errors, edit problem.ml and rerun dune runtest until all the tests pass.

Documentation and resources

Acknowledgements

Adapted from https://github.com/janestreet/learn-ocaml-workshop.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages