diff options
Diffstat (limited to 'stdlib/source/library/lux/tool/compiler/meta/packager/ruby.lux')
-rw-r--r-- | stdlib/source/library/lux/tool/compiler/meta/packager/ruby.lux | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/stdlib/source/library/lux/tool/compiler/meta/packager/ruby.lux b/stdlib/source/library/lux/tool/compiler/meta/packager/ruby.lux index 294e31ecc..3d7854861 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/packager/ruby.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/packager/ruby.lux @@ -1,6 +1,6 @@ (.using [library - [lux {"-" Module} + [lux "*" [type {"+" :sharing}] [abstract ["[0]" monad {"+" do}]] @@ -32,8 +32,9 @@ [// ["[0]" archive {"+" Output} [registry {"+" Registry}] - ["[0]" descriptor {"+" Module Descriptor}] ["[0]" artifact] + ["[0]" module] + ["[0]" descriptor] ["[0]" document {"+" Document}]] ["[0]" cache "_" ["[1]/[0]" module {"+" Order}] @@ -46,7 +47,7 @@ [generation {"+" Context}]]]]]]) (def: (bundle_module module module_id necessary_dependencies output) - (-> Module archive.ID (Set Context) Output (Try (Maybe _.Statement))) + (-> descriptor.Module module.ID (Set Context) Output (Try (Maybe _.Statement))) (do [! try.monad] [] (case (|> output @@ -76,14 +77,14 @@ (in {.#Some bundle}))))) (def: module_file - (-> archive.ID file.Path) + (-> module.ID file.Path) (|>> %.nat (text.suffix ".rb"))) (def: (write_module mapping necessary_dependencies [module [module_id entry]] sink) - (-> (Dictionary Module archive.ID) (Set Context) - [Module [archive.ID [Descriptor (Document .Module) Output Registry]]] - (List [archive.ID [Text Binary]]) - (Try (List [archive.ID [Text Binary]]))) + (-> (Dictionary descriptor.Module module.ID) (Set Context) + [descriptor.Module [module.ID (archive.Entry .Module)]] + (List [module.ID [Text Binary]]) + (Try (List [module.ID [Text Binary]]))) (do [! try.monad] [bundle (: (Try (Maybe _.Statement)) (..bundle_module module module_id necessary_dependencies (value@ archive.#output entry)))] @@ -104,13 +105,13 @@ "main.rb") (def: module_id_mapping - (-> (Order .Module) (Dictionary Module archive.ID)) + (-> (Order .Module) (Dictionary descriptor.Module module.ID)) (|>> (list#each (function (_ [module [module_id entry]]) [module module_id])) (dictionary.of_list text.hash))) (def: included_modules - (All (_ a) (-> (List [archive.ID a]) (Set archive.ID))) + (All (_ a) (-> (List [module.ID a]) (Set module.ID))) (|>> (list#each product.left) (list#mix set.has (set.empty nat.hash)))) |