Module Phantom_algebra.Interface

Phantom algebra interfaces

This modules provides the interface implemented by the core module, splits in smaller logical units.

There are intended to be used by people interested by the type-level interface but not by the simple OCaml implementation provided.

type k = float
exception Unexpected_ranks of int list
module type Core : sig ... end

Indexing

The two following module types provide a definition for indices and their associated type-level values and the indexing and slicing functions.

module type Index : sig ... end
module type Indexing : sig ... end
module type Basic : sig ... end

Advanced modules

The following functions are useful when writing higher functions of which the output depends on the dimension or the rank, or with input of arbitrary dimensions or ranks. Note that type errors often become atrocious in this use case

module type Rank : sig ... end
module type Dim : sig ... end
module type Matching : sig ... end
module type Cloning : sig ... end

Full interface

The module type S combines all previous interface together.

module type S : sig ... end