Skip to content

Commit f55862c

Browse files
committed
Remove SimpleLet
poorly defined semantics wrt environment, more trouble than it's worth
1 parent b991847 commit f55862c

File tree

4 files changed

+205
-192
lines changed

4 files changed

+205
-192
lines changed

src/cont.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,6 @@ pub enum Cont {
111111
next: Rc<Expr>,
112112
cont: Rc<Cont>,
113113
},
114-
SimpleLet {
115-
arg: Symbol,
116-
cont: Rc<Cont>,
117-
},
118114
Conditional {
119115
consequent: Rc<Expr>,
120116
alternate: Option<Rc<Expr>>,

src/evaler.rs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -227,17 +227,6 @@ pub(crate) fn eval_expr(state: State) -> Bouncer {
227227
winds,
228228
}),
229229
},
230-
Expr::SimpleLet { arg, value, body } => Bouncer::Bounce(State {
231-
acc: Acc::Expr(value.clone()),
232-
cont: Rc::new(Cont::SimpleLet {
233-
arg: *arg,
234-
cont: Cont::from_body(body, Some(cont)),
235-
}),
236-
env,
237-
rib,
238-
stack,
239-
winds,
240-
}),
241230
Expr::Undefined => Bouncer::Bounce(State {
242231
acc: Acc::Obj(Ok(ObjectRef::Undefined)),
243232
cont,
@@ -312,17 +301,6 @@ pub(crate) fn eval_expr(state: State) -> Bouncer {
312301
winds,
313302
})
314303
}
315-
Cont::SimpleLet { arg, cont } => {
316-
env.insert(*arg, obj);
317-
Bouncer::Bounce(State {
318-
acc: Acc::Obj(Ok(ObjectRef::Undefined)),
319-
cont: cont.clone(),
320-
env,
321-
rib,
322-
stack,
323-
winds,
324-
})
325-
}
326304
Cont::Conditional {
327305
consequent,
328306
alternate,

src/expr.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@ pub enum Expr {
5252
value: Rc<Expr>,
5353
},
5454
Begin(Vec<Rc<Expr>>),
55-
SimpleLet {
56-
arg: Symbol,
57-
value: Rc<Expr>,
58-
body: Vec<ExprOrDef>,
59-
},
6055
Undefined,
6156
}
6257

0 commit comments

Comments
 (0)