create value module

This commit is contained in:
collin 2020-07-07 19:11:26 -07:00
parent 604eb09e27
commit 2e24197ea2
12 changed files with 16 additions and 12 deletions

View File

@ -1,8 +1,9 @@
//! Compiles a Leo program from a file path.
use crate::{
constraints::{generate_constraints, generate_test_constraints, ConstrainedValue},
constraints::{generate_constraints, generate_test_constraints},
errors::CompilerError,
value::ConstrainedValue,
GroupType,
ImportedPrograms,
};

View File

@ -1,6 +1,6 @@
//! Methods to enforce constraints on booleans in a resolved Leo program.
use crate::{constraints::ConstrainedValue, errors::BooleanError, GroupType};
use crate::{errors::BooleanError, value::ConstrainedValue, GroupType};
use leo_types::{InputValue, Span};
use snarkos_errors::gadgets::SynthesisError;

View File

@ -5,11 +5,10 @@ use crate::{
constraints::{
boolean::{enforce_and, enforce_or, evaluate_not, new_bool_constant},
new_scope,
ConstrainedCircuitMember,
ConstrainedProgram,
ConstrainedValue,
},
errors::ExpressionError,
value::{ConstrainedCircuitMember, ConstrainedValue},
Address,
FieldType,
GroupType,

View File

@ -1,6 +1,6 @@
//! Methods to enforce constraints on field elements in a resolved Leo program.
use crate::{constraints::ConstrainedValue, errors::FieldError, FieldType, GroupType};
use crate::{errors::FieldError, value::ConstrainedValue, FieldType, GroupType};
use leo_types::{InputValue, Span};
use snarkos_errors::gadgets::SynthesisError;

View File

@ -9,9 +9,9 @@ use crate::{
group::group_from_input,
new_scope,
ConstrainedProgram,
ConstrainedValue,
},
errors::{FunctionError, StatementError},
value::ConstrainedValue,
GroupType,
Integer,
};

View File

@ -24,8 +24,5 @@ pub mod group;
pub mod program;
pub use self::program::*;
pub mod value;
pub use self::value::*;
pub mod statement;
pub use self::statement::*;

View File

@ -1,6 +1,6 @@
//! An in memory store to keep track of defined names when constraining a Leo program.
use crate::{constraints::ConstrainedValue, GroupType};
use crate::{value::ConstrainedValue, GroupType};
use snarkos_models::curves::{Field, PrimeField};

View File

@ -1,9 +1,10 @@
//! Methods to enforce constraints on statements in a resolved Leo program.
use crate::{
constraints::{ConstrainedProgram, ConstrainedValue},
constraints::ConstrainedProgram,
errors::{StatementError, ValueError},
new_scope,
value::ConstrainedValue,
GroupType,
Integer,
};

View File

@ -1,6 +1,7 @@
use crate::{
constraints::{new_scope, ConstrainedProgram, ConstrainedValue},
constraints::{new_scope, ConstrainedProgram},
errors::ImportError,
value::ConstrainedValue,
GroupType,
ImportedPrograms,
};

View File

@ -23,3 +23,6 @@ pub use self::group::*;
pub mod imports;
pub use self::imports::*;
pub mod value;
pub use self::value::*;

View File

@ -0,0 +1,2 @@
pub mod value;
pub use self::value::*;