package phantom-algebra
Module Phantom_algebra.InterfaceSource
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.
Indexing
The two following module types provide a definition for indices and their associated type-level values and the indexing and slicing functions.
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
Cloning a value is useful to duplicate the type-level information associated to this value when this value is provided as an function argument. This useful when using multiple time this value with functions performing different type-level computations.
Full interface
The module type S combines all previous interface together.