Skip to content

Commit

Permalink
Derive some more debugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseth committed Jan 16, 2024
1 parent 24e7780 commit c1cc670
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion executor/src/constant_evaluator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ impl<'a, T: FieldElement> SymbolLookup<'a, T, FixedColumnRef<'a>> for Symbols<'a
}
}

#[derive(Clone, PartialEq)]
#[derive(Clone, PartialEq, Debug)]
pub struct FixedColumnRef<'a> {
pub name: &'a str,
}
Expand Down
2 changes: 1 addition & 1 deletion executor/src/witgen/query_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ impl<'a, T: FieldElement> SymbolLookup<'a, T, Reference<'a>> for Symbols<'a, T>
}
}

#[derive(Clone)]
#[derive(Clone, Debug)]
struct Reference<'a> {
name: &'a str,
poly_id: PolyID,
Expand Down
2 changes: 1 addition & 1 deletion pil_analyzer/src/condenser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ impl<'a, T: FieldElement> SymbolLookup<'a, T, Condensate<T>> for &'a Condenser<T
}
}

#[derive(Clone, PartialEq)]
#[derive(Clone, PartialEq, Debug)]
enum Condensate<T> {
Expression(AlgebraicExpression<T>),
Identity(AlgebraicExpression<T>, AlgebraicExpression<T>),
Expand Down
9 changes: 5 additions & 4 deletions pil_analyzer/src/evaluator.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use std::fmt;
use std::{collections::HashMap, fmt::Display, rc::Rc};

use ast::{
Expand Down Expand Up @@ -76,7 +77,7 @@ pub enum EvalError {
DataNotAvailable,
}

#[derive(Clone, PartialEq)]
#[derive(Clone, PartialEq, Debug)]
pub enum Value<'a, T, C> {
Number(T),
String(String),
Expand All @@ -103,7 +104,7 @@ impl<'a, T: FieldElement, C: Custom> Value<'a, T, C> {
}
}

pub trait Custom: Display + Clone + PartialEq {}
pub trait Custom: Display + fmt::Debug + Clone + PartialEq {}

impl<'a, T: Display, C: Custom> Display for Value<'a, T, C> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
Expand All @@ -118,7 +119,7 @@ impl<'a, T: Display, C: Custom> Display for Value<'a, T, C> {
}
}

#[derive(Clone, PartialEq)]
#[derive(Clone, PartialEq, Debug)]
pub enum NoCustom {}

impl Custom for NoCustom {}
Expand All @@ -129,7 +130,7 @@ impl Display for NoCustom {
}
}

#[derive(Clone)]
#[derive(Clone, Debug)]
pub struct Closure<'a, T, C> {
pub lambda: &'a LambdaExpression<T, Reference>,
pub environment: Vec<Rc<Value<'a, T, C>>>,
Expand Down

0 comments on commit c1cc670

Please sign in to comment.