diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/tool/interpreter.lux | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/stdlib/source/library/lux/tool/interpreter.lux b/stdlib/source/library/lux/tool/interpreter.lux index 6e28d5c1a..ee02eacc9 100644 --- a/stdlib/source/library/lux/tool/interpreter.lux +++ b/stdlib/source/library/lux/tool/interpreter.lux @@ -75,14 +75,14 @@ (do Monad<!> [state (platform.initialize platform generation_bundle) state (platform.compile platform - (set@ #cli.module syntax.prelude configuration) - (set@ [#extension.state - #directive.analysis #directive.state - #extension.state - #.info #.mode] - #.Interpreter - state)) - [state _] (\ (get@ #platform.file_system platform) + (with@ #cli.module syntax.prelude configuration) + (with@ [#extension.state + #directive.analysis #directive.state + #extension.state + #.info #.mode] + #.Interpreter + state)) + [state _] (\ (value@ #platform.file_system platform) lift (phase.result' state enter_module)) _ (\ Console<!> write ..welcome_message)] (in state))) @@ -102,9 +102,9 @@ (-> Code <Interpretation>)) (do {! phase.monad} [state (extension.lifted phase.get_state) - .let [analyse (get@ [#directive.analysis #directive.phase] state) - synthesize (get@ [#directive.synthesis #directive.phase] state) - generate (get@ [#directive.generation #directive.phase] state)] + .let [analyse (value@ [#directive.analysis #directive.phase] state) + synthesize (value@ [#directive.synthesis #directive.phase] state) + generate (value@ [#directive.generation #directive.phase] state)] [_ codeT codeA] (directive.lifted_analysis (analysis.with_scope (type.with_fresh_env @@ -154,10 +154,10 @@ (do phase.monad [[codeT codeV] (interpret configuration code) state phase.get_state] - (in (/type.represent (get@ [#extension.state - #directive.analysis #directive.state - #extension.state] - state) + (in (/type.represent (value@ [#extension.state + #directive.analysis #directive.state + #extension.state] + state) codeT codeV)))) @@ -171,24 +171,24 @@ (All [anchor expression directive] (-> <Context> (Try [<Context> Text]))) (do try.monad - [.let [[_where _offset _code] (get@ #source context)] - [source' input] (syntax.parse ..module syntax.no_aliases (text.size _code) (get@ #source context)) + [.let [[_where _offset _code] (value@ #source context)] + [source' input] (syntax.parse ..module syntax.no_aliases (text.size _code) (value@ #source context)) [state' representation] (let [... TODO: Simplify ASAP state (:sharing [anchor expression directive] {<Context> context} {(State+ anchor expression directive) - (get@ #state context)})] + (value@ #state context)})] (<| (phase.result' state) ... TODO: Simplify ASAP (:sharing [anchor expression directive] {<Context> context} {(Operation anchor expression directive Text) - (execute (get@ #configuration context) input)})))] + (execute (value@ #configuration context) input)})))] (in [(|> context - (set@ #state state') - (set@ #source source')) + (with@ #state state') + (with@ #source source')) representation])))) (def: .public (run! Monad<!> Console<!> platform configuration generation_bundle) @@ -212,7 +212,7 @@ (if (and (not multi_line?) (text\= ..exit_command line)) (\ Console<!> write ..farewell_message) - (case (read_eval_print (update@ #source (add_line line) context)) + (case (read_eval_print (revised@ #source (add_line line) context)) (#try.Success [context' representation]) (do ! [_ (\ Console<!> write representation)] @@ -222,5 +222,5 @@ (if (ex.match? syntax.end_of_file error) (recur context #1) (exec (log! (ex.error ..error error)) - (recur (set@ #source ..fresh_source context) #0)))))) + (recur (with@ #source ..fresh_source context) #0)))))) ))) |