Closed krame505 closed 11 months ago
This is currently failing to build due https://github.com/melt-umn/silver/issues/776
:tada: All dependencies have been resolved !
Can one still pattern match on pairs if annotations are used instead of regular child terms?
Yes, one can still write
case foo of
| pair(fst=42, y=a) -> ...
end
or
case foo of
| (42, a) -> ...
end
using tuple syntax.
Of course - the tuples extension is what we'd use in most applications. Thanks.
Changes
Depends on #773.
We discussed this change a while ago but never actually did it - this changes the definition of
Pair
fromto
This gives a slight performance improvement, as we don't need to create a
DecoratedNode
to access an annotation. This is also a nice demo of Silver's support for "records" via annotations (which works out a bit nicer now with the addition of deriving support in #774.)Documentation
https://github.com/melt-umn/melt-website/pull/52