A collection of types that includes variants, records, and tuples.

Product Types

  • contains one value from each component.
  • tuples
  • records
  • combine multiple different types together and are mathematically similar to Cartesian products;
  • Conjunctions
type Point = (Float, Float)

Sum Types

  • Variants
  • combine multiple different possibilities into one type, and are mathematically similar to disjoint unions
  • Disjunctions
data Shape = Circle Float
           | Rectangle Float Float
           | Triangle Float Float Float