diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/tool/compiler/meta/archive.lux | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive.lux b/stdlib/source/library/lux/tool/compiler/meta/archive.lux index fbcb3c0f9..b1397ef8c 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/archive.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/archive.lux @@ -27,7 +27,7 @@ [number ["n" nat ("[1]#[0]" equivalence)]]] [type - abstract]]] + [abstract {"-" pattern}]]]] [/ ["[0]" artifact] ["[0]" registry {"+" Registry}] @@ -79,16 +79,16 @@ (def: next (-> Archive module.ID) - (|>> :representation (the #next))) + (|>> representation (the #next))) (def: .public empty Archive - (:abstraction [#next 0 - #resolver (dictionary.empty text.hash)])) + (abstraction [#next 0 + #resolver (dictionary.empty text.hash)])) (def: .public (id module archive) (-> descriptor.Module Archive (Try module.ID)) - (let [(open "/[0]") (:representation archive)] + (let [(open "/[0]") (representation archive)] (case (dictionary.value module /#resolver) {.#Some [id _]} {try.#Success id} @@ -99,7 +99,7 @@ (def: .public (reserve module archive) (-> descriptor.Module Archive (Try [module.ID Archive])) - (let [(open "/[0]") (:representation archive)] + (let [(open "/[0]") (representation archive)] (case (dictionary.value module /#resolver) {.#Some _} (exception.except ..module_has_already_been_reserved [module]) @@ -107,20 +107,20 @@ {.#None} {try.#Success [/#next (|> archive - :representation - (revised #resolver (dictionary.has module [/#next (: (Maybe (Entry Any)) {.#None})])) + representation + (revised #resolver (dictionary.has module [/#next (is (Maybe (Entry Any)) {.#None})])) (revised #next ++) - :abstraction)]}))) + abstraction)]}))) (def: .public (has module entry archive) (-> descriptor.Module (Entry Any) Archive (Try Archive)) - (let [(open "/[0]") (:representation archive)] + (let [(open "/[0]") (representation archive)] (case (dictionary.value module /#resolver) {.#Some [id {.#None}]} {try.#Success (|> archive - :representation + representation (revised ..#resolver (dictionary.has module [id {.#Some entry}])) - :abstraction)} + abstraction)} {.#Some [id {.#Some [existing_module existing_output existing_registry]}]} (if (same? (the module.#document existing_module) @@ -134,7 +134,7 @@ (def: .public entries (-> Archive (List [descriptor.Module [module.ID (Entry Any)]])) - (|>> :representation + (|>> representation (the #resolver) dictionary.entries (list.all (function (_ [module [module_id entry]]) @@ -142,7 +142,7 @@ (def: .public (find module archive) (-> descriptor.Module Archive (Try (Entry Any))) - (let [(open "/[0]") (:representation archive)] + (let [(open "/[0]") (representation archive)] (case (dictionary.value module /#resolver) {.#Some [id {.#Some entry}]} {try.#Success entry} @@ -164,7 +164,7 @@ (def: .public archived (-> Archive (List descriptor.Module)) - (|>> :representation + (|>> representation (the #resolver) dictionary.entries (list.all (function (_ [module [id descriptor+document]]) @@ -174,7 +174,7 @@ (def: .public (reserved? archive module) (-> Archive descriptor.Module Bit) - (let [(open "/[0]") (:representation archive)] + (let [(open "/[0]") (representation archive)] (case (dictionary.value module /#resolver) {.#Some [id _]} true @@ -184,13 +184,13 @@ (def: .public reserved (-> Archive (List descriptor.Module)) - (|>> :representation + (|>> representation (the #resolver) dictionary.keys)) (def: .public reservations (-> Archive (List [descriptor.Module module.ID])) - (|>> :representation + (|>> representation (the #resolver) dictionary.entries (list#each (function (_ [module [id _]]) @@ -198,9 +198,9 @@ (def: .public (merged additions archive) (-> Archive Archive Archive) - (let [[+next +resolver] (:representation additions)] + (let [[+next +resolver] (representation additions)] (|> archive - :representation + representation (revised #next (n.max +next)) (revised #resolver (function (_ resolver) (list#mix (function (_ [module [id entry]] resolver) @@ -212,7 +212,7 @@ resolver)) resolver (dictionary.entries +resolver)))) - :abstraction))) + abstraction))) (type: Reservation [descriptor.Module module.ID]) @@ -236,7 +236,7 @@ (def: .public (export version archive) (-> Version Archive Binary) - (let [(open "/[0]") (:representation archive)] + (let [(open "/[0]") (representation archive)] (|> /#resolver dictionary.entries (list.all (function (_ [module [id descriptor+document]]) @@ -258,10 +258,10 @@ [[actual next reservations] (<binary>.result ..reader binary) _ (exception.assertion ..version_mismatch [expected actual] (n#= expected actual))] - (in (:abstraction + (in (abstraction [#next next #resolver (list#mix (function (_ [module id] archive) - (dictionary.has module [id (: (Maybe (Entry Any)) {.#None})] archive)) - (the #resolver (:representation ..empty)) + (dictionary.has module [id (is (Maybe (Entry Any)) {.#None})] archive)) + (the #resolver (representation ..empty)) reservations)])))) ) |