Looking at the documentation, I see that Haze supports pattern matching, but doesn't support nested patterns. Is there a reason why those are disallowed? They can provide succinct expressions for things like balancing red-black trees:
balanceLeft (Node _ (Node Red lx kx vx rx) ky vy ry) k v r = Node Red (Node Black lx kx vx rx) ky vy (Node Black ry k v r)
View all comments
2
u/AustinVelonaut 13h ago
Looking at the documentation, I see that Haze supports pattern matching, but doesn't support nested patterns. Is there a reason why those are disallowed? They can provide succinct expressions for things like balancing red-black trees: