From 54b69afa96cd00b174b07c3f23b496b5e5b63858 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 17 Mar 2019 22:19:06 -0400 Subject: Now compiling program statements. --- stdlib/source/program/compositor.lux | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'stdlib/source/program/compositor.lux') diff --git a/stdlib/source/program/compositor.lux b/stdlib/source/program/compositor.lux index 3c4d2015c..b2ab8208e 100644 --- a/stdlib/source/program/compositor.lux +++ b/stdlib/source/program/compositor.lux @@ -44,11 +44,12 @@ (#error.Success output) (wrap output)))) -(def: #export (compiler expander platform bundle service) +(def: #export (compiler expander platform bundle program service) (All [anchor expression statement] (-> Expander (IO (Platform IO anchor expression statement)) (generation.Bundle anchor expression statement) + (-> expression statement) Service (IO Any))) (do io.monad @@ -57,21 +58,20 @@ (case service (#cli.Compilation configuration) (<| (or-crash! "Compilation failed:") - (function (_ _) - (do (error.with io.monad) - [state (:share [anchor expression statement] - {(Platform IO anchor expression statement) - platform} - {(IO (Error (statement.State+ anchor expression statement))) - (platform.initialize expander platform bundle)}) - _ (:share [anchor expression statement] - {(Platform IO anchor expression statement) - platform} - {(IO (Error [Archive (statement.State+ anchor expression statement)])) - (platform.compile expander platform configuration archive.empty state)}) - ## _ (cache/io.clean target ...) - ] - (wrap (log! "Compilation complete!"))))) + (do (error.with io.monad) + [state (:share [anchor expression statement] + {(Platform IO anchor expression statement) + platform} + {(IO (Error (statement.State+ anchor expression statement))) + (platform.initialize expander platform bundle program)}) + _ (:share [anchor expression statement] + {(Platform IO anchor expression statement) + platform} + {(IO (Error [Archive (statement.State+ anchor expression statement)])) + (platform.compile expander platform configuration archive.empty state)}) + ## _ (cache/io.clean target ...) + ] + (wrap (log! "Compilation complete!")))) (#cli.Interpretation configuration) ## TODO: Fix the interpreter... -- cgit v1.2.3