Suggestion for Branded Types in Schemata

Wouldn’t it be nice if schemata like Schema.Positive and Schema.Trimmed returned Branded types, with names like PositiveNumber and TrimmedString? It would move us towards functions like makeComponent(name: TrimmedString, width: PositiveNumber)
Was this page helpful?