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

Safe HaskellSafe-Inferred




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.

class GCardinality a Source

Associated Types

type GCard a Source


GCardinality (V1 p) 
GCardinality (U1 p) 
Cardinality a => GCardinality (K1 i a p) 
(GCardinality (f p), GCardinality (g p)) => GCardinality (:+: f g p) 
(GCardinality (f p), GCardinality (g p)) => GCardinality (:*: f g p) 
GCardinality (f p) => GCardinality (M1 i c f p)