hydra icon indicating copy to clipboard operation
hydra copied to clipboard

Rename hydra/core.UnitType to hydra/core.Unit

Open joshsh opened this issue 1 year ago • 2 comments

The UnitType type in Hydra Core is, unlike its siblings IntegerType, MapType, etc. not used exclusively in type definitions. The one and only instance of this type is the unit value, which is used throughout Hydra at both the term and the type level. Rename the type to Unit.

joshsh avatar Mar 09 '24 00:03 joshsh

unit is also the empty tuple and empty record

wisnesky avatar Mar 09 '24 02:03 wisnesky

Empty tuple is different in Hydra (though yes it can be considered equivalent), and there are also other empty records in Hydra which are distinct from unit. It’s the canonical empty record, though.

joshsh avatar Mar 09 '24 03:03 joshsh

This has been done for a while. Close.

joshsh avatar Jul 27 '24 05:07 joshsh