Skip to content

Unhack TypeFamilies for magma #120

Open
@rdaly525

Description

@rdaly525

Currently, Magma has a different Enum/Product/Tuple from the hwtypes.adt types. This causes a lot of hacked user code in order to get Peak to compile to magma.

I would request we add all ADT types into TypeFamily so that we can nicely define ADT types the following way:

ADT_fc(family : TypeFamily):
    class A(family.Product):
        a = family.Bit
        b = family.BitVector[16]
    T = family.Tuple[A,family.Bit] 
    # etc...

Enum/Product/Tuple are probably sufficient in the short term, but we should also add Sum, and TaggedUnion once magma supports these ADT types.

@leonardt, @cdonovick, Any issues with this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions