use crate::core::{
    compile_passes::optimizer::Optimizer,
    expressions::{curve_expr::CurveExpr, expr::Expr},
};

impl Optimizer {
    pub fn optimize_curve_expr(&mut self, expr: CurveExpr<usize>) -> Expr<usize> {
        match expr {
            CurveExpr::Reveal(id) => self.expr_store.get_expr(id).clone(),
            _ => Expr::Curve(expr),
        }
    }
}
