vyre-spec 0.6.1

Frozen data contracts for vyre - OpDef, AlgebraicLaw, Category, IntrinsicTable
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
macro_rules! impl_builtin_wire_tag {
    ($name:ident, $opaque:ident, { $($variant:ident => $tag:expr),+ $(,)? }) => {
        impl $name {
            /// Frozen builtin wire tag for this operation.
            ///
            /// Returns `None` for extension-declared opaque operators because their
            /// wire representation is the high-bit extension id, not a core tag.
            #[must_use]
            pub const fn builtin_wire_tag(&self) -> Option<u8> {
                match self {
                    $(Self::$variant => Some($tag),)+
                    Self::$opaque(_) => None,
                }
            }
        }
    };
}