use super::*;
impl<A: Aleo> Equal<Self> for Value<A> {
type Output = Boolean<A>;
fn is_equal(&self, other: &Self) -> Self::Output {
match (self, other) {
(Self::Plaintext(a), Self::Plaintext(b)) => a.is_equal(b),
(Self::Record(a), Self::Record(b)) => a.is_equal(b),
(Self::Future(a), Self::Future(b)) => a.is_equal(b),
(Self::DynamicRecord(a), Self::DynamicRecord(b)) => a.is_equal(b),
(Self::DynamicFuture(a), Self::DynamicFuture(b)) => a.is_equal(b),
(Self::Plaintext(..), _)
| (Self::Record(..), _)
| (Self::Future(..), _)
| (Self::DynamicRecord(..), _)
| (Self::DynamicFuture(..), _) => Boolean::constant(false),
}
}
fn is_not_equal(&self, other: &Self) -> Self::Output {
match (self, other) {
(Self::Plaintext(a), Self::Plaintext(b)) => a.is_not_equal(b),
(Self::Record(a), Self::Record(b)) => a.is_not_equal(b),
(Self::Future(a), Self::Future(b)) => a.is_not_equal(b),
(Self::DynamicRecord(a), Self::DynamicRecord(b)) => a.is_not_equal(b),
(Self::DynamicFuture(a), Self::DynamicFuture(b)) => a.is_not_equal(b),
(Self::Plaintext(..), _)
| (Self::Record(..), _)
| (Self::Future(..), _)
| (Self::DynamicRecord(..), _)
| (Self::DynamicFuture(..), _) => Boolean::constant(true),
}
}
}