CategoricalData / hydra

Transformations transformed
Apache License 2.0
64 stars 9 forks source link

Unify the Nominal type with RowType #115

Open joshsh opened 8 months ago

joshsh commented 8 months ago

Currently, wrapper types (newtypes) in Hydra use the Nominal type, which binds a name to another type. Wrapper types are essentially single-field record types. Record types and union types also bind a name to another (row) type, but they do it by including a typeName field in RowType. Record and union types are essentially just named row types, and should probably use Nominal in the same way that wrapper types do.

joshsh commented 8 months ago

Note: rather than create a separate issue, there is also some simplification to be done around the Nominal, Element, Field, FieldType, Name, and FieldName types. E.g. if we rename Nominal to Named, then wrapper types just become Named Type. Record types become Named RowType. Elements become Named Term, etc.