Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing build warnings and compile errors with minimal MeTTa #453

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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