From ef3779d8e09569a9a7cc10087879fd77f3a699ee Mon Sep 17 00:00:00 2001 From: Innokenty Date: Wed, 20 Nov 2024 09:08:35 +0300 Subject: [PATCH] moved stdlib_minimal to separate folder --- lib/src/metta/runner/mod.rs | 3 --- .../runner/{stdlib_minimal.rs => stdlib_minimal/mod.rs} | 5 ++++- lib/src/metta/runner/{ => stdlib_minimal}/stdlib_math.rs | 2 +- .../metta/runner/{ => stdlib_minimal}/stdlib_minimal.metta | 0 4 files changed, 5 insertions(+), 5 deletions(-) rename lib/src/metta/runner/{stdlib_minimal.rs => stdlib_minimal/mod.rs} (99%) rename lib/src/metta/runner/{ => stdlib_minimal}/stdlib_math.rs (99%) rename lib/src/metta/runner/{ => stdlib_minimal}/stdlib_minimal.metta (100%) diff --git a/lib/src/metta/runner/mod.rs b/lib/src/metta/runner/mod.rs index 7beaee4e8..3cec2109b 100644 --- a/lib/src/metta/runner/mod.rs +++ b/lib/src/metta/runner/mod.rs @@ -91,9 +91,6 @@ use super::interpreter::{interpret, interpret_init, interpret_step, InterpreterS pub mod stdlib_minimal; use stdlib_minimal::CoreLibLoader; -#[macro_use] -pub mod stdlib_math; - mod builtin_mods; use builtin_mods::*; diff --git a/lib/src/metta/runner/stdlib_minimal.rs b/lib/src/metta/runner/stdlib_minimal/mod.rs similarity index 99% rename from lib/src/metta/runner/stdlib_minimal.rs rename to lib/src/metta/runner/stdlib_minimal/mod.rs index 8a7266815..ae5c2aa07 100644 --- a/lib/src/metta/runner/stdlib_minimal.rs +++ b/lib/src/metta/runner/stdlib_minimal/mod.rs @@ -1,3 +1,6 @@ +#[macro_use] +pub mod stdlib_math; + use crate::*; use crate::space::*; use crate::metta::*; @@ -13,7 +16,7 @@ use crate::common::multitrie::MultiTrie; use crate::space::grounding::atom_to_trie_key; #[cfg(feature = "pkg_mgmt")] use crate::metta::runner::{git_catalog::ModuleGitLocation, mod_name_from_url, pkg_mgmt::UpdateMode}; -use crate::metta::runner::stdlib_math; +// use crate::metta::runner::stdlib_minimal::stdlib_math; use std::convert::TryInto; use std::rc::Rc; diff --git a/lib/src/metta/runner/stdlib_math.rs b/lib/src/metta/runner/stdlib_minimal/stdlib_math.rs similarity index 99% rename from lib/src/metta/runner/stdlib_math.rs rename to lib/src/metta/runner/stdlib_minimal/stdlib_math.rs index d769c7c23..bbe14dcb7 100644 --- a/lib/src/metta/runner/stdlib_math.rs +++ b/lib/src/metta/runner/stdlib_minimal/stdlib_math.rs @@ -4,7 +4,7 @@ use crate::metta::*; use std::convert::TryInto; -use super::arithmetics::*; +use crate::metta::runner::arithmetics::*; macro_rules! grounded_op { diff --git a/lib/src/metta/runner/stdlib_minimal.metta b/lib/src/metta/runner/stdlib_minimal/stdlib_minimal.metta similarity index 100% rename from lib/src/metta/runner/stdlib_minimal.metta rename to lib/src/metta/runner/stdlib_minimal/stdlib_minimal.metta