magma icon indicating copy to clipboard operation
magma copied to clipboard

Enum/Product namespace

Open leonardt opened this issue 6 years ago • 2 comments

We should either: (a) have a list of reserved names and error when a user provides an enum field that uses one (see https://github.com/phanrahan/magma/issues/500) (b) use a separate namespace for enum fields that avoids clobbering the internally used names by the type system, so the user can use arbitrary names without breaking internal code.

leonardt avatar Jan 31 '20 17:01 leonardt

Product needs same thing #567

splhack avatar Feb 02 '20 08:02 splhack

hwtypes uses a list of reserved names which may not be fields. There is also list of reserved _names_ which if set will have strange side effects but allow for extension.

https://github.com/leonardt/hwtypes/blob/master/hwtypes/adt_meta.py#L40 https://github.com/leonardt/hwtypes/blob/master/tests/test_adt.py#L359

It would make sense for magma to do something

cdonovick avatar Feb 04 '20 00:02 cdonovick