Unittype
Unittype, or unit type, is a basic concept in type systems and programming languages. It denotes a type that has exactly one possible value or inhabitant. This value is typically used to represent “no meaningful value” or to sequence effects without conveying information.
In practice, many languages expose a concrete unit type. Haskell has the unit type () with the single
Semantically, the unit type acts as the identity element for product types: A × Unit is isomorphic
Comparison with void: Void is a type with no values and is used to express computations that
Uses and implications: Unit types enable code that requires a type parameter but no actual value, support