Fixing some showstoppers
- inertness now tracked separately from gas - atomic_impl now correctly rolls over when the argument is inert - syntax fixes - tree shaking
This commit is contained in:
2
src/external/bool/equals.rs
vendored
2
src/external/bool/equals.rs
vendored
@@ -13,7 +13,7 @@ use super::boolean::Boolean;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Equals2;
|
||||
externfn_impl!(Equals2, |_: &Self, x: ExprInst| {Ok(Equals1{x})});
|
||||
externfn_impl!(Equals2, |_: &Self, x: ExprInst| Ok(Equals1{x}));
|
||||
|
||||
/// Partially applied Equals function
|
||||
///
|
||||
|
||||
2
src/external/bool/ifthenelse.rs
vendored
2
src/external/bool/ifthenelse.rs
vendored
@@ -13,7 +13,7 @@ use super::Boolean;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct IfThenElse1;
|
||||
externfn_impl!(IfThenElse1, |_: &Self, x: ExprInst| {Ok(IfThenElse0{x})});
|
||||
externfn_impl!(IfThenElse1, |_: &Self, x: ExprInst| Ok(IfThenElse0{x}));
|
||||
|
||||
/// Partially applied IfThenElse function
|
||||
///
|
||||
|
||||
2
src/external/conv/parse_float.rs
vendored
2
src/external/conv/parse_float.rs
vendored
@@ -15,7 +15,7 @@ use crate::{atomic_impl, atomic_redirect, externfn_impl};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct ParseFloat1;
|
||||
externfn_impl!(ParseFloat1, |_: &Self, x: ExprInst| {Ok(ParseFloat0{x})});
|
||||
externfn_impl!(ParseFloat1, |_: &Self, x: ExprInst| Ok(ParseFloat0{x}));
|
||||
|
||||
/// Applied to_string function
|
||||
///
|
||||
|
||||
2
src/external/conv/parse_uint.rs
vendored
2
src/external/conv/parse_uint.rs
vendored
@@ -14,7 +14,7 @@ use crate::parse::int_parser;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct ParseUint1;
|
||||
externfn_impl!(ParseUint1, |_: &Self, x: ExprInst| {Ok(ParseUint0{x})});
|
||||
externfn_impl!(ParseUint1, |_: &Self, x: ExprInst| Ok(ParseUint0{x}));
|
||||
|
||||
/// Applied ParseUint function
|
||||
///
|
||||
|
||||
2
src/external/conv/to_string.rs
vendored
2
src/external/conv/to_string.rs
vendored
@@ -11,7 +11,7 @@ use crate::{atomic_impl, atomic_redirect, externfn_impl};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct ToString1;
|
||||
externfn_impl!(ToString1, |_: &Self, x: ExprInst| {Ok(ToString0{x})});
|
||||
externfn_impl!(ToString1, |_: &Self, x: ExprInst| Ok(ToString0{x}));
|
||||
|
||||
/// Applied ToString function
|
||||
///
|
||||
|
||||
2
src/external/cpsio/print.rs
vendored
2
src/external/cpsio/print.rs
vendored
@@ -12,7 +12,7 @@ use crate::representations::interpreted::{Clause, ExprInst};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Print2;
|
||||
externfn_impl!(Print2, |_: &Self, x: ExprInst| {Ok(Print1{x})});
|
||||
externfn_impl!(Print2, |_: &Self, x: ExprInst| Ok(Print1{x}));
|
||||
|
||||
/// Partially applied Print function
|
||||
///
|
||||
|
||||
5
src/external/cpsio/readline.rs
vendored
5
src/external/cpsio/readline.rs
vendored
@@ -12,7 +12,7 @@ use crate::representations::interpreted::{Clause, ExprInst};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Readln2;
|
||||
externfn_impl!(Readln2, |_: &Self, x: ExprInst| {Ok(Readln1{x})});
|
||||
externfn_impl!(Readln2, |_: &Self, x: ExprInst| Ok(Readln1{x}));
|
||||
|
||||
/// Partially applied Readln function
|
||||
///
|
||||
@@ -23,7 +23,8 @@ pub struct Readln1{ x: ExprInst }
|
||||
atomic_redirect!(Readln1, x);
|
||||
atomic_impl!(Readln1, |Self{ x }: &Self| {
|
||||
let mut buf = String::new();
|
||||
stdin().read_line(&mut buf).map_err(|e| RuntimeError::ext(e.to_string(), "reading from stdin"))?;
|
||||
stdin().read_line(&mut buf)
|
||||
.map_err(|e| RuntimeError::ext(e.to_string(), "reading from stdin"))?;
|
||||
buf.pop();
|
||||
Ok(Clause::Apply {
|
||||
f: x.clone(),
|
||||
|
||||
2
src/external/num/operators/add.rs
vendored
2
src/external/num/operators/add.rs
vendored
@@ -12,7 +12,7 @@ use crate::representations::interpreted::ExprInst;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Add2;
|
||||
externfn_impl!(Add2, |_: &Self, x: ExprInst| {Ok(Add1{x})});
|
||||
externfn_impl!(Add2, |_: &Self, x: ExprInst| Ok(Add1{x}));
|
||||
|
||||
/// Partially applied Add function
|
||||
///
|
||||
|
||||
2
src/external/num/operators/divide.rs
vendored
2
src/external/num/operators/divide.rs
vendored
@@ -12,7 +12,7 @@ use crate::representations::interpreted::ExprInst;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Divide2;
|
||||
externfn_impl!(Divide2, |_: &Self, x: ExprInst| {Ok(Divide1{x})});
|
||||
externfn_impl!(Divide2, |_: &Self, x: ExprInst| Ok(Divide1{x}));
|
||||
|
||||
/// Partially applied Divide function
|
||||
///
|
||||
|
||||
2
src/external/num/operators/multiply.rs
vendored
2
src/external/num/operators/multiply.rs
vendored
@@ -12,7 +12,7 @@ use crate::representations::interpreted::ExprInst;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Multiply2;
|
||||
externfn_impl!(Multiply2, |_: &Self, x: ExprInst| {Ok(Multiply1{x})});
|
||||
externfn_impl!(Multiply2, |_: &Self, x: ExprInst| Ok(Multiply1{x}));
|
||||
|
||||
/// Partially applied Multiply function
|
||||
///
|
||||
|
||||
2
src/external/num/operators/remainder.rs
vendored
2
src/external/num/operators/remainder.rs
vendored
@@ -12,7 +12,7 @@ use crate::representations::interpreted::ExprInst;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Remainder2;
|
||||
externfn_impl!(Remainder2, |_: &Self, x: ExprInst| {Ok(Remainder1{x})});
|
||||
externfn_impl!(Remainder2, |_: &Self, x: ExprInst| Ok(Remainder1{x}));
|
||||
|
||||
/// Partially applied Remainder function
|
||||
///
|
||||
|
||||
2
src/external/num/operators/subtract.rs
vendored
2
src/external/num/operators/subtract.rs
vendored
@@ -12,7 +12,7 @@ use crate::representations::interpreted::ExprInst;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Subtract2;
|
||||
externfn_impl!(Subtract2, |_: &Self, x: ExprInst| {Ok(Subtract1{x})});
|
||||
externfn_impl!(Subtract2, |_: &Self, x: ExprInst| Ok(Subtract1{x}));
|
||||
|
||||
/// Partially applied Subtract function
|
||||
///
|
||||
|
||||
2
src/external/str/char_at.rs
vendored
2
src/external/str/char_at.rs
vendored
@@ -12,7 +12,7 @@ use crate::representations::interpreted::{Clause, ExprInst};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct CharAt2;
|
||||
externfn_impl!(CharAt2, |_: &Self, x: ExprInst| {Ok(CharAt1{x})});
|
||||
externfn_impl!(CharAt2, |_: &Self, x: ExprInst| Ok(CharAt1{x}));
|
||||
|
||||
/// Partially applied CharAt function
|
||||
///
|
||||
|
||||
2
src/external/str/concatenate.rs
vendored
2
src/external/str/concatenate.rs
vendored
@@ -11,7 +11,7 @@ use crate::representations::interpreted::{Clause, ExprInst};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Concatenate2;
|
||||
externfn_impl!(Concatenate2, |_: &Self, c: ExprInst| {Ok(Concatenate1{c})});
|
||||
externfn_impl!(Concatenate2, |_: &Self, c: ExprInst| Ok(Concatenate1{c}));
|
||||
|
||||
/// Partially applied Concatenate function
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user