diff --git a/Cargo.lock b/Cargo.lock index b8c6e2c4f5..c222024db9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -704,7 +704,7 @@ dependencies = [ "leo-ast", "leo-gadgets", "leo-input", - "leo-types", + "leo-typed", "log", "num-bigint", "pest", @@ -755,7 +755,7 @@ name = "leo-linter" version = "0.1.0" [[package]] -name = "leo-types" +name = "leo-typed" version = "0.1.0" dependencies = [ "criterion", diff --git a/Cargo.toml b/Cargo.toml index cd948baa35..dd959dd51c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,12 +13,12 @@ name = "leo" path = "leo/main.rs" [workspace] -members = [ "ast", "compiler", "gadgets", "leo-input", "linter", "types" ] +members = [ "ast", "compiler", "gadgets", "input", "linter", "typed" ] [dependencies] leo-compiler = { path = "compiler", version = "0.1.0" } leo-gadgets = { path = "gadgets", version = "0.1.0" } -leo-input = { path = "leo-input", version = "0.1.0" } +leo-input = { path = "input", version = "0.1.0" } snarkos-algorithms = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", package = "snarkos-algorithms", default-features = false } snarkos-curves = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", package = "snarkos-curves", default-features = false } diff --git a/compiler/Cargo.toml b/compiler/Cargo.toml index b4dc36fbf0..35bf31e318 100644 --- a/compiler/Cargo.toml +++ b/compiler/Cargo.toml @@ -7,8 +7,8 @@ edition = "2018" [dependencies] leo-ast = { path = "../ast", version = "0.1.0" } leo-gadgets = { path = "../gadgets", version = "0.1.0" } -leo-input = { path = "../leo-input", version = "0.1.0" } -leo-types = { path = "../types", version = "0.1.0" } +leo-input = { path = "../input", version = "0.1.0" } +leo-typed = { path = "../typed", version = "0.1.0" } snarkos-curves = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", package = "snarkos-curves", default-features = false } snarkos-dpc = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", package = "snarkos-dpc", default-features = false } @@ -33,4 +33,4 @@ num-bigint = { version = "0.3" } [features] default = [] -ci_skip = ["leo-ast/ci_skip", "leo-types/ci_skip"] +ci_skip = ["leo-ast/ci_skip", "leo-typed/ci_skip"] diff --git a/compiler/src/compiler.rs b/compiler/src/compiler.rs index b014398358..2f9f80f4f5 100644 --- a/compiler/src/compiler.rs +++ b/compiler/src/compiler.rs @@ -10,7 +10,7 @@ use crate::{ }; use leo_ast::LeoAst; use leo_input::LeoInputParser; -use leo_types::{Input, LeoTypedAst, MainInput, Program}; +use leo_typed::{Input, LeoTypedAst, MainInput, Program}; use snarkos_errors::gadgets::SynthesisError; use snarkos_models::{ diff --git a/compiler/src/constraints/constraints.rs b/compiler/src/constraints/constraints.rs index 5c258c2777..fc74c6066e 100644 --- a/compiler/src/constraints/constraints.rs +++ b/compiler/src/constraints/constraints.rs @@ -9,7 +9,7 @@ use crate::{ ImportParser, OutputBytes, }; -use leo_types::{Input, Program}; +use leo_typed::{Input, Program}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/definition/definition.rs b/compiler/src/definition/definition.rs index 796a0fbbc1..2c00abb86d 100644 --- a/compiler/src/definition/definition.rs +++ b/compiler/src/definition/definition.rs @@ -5,7 +5,7 @@ use crate::{ value::ConstrainedValue, GroupType, }; -use leo_types::Variable; +use leo_typed::Variable; use snarkos_models::curves::{Field, PrimeField}; diff --git a/compiler/src/definition/definitions.rs b/compiler/src/definition/definitions.rs index 56d77c1cf9..cf377444bc 100644 --- a/compiler/src/definition/definitions.rs +++ b/compiler/src/definition/definitions.rs @@ -7,7 +7,7 @@ use crate::{ GroupType, ImportParser, }; -use leo_types::Program; +use leo_typed::Program; use snarkos_models::curves::{Field, PrimeField}; diff --git a/compiler/src/errors/expression.rs b/compiler/src/errors/expression.rs index 17f2167248..5e87cf5082 100644 --- a/compiler/src/errors/expression.rs +++ b/compiler/src/errors/expression.rs @@ -1,5 +1,5 @@ use crate::errors::{AddressError, BooleanError, FieldError, FunctionError, GroupError, IntegerError, ValueError}; -use leo_types::{Error as FormattedError, Identifier, Span}; +use leo_typed::{Error as FormattedError, Identifier, Span}; use snarkos_errors::gadgets::SynthesisError; use std::path::PathBuf; diff --git a/compiler/src/errors/function.rs b/compiler/src/errors/function.rs index 7d215819b7..ca267b7c11 100644 --- a/compiler/src/errors/function.rs +++ b/compiler/src/errors/function.rs @@ -9,7 +9,7 @@ use crate::errors::{ StatementError, ValueError, }; -use leo_types::{Error as FormattedError, Span}; +use leo_typed::{Error as FormattedError, Span}; use std::path::PathBuf; diff --git a/compiler/src/errors/import.rs b/compiler/src/errors/import.rs index 2da0f83197..0a96438afe 100644 --- a/compiler/src/errors/import.rs +++ b/compiler/src/errors/import.rs @@ -1,5 +1,5 @@ use leo_ast::ParserError; -use leo_types::{Error as FormattedError, Identifier, ImportSymbol, Span}; +use leo_typed::{Error as FormattedError, Identifier, ImportSymbol, Span}; use std::{io, path::PathBuf}; diff --git a/compiler/src/errors/macro_.rs b/compiler/src/errors/macro_.rs index 5a95104fb1..83c25fe76e 100644 --- a/compiler/src/errors/macro_.rs +++ b/compiler/src/errors/macro_.rs @@ -1,5 +1,5 @@ use crate::errors::ExpressionError; -use leo_types::{Error as FormattedError, Span}; +use leo_typed::{Error as FormattedError, Span}; use std::path::PathBuf; diff --git a/compiler/src/errors/output_bytes.rs b/compiler/src/errors/output_bytes.rs index 0de3eb5117..7e65366d3b 100644 --- a/compiler/src/errors/output_bytes.rs +++ b/compiler/src/errors/output_bytes.rs @@ -1,4 +1,4 @@ -use leo_types::{Error as FormattedError, Span}; +use leo_typed::{Error as FormattedError, Span}; use std::path::PathBuf; diff --git a/compiler/src/errors/statement.rs b/compiler/src/errors/statement.rs index c1f345272e..3f838a966b 100644 --- a/compiler/src/errors/statement.rs +++ b/compiler/src/errors/statement.rs @@ -1,5 +1,5 @@ use crate::errors::{AddressError, BooleanError, ExpressionError, IntegerError, MacroError, ValueError}; -use leo_types::{Error as FormattedError, Span, Type}; +use leo_typed::{Error as FormattedError, Span, Type}; use std::path::PathBuf; diff --git a/compiler/src/errors/value/address.rs b/compiler/src/errors/value/address.rs index edb675abca..9f9c131f17 100644 --- a/compiler/src/errors/value/address.rs +++ b/compiler/src/errors/value/address.rs @@ -1,4 +1,4 @@ -use leo_types::{Error as FormattedError, Span}; +use leo_typed::{Error as FormattedError, Span}; use snarkos_errors::{gadgets::SynthesisError, objects::account::AccountError}; use std::path::PathBuf; diff --git a/compiler/src/errors/value/boolean.rs b/compiler/src/errors/value/boolean.rs index bea08d67e4..9b96b586b4 100644 --- a/compiler/src/errors/value/boolean.rs +++ b/compiler/src/errors/value/boolean.rs @@ -1,4 +1,4 @@ -use leo_types::{Error as FormattedError, Span}; +use leo_typed::{Error as FormattedError, Span}; use snarkos_errors::gadgets::SynthesisError; use std::path::PathBuf; diff --git a/compiler/src/errors/value/field.rs b/compiler/src/errors/value/field.rs index 3fc81f200d..3c93b72143 100644 --- a/compiler/src/errors/value/field.rs +++ b/compiler/src/errors/value/field.rs @@ -1,4 +1,4 @@ -use leo_types::{Error as FormattedError, Span}; +use leo_typed::{Error as FormattedError, Span}; use snarkos_errors::gadgets::SynthesisError; use std::path::PathBuf; diff --git a/compiler/src/errors/value/group.rs b/compiler/src/errors/value/group.rs index 6531cc356e..75b42d596d 100644 --- a/compiler/src/errors/value/group.rs +++ b/compiler/src/errors/value/group.rs @@ -1,4 +1,4 @@ -use leo_types::{Error as FormattedError, Span}; +use leo_typed::{Error as FormattedError, Span}; use snarkos_errors::gadgets::SynthesisError; use std::path::PathBuf; diff --git a/compiler/src/errors/value/integer.rs b/compiler/src/errors/value/integer.rs index 9f17f19a31..67e57ecae7 100644 --- a/compiler/src/errors/value/integer.rs +++ b/compiler/src/errors/value/integer.rs @@ -1,5 +1,5 @@ use leo_gadgets::errors::SignedIntegerError; -use leo_types::{error::Error as FormattedError, Span}; +use leo_typed::{error::Error as FormattedError, Span}; use snarkos_errors::gadgets::SynthesisError; use std::path::PathBuf; diff --git a/compiler/src/errors/value/value.rs b/compiler/src/errors/value/value.rs index 2a7ade0661..af47546962 100644 --- a/compiler/src/errors/value/value.rs +++ b/compiler/src/errors/value/value.rs @@ -1,5 +1,5 @@ use crate::errors::{AddressError, BooleanError, FieldError, GroupError, IntegerError}; -use leo_types::{Error as FormattedError, Span}; +use leo_typed::{Error as FormattedError, Span}; use std::path::PathBuf; diff --git a/compiler/src/expression/arithmetic/add.rs b/compiler/src/expression/arithmetic/add.rs index e62ccfee78..e7117101fe 100644 --- a/compiler/src/expression/arithmetic/add.rs +++ b/compiler/src/expression/arithmetic/add.rs @@ -1,7 +1,7 @@ //! Enforces an arithmetic `+` operator in a resolved Leo program. use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType}; -use leo_types::Span; +use leo_typed::Span; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/expression/arithmetic/div.rs b/compiler/src/expression/arithmetic/div.rs index 3f2a6c82c6..0545f8b229 100644 --- a/compiler/src/expression/arithmetic/div.rs +++ b/compiler/src/expression/arithmetic/div.rs @@ -1,7 +1,7 @@ //! Enforces an arithmetic `/` operator in a resolved Leo program. use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType}; -use leo_types::Span; +use leo_typed::Span; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/expression/arithmetic/mul.rs b/compiler/src/expression/arithmetic/mul.rs index 9742c6ee83..f9b58aa5c0 100644 --- a/compiler/src/expression/arithmetic/mul.rs +++ b/compiler/src/expression/arithmetic/mul.rs @@ -1,7 +1,7 @@ //! Enforces an arithmetic `*` operator in a resolved Leo program. use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType}; -use leo_types::Span; +use leo_typed::Span; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/expression/arithmetic/pow.rs b/compiler/src/expression/arithmetic/pow.rs index b817436c7f..737fa15ffa 100644 --- a/compiler/src/expression/arithmetic/pow.rs +++ b/compiler/src/expression/arithmetic/pow.rs @@ -1,7 +1,7 @@ //! Enforces an arithmetic `**` operator in a resolved Leo program. use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType}; -use leo_types::Span; +use leo_typed::Span; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/expression/arithmetic/sub.rs b/compiler/src/expression/arithmetic/sub.rs index aca482b6b3..efd87a6b9e 100644 --- a/compiler/src/expression/arithmetic/sub.rs +++ b/compiler/src/expression/arithmetic/sub.rs @@ -1,7 +1,7 @@ //! Enforces an arithmetic `-` operator in a resolved Leo program. use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType}; -use leo_types::Span; +use leo_typed::Span; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/expression/array/access.rs b/compiler/src/expression/array/access.rs index dfe8da05e9..d2794774f2 100644 --- a/compiler/src/expression/array/access.rs +++ b/compiler/src/expression/array/access.rs @@ -1,7 +1,7 @@ //! Enforces array access in a compiled Leo program. use crate::{errors::ExpressionError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; -use leo_types::{Expression, RangeOrExpression, Span, Type}; +use leo_typed::{Expression, RangeOrExpression, Span, Type}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/expression/array/array.rs b/compiler/src/expression/array/array.rs index 070b28a2ec..2b5fdb7bb6 100644 --- a/compiler/src/expression/array/array.rs +++ b/compiler/src/expression/array/array.rs @@ -6,7 +6,7 @@ use crate::{ value::ConstrainedValue, GroupType, }; -use leo_types::{Expression, Span, SpreadOrExpression, Type}; +use leo_typed::{Expression, Span, SpreadOrExpression, Type}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/expression/array/index.rs b/compiler/src/expression/array/index.rs index a8aa4ca390..f3ef721cba 100644 --- a/compiler/src/expression/array/index.rs +++ b/compiler/src/expression/array/index.rs @@ -1,7 +1,7 @@ //! Enforces an array index expression in a compiled Leo program. use crate::{errors::ExpressionError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; -use leo_types::{Expression, IntegerType, Span, Type}; +use leo_typed::{Expression, IntegerType, Span, Type}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/expression/binary/binary.rs b/compiler/src/expression/binary/binary.rs index c4502ac68b..e6033c8b91 100644 --- a/compiler/src/expression/binary/binary.rs +++ b/compiler/src/expression/binary/binary.rs @@ -1,7 +1,7 @@ //! Enforces a binary expression in a compiled Leo program. use crate::{errors::ExpressionError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; -use leo_types::{Expression, Span, Type}; +use leo_typed::{Expression, Span, Type}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/expression/binary/operand.rs b/compiler/src/expression/binary/operand.rs index 65ce939bbc..f1f688f79d 100644 --- a/compiler/src/expression/binary/operand.rs +++ b/compiler/src/expression/binary/operand.rs @@ -1,7 +1,7 @@ //! Enforces one operand in a binary expression in a compiled Leo program. use crate::{errors::ExpressionError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; -use leo_types::{Expression, Span, Type}; +use leo_typed::{Expression, Span, Type}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/expression/circuit/access.rs b/compiler/src/expression/circuit/access.rs index d7d672f5dd..5e6f9744e2 100644 --- a/compiler/src/expression/circuit/access.rs +++ b/compiler/src/expression/circuit/access.rs @@ -6,7 +6,7 @@ use crate::{ value::ConstrainedValue, GroupType, }; -use leo_types::{Expression, Identifier, Span, Type}; +use leo_typed::{Expression, Identifier, Span, Type}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/expression/circuit/circuit.rs b/compiler/src/expression/circuit/circuit.rs index fe1f5332aa..dd39deab72 100644 --- a/compiler/src/expression/circuit/circuit.rs +++ b/compiler/src/expression/circuit/circuit.rs @@ -6,7 +6,7 @@ use crate::{ value::{ConstrainedCircuitMember, ConstrainedValue}, GroupType, }; -use leo_types::{CircuitFieldDefinition, CircuitMember, Identifier, Span}; +use leo_typed::{CircuitFieldDefinition, CircuitMember, Identifier, Span}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/expression/circuit/static_access.rs b/compiler/src/expression/circuit/static_access.rs index 2afa33b20e..14d8317aa5 100644 --- a/compiler/src/expression/circuit/static_access.rs +++ b/compiler/src/expression/circuit/static_access.rs @@ -1,7 +1,7 @@ //! Enforces a circuit static access expression in a compiled Leo program. use crate::{errors::ExpressionError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; -use leo_types::{CircuitMember, Expression, Identifier, Span, Type}; +use leo_typed::{CircuitMember, Expression, Identifier, Span, Type}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/expression/conditional/conditional.rs b/compiler/src/expression/conditional/conditional.rs index 53df643584..b47ca5e4b4 100644 --- a/compiler/src/expression/conditional/conditional.rs +++ b/compiler/src/expression/conditional/conditional.rs @@ -1,7 +1,7 @@ //! Enforces a conditional expression in a compiled Leo program. use crate::{errors::ExpressionError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; -use leo_types::{Expression, Span, Type}; +use leo_typed::{Expression, Span, Type}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/expression/expression.rs b/compiler/src/expression/expression.rs index 49b6b83b9f..43185fec4b 100644 --- a/compiler/src/expression/expression.rs +++ b/compiler/src/expression/expression.rs @@ -12,7 +12,7 @@ use crate::{ GroupType, Integer, }; -use leo_types::{Expression, Type}; +use leo_typed::{Expression, Type}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/expression/function/function.rs b/compiler/src/expression/function/function.rs index 1fa9c50797..03f54b0921 100644 --- a/compiler/src/expression/function/function.rs +++ b/compiler/src/expression/function/function.rs @@ -1,7 +1,7 @@ //! Enforce a function call expression in a compiled Leo program. use crate::{errors::ExpressionError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; -use leo_types::{Expression, Span, Type}; +use leo_typed::{Expression, Span, Type}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/expression/identifier/identifier.rs b/compiler/src/expression/identifier/identifier.rs index 4b35ccb05a..23cb40dd25 100644 --- a/compiler/src/expression/identifier/identifier.rs +++ b/compiler/src/expression/identifier/identifier.rs @@ -7,7 +7,7 @@ use crate::{ Address, GroupType, }; -use leo_types::{Identifier, Type}; +use leo_typed::{Identifier, Type}; use snarkos_models::curves::{Field, PrimeField}; diff --git a/compiler/src/expression/logical/and.rs b/compiler/src/expression/logical/and.rs index db35ed1b5e..ee80c1ba1b 100644 --- a/compiler/src/expression/logical/and.rs +++ b/compiler/src/expression/logical/and.rs @@ -1,7 +1,7 @@ //! Enforces a logical `&&` operator in a resolved Leo program. use crate::{errors::BooleanError, value::ConstrainedValue, GroupType}; -use leo_types::Span; +use leo_typed::Span; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/expression/logical/not.rs b/compiler/src/expression/logical/not.rs index 8eaede90e8..9e1d63b230 100644 --- a/compiler/src/expression/logical/not.rs +++ b/compiler/src/expression/logical/not.rs @@ -1,7 +1,7 @@ //! Enforces a logical `!` operator in a resolved Leo program. use crate::{errors::BooleanError, value::ConstrainedValue, GroupType}; -use leo_types::Span; +use leo_typed::Span; use snarkos_models::curves::{Field, PrimeField}; diff --git a/compiler/src/expression/logical/or.rs b/compiler/src/expression/logical/or.rs index a4f900adf6..454ba1be25 100644 --- a/compiler/src/expression/logical/or.rs +++ b/compiler/src/expression/logical/or.rs @@ -1,7 +1,7 @@ //! Enforces a logical `||` operator in a resolved Leo program. use crate::{errors::BooleanError, value::ConstrainedValue, GroupType}; -use leo_types::Span; +use leo_typed::Span; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/expression/relational/eq.rs b/compiler/src/expression/relational/eq.rs index 766544556f..6f62542001 100644 --- a/compiler/src/expression/relational/eq.rs +++ b/compiler/src/expression/relational/eq.rs @@ -1,7 +1,7 @@ //! Enforces a relational `==` operator in a resolved Leo program. use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType}; -use leo_types::Span; +use leo_typed::Span; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/expression/relational/ge.rs b/compiler/src/expression/relational/ge.rs index c8c7737f93..a91cc8d3bc 100644 --- a/compiler/src/expression/relational/ge.rs +++ b/compiler/src/expression/relational/ge.rs @@ -2,7 +2,7 @@ use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType}; use leo_gadgets::bits::ComparatorGadget; -use leo_types::Span; +use leo_typed::Span; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/expression/relational/gt.rs b/compiler/src/expression/relational/gt.rs index 96ad587219..4fc26cbe20 100644 --- a/compiler/src/expression/relational/gt.rs +++ b/compiler/src/expression/relational/gt.rs @@ -2,7 +2,7 @@ use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType}; use leo_gadgets::bits::ComparatorGadget; -use leo_types::Span; +use leo_typed::Span; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/expression/relational/le.rs b/compiler/src/expression/relational/le.rs index 77574e051f..06f8d47294 100644 --- a/compiler/src/expression/relational/le.rs +++ b/compiler/src/expression/relational/le.rs @@ -2,7 +2,7 @@ use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType}; use leo_gadgets::bits::ComparatorGadget; -use leo_types::Span; +use leo_typed::Span; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/expression/relational/lt.rs b/compiler/src/expression/relational/lt.rs index a5ff4e5222..4c49c36bd1 100644 --- a/compiler/src/expression/relational/lt.rs +++ b/compiler/src/expression/relational/lt.rs @@ -2,7 +2,7 @@ use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType}; use leo_gadgets::bits::comparator::EvaluateLtGadget; -use leo_types::Span; +use leo_typed::Span; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/function/function.rs b/compiler/src/function/function.rs index c8b5c10295..b594d7b01a 100644 --- a/compiler/src/function/function.rs +++ b/compiler/src/function/function.rs @@ -7,7 +7,7 @@ use crate::{ GroupType, }; -use leo_types::{Expression, Function, InputVariable, Span}; +use leo_typed::{Expression, Function, InputVariable, Span}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/function/input/array.rs b/compiler/src/function/input/array.rs index 5614e5b900..cb6e39602b 100644 --- a/compiler/src/function/input/array.rs +++ b/compiler/src/function/input/array.rs @@ -7,7 +7,7 @@ use crate::{ GroupType, }; -use leo_types::{InputValue, Span, Type}; +use leo_typed::{InputValue, Span, Type}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/function/input/function_input.rs b/compiler/src/function/input/function_input.rs index c730143a3f..d9a715eb23 100644 --- a/compiler/src/function/input/function_input.rs +++ b/compiler/src/function/input/function_input.rs @@ -2,7 +2,7 @@ use crate::{errors::FunctionError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; -use leo_types::{Expression, Type}; +use leo_typed::{Expression, Type}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/function/input/input_keyword.rs b/compiler/src/function/input/input_keyword.rs index e9431fe94c..85e9e1a71b 100644 --- a/compiler/src/function/input/input_keyword.rs +++ b/compiler/src/function/input/input_keyword.rs @@ -1,5 +1,5 @@ use crate::{errors::FunctionError, ConstrainedCircuitMember, ConstrainedProgram, ConstrainedValue, GroupType}; -use leo_types::{Identifier, Input}; +use leo_typed::{Identifier, Input}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/function/input/input_section.rs b/compiler/src/function/input/input_section.rs index 0916a55f32..2abbf7cd4c 100644 --- a/compiler/src/function/input/input_section.rs +++ b/compiler/src/function/input/input_section.rs @@ -1,6 +1,6 @@ use crate::{errors::FunctionError, ConstrainedCircuitMember, ConstrainedProgram, ConstrainedValue, GroupType}; -use leo_types::{Identifier, InputValue, Parameter}; +use leo_typed::{Identifier, InputValue, Parameter}; use snarkos_models::{ curves::{Field, PrimeField}, gadgets::r1cs::ConstraintSystem, diff --git a/compiler/src/function/input/main_function_input.rs b/compiler/src/function/input/main_function_input.rs index 1ffd0a4980..0b24f707b1 100644 --- a/compiler/src/function/input/main_function_input.rs +++ b/compiler/src/function/input/main_function_input.rs @@ -14,7 +14,7 @@ use crate::{ Integer, }; -use leo_types::{InputValue, Span, Type}; +use leo_typed::{InputValue, Span, Type}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/function/main_function.rs b/compiler/src/function/main_function.rs index e228cda5bd..d8f4f9bbae 100644 --- a/compiler/src/function/main_function.rs +++ b/compiler/src/function/main_function.rs @@ -7,7 +7,7 @@ use crate::{ OutputBytes, }; -use leo_types::{Expression, Function, Input, InputVariable}; +use leo_typed::{Expression, Function, Input, InputVariable}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/function/result/result.rs b/compiler/src/function/result/result.rs index 0107654a52..49fc830cfa 100644 --- a/compiler/src/function/result/result.rs +++ b/compiler/src/function/result/result.rs @@ -2,7 +2,7 @@ use crate::{errors::StatementError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; -use leo_types::Span; +use leo_typed::Span; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/import/parser/import_parser.rs b/compiler/src/import/parser/import_parser.rs index 4825da4eac..9a9234f2bb 100644 --- a/compiler/src/import/parser/import_parser.rs +++ b/compiler/src/import/parser/import_parser.rs @@ -1,5 +1,5 @@ use crate::errors::ImportError; -use leo_types::Program; +use leo_typed::Program; use std::{collections::HashMap, env::current_dir}; diff --git a/compiler/src/import/parser/parse_package.rs b/compiler/src/import/parser/parse_package.rs index c0f78000ef..0a149b1adb 100644 --- a/compiler/src/import/parser/parse_package.rs +++ b/compiler/src/import/parser/parse_package.rs @@ -1,5 +1,5 @@ use crate::{errors::ImportError, ImportParser}; -use leo_types::{Package, PackageAccess}; +use leo_typed::{Package, PackageAccess}; use std::{fs, fs::DirEntry, path::PathBuf}; diff --git a/compiler/src/import/parser/parse_symbol.rs b/compiler/src/import/parser/parse_symbol.rs index 9e4c899917..fc6884415e 100644 --- a/compiler/src/import/parser/parse_symbol.rs +++ b/compiler/src/import/parser/parse_symbol.rs @@ -1,6 +1,6 @@ use crate::{errors::ImportError, ImportParser}; use leo_ast::LeoAst; -use leo_types::{ImportSymbol, Program, Span}; +use leo_typed::{ImportSymbol, Program, Span}; use std::{ffi::OsString, fs::DirEntry, path::PathBuf}; diff --git a/compiler/src/import/store/import.rs b/compiler/src/import/store/import.rs index 2acf551772..c13454f3be 100644 --- a/compiler/src/import/store/import.rs +++ b/compiler/src/import/store/import.rs @@ -1,5 +1,5 @@ use crate::{errors::ImportError, imported_symbols::ImportedSymbols, ConstrainedProgram, GroupType, ImportParser}; -use leo_types::Import; +use leo_typed::Import; use snarkos_models::curves::{Field, PrimeField}; diff --git a/compiler/src/import/store/imported_symbols.rs b/compiler/src/import/store/imported_symbols.rs index d9fd56e888..71e915a35b 100644 --- a/compiler/src/import/store/imported_symbols.rs +++ b/compiler/src/import/store/imported_symbols.rs @@ -1,4 +1,4 @@ -use leo_types::{Import, ImportSymbol, Package, PackageAccess}; +use leo_typed::{Import, ImportSymbol, Package, PackageAccess}; /// Stores the the package file name and imported symbol from an import statement #[derive(Debug)] diff --git a/compiler/src/import/store/symbol.rs b/compiler/src/import/store/symbol.rs index 5fd7366ddc..c618c6f6b5 100644 --- a/compiler/src/import/store/symbol.rs +++ b/compiler/src/import/store/symbol.rs @@ -1,5 +1,5 @@ use crate::{errors::ImportError, new_scope, ConstrainedProgram, ConstrainedValue, GroupType}; -use leo_types::{ImportSymbol, Program}; +use leo_typed::{ImportSymbol, Program}; use snarkos_models::curves::{Field, PrimeField}; diff --git a/compiler/src/macro_/format.rs b/compiler/src/macro_/format.rs index cc872f5b57..4eaf449507 100644 --- a/compiler/src/macro_/format.rs +++ b/compiler/src/macro_/format.rs @@ -1,7 +1,7 @@ //! Evaluates a formatted string in a compiled Leo program. use crate::{errors::MacroError, program::ConstrainedProgram, GroupType}; -use leo_types::FormattedString; +use leo_typed::FormattedString; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/macro_/macro_.rs b/compiler/src/macro_/macro_.rs index 9ab6efe503..84e406b802 100644 --- a/compiler/src/macro_/macro_.rs +++ b/compiler/src/macro_/macro_.rs @@ -1,7 +1,7 @@ //! Evaluates a macro in a compiled Leo program. use crate::{errors::MacroError, program::ConstrainedProgram, GroupType}; -use leo_types::{FormattedMacro, MacroName}; +use leo_typed::{FormattedMacro, MacroName}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/output/output_bytes.rs b/compiler/src/output/output_bytes.rs index 0eafc221c4..6482c4e974 100644 --- a/compiler/src/output/output_bytes.rs +++ b/compiler/src/output/output_bytes.rs @@ -1,5 +1,5 @@ use crate::{errors::OutputBytesError, ConstrainedValue, GroupType, REGISTERS_VARIABLE_NAME}; -use leo_types::{Parameter, Registers, Span}; +use leo_typed::{Parameter, Registers, Span}; use snarkos_models::curves::{Field, PrimeField}; diff --git a/compiler/src/statement/assert/assert_eq.rs b/compiler/src/statement/assert/assert_eq.rs index abe64b2a45..b7633e2289 100644 --- a/compiler/src/statement/assert/assert_eq.rs +++ b/compiler/src/statement/assert/assert_eq.rs @@ -1,7 +1,7 @@ //! Enforces an assert equals statement in a compiled Leo program. use crate::{errors::StatementError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; -use leo_types::Span; +use leo_typed::Span; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/statement/assign/array.rs b/compiler/src/statement/assign/array.rs index cf9706a2d7..f27b89c941 100644 --- a/compiler/src/statement/assign/array.rs +++ b/compiler/src/statement/assign/array.rs @@ -1,7 +1,7 @@ //! Enforces an array assignment statement in a compiled Leo program. use crate::{errors::StatementError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; -use leo_types::{RangeOrExpression, Span}; +use leo_typed::{RangeOrExpression, Span}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/statement/assign/assign.rs b/compiler/src/statement/assign/assign.rs index 693bb8f4b8..c1dfbdcdcd 100644 --- a/compiler/src/statement/assign/assign.rs +++ b/compiler/src/statement/assign/assign.rs @@ -7,7 +7,7 @@ use crate::{ value::ConstrainedValue, GroupType, }; -use leo_types::{Assignee, Expression, Span}; +use leo_typed::{Assignee, Expression, Span}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/statement/assign/assignee.rs b/compiler/src/statement/assign/assignee.rs index 32a3357aeb..ae3a864369 100644 --- a/compiler/src/statement/assign/assignee.rs +++ b/compiler/src/statement/assign/assignee.rs @@ -1,7 +1,7 @@ //! Resolves assignees in a compiled Leo program. use crate::{errors::StatementError, new_scope, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; -use leo_types::{Assignee, Span}; +use leo_typed::{Assignee, Span}; use snarkos_models::curves::{Field, PrimeField}; diff --git a/compiler/src/statement/assign/circuit_field.rs b/compiler/src/statement/assign/circuit_field.rs index a7a7ddc363..450bfa7816 100644 --- a/compiler/src/statement/assign/circuit_field.rs +++ b/compiler/src/statement/assign/circuit_field.rs @@ -1,7 +1,7 @@ //! Enforces a circuit field assignment statement in a compiled Leo program. use crate::{errors::StatementError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; -use leo_types::{Identifier, Span}; +use leo_typed::{Identifier, Span}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/statement/branch/branch.rs b/compiler/src/statement/branch/branch.rs index cf8e3a0cd8..6c954c0e15 100644 --- a/compiler/src/statement/branch/branch.rs +++ b/compiler/src/statement/branch/branch.rs @@ -1,7 +1,7 @@ //! Enforces a branch of a conditional or iteration statement in a compiled Leo program. use crate::{errors::StatementError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; -use leo_types::{Statement, Type}; +use leo_typed::{Statement, Type}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/statement/conditional/conditional.rs b/compiler/src/statement/conditional/conditional.rs index 2e0cbab9d2..a88ec0ffdd 100644 --- a/compiler/src/statement/conditional/conditional.rs +++ b/compiler/src/statement/conditional/conditional.rs @@ -1,7 +1,7 @@ //! Methods to enforce constraints on statements in a compiled Leo program. use crate::{errors::StatementError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; -use leo_types::{ConditionalNestedOrEndStatement, ConditionalStatement, Span, Type}; +use leo_typed::{ConditionalNestedOrEndStatement, ConditionalStatement, Span, Type}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/statement/definition/definition.rs b/compiler/src/statement/definition/definition.rs index 7c65c40ba1..59f307a8fc 100644 --- a/compiler/src/statement/definition/definition.rs +++ b/compiler/src/statement/definition/definition.rs @@ -1,7 +1,7 @@ //! Enforces a definition statement in a compiled Leo program. use crate::{errors::StatementError, program::ConstrainedProgram, GroupType}; -use leo_types::{Declare, Expression, Span, Variable}; +use leo_typed::{Declare, Expression, Span, Variable}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/statement/definition/multiple.rs b/compiler/src/statement/definition/multiple.rs index ba37fc33ab..df0a98a86f 100644 --- a/compiler/src/statement/definition/multiple.rs +++ b/compiler/src/statement/definition/multiple.rs @@ -1,7 +1,7 @@ //! Enforces a multiple definition statement in a compiled Leo program. use crate::{errors::StatementError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; -use leo_types::{Expression, Span, Variable}; +use leo_typed::{Expression, Span, Variable}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/statement/iteration/iteration.rs b/compiler/src/statement/iteration/iteration.rs index b221b4db02..89e20cb19b 100644 --- a/compiler/src/statement/iteration/iteration.rs +++ b/compiler/src/statement/iteration/iteration.rs @@ -8,7 +8,7 @@ use crate::{ GroupType, Integer, }; -use leo_types::{Expression, Identifier, Span, Statement, Type}; +use leo_typed::{Expression, Identifier, Span, Statement, Type}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/statement/return_/return_.rs b/compiler/src/statement/return_/return_.rs index 668caa52f2..f78dc51b70 100644 --- a/compiler/src/statement/return_/return_.rs +++ b/compiler/src/statement/return_/return_.rs @@ -6,7 +6,7 @@ use crate::{ value::ConstrainedValue, GroupType, }; -use leo_types::{Expression, Span, Type}; +use leo_typed::{Expression, Span, Type}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/statement/statement.rs b/compiler/src/statement/statement.rs index c8cb1fc3ab..c16c5e659a 100644 --- a/compiler/src/statement/statement.rs +++ b/compiler/src/statement/statement.rs @@ -1,7 +1,7 @@ //! Enforces a statement in a compiled Leo program. use crate::{errors::StatementError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; -use leo_types::{Statement, Type}; +use leo_typed::{Statement, Type}; use snarkos_models::{ curves::{Field, PrimeField}, diff --git a/compiler/src/value/address/address.rs b/compiler/src/value/address/address.rs index 083c2c7c9a..da143bcaba 100644 --- a/compiler/src/value/address/address.rs +++ b/compiler/src/value/address/address.rs @@ -1,5 +1,5 @@ use crate::{errors::AddressError, ConstrainedValue, GroupType}; -use leo_types::{InputValue, Span}; +use leo_typed::{InputValue, Span}; use snarkos_dpc::base_dpc::instantiated::Components; use snarkos_errors::gadgets::SynthesisError; diff --git a/compiler/src/value/boolean/input.rs b/compiler/src/value/boolean/input.rs index 523fed643d..50e41cc244 100644 --- a/compiler/src/value/boolean/input.rs +++ b/compiler/src/value/boolean/input.rs @@ -1,7 +1,7 @@ //! Methods to enforce constraints on input boolean values in a resolved Leo program. use crate::{errors::BooleanError, value::ConstrainedValue, GroupType}; -use leo_types::{InputValue, Span}; +use leo_typed::{InputValue, Span}; use snarkos_errors::gadgets::SynthesisError; use snarkos_models::{ diff --git a/compiler/src/value/field/field_type.rs b/compiler/src/value/field/field_type.rs index 3ec5afce4b..fd81ce10f7 100644 --- a/compiler/src/value/field/field_type.rs +++ b/compiler/src/value/field/field_type.rs @@ -1,7 +1,7 @@ //! A data type that represents a field value use crate::errors::FieldError; -use leo_types::Span; +use leo_typed::Span; use snarkos_errors::gadgets::SynthesisError; use snarkos_models::{ diff --git a/compiler/src/value/field/input.rs b/compiler/src/value/field/input.rs index 85b937f4c6..b01044ef0f 100644 --- a/compiler/src/value/field/input.rs +++ b/compiler/src/value/field/input.rs @@ -1,7 +1,7 @@ //! Methods to enforce constraints on input field values in a compiled Leo program. use crate::{errors::FieldError, value::ConstrainedValue, FieldType, GroupType}; -use leo_types::{InputValue, Span}; +use leo_typed::{InputValue, Span}; use snarkos_errors::gadgets::SynthesisError; use snarkos_models::{ diff --git a/compiler/src/value/group/group_type.rs b/compiler/src/value/group/group_type.rs index 7b510ab55f..89c0d7c6b8 100644 --- a/compiler/src/value/group/group_type.rs +++ b/compiler/src/value/group/group_type.rs @@ -1,7 +1,7 @@ //! A data type that represents members in the group formed by the set of affine points on a curve. use crate::errors::GroupError; -use leo_types::Span; +use leo_typed::Span; use snarkos_models::{ curves::{Field, One}, diff --git a/compiler/src/value/group/input.rs b/compiler/src/value/group/input.rs index 72733b1840..4f0e44017f 100644 --- a/compiler/src/value/group/input.rs +++ b/compiler/src/value/group/input.rs @@ -1,7 +1,7 @@ //! Methods to enforce constraints on input group values in a Leo program. use crate::{errors::GroupError, ConstrainedValue, GroupType}; -use leo_types::{InputValue, Span}; +use leo_typed::{InputValue, Span}; use snarkos_errors::gadgets::SynthesisError; use snarkos_models::{ diff --git a/compiler/src/value/group/targets/edwards_bls12.rs b/compiler/src/value/group/targets/edwards_bls12.rs index 34a7ce94fb..d04c2faa0a 100644 --- a/compiler/src/value/group/targets/edwards_bls12.rs +++ b/compiler/src/value/group/targets/edwards_bls12.rs @@ -1,5 +1,5 @@ use crate::{errors::GroupError, GroupType}; -use leo_types::Span; +use leo_typed::Span; use snarkos_curves::{ edwards_bls12::{EdwardsAffine, EdwardsParameters, Fq}, diff --git a/compiler/src/value/implicit/implicit.rs b/compiler/src/value/implicit/implicit.rs index b626d85e93..93c9107c4e 100644 --- a/compiler/src/value/implicit/implicit.rs +++ b/compiler/src/value/implicit/implicit.rs @@ -1,7 +1,7 @@ //! Enforces constraints on an implicit number in a compiled Leo program. use crate::{errors::ValueError, value::ConstrainedValue, GroupType}; -use leo_types::{Span, Type}; +use leo_typed::{Span, Type}; use snarkos_models::curves::{Field, PrimeField}; diff --git a/compiler/src/value/integer/integer.rs b/compiler/src/value/integer/integer.rs index 9c3c6bf715..2c53b15f43 100644 --- a/compiler/src/value/integer/integer.rs +++ b/compiler/src/value/integer/integer.rs @@ -5,7 +5,7 @@ use leo_gadgets::{ bits::comparator::{ComparatorGadget, EvaluateLtGadget}, signed_integer::*, }; -use leo_types::{InputValue, IntegerType, Span}; +use leo_typed::{InputValue, IntegerType, Span}; use snarkos_errors::gadgets::SynthesisError; use snarkos_models::{ diff --git a/compiler/src/value/value.rs b/compiler/src/value/value.rs index 645a008bd8..a7753ca220 100644 --- a/compiler/src/value/value.rs +++ b/compiler/src/value/value.rs @@ -10,7 +10,7 @@ use crate::{ GroupType, Integer, }; -use leo_types::{Circuit, Function, Identifier, Span, Type}; +use leo_typed::{Circuit, Function, Identifier, Span, Type}; use snarkos_errors::gadgets::SynthesisError; use snarkos_models::{ diff --git a/compiler/tests/address/mod.rs b/compiler/tests/address/mod.rs index 3bbfa1dd43..b905056baa 100644 --- a/compiler/tests/address/mod.rs +++ b/compiler/tests/address/mod.rs @@ -1,5 +1,5 @@ use crate::{assert_satisfied, expect_compiler_error, generate_main_input, parse_program}; -use leo_types::InputValue; +use leo_typed::InputValue; static TEST_ADDRESS_1: &'static str = "aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8"; static TEST_ADDRESS_2: &'static str = "aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r"; diff --git a/compiler/tests/field/mod.rs b/compiler/tests/field/mod.rs index ccfdd1820c..f95899d6c3 100644 --- a/compiler/tests/field/mod.rs +++ b/compiler/tests/field/mod.rs @@ -1,5 +1,5 @@ use crate::{assert_satisfied, expect_synthesis_error, generate_main_input, parse_program}; -use leo_types::InputValue; +use leo_typed::InputValue; use snarkos_curves::edwards_bls12::Fq; use snarkos_utilities::bytes::ToBytes; diff --git a/compiler/tests/group/mod.rs b/compiler/tests/group/mod.rs index ee62313cf8..463f61ed59 100644 --- a/compiler/tests/group/mod.rs +++ b/compiler/tests/group/mod.rs @@ -6,7 +6,7 @@ use crate::{ parse_program, parse_program_with_input, }; -use leo_types::InputValue; +use leo_typed::InputValue; use snarkos_curves::edwards_bls12::EdwardsAffine; diff --git a/compiler/tests/integers/i128/mod.rs b/compiler/tests/integers/i128/mod.rs index 4cbf883a58..5faca493ef 100644 --- a/compiler/tests/integers/i128/mod.rs +++ b/compiler/tests/integers/i128/mod.rs @@ -6,7 +6,7 @@ use crate::{ parse_program, }; use leo_input::types::{I128Type, IntegerType}; -use leo_types::InputValue; +use leo_typed::InputValue; test_int!(Testi128, i128, IntegerType::I128Type(I128Type {}), Int128); diff --git a/compiler/tests/integers/i16/mod.rs b/compiler/tests/integers/i16/mod.rs index 3f5c4c0f9d..c7f8b6dc47 100644 --- a/compiler/tests/integers/i16/mod.rs +++ b/compiler/tests/integers/i16/mod.rs @@ -6,7 +6,7 @@ use crate::{ parse_program, }; use leo_input::types::{I16Type, IntegerType}; -use leo_types::InputValue; +use leo_typed::InputValue; test_int!(Testi16, i16, IntegerType::I16Type(I16Type {}), Int16); diff --git a/compiler/tests/integers/i32/mod.rs b/compiler/tests/integers/i32/mod.rs index 58ea1ee7b8..a1f0be644b 100644 --- a/compiler/tests/integers/i32/mod.rs +++ b/compiler/tests/integers/i32/mod.rs @@ -6,7 +6,7 @@ use crate::{ parse_program, }; use leo_input::types::{I32Type, IntegerType}; -use leo_types::InputValue; +use leo_typed::InputValue; test_int!(Testi32, i32, IntegerType::I32Type(I32Type {}), Int32); diff --git a/compiler/tests/integers/i64/mod.rs b/compiler/tests/integers/i64/mod.rs index d480786c7a..27b45d31f1 100644 --- a/compiler/tests/integers/i64/mod.rs +++ b/compiler/tests/integers/i64/mod.rs @@ -6,7 +6,7 @@ use crate::{ parse_program, }; use leo_input::types::{I64Type, IntegerType}; -use leo_types::InputValue; +use leo_typed::InputValue; test_int!(Testi64, i64, IntegerType::I64Type(I64Type {}), Int64); diff --git a/compiler/tests/integers/i8/mod.rs b/compiler/tests/integers/i8/mod.rs index a07053d580..1961462495 100644 --- a/compiler/tests/integers/i8/mod.rs +++ b/compiler/tests/integers/i8/mod.rs @@ -6,7 +6,7 @@ use crate::{ parse_program, }; use leo_input::types::{I8Type, IntegerType}; -use leo_types::InputValue; +use leo_typed::InputValue; test_int!(Testi8, i8, IntegerType::I8Type(I8Type {}), Int8); diff --git a/compiler/tests/integers/u128/mod.rs b/compiler/tests/integers/u128/mod.rs index 6e114983ec..8c7e2ea65c 100644 --- a/compiler/tests/integers/u128/mod.rs +++ b/compiler/tests/integers/u128/mod.rs @@ -6,7 +6,7 @@ use crate::{ parse_program, }; use leo_input::types::{IntegerType, U128Type}; -use leo_types::InputValue; +use leo_typed::InputValue; test_uint!(TestU128, u128, IntegerType::U128Type(U128Type {}), UInt128); diff --git a/compiler/tests/integers/u16/mod.rs b/compiler/tests/integers/u16/mod.rs index 5c7f1b0151..b323fcbe04 100644 --- a/compiler/tests/integers/u16/mod.rs +++ b/compiler/tests/integers/u16/mod.rs @@ -6,7 +6,7 @@ use crate::{ parse_program, }; use leo_input::types::{IntegerType, U16Type}; -use leo_types::InputValue; +use leo_typed::InputValue; test_uint!(TestU16, u16, IntegerType::U16Type(U16Type {}), UInt16); diff --git a/compiler/tests/integers/u32/mod.rs b/compiler/tests/integers/u32/mod.rs index 84df88b4ad..0c2cc405fa 100644 --- a/compiler/tests/integers/u32/mod.rs +++ b/compiler/tests/integers/u32/mod.rs @@ -6,7 +6,7 @@ use crate::{ parse_program, }; use leo_input::types::{IntegerType, U32Type}; -use leo_types::InputValue; +use leo_typed::InputValue; test_uint!(TestU32, u32, IntegerType::U32Type(U32Type {}), UInt32); diff --git a/compiler/tests/integers/u64/mod.rs b/compiler/tests/integers/u64/mod.rs index bf87def8a0..ba5826456c 100644 --- a/compiler/tests/integers/u64/mod.rs +++ b/compiler/tests/integers/u64/mod.rs @@ -6,7 +6,7 @@ use crate::{ parse_program, }; use leo_input::types::{IntegerType, U64Type}; -use leo_types::InputValue; +use leo_typed::InputValue; test_uint!(TestU64, u64, IntegerType::U64Type(U64Type {}), UInt64); diff --git a/compiler/tests/integers/u8/mod.rs b/compiler/tests/integers/u8/mod.rs index 9cde3f0761..2342cb70f4 100644 --- a/compiler/tests/integers/u8/mod.rs +++ b/compiler/tests/integers/u8/mod.rs @@ -6,7 +6,7 @@ use crate::{ parse_program, }; use leo_input::types::{IntegerType, U8Type}; -use leo_types::InputValue; +use leo_typed::InputValue; test_uint!(TestU8, u8, IntegerType::U8Type(U8Type {}), UInt8); diff --git a/compiler/tests/macros/mod.rs b/compiler/tests/macros/mod.rs index c79b5190fe..661f8db295 100644 --- a/compiler/tests/macros/mod.rs +++ b/compiler/tests/macros/mod.rs @@ -1,5 +1,5 @@ use crate::{assert_satisfied, expect_compiler_error, generate_main_input, parse_program}; -use leo_types::InputValue; +use leo_typed::InputValue; #[test] fn test_print() { diff --git a/compiler/tests/mod.rs b/compiler/tests/mod.rs index 75d4660bc0..6e629667ad 100644 --- a/compiler/tests/mod.rs +++ b/compiler/tests/mod.rs @@ -20,7 +20,7 @@ use leo_compiler::{ ConstrainedValue, OutputBytes, }; -use leo_types::{InputValue, MainInput}; +use leo_typed::{InputValue, MainInput}; use snarkos_curves::edwards_bls12::Fq; use snarkos_models::gadgets::r1cs::TestConstraintSystem; diff --git a/compiler/tests/mutability/mod.rs b/compiler/tests/mutability/mod.rs index 1e997cc26c..460f8a0565 100644 --- a/compiler/tests/mutability/mod.rs +++ b/compiler/tests/mutability/mod.rs @@ -1,5 +1,5 @@ use crate::{assert_satisfied, expect_compiler_error, generate_main_input, parse_program}; -use leo_types::InputValue; +use leo_typed::InputValue; #[test] fn test_let() { diff --git a/compiler/tests/statements/conditional/mod.rs b/compiler/tests/statements/conditional/mod.rs index 7ffe8384b6..246cf3db2e 100644 --- a/compiler/tests/statements/conditional/mod.rs +++ b/compiler/tests/statements/conditional/mod.rs @@ -8,7 +8,7 @@ use crate::{ EdwardsTestCompiler, }; use leo_input::types::{IntegerType, U32Type}; -use leo_types::InputValue; +use leo_typed::InputValue; #[test] fn test_assert() { diff --git a/compiler/tests/statements/mod.rs b/compiler/tests/statements/mod.rs index 2cdf515083..b4c98b9f3a 100644 --- a/compiler/tests/statements/mod.rs +++ b/compiler/tests/statements/mod.rs @@ -1,5 +1,5 @@ use crate::{assert_satisfied, expect_compiler_error, expect_synthesis_error, generate_main_input, parse_program}; -use leo_types::InputValue; +use leo_typed::InputValue; pub mod conditional; diff --git a/examples/pedersen_hash/input/pedersen_hash.in b/examples/pedersen_hash/inputs/pedersen_hash.in similarity index 100% rename from examples/pedersen_hash/input/pedersen_hash.in rename to examples/pedersen_hash/inputs/pedersen_hash.in diff --git a/leo-input/Cargo.toml b/input/Cargo.toml similarity index 100% rename from leo-input/Cargo.toml rename to input/Cargo.toml diff --git a/leo-input/src/ast.rs b/input/src/ast.rs similarity index 100% rename from leo-input/src/ast.rs rename to input/src/ast.rs diff --git a/leo-input/src/common/eoi.rs b/input/src/common/eoi.rs similarity index 100% rename from leo-input/src/common/eoi.rs rename to input/src/common/eoi.rs diff --git a/leo-input/src/common/identifier.rs b/input/src/common/identifier.rs similarity index 100% rename from leo-input/src/common/identifier.rs rename to input/src/common/identifier.rs diff --git a/leo-input/src/common/line_end.rs b/input/src/common/line_end.rs similarity index 100% rename from leo-input/src/common/line_end.rs rename to input/src/common/line_end.rs diff --git a/leo-input/src/common/mod.rs b/input/src/common/mod.rs similarity index 100% rename from leo-input/src/common/mod.rs rename to input/src/common/mod.rs diff --git a/leo-input/src/definitions/definition.rs b/input/src/definitions/definition.rs similarity index 100% rename from leo-input/src/definitions/definition.rs rename to input/src/definitions/definition.rs diff --git a/leo-input/src/definitions/mod.rs b/input/src/definitions/mod.rs similarity index 100% rename from leo-input/src/definitions/mod.rs rename to input/src/definitions/mod.rs diff --git a/leo-input/src/errors/mod.rs b/input/src/errors/mod.rs similarity index 100% rename from leo-input/src/errors/mod.rs rename to input/src/errors/mod.rs diff --git a/leo-input/src/errors/parser.rs b/input/src/errors/parser.rs similarity index 100% rename from leo-input/src/errors/parser.rs rename to input/src/errors/parser.rs diff --git a/leo-input/src/errors/syntax.rs b/input/src/errors/syntax.rs similarity index 100% rename from leo-input/src/errors/syntax.rs rename to input/src/errors/syntax.rs diff --git a/leo-input/src/expressions/array_initializer_expression.rs b/input/src/expressions/array_initializer_expression.rs similarity index 100% rename from leo-input/src/expressions/array_initializer_expression.rs rename to input/src/expressions/array_initializer_expression.rs diff --git a/leo-input/src/expressions/array_inline_expression.rs b/input/src/expressions/array_inline_expression.rs similarity index 100% rename from leo-input/src/expressions/array_inline_expression.rs rename to input/src/expressions/array_inline_expression.rs diff --git a/leo-input/src/expressions/expression.rs b/input/src/expressions/expression.rs similarity index 100% rename from leo-input/src/expressions/expression.rs rename to input/src/expressions/expression.rs diff --git a/leo-input/src/expressions/mod.rs b/input/src/expressions/mod.rs similarity index 100% rename from leo-input/src/expressions/mod.rs rename to input/src/expressions/mod.rs diff --git a/leo-input/src/files/file.rs b/input/src/files/file.rs similarity index 100% rename from leo-input/src/files/file.rs rename to input/src/files/file.rs diff --git a/leo-input/src/files/mod.rs b/input/src/files/mod.rs similarity index 100% rename from leo-input/src/files/mod.rs rename to input/src/files/mod.rs diff --git a/leo-input/src/files/table_or_section.rs b/input/src/files/table_or_section.rs similarity index 100% rename from leo-input/src/files/table_or_section.rs rename to input/src/files/table_or_section.rs diff --git a/leo-input/src/leo-input.pest b/input/src/leo-input.pest similarity index 100% rename from leo-input/src/leo-input.pest rename to input/src/leo-input.pest diff --git a/leo-input/src/lib.rs b/input/src/lib.rs similarity index 100% rename from leo-input/src/lib.rs rename to input/src/lib.rs diff --git a/leo-input/src/parameters/mod.rs b/input/src/parameters/mod.rs similarity index 100% rename from leo-input/src/parameters/mod.rs rename to input/src/parameters/mod.rs diff --git a/leo-input/src/parameters/parameter.rs b/input/src/parameters/parameter.rs similarity index 100% rename from leo-input/src/parameters/parameter.rs rename to input/src/parameters/parameter.rs diff --git a/leo-input/src/sections/header.rs b/input/src/sections/header.rs similarity index 100% rename from leo-input/src/sections/header.rs rename to input/src/sections/header.rs diff --git a/leo-input/src/sections/main_.rs b/input/src/sections/main_.rs similarity index 100% rename from leo-input/src/sections/main_.rs rename to input/src/sections/main_.rs diff --git a/leo-input/src/sections/mod.rs b/input/src/sections/mod.rs similarity index 100% rename from leo-input/src/sections/mod.rs rename to input/src/sections/mod.rs diff --git a/leo-input/src/sections/record.rs b/input/src/sections/record.rs similarity index 100% rename from leo-input/src/sections/record.rs rename to input/src/sections/record.rs diff --git a/leo-input/src/sections/registers.rs b/input/src/sections/registers.rs similarity index 100% rename from leo-input/src/sections/registers.rs rename to input/src/sections/registers.rs diff --git a/leo-input/src/sections/section.rs b/input/src/sections/section.rs similarity index 100% rename from leo-input/src/sections/section.rs rename to input/src/sections/section.rs diff --git a/leo-input/src/sections/state.rs b/input/src/sections/state.rs similarity index 100% rename from leo-input/src/sections/state.rs rename to input/src/sections/state.rs diff --git a/leo-input/src/sections/state_leaf.rs b/input/src/sections/state_leaf.rs similarity index 100% rename from leo-input/src/sections/state_leaf.rs rename to input/src/sections/state_leaf.rs diff --git a/leo-input/src/tables/mod.rs b/input/src/tables/mod.rs similarity index 100% rename from leo-input/src/tables/mod.rs rename to input/src/tables/mod.rs diff --git a/leo-input/src/tables/private.rs b/input/src/tables/private.rs similarity index 100% rename from leo-input/src/tables/private.rs rename to input/src/tables/private.rs diff --git a/leo-input/src/tables/public.rs b/input/src/tables/public.rs similarity index 100% rename from leo-input/src/tables/public.rs rename to input/src/tables/public.rs diff --git a/leo-input/src/tables/table.rs b/input/src/tables/table.rs similarity index 100% rename from leo-input/src/tables/table.rs rename to input/src/tables/table.rs diff --git a/leo-input/src/tables/visibility.rs b/input/src/tables/visibility.rs similarity index 100% rename from leo-input/src/tables/visibility.rs rename to input/src/tables/visibility.rs diff --git a/leo-input/src/types/address_type.rs b/input/src/types/address_type.rs similarity index 100% rename from leo-input/src/types/address_type.rs rename to input/src/types/address_type.rs diff --git a/leo-input/src/types/array_type.rs b/input/src/types/array_type.rs similarity index 100% rename from leo-input/src/types/array_type.rs rename to input/src/types/array_type.rs diff --git a/leo-input/src/types/boolean_type.rs b/input/src/types/boolean_type.rs similarity index 100% rename from leo-input/src/types/boolean_type.rs rename to input/src/types/boolean_type.rs diff --git a/leo-input/src/types/data_type.rs b/input/src/types/data_type.rs similarity index 100% rename from leo-input/src/types/data_type.rs rename to input/src/types/data_type.rs diff --git a/leo-input/src/types/field_type.rs b/input/src/types/field_type.rs similarity index 100% rename from leo-input/src/types/field_type.rs rename to input/src/types/field_type.rs diff --git a/leo-input/src/types/group_type.rs b/input/src/types/group_type.rs similarity index 100% rename from leo-input/src/types/group_type.rs rename to input/src/types/group_type.rs diff --git a/leo-input/src/types/integer_type.rs b/input/src/types/integer_type.rs similarity index 100% rename from leo-input/src/types/integer_type.rs rename to input/src/types/integer_type.rs diff --git a/leo-input/src/types/mod.rs b/input/src/types/mod.rs similarity index 100% rename from leo-input/src/types/mod.rs rename to input/src/types/mod.rs diff --git a/leo-input/src/types/type_.rs b/input/src/types/type_.rs similarity index 100% rename from leo-input/src/types/type_.rs rename to input/src/types/type_.rs diff --git a/leo-input/src/values/address.rs b/input/src/values/address.rs similarity index 100% rename from leo-input/src/values/address.rs rename to input/src/values/address.rs diff --git a/leo-input/src/values/address_value.rs b/input/src/values/address_value.rs similarity index 100% rename from leo-input/src/values/address_value.rs rename to input/src/values/address_value.rs diff --git a/leo-input/src/values/boolean_value.rs b/input/src/values/boolean_value.rs similarity index 100% rename from leo-input/src/values/boolean_value.rs rename to input/src/values/boolean_value.rs diff --git a/leo-input/src/values/field_value.rs b/input/src/values/field_value.rs similarity index 100% rename from leo-input/src/values/field_value.rs rename to input/src/values/field_value.rs diff --git a/leo-input/src/values/group_value.rs b/input/src/values/group_value.rs similarity index 100% rename from leo-input/src/values/group_value.rs rename to input/src/values/group_value.rs diff --git a/leo-input/src/values/integer_value.rs b/input/src/values/integer_value.rs similarity index 100% rename from leo-input/src/values/integer_value.rs rename to input/src/values/integer_value.rs diff --git a/leo-input/src/values/mod.rs b/input/src/values/mod.rs similarity index 100% rename from leo-input/src/values/mod.rs rename to input/src/values/mod.rs diff --git a/leo-input/src/values/number_implicit_value.rs b/input/src/values/number_implicit_value.rs similarity index 100% rename from leo-input/src/values/number_implicit_value.rs rename to input/src/values/number_implicit_value.rs diff --git a/leo-input/src/values/number_value.rs b/input/src/values/number_value.rs similarity index 100% rename from leo-input/src/values/number_value.rs rename to input/src/values/number_value.rs diff --git a/leo-input/src/values/value.rs b/input/src/values/value.rs similarity index 100% rename from leo-input/src/values/value.rs rename to input/src/values/value.rs diff --git a/types/Cargo.toml b/typed/Cargo.toml similarity index 87% rename from types/Cargo.toml rename to typed/Cargo.toml index 35848b122c..f9ae56b6c4 100644 --- a/types/Cargo.toml +++ b/typed/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "leo-types" +name = "leo-typed" version = "0.1.0" authors = ["The Aleo Team "] edition = "2018" [[bin]] -name = "leo_types_ast" +name = "leo_typed_ast" path = "src/main.rs" [[bench]] @@ -14,7 +14,7 @@ harness = false [dependencies] leo-ast = { path = "../ast", version = "0.1.0" } -leo-input = { path = "../leo-input", version = "0.1.0" } +leo-input = { path = "../input", version = "0.1.0" } snarkos-errors = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", package = "snarkos-errors", default-features = false } snarkos-models = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", package = "snarkos-models", default-features = false } diff --git a/types/benches/main.leo b/typed/benches/main.leo similarity index 100% rename from types/benches/main.leo rename to typed/benches/main.leo diff --git a/types/benches/typed_ast.rs b/typed/benches/typed_ast.rs similarity index 96% rename from types/benches/typed_ast.rs rename to typed/benches/typed_ast.rs index 67572859cf..6086f9594f 100644 --- a/types/benches/typed_ast.rs +++ b/typed/benches/typed_ast.rs @@ -1,5 +1,5 @@ use leo_ast::{errors::ParserError, files::File, LeoAst}; -use leo_types::LeoTypedAst; +use leo_typed::LeoTypedAst; use criterion::{black_box, criterion_group, criterion_main, Criterion}; use std::path::{Path, PathBuf}; diff --git a/types/src/circuits/circuit.rs b/typed/src/circuits/circuit.rs similarity index 100% rename from types/src/circuits/circuit.rs rename to typed/src/circuits/circuit.rs diff --git a/types/src/circuits/circuit_field_definition.rs b/typed/src/circuits/circuit_field_definition.rs similarity index 100% rename from types/src/circuits/circuit_field_definition.rs rename to typed/src/circuits/circuit_field_definition.rs diff --git a/types/src/circuits/circuit_member.rs b/typed/src/circuits/circuit_member.rs similarity index 100% rename from types/src/circuits/circuit_member.rs rename to typed/src/circuits/circuit_member.rs diff --git a/types/src/circuits/mod.rs b/typed/src/circuits/mod.rs similarity index 100% rename from types/src/circuits/mod.rs rename to typed/src/circuits/mod.rs diff --git a/types/src/common/assignee.rs b/typed/src/common/assignee.rs similarity index 100% rename from types/src/common/assignee.rs rename to typed/src/common/assignee.rs diff --git a/types/src/common/declare.rs b/typed/src/common/declare.rs similarity index 100% rename from types/src/common/declare.rs rename to typed/src/common/declare.rs diff --git a/types/src/common/identifier.rs b/typed/src/common/identifier.rs similarity index 100% rename from types/src/common/identifier.rs rename to typed/src/common/identifier.rs diff --git a/types/src/common/mod.rs b/typed/src/common/mod.rs similarity index 100% rename from types/src/common/mod.rs rename to typed/src/common/mod.rs diff --git a/types/src/common/range_or_expression.rs b/typed/src/common/range_or_expression.rs similarity index 100% rename from types/src/common/range_or_expression.rs rename to typed/src/common/range_or_expression.rs diff --git a/types/src/common/span.rs b/typed/src/common/span.rs similarity index 100% rename from types/src/common/span.rs rename to typed/src/common/span.rs diff --git a/types/src/common/spread_or_expression.rs b/typed/src/common/spread_or_expression.rs similarity index 100% rename from types/src/common/spread_or_expression.rs rename to typed/src/common/spread_or_expression.rs diff --git a/types/src/common/variable.rs b/typed/src/common/variable.rs similarity index 100% rename from types/src/common/variable.rs rename to typed/src/common/variable.rs diff --git a/types/src/errors/error.rs b/typed/src/errors/error.rs similarity index 100% rename from types/src/errors/error.rs rename to typed/src/errors/error.rs diff --git a/types/src/errors/mod.rs b/typed/src/errors/mod.rs similarity index 100% rename from types/src/errors/mod.rs rename to typed/src/errors/mod.rs diff --git a/types/src/expression.rs b/typed/src/expression.rs similarity index 100% rename from types/src/expression.rs rename to typed/src/expression.rs diff --git a/types/src/functions/function.rs b/typed/src/functions/function.rs similarity index 100% rename from types/src/functions/function.rs rename to typed/src/functions/function.rs diff --git a/types/src/functions/input/function_input.rs b/typed/src/functions/input/function_input.rs similarity index 100% rename from types/src/functions/input/function_input.rs rename to typed/src/functions/input/function_input.rs diff --git a/types/src/functions/input/input_variable.rs b/typed/src/functions/input/input_variable.rs similarity index 100% rename from types/src/functions/input/input_variable.rs rename to typed/src/functions/input/input_variable.rs diff --git a/types/src/functions/input/mod.rs b/typed/src/functions/input/mod.rs similarity index 100% rename from types/src/functions/input/mod.rs rename to typed/src/functions/input/mod.rs diff --git a/types/src/functions/mod.rs b/typed/src/functions/mod.rs similarity index 100% rename from types/src/functions/mod.rs rename to typed/src/functions/mod.rs diff --git a/types/src/functions/test_function.rs b/typed/src/functions/test_function.rs similarity index 100% rename from types/src/functions/test_function.rs rename to typed/src/functions/test_function.rs diff --git a/types/src/imports/import.rs b/typed/src/imports/import.rs similarity index 100% rename from types/src/imports/import.rs rename to typed/src/imports/import.rs diff --git a/types/src/imports/import_symbol.rs b/typed/src/imports/import_symbol.rs similarity index 100% rename from types/src/imports/import_symbol.rs rename to typed/src/imports/import_symbol.rs diff --git a/types/src/imports/mod.rs b/typed/src/imports/mod.rs similarity index 100% rename from types/src/imports/mod.rs rename to typed/src/imports/mod.rs diff --git a/types/src/imports/package.rs b/typed/src/imports/package.rs similarity index 100% rename from types/src/imports/package.rs rename to typed/src/imports/package.rs diff --git a/types/src/imports/package_access.rs b/typed/src/imports/package_access.rs similarity index 100% rename from types/src/imports/package_access.rs rename to typed/src/imports/package_access.rs diff --git a/types/src/input/input.rs b/typed/src/input/input.rs similarity index 100% rename from types/src/input/input.rs rename to typed/src/input/input.rs diff --git a/types/src/input/input_value.rs b/typed/src/input/input_value.rs similarity index 100% rename from types/src/input/input_value.rs rename to typed/src/input/input_value.rs diff --git a/types/src/input/macros.rs b/typed/src/input/macros.rs similarity index 100% rename from types/src/input/macros.rs rename to typed/src/input/macros.rs diff --git a/types/src/input/mod.rs b/typed/src/input/mod.rs similarity index 100% rename from types/src/input/mod.rs rename to typed/src/input/mod.rs diff --git a/types/src/input/parameters/mod.rs b/typed/src/input/parameters/mod.rs similarity index 100% rename from types/src/input/parameters/mod.rs rename to typed/src/input/parameters/mod.rs diff --git a/types/src/input/parameters/parameter.rs b/typed/src/input/parameters/parameter.rs similarity index 100% rename from types/src/input/parameters/parameter.rs rename to typed/src/input/parameters/parameter.rs diff --git a/types/src/input/program_input/main_input.rs b/typed/src/input/program_input/main_input.rs similarity index 100% rename from types/src/input/program_input/main_input.rs rename to typed/src/input/program_input/main_input.rs diff --git a/types/src/input/program_input/mod.rs b/typed/src/input/program_input/mod.rs similarity index 100% rename from types/src/input/program_input/mod.rs rename to typed/src/input/program_input/mod.rs diff --git a/types/src/input/program_input/program_input.rs b/typed/src/input/program_input/program_input.rs similarity index 100% rename from types/src/input/program_input/program_input.rs rename to typed/src/input/program_input/program_input.rs diff --git a/types/src/input/program_input/registers.rs b/typed/src/input/program_input/registers.rs similarity index 100% rename from types/src/input/program_input/registers.rs rename to typed/src/input/program_input/registers.rs diff --git a/types/src/input/program_state/mod.rs b/typed/src/input/program_state/mod.rs similarity index 100% rename from types/src/input/program_state/mod.rs rename to typed/src/input/program_state/mod.rs diff --git a/types/src/input/program_state/private_state/mod.rs b/typed/src/input/program_state/private_state/mod.rs similarity index 100% rename from types/src/input/program_state/private_state/mod.rs rename to typed/src/input/program_state/private_state/mod.rs diff --git a/types/src/input/program_state/private_state/private_state.rs b/typed/src/input/program_state/private_state/private_state.rs similarity index 100% rename from types/src/input/program_state/private_state/private_state.rs rename to typed/src/input/program_state/private_state/private_state.rs diff --git a/types/src/input/program_state/private_state/record.rs b/typed/src/input/program_state/private_state/record.rs similarity index 100% rename from types/src/input/program_state/private_state/record.rs rename to typed/src/input/program_state/private_state/record.rs diff --git a/types/src/input/program_state/private_state/state_leaf.rs b/typed/src/input/program_state/private_state/state_leaf.rs similarity index 100% rename from types/src/input/program_state/private_state/state_leaf.rs rename to typed/src/input/program_state/private_state/state_leaf.rs diff --git a/types/src/input/program_state/program_state.rs b/typed/src/input/program_state/program_state.rs similarity index 100% rename from types/src/input/program_state/program_state.rs rename to typed/src/input/program_state/program_state.rs diff --git a/types/src/input/program_state/public_state/mod.rs b/typed/src/input/program_state/public_state/mod.rs similarity index 100% rename from types/src/input/program_state/public_state/mod.rs rename to typed/src/input/program_state/public_state/mod.rs diff --git a/types/src/input/program_state/public_state/public_state.rs b/typed/src/input/program_state/public_state/public_state.rs similarity index 100% rename from types/src/input/program_state/public_state/public_state.rs rename to typed/src/input/program_state/public_state/public_state.rs diff --git a/types/src/input/program_state/public_state/state.rs b/typed/src/input/program_state/public_state/state.rs similarity index 100% rename from types/src/input/program_state/public_state/state.rs rename to typed/src/input/program_state/public_state/state.rs diff --git a/types/src/lib.rs b/typed/src/lib.rs similarity index 100% rename from types/src/lib.rs rename to typed/src/lib.rs diff --git a/types/src/macros/debug.rs b/typed/src/macros/debug.rs similarity index 100% rename from types/src/macros/debug.rs rename to typed/src/macros/debug.rs diff --git a/types/src/macros/error_macro.rs b/typed/src/macros/error_macro.rs similarity index 100% rename from types/src/macros/error_macro.rs rename to typed/src/macros/error_macro.rs diff --git a/types/src/macros/formatted_container.rs b/typed/src/macros/formatted_container.rs similarity index 100% rename from types/src/macros/formatted_container.rs rename to typed/src/macros/formatted_container.rs diff --git a/types/src/macros/formatted_macro.rs b/typed/src/macros/formatted_macro.rs similarity index 100% rename from types/src/macros/formatted_macro.rs rename to typed/src/macros/formatted_macro.rs diff --git a/types/src/macros/formatted_parameter.rs b/typed/src/macros/formatted_parameter.rs similarity index 100% rename from types/src/macros/formatted_parameter.rs rename to typed/src/macros/formatted_parameter.rs diff --git a/types/src/macros/formatted_string.rs b/typed/src/macros/formatted_string.rs similarity index 100% rename from types/src/macros/formatted_string.rs rename to typed/src/macros/formatted_string.rs diff --git a/types/src/macros/macro_name.rs b/typed/src/macros/macro_name.rs similarity index 100% rename from types/src/macros/macro_name.rs rename to typed/src/macros/macro_name.rs diff --git a/types/src/macros/mod.rs b/typed/src/macros/mod.rs similarity index 100% rename from types/src/macros/mod.rs rename to typed/src/macros/mod.rs diff --git a/types/src/macros/print.rs b/typed/src/macros/print.rs similarity index 100% rename from types/src/macros/print.rs rename to typed/src/macros/print.rs diff --git a/types/src/main.rs b/typed/src/main.rs similarity index 86% rename from types/src/main.rs rename to typed/src/main.rs index 2d1a88b1df..0ed3c23384 100644 --- a/types/src/main.rs +++ b/typed/src/main.rs @@ -1,8 +1,8 @@ use leo_ast::{LeoAst, ParserError}; -use leo_types::LeoTypedAst; +use leo_typed::LeoTypedAst; use std::{env, fs, path::Path}; -fn to_leo_types_tree(filepath: &Path) -> Result { +fn to_leo_typed_tree(filepath: &Path) -> Result { // Loads the Leo code as a string from the given file path. let program_filepath = filepath.to_path_buf(); let program_string = LeoAst::load_file(&program_filepath)?; @@ -11,7 +11,7 @@ fn to_leo_types_tree(filepath: &Path) -> Result { let ast = LeoAst::new(&program_filepath, &program_string)?; // Parse the abstract syntax tree and constructs a typed syntax tree. - let typed_ast = LeoTypedAst::new("leo_types_tree", &ast); + let typed_ast = LeoTypedAst::new("leo_typed_tree", &ast); // Serializes the typed syntax tree into JSON format. let serialized_typed_tree = LeoTypedAst::to_json_string(&typed_ast)?; @@ -27,7 +27,7 @@ fn main() -> Result<(), ParserError> { if cli_arguments.len() < 2 || cli_arguments.len() > 3 { eprintln!("Warning - an invalid number of command-line arguments were provided."); println!( - "\nCommand-line usage:\n\n\tleo_types_ast {{PATH/TO/INPUT_FILENAME}}.leo {{PATH/TO/OUTPUT_DIRECTORY (optional)}}\n" + "\nCommand-line usage:\n\n\tleo_typed_ast {{PATH/TO/INPUT_FILENAME}}.leo {{PATH/TO/OUTPUT_DIRECTORY (optional)}}\n" ); return Ok(()); // Exit innocently } @@ -36,7 +36,7 @@ fn main() -> Result<(), ParserError> { let input_filepath = Path::new(&cli_arguments[1]); // Construct the serialized typed syntax tree. - let serialized_typed_tree = to_leo_types_tree(&input_filepath)?; + let serialized_typed_tree = to_leo_typed_tree(&input_filepath)?; println!("{}", serialized_typed_tree); // Determine the output directory. diff --git a/types/src/program.rs b/typed/src/program.rs similarity index 100% rename from types/src/program.rs rename to typed/src/program.rs diff --git a/types/src/statements/conditional_nested_or_end_statement.rs b/typed/src/statements/conditional_nested_or_end_statement.rs similarity index 100% rename from types/src/statements/conditional_nested_or_end_statement.rs rename to typed/src/statements/conditional_nested_or_end_statement.rs diff --git a/types/src/statements/conditional_statement.rs b/typed/src/statements/conditional_statement.rs similarity index 100% rename from types/src/statements/conditional_statement.rs rename to typed/src/statements/conditional_statement.rs diff --git a/types/src/statements/mod.rs b/typed/src/statements/mod.rs similarity index 100% rename from types/src/statements/mod.rs rename to typed/src/statements/mod.rs diff --git a/types/src/statements/statement.rs b/typed/src/statements/statement.rs similarity index 100% rename from types/src/statements/statement.rs rename to typed/src/statements/statement.rs diff --git a/types/src/types/integer_type.rs b/typed/src/types/integer_type.rs similarity index 100% rename from types/src/types/integer_type.rs rename to typed/src/types/integer_type.rs diff --git a/types/src/types/mod.rs b/typed/src/types/mod.rs similarity index 100% rename from types/src/types/mod.rs rename to typed/src/types/mod.rs diff --git a/types/src/types/type_.rs b/typed/src/types/type_.rs similarity index 100% rename from types/src/types/type_.rs rename to typed/src/types/type_.rs diff --git a/types/tests/mod.rs b/typed/tests/mod.rs similarity index 100% rename from types/tests/mod.rs rename to typed/tests/mod.rs diff --git a/types/tests/serialization/expected_typed_ast.json b/typed/tests/serialization/expected_typed_ast.json similarity index 95% rename from types/tests/serialization/expected_typed_ast.json rename to typed/tests/serialization/expected_typed_ast.json index 93f943bdad..4955096120 100644 --- a/types/tests/serialization/expected_typed_ast.json +++ b/typed/tests/serialization/expected_typed_ast.json @@ -1,12 +1,12 @@ { - "name": "leo_types_tree", - "expected_inputs": [], + "name": "leo_typed_tree", + "expected_input": [], "imports": [], "circuits": {}, "functions": { "{\"name\":\"main\",\"span\":\"{\\\"text\\\":\\\" function main() {\\\",\\\"line\\\":1,\\\"start\\\":10,\\\"end\\\":14}\"}": { "function_name": "{\"name\":\"main\",\"span\":\"{\\\"text\\\":\\\" function main() {\\\",\\\"line\\\":1,\\\"start\\\":10,\\\"end\\\":14}\"}", - "inputs": [], + "input": [], "returns": [], "statements": [ { diff --git a/types/tests/serialization/json.rs b/typed/tests/serialization/json.rs similarity index 96% rename from types/tests/serialization/json.rs rename to typed/tests/serialization/json.rs index a5d5f82c9f..20b860623c 100644 --- a/types/tests/serialization/json.rs +++ b/typed/tests/serialization/json.rs @@ -1,5 +1,5 @@ use leo_ast::LeoAst; -use leo_types::LeoTypedAst; +use leo_typed::LeoTypedAst; use std::path::PathBuf; @@ -11,7 +11,7 @@ fn to_typed_ast(program_filepath: &PathBuf) -> LeoTypedAst { let ast = LeoAst::new(&program_filepath, &program_string).unwrap(); // Parse the abstract syntax tree and constructs a typed syntax tree. - let typed_ast = LeoTypedAst::new("leo_types_tree", &ast); + let typed_ast = LeoTypedAst::new("leo_typed_tree", &ast); typed_ast } diff --git a/types/tests/serialization/main.leo b/typed/tests/serialization/main.leo similarity index 100% rename from types/tests/serialization/main.leo rename to typed/tests/serialization/main.leo diff --git a/types/tests/serialization/mod.rs b/typed/tests/serialization/mod.rs similarity index 100% rename from types/tests/serialization/mod.rs rename to typed/tests/serialization/mod.rs