diff --git a/src/types/object.rs b/src/types/object.rs deleted file mode 100644 index be0f944..0000000 --- a/src/types/object.rs +++ /dev/null @@ -1,15 +0,0 @@ -/* types/object.rs - * Eryn Wells - */ - -/// `Object` is the top-level type in Scheme's world. It is abstract -- no value is of `Object` -/// type -- but all types must implement it. -pub trait Object: IsBool + IsChar { } - -pub trait IsBool { - fn is_bool() -> bool { false } -} - -pub trait isChar { - fn is_char() -> bool { false } -} diff --git a/src/types/value.rs b/src/types/value.rs index c4e8423..004ed5a 100644 --- a/src/types/value.rs +++ b/src/types/value.rs @@ -5,7 +5,7 @@ use std::fmt::Debug; use std::any::Any; -pub trait Value: Debug + ValueEq { +pub trait Value: Debug + ValueEq + IsBool + IsChar { fn as_value(&self) -> &Value; } @@ -22,3 +22,10 @@ impl<'lhs,'rhs> PartialEq for Value+'lhs { } } +pub trait IsBool { + fn is_bool(&self) -> bool { false } +} + +pub trait IsChar { + fn is_char(&self) -> bool { false } +}