Skip to content

Commit

Permalink
Merge pull request #453 from luketpeterson/main
Browse files Browse the repository at this point in the history
Fixing build warnings and compile errors with minimal MeTTa
  • Loading branch information
vsbogd authored Oct 5, 2023
2 parents f42cd04 + 12bc53b commit 85bedd2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/src/metta/runner/stdlib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ use super::arithmetics::*;

pub const VOID_SYMBOL : Atom = sym!("%void%");

//TODO: convert these from functions to static strcutures, when Atoms are Send+Sync
#[allow(non_snake_case)]
pub fn UNIT_ATOM() -> Atom {
Atom::expr([])
}
#[allow(non_snake_case)]
pub fn UNIT_TYPE() -> Atom {
Atom::expr([ARROW_SYMBOL])
}
Expand Down
12 changes: 12 additions & 0 deletions lib/src/metta/runner/stdlib2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ use std::collections::HashMap;

use super::arithmetics::*;

pub const VOID_SYMBOL : Atom = sym!("%void%");

//TODO: convert these from functions to static strcutures, when Atoms are Send+Sync
#[allow(non_snake_case)]
pub fn UNIT_ATOM() -> Atom {
Atom::expr([])
}
#[allow(non_snake_case)]
pub fn UNIT_TYPE() -> Atom {
Atom::expr([ARROW_SYMBOL])
}

#[derive(Clone, PartialEq, Debug)]
pub struct GetTypeOp {}

Expand Down
3 changes: 3 additions & 0 deletions lib/tests/metta.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#[cfg(not(feature = "minimal"))]
use hyperon::metta::runner::stdlib::UNIT_ATOM;
#[cfg(feature = "minimal")]
use hyperon::metta::runner::stdlib2::UNIT_ATOM;
use hyperon::metta::text::*;
use hyperon::metta::runner::new_metta_rust;

Expand Down

0 comments on commit 85bedd2

Please sign in to comment.