tensor-0.1: A completely type-safe library for linear algebra

Safe HaskellSafe-Infered




class Cardinal a whereSource

Cardinal number as a type. The associated data type Succ a provides the next cardinal type. The method fromCardinal provides a numeric representation of the cardinal number; it should be independent on the argument and work on undefined.

Associated Types

data Succ a Source


fromCardinal :: Num i => a -> iSource


type C0 = ZeroSource

class Cardinal (Card a) => Cardinality a Source

The cardinality of a type is defined by its Cardinal type Card a.

Associated Types

type Card a Source

card :: (Cardinality a, Num i) => a -> iSource

The numeric cardinality of a type. card is independent on its argument.