Skip to content

Latest commit

 

History

History
84 lines (48 loc) · 3.39 KB

README.md

File metadata and controls

84 lines (48 loc) · 3.39 KB

SM2-TES: Functional Programming and Property-Based Testing

This repository contains course material for the course 'SM2-TES: Functional Programming and Property-Based Testing' held at the University of Southern Denmark, Spring 2021.

Useful resources

Installation instructions

A minimal example of QCheck, ocamlfind, and ocamlbuild

OCaml standard library

OCaml operator lookup

QCheck documentation

Screencast illustrating utop

Screencast illustrating the regular toplevel

Screencast illustrating ocamlbuild and Makefiles

Top-level directives:

Both utop and the ocaml read-eval-print loop accepts a number of "directives" documented in the manual, chapter 10.2.

These are strictly speaking not part of the OCaml language - just helpful instructions to the interactive interpreters. As such, I wouldn't put them in source code.

  • #use "filename.ml";; loads OCaml source code into the read-eval-print loop. It stops on the first error.

  • #show identifier;; prints the type of a variable or module.

  • #use "topfind";; loads a helper program to easily load packages. topfind is loaded automatically by utop.

    After loading topfind additional directives are available:

    • #require "packagename";; for loading a package, e.g., qcheck.

    • #list;; prints a list of installed packages

  • ...

Cool uses of OCaml:

Here's some example uses of OCaml:

The Wikipedia page for OCaml also lists users of OCaml.

ocaml.org maintains a list of companies that use OCaml.