From 5d44577c3849a045052dc1c9f0dd7deddd032120 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 1 Jun 2022 21:52:34 -0400 Subject: Extensible import syntax: Part 1 --- .../program/aedifex/dependency/deployment.lux | 34 +++++++-------- .../program/aedifex/dependency/resolution.lux | 48 +++++++++++----------- .../source/program/aedifex/dependency/status.lux | 6 +-- 3 files changed, 44 insertions(+), 44 deletions(-) (limited to 'stdlib/source/program/aedifex/dependency') diff --git a/stdlib/source/program/aedifex/dependency/deployment.lux b/stdlib/source/program/aedifex/dependency/deployment.lux index c4adf703b..dd4242192 100644 --- a/stdlib/source/program/aedifex/dependency/deployment.lux +++ b/stdlib/source/program/aedifex/dependency/deployment.lux @@ -2,43 +2,43 @@ [library [lux {"-" all} [abstract - [codec {"+" Codec}] - ["[0]" monad {"+" do}]] + [codec (.only Codec)] + ["[0]" monad (.only do)]] [control - ["[0]" try {"+" Try}] + ["[0]" try (.only Try)] [concurrency - ["[0]" async {"+" Async}]]] + ["[0]" async (.only Async)]]] [data - [binary {"+" Binary}] + [binary (.only Binary)] ["[0]" product] [text - ["%" format {"+" format}] + ["%" format (.only format)] [encoding ["[0]" utf8]]] [collection ["[0]" dictionary] - ["[0]" set {"+" Set}] + ["[0]" set (.only Set)] ["[0]" list ("[1]#[0]" monoid)]]] [time - ["[0]" instant {"+" Instant}]]]] + ["[0]" instant (.only Instant)]]]] ["[0]" /// "_" - [repository {"+" Repository}] - ["[1][0]" hash {"+" Hash}] - ["[1][0]" package {"+" Package}] - ["[1][0]" artifact {"+" Artifact} + [repository (.only Repository)] + ["[1][0]" hash (.only Hash)] + ["[1][0]" package (.only Package)] + ["[1][0]" artifact (.only Artifact) ["[1]/[0]" time] ["[1]/[0]" type] - ["[1]/[0]" extension {"+" Extension}] + ["[1]/[0]" extension (.only Extension)] ["[1]/[0]" versioning] ["[1]/[0]" snapshot ["[1]/[0]" version ["[1]/[0]" value]]]] ["[1][0]" metadata "_" ["[1]/[0]" artifact] - ["[1]/[0]" snapshot {"+" Metadata}]] - ["[1][0]" dependency {"+" Dependency} - [resolution {"+" Resolution}] - ["[1]/[0]" status {"+" Status}]]]) + ["[1]/[0]" snapshot (.only Metadata)]] + ["[1][0]" dependency (.only Dependency) + [resolution (.only Resolution)] + ["[1]/[0]" status (.only Status)]]]) (def: (with_status repository version_template [artifact type] [data status]) (-> (Repository Async) ///artifact.Version Dependency [Binary Status] (Async (Try Any))) diff --git a/stdlib/source/program/aedifex/dependency/resolution.lux b/stdlib/source/program/aedifex/dependency/resolution.lux index 753c7d4a4..0e1e9d291 100644 --- a/stdlib/source/program/aedifex/dependency/resolution.lux +++ b/stdlib/source/program/aedifex/dependency/resolution.lux @@ -3,30 +3,30 @@ [lux {"-" all} ["@" target] ["[0]" debug] - ["[0]" ffi {"+" import:}] + ["[0]" ffi (.only import:)] [abstract - [codec {"+" Codec}] - [equivalence {"+" Equivalence}] - [monad {"+" do}] - ["[0]" predicate {"+" Predicate}]] + [codec (.only Codec)] + [equivalence (.only Equivalence)] + [monad (.only do)] + ["[0]" predicate (.only Predicate)]] [control ["[0]" maybe] - ["[0]" try {"+" Try} ("[1]#[0]" functor)] - ["[0]" exception {"+" Exception exception:}] + ["[0]" try (.only Try) ("[1]#[0]" functor)] + ["[0]" exception (.only Exception exception:)] ["<>" parser - ["<[0]>" xml {"+" Parser}]] + ["<[0]>" xml (.only Parser)]] [concurrency - ["[0]" async {"+" Async}]]] + ["[0]" async (.only Async)]]] [data - ["[0]" binary {"+" Binary}] + ["[0]" binary (.only Binary)] ["[0]" text - ["%" format {"+" format}] + ["%" format (.only format)] [encoding ["[0]" utf8]]] [format - ["[0]" xml {"+" Tag XML}]] + ["[0]" xml (.only Tag XML)]] [collection - ["[0]" dictionary {"+" Dictionary}] + ["[0]" dictionary (.only Dictionary)] ["[0]" set] ["[0]" list ("[1]#[0]" functor monoid)]]] [math @@ -34,27 +34,27 @@ ["n" nat] ["[0]" i64]]] [world - [console {"+" Console}] - [net {"+" URL} + [console (.only Console)] + [net (.only URL) ["[0]" uri] ["[0]" http "_" ["[1]" client]]]]]] - ["[0]" // {"+" Dependency} - ["[1][0]" status {"+" Status}] + ["[0]" // (.only Dependency) + ["[1][0]" status (.only Status)] ["/[1]" // "_" ["/" profile] - ["[1][0]" hash {"+" Hash SHA-1 MD5}] + ["[1][0]" hash (.only Hash SHA-1 MD5)] ["[1][0]" pom] - ["[1][0]" package {"+" Package}] - ["[1][0]" artifact {"+" Version Artifact} - ["[1]/[0]" extension {"+" Extension}] + ["[1][0]" package (.only Package)] + ["[1][0]" artifact (.only Version Artifact) + ["[1]/[0]" extension (.only Extension)] ["[1]/[0]" versioning] ["[0]" snapshot [version ["[0]" value]]]] - ["[1][0]" repository {"+" Repository} - ["[1]/[0]" remote {"+" Address}] - ["[1]/[0]" origin {"+" Origin}]] + ["[1][0]" repository (.only Repository) + ["[1]/[0]" remote (.only Address)] + ["[1]/[0]" origin (.only Origin)]] ["[1][0]" metadata ["[1]/[0]" snapshot]]]]) diff --git a/stdlib/source/program/aedifex/dependency/status.lux b/stdlib/source/program/aedifex/dependency/status.lux index 7c66d0688..2d2bb0f3c 100644 --- a/stdlib/source/program/aedifex/dependency/status.lux +++ b/stdlib/source/program/aedifex/dependency/status.lux @@ -2,13 +2,13 @@ [library [lux "*" [abstract - [equivalence {"+" Equivalence}]] + [equivalence (.only Equivalence)]] [data - [binary {"+" Binary}] + [binary (.only Binary)] ["[0]" sum] ["[0]" product]]]] ["[0]" /// "_" - ["[1][0]" hash {"+" Hash SHA-1 MD5}]]) + ["[1][0]" hash (.only Hash SHA-1 MD5)]]) (type: .public Status (Variant -- cgit v1.2.3