This pull request adds static type information for enum types, in the form of enum bindings. Enum bindings are created by define-enum-type and can be extracted with the enum-id syntax class. Additionally, this pull request implements an enum-out provide transformer.
An unfortunate breaking change to rebellion/base/range is included: the range-bound-type enum is renamed to bound-type, to avoid a clash between the enum binding and the range-bound-type accessor for the type field of range-bound.
This pull request paves the way for compile-time manipulation of enums, such as defining converters between different enums or converters from enums to symbols and strings. It also sets a precedent for how other kinds of types will expose compile-time information.
Partially addresses #431, though docs for enum-type? and enum type descriptors are still lacking.
This pull request adds static type information for enum types, in the form of enum bindings. Enum bindings are created by
define-enum-type
and can be extracted with theenum-id
syntax class. Additionally, this pull request implements anenum-out
provide transformer.An unfortunate breaking change to
rebellion/base/range
is included: therange-bound-type
enum is renamed tobound-type
, to avoid a clash between the enum binding and therange-bound-type
accessor for thetype
field ofrange-bound
.This pull request paves the way for compile-time manipulation of enums, such as defining converters between different enums or converters from enums to symbols and strings. It also sets a precedent for how other kinds of types will expose compile-time information.
Partially addresses #431, though docs for
enum-type?
and enum type descriptors are still lacking.