diff options
Diffstat (limited to 'stdlib/source/lux/tool/compiler/phase/extension/statement.lux')
-rw-r--r-- | stdlib/source/lux/tool/compiler/phase/extension/statement.lux | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/stdlib/source/lux/tool/compiler/phase/extension/statement.lux b/stdlib/source/lux/tool/compiler/phase/extension/statement.lux index 18bb58fbd..4f36ef89f 100644 --- a/stdlib/source/lux/tool/compiler/phase/extension/statement.lux +++ b/stdlib/source/lux/tool/compiler/phase/extension/statement.lux @@ -36,12 +36,11 @@ Synthesis (Operation anchor expression statement [Type expression Any]))) (////statement.lift-generation - (///generation.with-buffer - (do ///.monad - [codeT (generate codeS) - count ///generation.next - codeV (///generation.evaluate! (format "evaluate" (%n count)) codeT)] - (wrap [code//type codeT codeV]))))) + (do ///.monad + [codeT (generate codeS) + count ///generation.next + codeV (///generation.evaluate! (format "evaluate" (%n count)) codeT)] + (wrap [code//type codeT codeV])))) (def: (evaluate! type codeC) (All [anchor expression statement] @@ -71,11 +70,11 @@ Synthesis (Operation anchor expression statement [Type expression Text Any]))) (////statement.lift-generation - (///generation.with-buffer - (do ///.monad - [codeT (generate codeS) - codeN+V (///generation.define! name codeT)] - (wrap [code//type codeT codeN+V]))))) + (do ///.monad + [codeT (generate codeS) + [target-name value statement] (///generation.define! name codeT) + _ (///generation.save! name statement)] + (wrap [code//type codeT target-name value])))) (def: (definition name ?type codeC) (All [anchor expression statement] @@ -270,10 +269,9 @@ (-> expression statement) Synthesis (///generation.Operation anchor expression statement Any))) - (///generation.with-buffer - (do ///.monad - [programG (generate programS)] - (///generation.save! ["" ""] (program programG))))) + (do ///.monad + [programG (generate programS)] + (///generation.save! ["" ""] (program programG)))) (def: (def::program program) (All [anchor expression statement] |