jspahrsummers / adt

Algebraic data types for Python (experimental, not actively maintained)
MIT License
172 stars 14 forks source link

Nicer multi-arg case construction #6

Closed jspahrsummers closed 5 years ago

jspahrsummers commented 5 years ago

ListADT.CONS(("a", ListADT.CONS(("b", ListADT.NIL)))) is ugly as hell (with the nested parens)

jspahrsummers commented 5 years ago

Bonus points if we can get rid of the need to declare Tuple[…] for multi-arg fields. Maybe a universal Case[…] annotation is possible somehow?