pub fn equal(val1: &Value, val2: &Value) -> bool {
    match (val1, val2) {
        (Value::Neutral(head0, elims0), Value::Neutral(head1, elims1)) => {
            readback_neutral(head0, elims0) == readback_neutral(head1, elims1)
        }
        (Value::BoolConst(value0), Value::BoolConst(value1)) => value0 == value1,
        (Value::IntConst(value0), Value::IntConst(value1)) => value0 == value1,
        (Value::F32Const(value0), Value::F32Const(value1)) => ieee754::logical_eq(*value0, *value1),
        (Value::F64Const(value0), Value::F64Const(value1)) => ieee754::logical_eq(*value0, *value1),
        (Value::Universe(universe0), Value::Universe(universe1)) => universe0 == universe1,
        (Value::U8Type, Value::U8Type)
        | (Value::U16LeType, Value::U16LeType)
        | (Value::U16BeType, Value::U16BeType)
        | (Value::U32LeType, Value::U32LeType)
        | (Value::U32BeType, Value::U32BeType)
        | (Value::U64LeType, Value::U64LeType)
        | (Value::U64BeType, Value::U64BeType)
        | (Value::S8Type, Value::S8Type)
        | (Value::S16LeType, Value::S16LeType)
        | (Value::S16BeType, Value::S16BeType)
        | (Value::S32LeType, Value::S32LeType)
        | (Value::S32BeType, Value::S32BeType)
        | (Value::S64LeType, Value::S64LeType)
        | (Value::S64BeType, Value::S64BeType)
        | (Value::F32LeType, Value::F32LeType)
        | (Value::F32BeType, Value::F32BeType)
        | (Value::F64LeType, Value::F64LeType)
        | (Value::F64BeType, Value::F64BeType)
        | (Value::BoolType, Value::BoolType)
        | (Value::IntType, Value::IntType)
        | (Value::F32Type, Value::F32Type)
        | (Value::F64Type, Value::F64Type) => true,
        // Errors are always treated as equal
        (Value::Error, _) | (_, Value::Error) => true,
        // Anything else is not equal!
        (_, _) => false,
    }
}
/// Check that two values are equal.
Check that two values are equal.
Check that two values are equal .
pub fn equal(val1: &Value, val2: &Value) -> bool {
    match (val1, val2) {
        (Value::Neutral(head0, elims0), Value::Neutral(head1, elims1)) => {
            readback_neutral(head0, elims0) == readback_neutral(head1, elims1)
        }
        (Value::BoolConst(value0), Value::BoolConst(value1)) => value0 == value1,
        (Value::IntConst(value0), Value::IntConst(value1)) => value0 == value1,
        (Value::F32Const(value0), Value::F32Const(value1)) => ieee754::logical_eq(*value0, *value1),
        (Value::F64Const(value0), Value::F64Const(value1)) => ieee754::logical_eq(*value0, *value1),
        (Value::Universe(universe0), Value::Universe(universe1)) => universe0 == universe1,
        (Value::U8Type, Value::U8Type)
        | (Value::U16LeType, Value::U16LeType)
        | (Value::U16BeType, Value::U16BeType)
        | (Value::U32LeType, Value::U32LeType)
        | (Value::U32BeType, Value::U32BeType)
        | (Value::U64LeType, Value::U64LeType)
        | (Value::U64BeType, Value::U64BeType)
        | (Value::S8Type, Value::S8Type)
        | (Value::S16LeType, Value::S16LeType)
        | (Value::S16BeType, Value::S16BeType)
        | (Value::S32LeType, Value::S32LeType)
        | (Value::S32BeType, Value::S32BeType)
        | (Value::S64LeType, Value::S64LeType)
        | (Value::S64BeType, Value::S64BeType)
        | (Value::F32LeType, Value::F32LeType)
        | (Value::F32BeType, Value::F32BeType)
        | (Value::F64LeType, Value::F64LeType)
        | (Value::F64BeType, Value::F64BeType)
        | (Value::BoolType, Value::BoolType)
        | (Value::IntType, Value::IntType)
        | (Value::F32Type, Value::F32Type)
        | (Value::F64Type, Value::F64Type) => true,
        // Errors are always treated as equal
        (Value::Error, _) | (_, Value::Error) => true,
        // Anything else is not equal!
        (_, _) => false,
    }
}
pub fn equal ( val1 : & Value , val2 : & Value ) -> bool { match ( val1 , val2 ) { ( Value :: Neutral ( head0 , elims0 ) , Value :: Neutral ( head1 , elims1 ) ) => { readback_neutral ( head0 , elims0 ) == readback_neutral ( head1 , elims1 ) } ( Value :: BoolConst ( value0 ) , Value :: BoolConst ( value1 ) ) => value0 == value1 , ( Value :: IntConst ( value0 ) , Value :: IntConst ( value1 ) ) => value0 == value1 , ( Value :: F32Const ( value0 ) , Value :: F32Const ( value1 ) ) => ieee754 :: logical_eq ( * value0 , * value1 ) , ( Value :: F64Const ( value0 ) , Value :: F64Const ( value1 ) ) => ieee754 :: logical_eq ( * value0 , * value1 ) , ( Value :: Universe ( universe0 ) , Value :: Universe ( universe1 ) ) => universe0 == universe1 , ( Value :: U8Type , Value :: U8Type ) | ( Value :: U16LeType , Value :: U16LeType ) | ( Value :: U16BeType , Value :: U16BeType ) | ( Value :: U32LeType , Value :: U32LeType ) | ( Value :: U32BeType , Value :: U32BeType ) | ( Value :: U64LeType , Value :: U64LeType ) | ( Value :: U64BeType , Value :: U64BeType ) | ( Value :: S8Type , Value :: S8Type ) | ( Value :: S16LeType , Value :: S16LeType ) | ( Value :: S16BeType , Value :: S16BeType ) | ( Value :: S32LeType , Value :: S32LeType ) | ( Value :: S32BeType , Value :: S32BeType ) | ( Value :: S64LeType , Value :: S64LeType ) | ( Value :: S64BeType , Value :: S64BeType ) | ( Value :: F32LeType , Value :: F32LeType ) | ( Value :: F32BeType , Value :: F32BeType ) | ( Value :: F64LeType , Value :: F64LeType ) | ( Value :: F64BeType , Value :: F64BeType ) | ( Value :: BoolType , Value :: BoolType ) | ( Value :: IntType , Value :: IntType ) | ( Value :: F32Type , Value :: F32Type ) | ( Value :: F64Type , Value :: F64Type ) => true , // Errors are always treated as equal ( Value :: Error , _ ) | ( _ , Value :: Error ) => true , // Anything else is not equal! ( _ , _ ) => false , } }
Check that two values are equal.
Check that two values are equal .
val1
&Value
val2
&Value
val1
&Value
val2
&Value