Hide RocDec implemntation details.

This commit is contained in:
Derek Gustafson 2022-03-07 15:34:02 -05:00
parent 92ace8ff67
commit ba6b225761
No known key found for this signature in database
GPG key ID: 8B8B15EF3CC8410B
8 changed files with 26 additions and 16 deletions

View file

@ -135,7 +135,7 @@ impl<'a> Hash for Test<'a> {
IsDecimal(v) => {
// TODO: Is this okay?
state.write_u8(6);
v.0.hash(state);
v.hash(state);
}
IsU128(v) => {
state.write_u8(7);
@ -906,7 +906,7 @@ fn to_relevant_branch_help<'a>(
},
DecimalLiteral(dec) => match test {
IsDecimal(test_dec) if dec.0 == test_dec.0 => {
IsDecimal(test_dec) if dec.eq(test_dec) => {
start.extend(end);
Some(Branch {
goal: branch.goal,
@ -1396,7 +1396,7 @@ fn test_to_equality<'a>(
}
Test::IsDecimal(test_dec) => {
let lhs = Expr::Literal(Literal::Int(test_dec.0));
let lhs = Expr::Literal(Literal::Decimal(test_dec));
let lhs_symbol = env.unique_symbol();
stores.push((lhs_symbol, *cond_layout, lhs));