rebirth: Correct recursive fnmap form definitions
There were some instances where fnmap forms defined themselves in terms of themselves (e.g. `if' using `if'), or defined themselves in terms of one of their dependents (`let*' used `let' which uses `let*'). They work just fine because of how we're just transpiling directly into JS, but we're converting them into macros, and we're going to run into issues once we do that. This was never intentional---I didn't realize that I was doing it. * build-aux/bootstrap/rebirth.scm (fnmap)[if, let*]: Fix definitions.master
parent
1060247f0b
commit
ae7fcdbc1a
|
@ -1014,8 +1014,8 @@
|
|||
(string-append
|
||||
"(function(){"
|
||||
"if (_truep(" (sexp->es pred) ")){return " (sexp->es t) ";}"
|
||||
(if (pair? f)
|
||||
(string-append "else{return " (sexp->es f) ";}")
|
||||
(or (and (pair? f)
|
||||
(string-append "else{return " (sexp->es f) ";}"))
|
||||
"")
|
||||
"})()")))
|
||||
|
||||
|
@ -1052,10 +1052,9 @@
|
|||
(string-append
|
||||
"(function(){\n"
|
||||
(join "" (map (lambda (binding)
|
||||
(let ((var (car binding))
|
||||
(init (cadr binding)))
|
||||
(string-append " let " (sexp->es var)
|
||||
" = " (sexp->es init) ";\n")))
|
||||
(string-append
|
||||
" let " (sexp->es (car binding))
|
||||
" = " (sexp->es (cadr binding)) ";\n"))
|
||||
bindings))
|
||||
(body->es body #t) "\n"
|
||||
" })()")))
|
||||
|
|
Loading…
Reference in New Issue