Skip to content

BuildError: Cannot lower Set node #660

@jon-wurtz

Description

@jon-wurtz

Cannot represent sets in kirin. This is useful for many things, such as comparing sets and other unordered collections of elements. The specific use case is for a switch statement:

if {ind1, ind2} == {0, 1}:
    # Do this
elif {ind1, ind2} == {0, 2}:
    # Do that
elif {ind1, ind2} == {1, 2}:
   # Do the other thing
else:
    raise #659 

This can be overcome right now by (ind1, ind2)==(0,1) or (ind1, ind2)==(1,0) but this gets tiresome for large sets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    category: featureCategory: new feature or feature request.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions