Allow using data
constructor defaults in pattern-matching
#708
Labels
Milestone
data
constructor defaults in pattern-matching
#708
For a
data
type defined aswe should compile
to the equivalent of
probably by looking up the defaults on a
__match_defaults__
, though note that we'll only be able to do this fordata
patterns, notclass
patterns, so as to keep consistency with Python.Additionally, this will let us pattern-match
Expected
in the expected way:The text was updated successfully, but these errors were encountered: