Revert do→let/it chaining (caused 80-test regression)
The let/it wrapping changed semantics of ALL multi-command sequences, breaking independent side-effect chains like (do (add-class) (add-class)). Need a targeted approach — chain it only for then-separated commands. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -999,23 +999,7 @@
|
|||||||
(hs-to-sx (nth ast 1))
|
(hs-to-sx (nth ast 1))
|
||||||
(hs-to-sx (nth ast 2)))))
|
(hs-to-sx (nth ast 2)))))
|
||||||
((= head (quote do))
|
((= head (quote do))
|
||||||
(let
|
(cons (quote do) (map hs-to-sx (rest ast))))
|
||||||
((compiled (map hs-to-sx (rest ast))))
|
|
||||||
(if
|
|
||||||
(= (len compiled) 1)
|
|
||||||
(first compiled)
|
|
||||||
(let
|
|
||||||
((last-cmd (nth compiled (- (len compiled) 1)))
|
|
||||||
(init-cmds (reverse (rest (reverse compiled)))))
|
|
||||||
(reduce
|
|
||||||
(fn
|
|
||||||
(body cmd)
|
|
||||||
(list
|
|
||||||
(quote let)
|
|
||||||
(list (list (quote it) cmd))
|
|
||||||
body))
|
|
||||||
last-cmd
|
|
||||||
(reverse init-cmds))))))
|
|
||||||
((= head (quote wait)) (list (quote hs-wait) (nth ast 1)))
|
((= head (quote wait)) (list (quote hs-wait) (nth ast 1)))
|
||||||
((= head (quote wait-for)) (emit-wait-for ast))
|
((= head (quote wait-for)) (emit-wait-for ast))
|
||||||
((= head (quote log))
|
((= head (quote log))
|
||||||
|
|||||||
@@ -999,23 +999,7 @@
|
|||||||
(hs-to-sx (nth ast 1))
|
(hs-to-sx (nth ast 1))
|
||||||
(hs-to-sx (nth ast 2)))))
|
(hs-to-sx (nth ast 2)))))
|
||||||
((= head (quote do))
|
((= head (quote do))
|
||||||
(let
|
(cons (quote do) (map hs-to-sx (rest ast))))
|
||||||
((compiled (map hs-to-sx (rest ast))))
|
|
||||||
(if
|
|
||||||
(= (len compiled) 1)
|
|
||||||
(first compiled)
|
|
||||||
(let
|
|
||||||
((last-cmd (nth compiled (- (len compiled) 1)))
|
|
||||||
(init-cmds (reverse (rest (reverse compiled)))))
|
|
||||||
(reduce
|
|
||||||
(fn
|
|
||||||
(body cmd)
|
|
||||||
(list
|
|
||||||
(quote let)
|
|
||||||
(list (list (quote it) cmd))
|
|
||||||
body))
|
|
||||||
last-cmd
|
|
||||||
(reverse init-cmds))))))
|
|
||||||
((= head (quote wait)) (list (quote hs-wait) (nth ast 1)))
|
((= head (quote wait)) (list (quote hs-wait) (nth ast 1)))
|
||||||
((= head (quote wait-for)) (emit-wait-for ast))
|
((= head (quote wait-for)) (emit-wait-for ast))
|
||||||
((= head (quote log))
|
((= head (quote log))
|
||||||
|
|||||||
Reference in New Issue
Block a user