fix traits in compiler

This commit is contained in:
collin 2020-07-16 22:48:56 -07:00
parent 77d93d11bd
commit 1ede8db1cd
7 changed files with 9 additions and 8 deletions

View File

@ -1,7 +1,7 @@
//! Enforces a relational `>=` operator in a resolved Leo program. //! Enforces a relational `>=` operator in a resolved Leo program.
use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType}; use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType};
use leo_gadgets::binary::ComparatorGadget; use leo_gadgets::bits::ComparatorGadget;
use leo_types::Span; use leo_types::Span;
use snarkos_models::{ use snarkos_models::{

View File

@ -1,7 +1,7 @@
//! Enforces a relational `>` operator in a resolved Leo program. //! Enforces a relational `>` operator in a resolved Leo program.
use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType}; use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType};
use leo_gadgets::binary::ComparatorGadget; use leo_gadgets::bits::ComparatorGadget;
use leo_types::Span; use leo_types::Span;
use snarkos_models::{ use snarkos_models::{

View File

@ -1,7 +1,7 @@
//! Enforces a relational `<=` operator in a resolved Leo program. //! Enforces a relational `<=` operator in a resolved Leo program.
use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType}; use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType};
use leo_gadgets::binary::ComparatorGadget; use leo_gadgets::bits::ComparatorGadget;
use leo_types::Span; use leo_types::Span;
use snarkos_models::{ use snarkos_models::{

View File

@ -1,7 +1,7 @@
//! Enforces a relational `<` operator in a resolved Leo program. //! Enforces a relational `<` operator in a resolved Leo program.
use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType}; use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType};
use leo_gadgets::binary::comparator::EvaluateLtGadget; use leo_gadgets::bits::comparator::EvaluateLtGadget;
use leo_types::Span; use leo_types::Span;
use snarkos_models::{ use snarkos_models::{

View File

@ -1,7 +1,7 @@
//! A data type that represents a field value //! A data type that represents a field value
use crate::errors::FieldError; use crate::errors::FieldError;
use leo_gadgets::binary::{ComparatorGadget, EvaluateLtGadget}; use leo_gadgets::bits::{ComparatorGadget, EvaluateLtGadget};
use leo_types::Span; use leo_types::Span;
use snarkos_errors::gadgets::SynthesisError; use snarkos_errors::gadgets::SynthesisError;

View File

@ -1,7 +1,8 @@
//! Conversion of integer declarations to constraints in Leo. //! Conversion of integer declarations to constraints in Leo.
use crate::{errors::IntegerError, integer::macros::IntegerTrait}; use crate::{errors::IntegerError, integer::macros::IntegerTrait};
use leo_gadgets::{ use leo_gadgets::{
binary::comparator::{ComparatorGadget, EvaluateLtGadget}, arithmetic::*,
bits::comparator::{ComparatorGadget, EvaluateLtGadget},
signed_integer::*, signed_integer::*,
}; };
use leo_types::{InputValue, IntegerType, Span}; use leo_types::{InputValue, IntegerType, Span};

View File

@ -1,4 +1,4 @@
use leo_gadgets::*; use leo_gadgets::signed_integer::*;
use snarkos_models::gadgets::utilities::{ use snarkos_models::gadgets::utilities::{
boolean::Boolean, boolean::Boolean,
@ -6,7 +6,7 @@ use snarkos_models::gadgets::utilities::{
}; };
use std::fmt::Debug; use std::fmt::Debug;
pub trait IntegerTrait: Sized + Clone + Debug + Add { pub trait IntegerTrait: Sized + Clone + Debug {
fn get_value(&self) -> Option<String>; fn get_value(&self) -> Option<String>;
fn get_bits(&self) -> Vec<Boolean>; fn get_bits(&self) -> Vec<Boolean>;