diff options
author | Eduardo Julian | 2021-08-07 02:20:09 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-08-07 02:20:09 -0400 |
commit | 17e7566be51df5e428a6b10e6469201a8a9468da (patch) | |
tree | 0d4ed80c9c9d846784b5bf460f6e6f5fc5b96663 /stdlib/source/library/lux/tool/compiler/meta/packager | |
parent | eff4c59794868b89d60fdc411f9b544a270b817e (diff) |
Made the be/de macros for (co)monadic expression extensible.
Diffstat (limited to 'stdlib/source/library/lux/tool/compiler/meta/packager')
3 files changed, 10 insertions, 10 deletions
diff --git a/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux b/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux index 3ebdae788..c138ef6ce 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux @@ -158,7 +158,7 @@ (function (_ [artifact custom content] sink) (..write_class static module artifact custom content sink)) sink - (row.to_list output))) + (row.list output))) (def: (read_jar_entry_with_unknown_size input) (-> java/util/jar/JarInputStream [Nat Binary]) @@ -247,7 +247,7 @@ (function (_ host_dependencies archive program) (do {! try.monad} [order (dependency.load_order $.key archive) - #let [buffer (java/io/ByteArrayOutputStream::new (.int ..mebi_byte))] + .let [buffer (java/io/ByteArrayOutputStream::new (.int ..mebi_byte))] sink (|> order (list\map (function (_ [module [module_id [descriptor document output]]]) [module_id output])) @@ -259,7 +259,7 @@ [(set.empty text.hash) (set.empty text.hash) sink])) - #let [_ (do_to sink + .let [_ (do_to sink (java/io/Flushable::flush) (java/io/Closeable::close))]] (in (java/io/ByteArrayOutputStream::toByteArray buffer))))) diff --git a/stdlib/source/library/lux/tool/compiler/meta/packager/scheme.lux b/stdlib/source/library/lux/tool/compiler/meta/packager/scheme.lux index 6af912b14..081a43829 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/packager/scheme.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/packager/scheme.lux @@ -3,7 +3,7 @@ [lux (#- Module) [type (#+ :sharing)] [abstract - ["." monad (#+ Monad do)]] + ["." monad (#+ do)]] [control ["." try (#+ Try)]] [data @@ -56,7 +56,7 @@ (def: bundle_module (-> Output (Try _.Expression)) - (|>> row.to_list + (|>> row.list (list\map product.right) (monad.fold try.monad (function (_ content so_far) @@ -105,7 +105,7 @@ entry_content (: (Try tar.Content) (|> descriptor (get@ #descriptor.references) - set.to_list + set.list (list.all (function (_ module) (dictionary.get module mapping))) (list\map (|>> ..module_file _.string _.load_relative/1)) (list\fold ..then bundle) @@ -121,7 +121,7 @@ (function (package host_dependencies archive program) (do {! try.monad} [order (dependency.load_order $.key archive) - #let [mapping (|> order + .let [mapping (|> order (list\map (function (_ [module [module_id [descriptor document output]]]) [module module_id])) (dictionary.of_list text.hash) diff --git a/stdlib/source/library/lux/tool/compiler/meta/packager/script.lux b/stdlib/source/library/lux/tool/compiler/meta/packager/script.lux index 080765231..0f3f33a29 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/packager/script.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/packager/script.lux @@ -38,7 +38,7 @@ (-> (-> directive directive directive) [archive.ID Output] directive (Try directive))) (|> output - row.to_list + row.list (list\map (|>> product.right product.right)) (monad.fold try.monad (function (_ content so_far) @@ -54,7 +54,7 @@ (sequence so_far))))) so_far))) -(def: #export (package header to_code sequence scope) +(def: #export (package header code sequence scope) (All [directive] (-> directive (-> directive Text) @@ -68,4 +68,4 @@ (list\map (function (_ [module [module_id [descriptor document output]]]) [module_id output])) (monad.fold ! (..write_module sequence) header) - (\ ! map (|>> scope to_code (\ utf8.codec encode))))))) + (\ ! map (|>> scope code (\ utf8.codec encode))))))) |