diff --git a/compiler/src/constraints/definitions/import.rs b/compiler/src/constraints/definitions/import.rs index fdb8c1b1b5..38f66fc9c2 100644 --- a/compiler/src/constraints/definitions/import.rs +++ b/compiler/src/constraints/definitions/import.rs @@ -1,4 +1,4 @@ -use crate::{errors::ImportError, ConstrainedProgram, GroupType, ImportedPrograms, ImportedSymbols}; +use crate::{errors::ImportError, imported_symbols::ImportedSymbols, ConstrainedProgram, GroupType, ImportedPrograms}; use leo_types::Import; use snarkos_models::curves::{Field, PrimeField}; diff --git a/compiler/src/constraints/definitions/mod.rs b/compiler/src/constraints/definitions/mod.rs index 08d5c11244..84aacdaf0e 100644 --- a/compiler/src/constraints/definitions/mod.rs +++ b/compiler/src/constraints/definitions/mod.rs @@ -2,7 +2,6 @@ pub mod import; pub use self::import::*; pub mod imported_symbols; -pub(crate) use self::imported_symbols::*; pub mod definitions; diff --git a/compiler/src/constraints/expression.rs b/compiler/src/constraints/expression.rs index 887abb3f29..4660845c87 100644 --- a/compiler/src/constraints/expression.rs +++ b/compiler/src/constraints/expression.rs @@ -1,13 +1,14 @@ //! Methods to enforce constraints on expressions in a resolved Leo program. use crate::{ - constraints::{ConstrainedCircuitMember, ConstrainedProgram, ConstrainedValue}, - enforce_and, - enforce_or, + constraints::{ + boolean::{enforce_and, enforce_or, evaluate_not, new_bool_constant}, + new_scope, + ConstrainedCircuitMember, + ConstrainedProgram, + ConstrainedValue, + }, errors::ExpressionError, - evaluate_not, - new_bool_constant, - new_scope, FieldType, GroupType, }; diff --git a/compiler/src/constraints/function.rs b/compiler/src/constraints/function.rs index 5a5dee6b0d..d220dc2472 100644 --- a/compiler/src/constraints/function.rs +++ b/compiler/src/constraints/function.rs @@ -2,11 +2,15 @@ //! a resolved Leo program. use crate::{ - bool_from_input, - constraints::{new_scope, ConstrainedProgram, ConstrainedValue}, + constraints::{ + boolean::bool_from_input, + field::field_from_input, + group::group_from_input, + new_scope, + ConstrainedProgram, + ConstrainedValue, + }, errors::{FunctionError, StatementError}, - field_from_input, - group_from_input, GroupType, }; use leo_types::{Expression, Function, InputValue, Integer, Span, Type}; diff --git a/compiler/src/constraints/mod.rs b/compiler/src/constraints/mod.rs index 7b2c617b38..85c9c6f11c 100644 --- a/compiler/src/constraints/mod.rs +++ b/compiler/src/constraints/mod.rs @@ -1,7 +1,6 @@ //! Module containing methods to enforce constraints in an Leo program -pub(crate) mod boolean; -pub(crate) use self::boolean::*; +pub mod boolean; pub mod function; pub use self::function::*; @@ -9,17 +8,15 @@ pub use self::function::*; pub mod expression; pub use self::expression::*; -pub(crate) mod field; -pub(crate) use self::field::*; +pub mod field; pub mod generate_constraints; pub use self::generate_constraints::*; -pub(crate) mod group; -pub(crate) use self::group::*; +pub mod group; -pub(crate) mod definitions; -pub(crate) use self::definitions::*; +pub mod definitions; +pub use self::definitions::*; pub mod program; pub use self::program::*; diff --git a/compiler/src/constraints/value.rs b/compiler/src/constraints/value.rs index 090aacd9c0..71c7bb6d29 100644 --- a/compiler/src/constraints/value.rs +++ b/compiler/src/constraints/value.rs @@ -1,11 +1,12 @@ //! The in memory stored value for a defined name in a resolved Leo program. use crate::{ - allocate_bool, - allocate_field, - allocate_group, + constraints::{ + boolean::{allocate_bool, new_bool_constant}, + field::allocate_field, + group::allocate_group, + }, errors::ValueError, - new_bool_constant, new_scope, FieldType, GroupType, diff --git a/compiler/src/errors/constraints/mod.rs b/compiler/src/errors/constraints/mod.rs index 315a513422..74fea7a4f4 100644 --- a/compiler/src/errors/constraints/mod.rs +++ b/compiler/src/errors/constraints/mod.rs @@ -1,25 +1,25 @@ //! Module containing errors returned when enforcing constraints in an Leo program pub mod boolean; -pub use boolean::*; +pub use self::boolean::*; pub mod function; -pub use function::*; +pub use self::function::*; pub mod expression; -pub use expression::*; +pub use self::expression::*; pub mod import; -pub use import::*; +pub use self::import::*; pub mod field; -pub use field::*; +pub use self::field::*; pub mod group; -pub use group::*; +pub use self::group::*; pub mod value; -pub use value::*; +pub use self::value::*; pub mod statement; -pub use statement::*; +pub use self::statement::*;