aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/compositor.lux
diff options
context:
space:
mode:
authorEduardo Julian2019-03-17 22:19:06 -0400
committerEduardo Julian2019-03-17 22:19:06 -0400
commit54b69afa96cd00b174b07c3f23b496b5e5b63858 (patch)
tree79b89aeb923b6212de76379beb6c823d39d4af3a /stdlib/source/program/compositor.lux
parenta6f04f38c0170e93e8f1ab2cfcde3cbf59f88b0b (diff)
Now compiling program statements.
Diffstat (limited to 'stdlib/source/program/compositor.lux')
-rw-r--r--stdlib/source/program/compositor.lux32
1 files changed, 16 insertions, 16 deletions
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...