Defining new types

Functions for defining new types and the constructors that go with them.


Define a new data type from a sequence of constructors.

Pattern matching

Functions for matching constructed values against patterns.


Dummy object used for generic function dispatching.


Dispatches from an expression to a matching pattern

cases_expr_() cases_expr()

Create an expression that tests patterns against an expression in turn

test_pattern_() test_pattern()

Test if a pattern matches an expression


Function for specifying a sequence of patterns/expressions

Function rewriting

Functionality for rewriting functions that use pattern matching.


Transform a function containing a cases call into one that instead has if-statements.