finos/morphir-elm/18.0.0

NOTE: the latest version is 22.0.2

Formerly Morgan-Stanley/morphir-elm. Search finds this package by either name.

Morphir.Type.Cardinality

This module contains utilities to calculate the cardinality of types.

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

type alias AlephNumber =
Int

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

cardinality : IR -> Dict Name (Type ()) -> Type () -> Cardinality

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