finos / morphir-elm / Morphir.Type.Cardinality

This module contains utilities to calculate the cardinality of types.


type Cardinality

Type cardinality represents the number of possible values for a given type. https://en.wikipedia.org/wiki/Cardinality


type alias AlephNumber =
Basics.Int

Represents an Aleph number that allows you to compare various levels of infinity https://en.wikipedia.org/wiki/Aleph_number

cardinality : Morphir.IR.Distribution.Distribution -> Dict Morphir.IR.Name.Name (Morphir.IR.Type.Type ()) -> Morphir.IR.Type.Type () -> Cardinality

Calculate the cardinality of a type going down recursively in the type expression tree.