Unary ADTs is a pretty common pattern in Harlan as a way of getting structs and tuples. For these cases, it'd be nice to be able to destructure them in more than just match expressions, such as let and kernel. It'd be nice to do something like this:
(let (((point a b c) p))
(+ a b c))
This would be equivalent to:
(match p
((point a b c) (+ a b c)))
It'd be especially nice for kernel parameters, for example.
This can probably be done mostly in the macro system.
Unary ADTs is a pretty common pattern in Harlan as a way of getting structs and tuples. For these cases, it'd be nice to be able to destructure them in more than just
match
expressions, such aslet
andkernel
. It'd be nice to do something like this:This would be equivalent to:
It'd be especially nice for kernel parameters, for example.
This can probably be done mostly in the macro system.