commons commerce.money {
  type CurrencyCode = String where Matches("[A-Z]{3}")

  type Money = {
    minorUnits: Int where NonNegative,
    currency:   CurrencyCode,
  }

  fn build(minorUnits: Int, cur: CurrencyCode) -> Money {
    Money { minorUnits: minorUnits, currency: cur }
  }
}
