Structural-typing 2.0.5

Define types by giving descriptions (perhaps incomplete) of how they're built. "...by how they're built" means applying arbitrary predicates (especially ones about existence) to parts of structures. The top-level namespaces contain what you need to use the library, including simpler customizations. The .assist namespaces are useful for more in-depth customizations.

structural-typing.assist.defaults

User-visible default behaviors.

structural-typing.assist.lifting

Lifting is a core concept, though one only writers of fairly unusual custom predicates need worry about.

Public variables and functions:

structural-typing.assist.oopsie

The declaration of the core data structure: the oopsie. It is produced when a predicate is applied to a value and fails. Also utility functions.

structural-typing.assist.predicate-defining

Helpers for defining custom predicates. See structural-typing.preds for examples of use.

Public variables and functions:

structural-typing.assist.special-words

There are a number of symbols that have special meanings. They are aggregated here for convenience.

structural-typing.assist.testutil

Useful shorthand for tests of new code, like custom predicates.

structural-typing.assist.type-repo

The TypeRepo structure and its functions.

structural-typing.doc

Functions that jump to online documentation.

Public variables and functions:

structural-typing.global-type

If you want to mutate the state of a single global type repo, these functions support that.

Public variables and functions:

structural-typing.preds

A few predefined predicates, but also functions that take expected values and generate predicates.

structural-typing.type

Structural types, loosely inspired by Elm’s way of looking at records.