mirror of
https://github.com/AleoHQ/leo.git
synced 2025-01-02 06:50:13 +03:00
create value module
This commit is contained in:
parent
604eb09e27
commit
2e24197ea2
@ -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,
|
||||
};
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
@ -9,9 +9,9 @@ use crate::{
|
||||
group::group_from_input,
|
||||
new_scope,
|
||||
ConstrainedProgram,
|
||||
ConstrainedValue,
|
||||
},
|
||||
errors::{FunctionError, StatementError},
|
||||
value::ConstrainedValue,
|
||||
GroupType,
|
||||
Integer,
|
||||
};
|
||||
|
@ -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::*;
|
||||
|
@ -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};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
@ -1,6 +1,7 @@
|
||||
use crate::{
|
||||
constraints::{new_scope, ConstrainedProgram, ConstrainedValue},
|
||||
constraints::{new_scope, ConstrainedProgram},
|
||||
errors::ImportError,
|
||||
value::ConstrainedValue,
|
||||
GroupType,
|
||||
ImportedPrograms,
|
||||
};
|
||||
|
@ -23,3 +23,6 @@ pub use self::group::*;
|
||||
|
||||
pub mod imports;
|
||||
pub use self::imports::*;
|
||||
|
||||
pub mod value;
|
||||
pub use self::value::*;
|
||||
|
2
compiler/src/value/mod.rs
Normal file
2
compiler/src/value/mod.rs
Normal file
@ -0,0 +1,2 @@
|
||||
pub mod value;
|
||||
pub use self::value::*;
|
Loading…
Reference in New Issue
Block a user