Skip to content

Commit a58c3dd

Browse files
committed
Fix module namespacing
and some rebase errors
1 parent 3c5e8f2 commit a58c3dd

File tree

3 files changed

+20
-34
lines changed

3 files changed

+20
-34
lines changed

src/environment.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ impl Environment {
8888
// clojure.std functions
8989
let thread_sleep_fn = clojure_std::thread::SleepFn {};
9090
let nanotime_fn = clojure_std::time::NanoTimeFn {};
91+
9192
// Hardcoded fns
9293
let lexical_eval_fn = Value::LexicalEvalFn {};
9394
// Hardcoded macros
@@ -98,7 +99,7 @@ impl Environment {
9899
let defmacro_macro = Value::DefmacroMacro {};
99100
let environment = Rc::new(Environment::new_main_environment());
100101

101-
let eval_fn = rust_core::eval::EvalFn::new(Rc::clone(&environment));
102+
let eval_fn = rust_core::EvalFn::new(Rc::clone(&environment));
102103

103104
environment.insert(Symbol::intern("+"), add_fn.to_rc_value());
104105
environment.insert(Symbol::intern("-"), subtract_fn.to_rc_value());

src/rust_core.rs

Lines changed: 18 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,45 @@
1-
pub(crate) mod slurp;
2-
3-
use crate::value::Value;
4-
use std::rc::Rc;
5-
6-
use crate::environment::Environment;
7-
use crate::ifn::IFn;
8-
use crate::persistent_list::{
9-
PersistentList,
10-
PersistentList::{Cons, Empty},
11-
ToPersistentList, ToPersistentListIter,
12-
};
13-
use crate::persistent_list_map::IPersistentListMap;
14-
use crate::persistent_vector::{PersistentVector, ToPersistentVectorIter};
15-
use crate::symbol::Symbol;
16-
use crate::type_tag::TypeTag;
17-
use crate::value::{Evaluable, ToValue};
18-
19-
use itertools::Itertools;
20-
use crate::error_message;
21-
22-
use crate::util::IsEven;
23-
24-
pub(crate) mod _subtract_;
25-
pub use self::_subtract_::*;
26-
27-
pub(crate) mod _divide_;
28-
pub use self::_divide_::*;
29-
30-
pub(crate) mod _multiply_;
31-
pub use self::_multiply_::*;
32-
//
331
// This module will hold core function and macro primitives that aren't special cases
342
// (like the quote macro, or let), and can't be implemented in clojure itself
353

364
// language core functions
375
pub(crate) mod eval;
6+
pub use self::eval::*;
387

398
// macros
409
pub(crate) mod do_macro;
10+
pub use self::do_macro::*;
4111

4212
// arithmetics
4313
pub(crate) mod _plus_;
4414
pub use self::_plus_::*;
4515

16+
pub(crate) mod _subtract_;
17+
pub use self::_subtract_::*;
18+
19+
pub(crate) mod _divide_;
20+
pub use self::_divide_::*;
21+
22+
pub(crate) mod _multiply_;
23+
pub use self::_multiply_::*;
24+
4625
// string
4726
pub(crate) mod str;
4827
pub use self::str::*;
4928

5029
// operations on collections
5130
pub(crate) mod nth;
31+
pub use self::nth::*;
5232
pub(crate) mod concat;
33+
pub use self::concat::*;
5334
pub(crate) mod assoc;
35+
pub use self::assoc::*;
5436

5537
// input and output
5638
pub(crate) mod print_string;
57-
pub(crate) mod string_pring;
39+
pub use self::print_string::*;
40+
pub(crate) mod string_print;
41+
pub use self::string_print::*;
5842

5943
// other
6044
pub(crate) mod slurp;
45+
pub use self::slurp::*;
File renamed without changes.

0 commit comments

Comments
 (0)