From 74e8954ee269aa5dea39f1e4e3c55e8d387384a8 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 21 Oct 2022 14:37:09 -0400 Subject: Clean-up after format change for extensions [part 2] --- stdlib/source/experiment/tool/interpreter.lux | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'stdlib/source/experiment') diff --git a/stdlib/source/experiment/tool/interpreter.lux b/stdlib/source/experiment/tool/interpreter.lux index 55064903b..53fe60a88 100644 --- a/stdlib/source/experiment/tool/interpreter.lux +++ b/stdlib/source/experiment/tool/interpreter.lux @@ -16,9 +16,8 @@ ["[0]" module] ["[0]" type]] ["[0]" generation] - ["[0]" declaration (.only State+ Operation) - ["[0]" total]] - ["[0]" extension]] + ["[0]" declaration (.only State Operation) + ["[0]" total]]] ["[0]" default ["[0]" syntax] ["[0]" platform (.only Platform)] @@ -72,14 +71,12 @@ (Console !) (Platform ! anchor expression declaration) Configuration (generation.Bundle anchor expression declaration) - (! (State+ anchor expression declaration)))) + (! (State anchor expression declaration)))) (do Monad [state (platform.initialize platform generation_bundle) state (platform.compile platform (has cli.#module syntax.prelude configuration) - (has [extension.#state - declaration.#analysis declaration.#state - extension.#state + (has [declaration.#analysis declaration.#state .#info .#mode] {.#Interpreter} state)) @@ -102,7 +99,7 @@ (All (_ anchor expression declaration) (-> Code )) (do [! phase.monad] - [state (extension.lifted phase.state) + [state phase.state .let [analyse (the [declaration.#analysis declaration.#phase] state) synthesize (the [declaration.#synthesis declaration.#phase] state) generate (the [declaration.#generation declaration.#phase] state)] @@ -131,7 +128,7 @@ (function (_ state) (when (<| (phase.result' state) (sharing [anchor expression declaration] - (is (State+ anchor expression declaration) + (is (State anchor expression declaration) state) (is (interpret_declaration code)))) @@ -142,7 +139,7 @@ (if (ex.match? total.not_a_declaration error) (<| (phase.result' state) (sharing [anchor expression declaration] - (is (State+ anchor expression declaration) + (is (State anchor expression declaration) state) (is (interpret_expression code)))) @@ -155,17 +152,14 @@ (do phase.monad [[codeT codeV] (interpret configuration code) state phase.state] - (in (/type.represent (the [extension.#state - declaration.#analysis declaration.#state - extension.#state] - state) + (in (/type.represent (the [declaration.#analysis declaration.#state] state) codeT codeV)))) (type (Context anchor expression declaration) (Record [#configuration Configuration - #state (State+ anchor expression declaration) + #state (State anchor expression declaration) #source Source])) (with_expansions [ (these (Context anchor expression declaration))] @@ -179,7 +173,7 @@ state (sharing [anchor expression declaration] (is context) - (is (State+ anchor expression declaration) + (is (State anchor expression declaration) (the #state context)))] (<| (phase.result' state) ... TODO: Simplify ASAP -- cgit v1.2.3