@@ -182,9 +182,6 @@ module Bootstrap.AST.Translator {
182
182
(map k | k in LazyBinopMap :: DE. Lazy (LazyBinopMap[k])) +
183
183
(map k | k in EagerBinopMap :: DE. Eager (DE.BinaryOp(EagerBinopMap[k])))
184
184
185
- // Do we desugar binds to variable declarations?
186
- const bindToVarDecl: bool := false
187
-
188
185
// Wo we wrap the content of `if then else` branches in blocks?
189
186
const wrapBranchesInBlocks: bool := true
190
187
@@ -433,7 +430,7 @@ module Bootstrap.AST.Translator {
433
430
Success (DE.Abs(bvars, body))
434
431
}
435
432
436
- function method TranslateLetExpr (as_bind: bool , le: C .LetExpr)
433
+ function method TranslateLetExpr (le: C .LetExpr)
437
434
: (e: TranslationResult< Expr> )
438
435
reads *
439
436
decreases ASTHeight (le), 0
@@ -452,13 +449,7 @@ module Bootstrap.AST.Translator {
452
449
:- Need (|bvs| == |elems|, UnsupportedExpr(le));
453
450
assume Decreases (le.Body, le);
454
451
var body :- TranslateExpression (le.Body);
455
- if as_bind then
456
- Success (DE.Bind(bvs, elems, body))
457
- else
458
- var vdecl := DE. VarDecl (bvs, DE.Some(elems));
459
- var block := DE. Block ([vdecl, body]);
460
- assert P. All_Expr (block, DE.WellFormed); // Doesn't work without this assertion
461
- Success (block)
452
+ Success (DE.Bind(bvs, elems, body))
462
453
}
463
454
464
455
function method TranslateConcreteSyntaxExpression (ce: C .ConcreteSyntaxExpression)
@@ -517,7 +508,7 @@ module Bootstrap.AST.Translator {
517
508
else if c is C. LambdaExpr then
518
509
TranslateLambdaExpr (c as C.LambdaExpr)
519
510
else if c is C. LetExpr then
520
- TranslateLetExpr (bindToVarDecl, c as C.LetExpr)
511
+ TranslateLetExpr (c as C.LetExpr)
521
512
else if c is C. ITEExpr then
522
513
TranslateITEExpr (c as C.ITEExpr)
523
514
else if c is C. ConcreteSyntaxExpression then
0 commit comments