add a process value
This commit is contained in:
parent
801e5bcc01
commit
c144702b98
|
@ -382,6 +382,7 @@ pub fn r#type(x: &Value) -> Value {
|
||||||
Value::Box(_) => Value::Keyword("box"),
|
Value::Box(_) => Value::Keyword("box"),
|
||||||
Value::BaseFn(_) => Value::Keyword("fn"),
|
Value::BaseFn(_) => Value::Keyword("fn"),
|
||||||
Value::Partial(_) => Value::Keyword("fn"),
|
Value::Partial(_) => Value::Keyword("fn"),
|
||||||
|
Value::Process => Value::Keyword("process"),
|
||||||
Value::Nothing => unreachable!(),
|
Value::Nothing => unreachable!(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,6 +131,7 @@ pub enum Value {
|
||||||
Fn(Rc<LFn>),
|
Fn(Rc<LFn>),
|
||||||
BaseFn(BaseFn),
|
BaseFn(BaseFn),
|
||||||
Partial(Rc<Partial>),
|
Partial(Rc<Partial>),
|
||||||
|
Process,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl PartialEq for Value {
|
impl PartialEq for Value {
|
||||||
|
@ -167,6 +168,7 @@ impl std::fmt::Display for Value {
|
||||||
Interned(str) => write!(f, "\"{str}\""),
|
Interned(str) => write!(f, "\"{str}\""),
|
||||||
String(str) => write!(f, "\"{str}\""),
|
String(str) => write!(f, "\"{str}\""),
|
||||||
Number(n) => write!(f, "{n}"),
|
Number(n) => write!(f, "{n}"),
|
||||||
|
Process => write!(f, "Process"),
|
||||||
Tuple(members) => write!(
|
Tuple(members) => write!(
|
||||||
f,
|
f,
|
||||||
"({})",
|
"({})",
|
||||||
|
@ -214,6 +216,7 @@ impl Value {
|
||||||
pub fn show(&self) -> String {
|
pub fn show(&self) -> String {
|
||||||
use Value::*;
|
use Value::*;
|
||||||
let mut out = match &self {
|
let mut out = match &self {
|
||||||
|
Process => "Process".to_string(),
|
||||||
Nil => "nil".to_string(),
|
Nil => "nil".to_string(),
|
||||||
True => "true".to_string(),
|
True => "true".to_string(),
|
||||||
False => "false".to_string(),
|
False => "false".to_string(),
|
||||||
|
@ -308,6 +311,7 @@ impl Value {
|
||||||
pub fn stringify(&self) -> String {
|
pub fn stringify(&self) -> String {
|
||||||
use Value::*;
|
use Value::*;
|
||||||
match &self {
|
match &self {
|
||||||
|
Process => "process".to_string(),
|
||||||
Nil => "nil".to_string(),
|
Nil => "nil".to_string(),
|
||||||
True => "true".to_string(),
|
True => "true".to_string(),
|
||||||
False => "false".to_string(),
|
False => "false".to_string(),
|
||||||
|
@ -369,6 +373,7 @@ impl Value {
|
||||||
Fn(..) => "fn",
|
Fn(..) => "fn",
|
||||||
BaseFn(..) => "fn",
|
BaseFn(..) => "fn",
|
||||||
Partial(..) => "fn",
|
Partial(..) => "fn",
|
||||||
|
Process => "process",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user