From ab99de20a3d0566a71bf0ef607d9d6e291d7f62a Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 8 Apr 2022 21:59:08 -0400 Subject: Removed (mostly useless) pattern-matching macro for abstract types. --- .../library/lux/control/concurrency/async.lux | 2 +- .../library/lux/control/concurrency/atom.lux | 2 +- .../source/library/lux/control/concurrency/frp.lux | 2 +- .../library/lux/control/concurrency/semaphore.lux | 7 +- .../source/library/lux/control/concurrency/stm.lux | 2 +- stdlib/source/library/lux/control/io.lux | 2 +- stdlib/source/library/lux/control/lazy.lux | 2 +- .../library/lux/control/security/capability.lux | 2 +- .../source/library/lux/control/security/policy.lux | 2 +- stdlib/source/library/lux/control/thread.lux | 2 +- .../library/lux/data/collection/set/multi.lux | 41 ++--- .../library/lux/data/collection/set/ordered.lux | 2 +- .../source/library/lux/data/collection/stack.lux | 2 +- stdlib/source/library/lux/data/color.lux | 2 +- .../source/library/lux/data/format/css/class.lux | 2 +- stdlib/source/library/lux/data/format/css/id.lux | 2 +- .../library/lux/data/format/css/property.lux | 2 +- .../source/library/lux/data/format/css/query.lux | 2 +- .../library/lux/data/format/css/selector.lux | 2 +- .../source/library/lux/data/format/css/style.lux | 2 +- .../source/library/lux/data/format/css/value.lux | 2 +- stdlib/source/library/lux/data/format/html.lux | 2 +- stdlib/source/library/lux/data/format/markdown.lux | 2 +- stdlib/source/library/lux/data/format/tar.lux | 2 +- stdlib/source/library/lux/data/text/buffer.lux | 2 +- stdlib/source/library/lux/data/text/encoding.lux | 2 +- .../source/library/lux/data/text/unicode/block.lux | 2 +- .../source/library/lux/data/text/unicode/set.lux | 2 +- stdlib/source/library/lux/ffi.lux | 2 +- stdlib/source/library/lux/locale.lux | 2 +- stdlib/source/library/lux/locale/language.lux | 2 +- stdlib/source/library/lux/locale/territory.lux | 2 +- stdlib/source/library/lux/math/modular.lux | 2 +- stdlib/source/library/lux/math/modulus.lux | 2 +- stdlib/source/library/lux/target/common_lisp.lux | 2 +- stdlib/source/library/lux/target/js.lux | 2 +- .../library/lux/target/jvm/bytecode/address.lux | 2 +- .../jvm/bytecode/environment/limit/registry.lux | 2 +- .../jvm/bytecode/environment/limit/stack.lux | 2 +- .../lux/target/jvm/bytecode/instruction.lux | 2 +- stdlib/source/library/lux/target/jvm/constant.lux | 2 +- .../source/library/lux/target/jvm/constant/tag.lux | 2 +- .../library/lux/target/jvm/encoding/name.lux | 2 +- .../library/lux/target/jvm/encoding/signed.lux | 2 +- .../library/lux/target/jvm/encoding/unsigned.lux | 2 +- stdlib/source/library/lux/target/jvm/index.lux | 2 +- stdlib/source/library/lux/target/jvm/modifier.lux | 2 +- stdlib/source/library/lux/target/jvm/type.lux | 2 +- .../library/lux/target/jvm/type/category.lux | 2 +- .../library/lux/target/jvm/type/descriptor.lux | 2 +- stdlib/source/library/lux/target/jvm/type/lux.lux | 2 +- .../library/lux/target/jvm/type/reflection.lux | 2 +- .../library/lux/target/jvm/type/signature.lux | 2 +- stdlib/source/library/lux/target/lua.lux | 2 +- stdlib/source/library/lux/target/php.lux | 2 +- stdlib/source/library/lux/target/python.lux | 2 +- stdlib/source/library/lux/target/r.lux | 2 +- stdlib/source/library/lux/target/ruby.lux | 2 +- stdlib/source/library/lux/target/scheme.lux | 2 +- stdlib/source/library/lux/time.lux | 2 +- stdlib/source/library/lux/time/date.lux | 2 +- stdlib/source/library/lux/time/duration.lux | 2 +- stdlib/source/library/lux/time/instant.lux | 2 +- stdlib/source/library/lux/time/year.lux | 2 +- .../library/lux/tool/compiler/meta/archive.lux | 2 +- .../library/lux/tool/compiler/meta/archive/key.lux | 2 +- .../tool/compiler/meta/archive/module/document.lux | 2 +- .../lux/tool/compiler/meta/archive/registry.lux | 2 +- stdlib/source/library/lux/type/abstract.lux | 20 +-- stdlib/source/library/lux/type/quotient.lux | 2 +- stdlib/source/library/lux/type/refinement.lux | 2 +- stdlib/source/library/lux/type/resource.lux | 2 +- stdlib/source/library/lux/type/unit.lux | 2 +- stdlib/source/library/lux/world/db/sql.lux | 2 +- stdlib/source/library/lux/world/net/http/mime.lux | 2 +- .../source/program/aedifex/artifact/time/date.lux | 2 +- stdlib/source/program/aedifex/hash.lux | 2 +- .../source/test/aedifex/dependency/resolution.lux | 190 ++++++++++----------- stdlib/source/test/lux/type/abstract.lux | 9 - 79 files changed, 196 insertions(+), 219 deletions(-) (limited to 'stdlib') diff --git a/stdlib/source/library/lux/control/concurrency/async.lux b/stdlib/source/library/lux/control/concurrency/async.lux index 82184402f..f72f51abb 100644 --- a/stdlib/source/library/lux/control/concurrency/async.lux +++ b/stdlib/source/library/lux/control/concurrency/async.lux @@ -15,7 +15,7 @@ [macro ["^" pattern]] [type {"+" sharing} - [abstract {"-" pattern}] + [abstract "*"] ["[0]" variance {"+" Mutable}]]]] [// ["[0]" thread] diff --git a/stdlib/source/library/lux/control/concurrency/atom.lux b/stdlib/source/library/lux/control/concurrency/atom.lux index 39207767c..8bef7b29b 100644 --- a/stdlib/source/library/lux/control/concurrency/atom.lux +++ b/stdlib/source/library/lux/control/concurrency/atom.lux @@ -14,7 +14,7 @@ ["[0]" array "_" ["[1]" \\unsafe]]]] [type - [abstract {"-" pattern}] + [abstract "*"] ["[0]" variance {"+" Mutable}]]]]) (with_expansions [ (these (ffi.import: (java/util/concurrent/atomic/AtomicReference a) diff --git a/stdlib/source/library/lux/control/concurrency/frp.lux b/stdlib/source/library/lux/control/concurrency/frp.lux index ee7054786..df890ccc1 100644 --- a/stdlib/source/library/lux/control/concurrency/frp.lux +++ b/stdlib/source/library/lux/control/concurrency/frp.lux @@ -12,7 +12,7 @@ ["[0]" exception {"+" exception:}] ["[0]" io {"+" IO io}]] [type {"+" sharing} - [abstract {"-" pattern}] + [abstract "*"] ["[0]" variance {"+" Mutable}]]]] [// ["[0]" atom {"+" Atom}] diff --git a/stdlib/source/library/lux/control/concurrency/semaphore.lux b/stdlib/source/library/lux/control/concurrency/semaphore.lux index 05ce1aef6..e534fc2de 100644 --- a/stdlib/source/library/lux/control/concurrency/semaphore.lux +++ b/stdlib/source/library/lux/control/concurrency/semaphore.lux @@ -18,7 +18,7 @@ ["n" nat] ["i" int]]] [type - ["[0]" abstract {"-" pattern}] + ["[0]" abstract "*"] ["[0]" refinement]]]] [// ["[0]" atom {"+" Atom}] @@ -148,10 +148,11 @@ (# async.monad in [])))) (template [ ] - [(def: ( (abstract.pattern barrier)) + [(def: ( barrier) (-> Barrier (Async Any)) (do async.monad - [.let [limit (refinement.value (the #limit barrier)) + [.let [barrier (representation barrier) + limit (refinement.value (the #limit barrier)) goal [_ count] (io.run! (atom.update! (the #count barrier))) reached? (n.= goal count)]] diff --git a/stdlib/source/library/lux/control/concurrency/stm.lux b/stdlib/source/library/lux/control/concurrency/stm.lux index 0e4c75e6e..94365f4f4 100644 --- a/stdlib/source/library/lux/control/concurrency/stm.lux +++ b/stdlib/source/library/lux/control/concurrency/stm.lux @@ -16,7 +16,7 @@ [macro ["^" pattern]] [type {"+" sharing} - [abstract {"-" pattern}] + [abstract "*"] ["[0]" variance {"+" Mutable}]]]] [// ["[0]" atom {"+" Atom atom}] diff --git a/stdlib/source/library/lux/control/io.lux b/stdlib/source/library/lux/control/io.lux index 9ea2818d3..96a1288f4 100644 --- a/stdlib/source/library/lux/control/io.lux +++ b/stdlib/source/library/lux/control/io.lux @@ -9,7 +9,7 @@ [parser ["<[0]>" code]]] [type - [abstract {"-" pattern}]] + [abstract "*"]] [macro {"+" with_symbols} [syntax {"+" syntax:}] ["[0]" template]]]]) diff --git a/stdlib/source/library/lux/control/lazy.lux b/stdlib/source/library/lux/control/lazy.lux index 4d13538c0..25c821be5 100644 --- a/stdlib/source/library/lux/control/lazy.lux +++ b/stdlib/source/library/lux/control/lazy.lux @@ -15,7 +15,7 @@ [macro {"+" with_symbols} [syntax {"+" syntax:}]] [type {"+" sharing} - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (abstract: .public (Lazy a) (-> [] a) diff --git a/stdlib/source/library/lux/control/security/capability.lux b/stdlib/source/library/lux/control/security/capability.lux index 4878554bf..9affbf537 100644 --- a/stdlib/source/library/lux/control/security/capability.lux +++ b/stdlib/source/library/lux/control/security/capability.lux @@ -15,7 +15,7 @@ [collection ["[0]" list ("[1]#[0]" functor)]]] [type - [abstract {"-" pattern}]] + [abstract "*"]] ["[0]" meta] ["[0]" macro ["[0]" code] diff --git a/stdlib/source/library/lux/control/security/policy.lux b/stdlib/source/library/lux/control/security/policy.lux index 3e6bb2e0c..de357b6e2 100644 --- a/stdlib/source/library/lux/control/security/policy.lux +++ b/stdlib/source/library/lux/control/security/policy.lux @@ -6,7 +6,7 @@ [apply {"+" Apply}] [monad {"+" Monad}]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (abstract: .public (Policy brand value label) value diff --git a/stdlib/source/library/lux/control/thread.lux b/stdlib/source/library/lux/control/thread.lux index 2192c1824..94de4803a 100644 --- a/stdlib/source/library/lux/control/thread.lux +++ b/stdlib/source/library/lux/control/thread.lux @@ -13,7 +13,7 @@ ["[0]" array "_" ["[1]" \\unsafe {"+" Array}]]]] [type - [abstract {"-" pattern}] + [abstract "*"] ["[0]" variance {"+" Mutable}]]]]) (type: .public (Thread ! a) diff --git a/stdlib/source/library/lux/data/collection/set/multi.lux b/stdlib/source/library/lux/data/collection/set/multi.lux index bdb423f0e..7654c4239 100644 --- a/stdlib/source/library/lux/data/collection/set/multi.lux +++ b/stdlib/source/library/lux/data/collection/set/multi.lux @@ -75,15 +75,16 @@ [sum n.+] ) - (def: .public (intersection parameter (abstract.pattern subject)) + (def: .public (intersection parameter subject) (All (_ a) (-> (Set a) (Set a) (Set a))) - (list#mix (function (_ [elem multiplicity] output) - (..has (n.min (..multiplicity parameter elem) - multiplicity) - elem - output)) - (..empty (dictionary.key_hash subject)) - (dictionary.entries subject))) + (let [subject (representation subject)] + (list#mix (function (_ [elem multiplicity] output) + (..has (n.min (..multiplicity parameter elem) + multiplicity) + elem + output)) + (..empty (dictionary.key_hash subject)) + (dictionary.entries subject)))) (def: .public (difference parameter subject) (All (_ a) (-> (Set a) (Set a) (Set a))) @@ -114,23 +115,25 @@ (implementation: .public equivalence (All (_ a) (Equivalence (Set a))) - (def: (= (abstract.pattern reference) sample) - (and (n.= (dictionary.size reference) - (dictionary.size (representation sample))) - (|> reference - dictionary.entries - (list.every? (function (_ [elem multiplicity]) - (|> elem - (..multiplicity sample) - (n.= multiplicity)))))))) + (def: (= reference sample) + (let [reference (representation reference)] + (and (n.= (dictionary.size reference) + (dictionary.size (representation sample))) + (|> reference + dictionary.entries + (list.every? (function (_ [elem multiplicity]) + (|> elem + (..multiplicity sample) + (n.= multiplicity))))))))) (implementation: .public hash (All (_ a) (Hash (Set a))) (def: equivalence ..equivalence) - (def: (hash (abstract.pattern set)) - (let [[hash _] set] + (def: (hash set) + (let [set (representation set) + [hash _] set] (list#mix (function (_ [elem multiplicity] acc) (|> elem (# hash hash) (n.* multiplicity) (n.+ acc))) 0 diff --git a/stdlib/source/library/lux/data/collection/set/ordered.lux b/stdlib/source/library/lux/data/collection/set/ordered.lux index edb7c6539..f79a1b640 100644 --- a/stdlib/source/library/lux/data/collection/set/ordered.lux +++ b/stdlib/source/library/lux/data/collection/set/ordered.lux @@ -10,7 +10,7 @@ [dictionary ["/" ordered]]]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (abstract: .public (Set a) (/.Dictionary a a) diff --git a/stdlib/source/library/lux/data/collection/stack.lux b/stdlib/source/library/lux/data/collection/stack.lux index fa7a5c589..26dea90cc 100644 --- a/stdlib/source/library/lux/data/collection/stack.lux +++ b/stdlib/source/library/lux/data/collection/stack.lux @@ -8,7 +8,7 @@ [collection ["//" list]]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (abstract: .public (Stack a) (List a) diff --git a/stdlib/source/library/lux/data/color.lux b/stdlib/source/library/lux/data/color.lux index 7a907d83e..a6ce4338d 100644 --- a/stdlib/source/library/lux/data/color.lux +++ b/stdlib/source/library/lux/data/color.lux @@ -16,7 +16,7 @@ ["[0]" rev ("[1]#[0]" interval)] ["[0]" i64]]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (def: rgb_limit 256) (def: top (-- rgb_limit)) diff --git a/stdlib/source/library/lux/data/format/css/class.lux b/stdlib/source/library/lux/data/format/css/class.lux index 61e71e094..59aa80efb 100644 --- a/stdlib/source/library/lux/data/format/css/class.lux +++ b/stdlib/source/library/lux/data/format/css/class.lux @@ -11,7 +11,7 @@ [syntax {"+" syntax:}] ["[0]" code]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (abstract: .public Class Text diff --git a/stdlib/source/library/lux/data/format/css/id.lux b/stdlib/source/library/lux/data/format/css/id.lux index c2f821ccb..ea1d66aa5 100644 --- a/stdlib/source/library/lux/data/format/css/id.lux +++ b/stdlib/source/library/lux/data/format/css/id.lux @@ -11,7 +11,7 @@ [syntax {"+" syntax:}] ["[0]" code]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (abstract: .public ID Text diff --git a/stdlib/source/library/lux/data/format/css/property.lux b/stdlib/source/library/lux/data/format/css/property.lux index 944701b7a..5035ee8de 100644 --- a/stdlib/source/library/lux/data/format/css/property.lux +++ b/stdlib/source/library/lux/data/format/css/property.lux @@ -7,7 +7,7 @@ [data ["[0]" text]] [type - [abstract {"-" pattern}]] + [abstract "*"]] [macro ["[0]" template] ["[0]" code] diff --git a/stdlib/source/library/lux/data/format/css/query.lux b/stdlib/source/library/lux/data/format/css/query.lux index afcd0740b..18ab53a99 100644 --- a/stdlib/source/library/lux/data/format/css/query.lux +++ b/stdlib/source/library/lux/data/format/css/query.lux @@ -12,7 +12,7 @@ ["[0]" code] [syntax {"+" syntax:}]] [type - [abstract {"-" pattern}]]]] + [abstract "*"]]]] ["[0]" // "_" ["[1][0]" value {"+" Value Length Count Resolution Ratio Orientation Scan Boolean Update diff --git a/stdlib/source/library/lux/data/format/css/selector.lux b/stdlib/source/library/lux/data/format/css/selector.lux index fc53d8731..405af9952 100644 --- a/stdlib/source/library/lux/data/format/css/selector.lux +++ b/stdlib/source/library/lux/data/format/css/selector.lux @@ -9,7 +9,7 @@ [number ["i" int]]] [type - [abstract {"-" pattern}]] + [abstract "*"]] [macro ["[0]" template]]]] ["[0]" // "_" diff --git a/stdlib/source/library/lux/data/format/css/style.lux b/stdlib/source/library/lux/data/format/css/style.lux index 42c7d07cb..6404b2216 100644 --- a/stdlib/source/library/lux/data/format/css/style.lux +++ b/stdlib/source/library/lux/data/format/css/style.lux @@ -7,7 +7,7 @@ [collection ["[0]" list ("[1]#[0]" mix)]]] [type - [abstract {"-" pattern}]]]] + [abstract "*"]]]] ["[0]" // "_" ["[1][0]" value {"+" Value}] ["[1][0]" property {"+" Property}]]) diff --git a/stdlib/source/library/lux/data/format/css/value.lux b/stdlib/source/library/lux/data/format/css/value.lux index ae3a15195..481d2996c 100644 --- a/stdlib/source/library/lux/data/format/css/value.lux +++ b/stdlib/source/library/lux/data/format/css/value.lux @@ -23,7 +23,7 @@ ["r" rev] ["f" frac]]] [type - [abstract {"-" pattern}]] + [abstract "*"]] [world [net {"+" URL}]]]] [// diff --git a/stdlib/source/library/lux/data/format/html.lux b/stdlib/source/library/lux/data/format/html.lux index 418513440..0a1c861fc 100644 --- a/stdlib/source/library/lux/data/format/html.lux +++ b/stdlib/source/library/lux/data/format/html.lux @@ -15,7 +15,7 @@ [target ["[0]" js]] [type - [abstract {"-" pattern}]] + [abstract "*"]] [world [net {"+" URL}]]]] [// diff --git a/stdlib/source/library/lux/data/format/markdown.lux b/stdlib/source/library/lux/data/format/markdown.lux index 984c023c1..f9acd6890 100644 --- a/stdlib/source/library/lux/data/format/markdown.lux +++ b/stdlib/source/library/lux/data/format/markdown.lux @@ -7,7 +7,7 @@ [collection ["[0]" list ("[1]#[0]" functor)]]] [type - [abstract {"-" pattern}]] + [abstract "*"]] [world [net {"+" URL}]]]]) diff --git a/stdlib/source/library/lux/data/format/tar.lux b/stdlib/source/library/lux/data/format/tar.lux index 5e3c57155..b1ceb5bbf 100644 --- a/stdlib/source/library/lux/data/format/tar.lux +++ b/stdlib/source/library/lux/data/format/tar.lux @@ -37,7 +37,7 @@ [world ["[0]" file]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (type: Size Nat) diff --git a/stdlib/source/library/lux/data/text/buffer.lux b/stdlib/source/library/lux/data/text/buffer.lux index 341c9a688..3aef48a85 100644 --- a/stdlib/source/library/lux/data/text/buffer.lux +++ b/stdlib/source/library/lux/data/text/buffer.lux @@ -16,7 +16,7 @@ [number ["n" nat]]] [type - [abstract {"-" pattern}]]]] + [abstract "*"]]]] ["[0]" //]) (with_expansions [ (these (import: java/lang/CharSequence diff --git a/stdlib/source/library/lux/data/text/encoding.lux b/stdlib/source/library/lux/data/text/encoding.lux index 10a29ed5c..643c279ae 100644 --- a/stdlib/source/library/lux/data/text/encoding.lux +++ b/stdlib/source/library/lux/data/text/encoding.lux @@ -4,7 +4,7 @@ [macro ["[0]" template]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) ... https://en.wikipedia.org/wiki/Character_encoding#Common_character_encodings (abstract: .public Encoding diff --git a/stdlib/source/library/lux/data/text/unicode/block.lux b/stdlib/source/library/lux/data/text/unicode/block.lux index 2f0eae7f7..e0da6cb16 100644 --- a/stdlib/source/library/lux/data/text/unicode/block.lux +++ b/stdlib/source/library/lux/data/text/unicode/block.lux @@ -11,7 +11,7 @@ ["n" nat ("[1]#[0]" interval)] ["[0]" i64]]] [type - [abstract {"-" pattern}]]]] + [abstract "*"]]]] [/// {"+" Char}]) (abstract: .public Block diff --git a/stdlib/source/library/lux/data/text/unicode/set.lux b/stdlib/source/library/lux/data/text/unicode/set.lux index b323804a9..155507178 100644 --- a/stdlib/source/library/lux/data/text/unicode/set.lux +++ b/stdlib/source/library/lux/data/text/unicode/set.lux @@ -10,7 +10,7 @@ ["[0]" tree "_" ["[1]" finger {"+" Tree}]]]] [type {"+" by_example} - [abstract {"-" pattern}]]]] + [abstract "*"]]]] ["[0]" / "_" ["/[1]" // "_" [// {"+" Char}] diff --git a/stdlib/source/library/lux/ffi.lux b/stdlib/source/library/lux/ffi.lux index fcd23b157..5d2b400a0 100644 --- a/stdlib/source/library/lux/ffi.lux +++ b/stdlib/source/library/lux/ffi.lux @@ -21,7 +21,7 @@ ["[0]" code] ["[0]" template]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (with_expansions [ (for @.js "js constant" @.python "python constant" diff --git a/stdlib/source/library/lux/locale.lux b/stdlib/source/library/lux/locale.lux index 98a244fcd..8519516a9 100644 --- a/stdlib/source/library/lux/locale.lux +++ b/stdlib/source/library/lux/locale.lux @@ -11,7 +11,7 @@ ["%" format {"+" format}] ["[0]" encoding {"+" Encoding}]]] [type - [abstract {"-" pattern}]]]] + [abstract "*"]]]] [/ ["[0]" language {"+" Language}] ["[0]" territory {"+" Territory}]]) diff --git a/stdlib/source/library/lux/locale/language.lux b/stdlib/source/library/lux/locale/language.lux index 0efdfc91e..cd51ac019 100644 --- a/stdlib/source/library/lux/locale/language.lux +++ b/stdlib/source/library/lux/locale/language.lux @@ -7,7 +7,7 @@ [data ["[0]" text]] [type - [abstract {"-" pattern}]] + [abstract "*"]] [macro ["[0]" template]]]]) diff --git a/stdlib/source/library/lux/locale/territory.lux b/stdlib/source/library/lux/locale/territory.lux index e17297a5c..8cc984ec7 100644 --- a/stdlib/source/library/lux/locale/territory.lux +++ b/stdlib/source/library/lux/locale/territory.lux @@ -7,7 +7,7 @@ [data ["[0]" text]] [type - [abstract {"-" pattern}]] + [abstract "*"]] [macro ["[0]" template]]]]) diff --git a/stdlib/source/library/lux/math/modular.lux b/stdlib/source/library/lux/math/modular.lux index 6c4263f23..8808e01c2 100644 --- a/stdlib/source/library/lux/math/modular.lux +++ b/stdlib/source/library/lux/math/modular.lux @@ -23,7 +23,7 @@ [number ["i" int ("[1]#[0]" decimal)]]] [type - [abstract {"-" pattern}]]]] + [abstract "*"]]]] ["[0]" // "_" ["[1]" modulus {"+" Modulus}]]) diff --git a/stdlib/source/library/lux/math/modulus.lux b/stdlib/source/library/lux/math/modulus.lux index 6a08451e1..dfc630966 100644 --- a/stdlib/source/library/lux/math/modulus.lux +++ b/stdlib/source/library/lux/math/modulus.lux @@ -16,7 +16,7 @@ [number ["i" int]]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (exception: .public zero_cannot_be_a_modulus) diff --git a/stdlib/source/library/lux/target/common_lisp.lux b/stdlib/source/library/lux/target/common_lisp.lux index dbeee8bdb..ba8ce8d02 100644 --- a/stdlib/source/library/lux/target/common_lisp.lux +++ b/stdlib/source/library/lux/target/common_lisp.lux @@ -14,7 +14,7 @@ [number ["f" frac]]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (def: as_form (-> Text Text) diff --git a/stdlib/source/library/lux/target/js.lux b/stdlib/source/library/lux/target/js.lux index d2b802d2f..5d24ab3d7 100644 --- a/stdlib/source/library/lux/target/js.lux +++ b/stdlib/source/library/lux/target/js.lux @@ -15,7 +15,7 @@ ["i" int] ["f" frac]]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (def: expression (text.enclosed ["(" ")"])) diff --git a/stdlib/source/library/lux/target/jvm/bytecode/address.lux b/stdlib/source/library/lux/target/jvm/bytecode/address.lux index f0df22eb4..94f53c258 100644 --- a/stdlib/source/library/lux/target/jvm/bytecode/address.lux +++ b/stdlib/source/library/lux/target/jvm/bytecode/address.lux @@ -15,7 +15,7 @@ [number ["n" nat]]] [type - [abstract {"-" pattern}]]]] + [abstract "*"]]]] ["[0]" // "_" [jump {"+" Big_Jump}] ["/[1]" // "_" diff --git a/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/registry.lux b/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/registry.lux index b7952504e..cc99cdaed 100644 --- a/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/registry.lux +++ b/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/registry.lux @@ -14,7 +14,7 @@ [number ["n" nat]]] [type - [abstract {"-" pattern}]]]] + [abstract "*"]]]] ["[0]" ///// "_" [encoding ["[1][0]" unsigned {"+" U1 U2}]] diff --git a/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/stack.lux b/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/stack.lux index 4b7b29804..4722fde9e 100644 --- a/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/stack.lux +++ b/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/stack.lux @@ -12,7 +12,7 @@ [format [binary {"+" Writer}]]] [type - [abstract {"-" pattern}]]]] + [abstract "*"]]]] ["[0]" ///// "_" [encoding ["[1][0]" unsigned {"+" U2}]]]) diff --git a/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux b/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux index 61201beb5..b899cd83d 100644 --- a/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux +++ b/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux @@ -23,7 +23,7 @@ [number {"+" hex} ["n" nat]]] [type - [abstract {"-" pattern}]]]] + [abstract "*"]]]] ["[0]" // "_" ["[1][0]" address {"+" Address}] ["[1][0]" jump {"+" Jump Big_Jump}] diff --git a/stdlib/source/library/lux/target/jvm/constant.lux b/stdlib/source/library/lux/target/jvm/constant.lux index 230157059..e1fc0337e 100644 --- a/stdlib/source/library/lux/target/jvm/constant.lux +++ b/stdlib/source/library/lux/target/jvm/constant.lux @@ -22,7 +22,7 @@ ["[0]" int] ["[0]" frac]]] [type - [abstract {"-" pattern}]]]] + [abstract "*"]]]] ["[0]" / "_" ["[1][0]" tag] ["/[1]" // "_" diff --git a/stdlib/source/library/lux/target/jvm/constant/tag.lux b/stdlib/source/library/lux/target/jvm/constant/tag.lux index 36acb163f..21a53ae56 100644 --- a/stdlib/source/library/lux/target/jvm/constant/tag.lux +++ b/stdlib/source/library/lux/target/jvm/constant/tag.lux @@ -9,7 +9,7 @@ [format [binary {"+" Writer}]]] [type - [abstract {"-" pattern}]]]] + [abstract "*"]]]] ["[0]" /// "_" [encoding ["[1][0]" unsigned {"+" U1} ("u1//[0]" equivalence)]]]) diff --git a/stdlib/source/library/lux/target/jvm/encoding/name.lux b/stdlib/source/library/lux/target/jvm/encoding/name.lux index 247300884..666251728 100644 --- a/stdlib/source/library/lux/target/jvm/encoding/name.lux +++ b/stdlib/source/library/lux/target/jvm/encoding/name.lux @@ -5,7 +5,7 @@ ["[0]" text ["%" format {"+" format}]]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (def: .public internal_separator "/") (def: .public external_separator ".") diff --git a/stdlib/source/library/lux/target/jvm/encoding/signed.lux b/stdlib/source/library/lux/target/jvm/encoding/signed.lux index 85e812b71..c56ada38f 100644 --- a/stdlib/source/library/lux/target/jvm/encoding/signed.lux +++ b/stdlib/source/library/lux/target/jvm/encoding/signed.lux @@ -20,7 +20,7 @@ ["n" nat] ["i" int]]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (abstract: .public (Signed brand) Int diff --git a/stdlib/source/library/lux/target/jvm/encoding/unsigned.lux b/stdlib/source/library/lux/target/jvm/encoding/unsigned.lux index 7e47d8260..ec8b7b068 100644 --- a/stdlib/source/library/lux/target/jvm/encoding/unsigned.lux +++ b/stdlib/source/library/lux/target/jvm/encoding/unsigned.lux @@ -19,7 +19,7 @@ ["n" nat] ["[0]" i64]]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (abstract: .public (Unsigned brand) Nat diff --git a/stdlib/source/library/lux/target/jvm/index.lux b/stdlib/source/library/lux/target/jvm/index.lux index b6a0eb318..9afae818a 100644 --- a/stdlib/source/library/lux/target/jvm/index.lux +++ b/stdlib/source/library/lux/target/jvm/index.lux @@ -7,7 +7,7 @@ [format [binary {"+" Writer}]]] [type - [abstract {"-" pattern}]]]] + [abstract "*"]]]] ["[0]" // "_" [encoding ["[1][0]" unsigned {"+" U2}]]]) diff --git a/stdlib/source/library/lux/target/jvm/modifier.lux b/stdlib/source/library/lux/target/jvm/modifier.lux index 24e442a21..0e4097cb0 100644 --- a/stdlib/source/library/lux/target/jvm/modifier.lux +++ b/stdlib/source/library/lux/target/jvm/modifier.lux @@ -18,7 +18,7 @@ ["[0]" number {"+" hex} ["[0]" i64]]] [type - [abstract {"-" pattern}]]]] + [abstract "*"]]]] ["[0]" // "_" [encoding ["[1][0]" unsigned]]]) diff --git a/stdlib/source/library/lux/target/jvm/type.lux b/stdlib/source/library/lux/target/jvm/type.lux index b0a0a1624..06191a89f 100644 --- a/stdlib/source/library/lux/target/jvm/type.lux +++ b/stdlib/source/library/lux/target/jvm/type.lux @@ -15,7 +15,7 @@ [number ["n" nat]]] [type - [abstract {"-" pattern}]]]] + [abstract "*"]]]] ["[0]" // "_" [encoding ["[1][0]" name {"+" External}]]] diff --git a/stdlib/source/library/lux/target/jvm/type/category.lux b/stdlib/source/library/lux/target/jvm/type/category.lux index 0b740dae1..82080666d 100644 --- a/stdlib/source/library/lux/target/jvm/type/category.lux +++ b/stdlib/source/library/lux/target/jvm/type/category.lux @@ -4,7 +4,7 @@ [macro ["[0]" template]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (abstract: Void' Any) (abstract: .public (Value' kind) Any) diff --git a/stdlib/source/library/lux/target/jvm/type/descriptor.lux b/stdlib/source/library/lux/target/jvm/type/descriptor.lux index c8c8f6f49..cfc674edc 100644 --- a/stdlib/source/library/lux/target/jvm/type/descriptor.lux +++ b/stdlib/source/library/lux/target/jvm/type/descriptor.lux @@ -14,7 +14,7 @@ [number ["n" nat]]] [type - [abstract {"-" pattern}]]]] + [abstract "*"]]]] ["[0]" // "_" [category {"+" Void Value Return Method Primitive Object Class Array Var Parameter Declaration}] ["/[1]" // "_" diff --git a/stdlib/source/library/lux/target/jvm/type/lux.lux b/stdlib/source/library/lux/target/jvm/type/lux.lux index 60960123d..a1b8328bf 100644 --- a/stdlib/source/library/lux/target/jvm/type/lux.lux +++ b/stdlib/source/library/lux/target/jvm/type/lux.lux @@ -16,7 +16,7 @@ ["[0]" array] ["[0]" dictionary {"+" Dictionary}]]] [type - [abstract {"-" pattern}] + [abstract "*"] ["[0]" check {"+" Check} ("[1]#[0]" monad)]]]] ["[0]" // [category {"+" Void Value Return Method Primitive Object Class Array Var Parameter}] diff --git a/stdlib/source/library/lux/target/jvm/type/reflection.lux b/stdlib/source/library/lux/target/jvm/type/reflection.lux index 37d7e0dde..ae364efa0 100644 --- a/stdlib/source/library/lux/target/jvm/type/reflection.lux +++ b/stdlib/source/library/lux/target/jvm/type/reflection.lux @@ -7,7 +7,7 @@ ["[0]" text ("[1]#[0]" equivalence) ["%" format {"+" format}]]] [type - [abstract {"-" pattern}]]]] + [abstract "*"]]]] ["[0]" // "_" [category {"+" Void Value Return Method Primitive Object Class Array Var Parameter Declaration}] ["[1][0]" descriptor] diff --git a/stdlib/source/library/lux/target/jvm/type/signature.lux b/stdlib/source/library/lux/target/jvm/type/signature.lux index ddf19de5a..46a4c1066 100644 --- a/stdlib/source/library/lux/target/jvm/type/signature.lux +++ b/stdlib/source/library/lux/target/jvm/type/signature.lux @@ -12,7 +12,7 @@ [collection ["[0]" list ("[1]#[0]" functor)]]] [type - [abstract {"-" pattern}]]]] + [abstract "*"]]]] ["[0]" // "_" [category {"+" Void Value Return Method Primitive Object Class Array Var Parameter Declaration Inheritance}] ["[1][0]" descriptor] diff --git a/stdlib/source/library/lux/target/lua.lux b/stdlib/source/library/lux/target/lua.lux index ef63669f0..676a0791f 100644 --- a/stdlib/source/library/lux/target/lua.lux +++ b/stdlib/source/library/lux/target/lua.lux @@ -25,7 +25,7 @@ ["i" int] ["f" frac]]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) ... Added the carriage return for better Windows compatibility. (def: \n+ diff --git a/stdlib/source/library/lux/target/php.lux b/stdlib/source/library/lux/target/php.lux index 5338f7aa6..ef79be536 100644 --- a/stdlib/source/library/lux/target/php.lux +++ b/stdlib/source/library/lux/target/php.lux @@ -24,7 +24,7 @@ ["n" nat] ["f" frac]]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (def: input_separator ", ") (def: statement_suffix ";") diff --git a/stdlib/source/library/lux/target/python.lux b/stdlib/source/library/lux/target/python.lux index 492881cea..369cbfd92 100644 --- a/stdlib/source/library/lux/target/python.lux +++ b/stdlib/source/library/lux/target/python.lux @@ -25,7 +25,7 @@ ["n" nat] ["f" frac]]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (def: input_separator ", ") diff --git a/stdlib/source/library/lux/target/r.lux b/stdlib/source/library/lux/target/r.lux index 631b0b74d..d7e7b7c90 100644 --- a/stdlib/source/library/lux/target/r.lux +++ b/stdlib/source/library/lux/target/r.lux @@ -20,7 +20,7 @@ [number ["f" frac]]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (abstract: .public (Code kind) Text diff --git a/stdlib/source/library/lux/target/ruby.lux b/stdlib/source/library/lux/target/ruby.lux index ba29eb81a..cc797609c 100644 --- a/stdlib/source/library/lux/target/ruby.lux +++ b/stdlib/source/library/lux/target/ruby.lux @@ -24,7 +24,7 @@ ["n" nat] ["f" frac]]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (def: input_separator ", ") (def: statement_suffix ";") diff --git a/stdlib/source/library/lux/target/scheme.lux b/stdlib/source/library/lux/target/scheme.lux index 509d1fe05..826ada9da 100644 --- a/stdlib/source/library/lux/target/scheme.lux +++ b/stdlib/source/library/lux/target/scheme.lux @@ -19,7 +19,7 @@ ["n" nat] ["f" frac]]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) ... Added the carriage return for better Windows compatibility. (def: \n+ diff --git a/stdlib/source/library/lux/time.lux b/stdlib/source/library/lux/time.lux index c03676e09..d395b5795 100644 --- a/stdlib/source/library/lux/time.lux +++ b/stdlib/source/library/lux/time.lux @@ -19,7 +19,7 @@ [number ["n" nat ("[1]#[0]" decimal)]]] [type - [abstract {"-" pattern}]]]] + [abstract "*"]]]] [/ ["[0]" duration {"+" Duration}]]) diff --git a/stdlib/source/library/lux/time/date.lux b/stdlib/source/library/lux/time/date.lux index d47ed902c..75091e32e 100644 --- a/stdlib/source/library/lux/time/date.lux +++ b/stdlib/source/library/lux/time/date.lux @@ -23,7 +23,7 @@ ["n" nat ("[1]#[0]" decimal)] ["i" int]]] [type - [abstract {"-" pattern}]]]] + [abstract "*"]]]] ["[0]" // "_" ["[1][0]" year {"+" Year}] ["[1][0]" month {"+" Month}]]) diff --git a/stdlib/source/library/lux/time/duration.lux b/stdlib/source/library/lux/time/duration.lux index 84588ff83..ec876f942 100644 --- a/stdlib/source/library/lux/time/duration.lux +++ b/stdlib/source/library/lux/time/duration.lux @@ -19,7 +19,7 @@ ["i" int] ["[0]" nat ("[1]#[0]" decimal)]]] [type - [abstract {"-" pattern}]]]] + [abstract "*"]]]] ["[0]" // "_" ["[1][0]" year]]) diff --git a/stdlib/source/library/lux/time/instant.lux b/stdlib/source/library/lux/time/instant.lux index 5ba290670..cf854a9fc 100644 --- a/stdlib/source/library/lux/time/instant.lux +++ b/stdlib/source/library/lux/time/instant.lux @@ -22,7 +22,7 @@ ["i" int] ["f" frac]]] [type - [abstract {"-" pattern}]]]] + [abstract "*"]]]] ["[0]" // {"+" Time} ["[0]" duration {"+" Duration}] ["[0]" year {"+" Year}] diff --git a/stdlib/source/library/lux/time/year.lux b/stdlib/source/library/lux/time/year.lux index 608f29958..dc149b476 100644 --- a/stdlib/source/library/lux/time/year.lux +++ b/stdlib/source/library/lux/time/year.lux @@ -18,7 +18,7 @@ ["n" nat ("[1]#[0]" decimal)] ["i" int ("[1]#[0]" decimal)]]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (def: (internal year) (-> Int Int) diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive.lux b/stdlib/source/library/lux/tool/compiler/meta/archive.lux index 5089188ce..e2bd7a114 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 {"-" pattern}]]]] + [abstract "*"]]]] [/ ["[0]" artifact] ["[0]" registry {"+" Registry}] diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive/key.lux b/stdlib/source/library/lux/tool/compiler/meta/archive/key.lux index 7ae44b175..78b3aa25f 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/archive/key.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/archive/key.lux @@ -2,7 +2,7 @@ [library [lux "*" [type - [abstract {"-" pattern}]]]] + [abstract "*"]]]] [// [signature {"+" Signature}]]) diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive/module/document.lux b/stdlib/source/library/lux/tool/compiler/meta/archive/module/document.lux index 4f87f705c..5ca25f617 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/archive/module/document.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/archive/module/document.lux @@ -14,7 +14,7 @@ [format ["[0]" binary {"+" Writer}]]] [type {"+" sharing} - [abstract {"-" pattern}]]]] + [abstract "*"]]]] [/// ["[0]" signature {"+" Signature} ("[1]#[0]" equivalence)] ["[0]" key {"+" Key}]]) diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive/registry.lux b/stdlib/source/library/lux/tool/compiler/meta/archive/registry.lux index ea5245ea7..6a9420985 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/archive/registry.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/archive/registry.lux @@ -23,7 +23,7 @@ [macro ["^" pattern]] [type - [abstract {"-" pattern}]]]] + [abstract "*"]]]] ["[0]" // "_" ["[0]" unit] ["[1]" artifact {"+" Artifact ID} diff --git a/stdlib/source/library/lux/type/abstract.lux b/stdlib/source/library/lux/type/abstract.lux index ec8b13b95..3d644dae3 100644 --- a/stdlib/source/library/lux/type/abstract.lux +++ b/stdlib/source/library/lux/type/abstract.lux @@ -1,6 +1,6 @@ (.using [library - [lux {"-" pattern} + [lux "*" ["[0]" meta] [abstract [monad {"+" Monad do}]] @@ -261,21 +261,3 @@ {#Current value} (in (list (` (.|> (~ value) ..representation ..abstraction)))))) - -(syntax: .public (pattern [selection (.form (..selection .local)) - body .any - branches (<>.some .any)]) - (case selection - {#Specific specific name} - (let [g!var (code.local name)] - (in (partial_list g!var - (` (.let [(~ g!var) (..representation (~ specific) (~ g!var))] - (~ body))) - branches))) - - {#Current name} - (let [g!var (code.local name)] - (in (partial_list g!var - (` (.let [(~ g!var) (..representation (~ g!var))] - (~ body))) - branches))))) diff --git a/stdlib/source/library/lux/type/quotient.lux b/stdlib/source/library/lux/type/quotient.lux index bd190b7b5..73c4b2a1e 100644 --- a/stdlib/source/library/lux/type/quotient.lux +++ b/stdlib/source/library/lux/type/quotient.lux @@ -9,7 +9,7 @@ [macro {"+" with_symbols} [syntax {"+" syntax:}]] ["[0]" type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (abstract: .public (Class t c %) (-> t c) diff --git a/stdlib/source/library/lux/type/refinement.lux b/stdlib/source/library/lux/type/refinement.lux index c4ac00c29..1a4433507 100644 --- a/stdlib/source/library/lux/type/refinement.lux +++ b/stdlib/source/library/lux/type/refinement.lux @@ -9,7 +9,7 @@ ["[0]" macro [syntax {"+" syntax:}]] ["[0]" type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (abstract: .public (Refined t %) (Record diff --git a/stdlib/source/library/lux/type/resource.lux b/stdlib/source/library/lux/type/resource.lux index 95d88ab50..4d6526d22 100644 --- a/stdlib/source/library/lux/type/resource.lux +++ b/stdlib/source/library/lux/type/resource.lux @@ -23,7 +23,7 @@ [number ["n" nat]]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (type: .public (Procedure monad input output value) (-> input (monad [output value]))) diff --git a/stdlib/source/library/lux/type/unit.lux b/stdlib/source/library/lux/type/unit.lux index 99b3e934c..4ef2269e3 100644 --- a/stdlib/source/library/lux/type/unit.lux +++ b/stdlib/source/library/lux/type/unit.lux @@ -24,7 +24,7 @@ ["i" int] ["[0]" ratio {"+" Ratio}]]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (abstract: .public (Qty unit) Int diff --git a/stdlib/source/library/lux/world/db/sql.lux b/stdlib/source/library/lux/world/db/sql.lux index f43d12af6..4835e3f24 100644 --- a/stdlib/source/library/lux/world/db/sql.lux +++ b/stdlib/source/library/lux/world/db/sql.lux @@ -13,7 +13,7 @@ [macro ["[0]" template]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (def: parenthesize (-> Text Text) diff --git a/stdlib/source/library/lux/world/net/http/mime.lux b/stdlib/source/library/lux/world/net/http/mime.lux index b9e9b8505..12cf28d79 100644 --- a/stdlib/source/library/lux/world/net/http/mime.lux +++ b/stdlib/source/library/lux/world/net/http/mime.lux @@ -6,7 +6,7 @@ ["%" format {"+" format}] ["[0]" encoding {"+" Encoding}]]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (abstract: .public MIME Text diff --git a/stdlib/source/program/aedifex/artifact/time/date.lux b/stdlib/source/program/aedifex/artifact/time/date.lux index 862eeec23..71f4dbe1c 100644 --- a/stdlib/source/program/aedifex/artifact/time/date.lux +++ b/stdlib/source/program/aedifex/artifact/time/date.lux @@ -21,7 +21,7 @@ ["[0]" year] ["[0]" month]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) (def: .public (pad value) (-> Nat Text) diff --git a/stdlib/source/program/aedifex/hash.lux b/stdlib/source/program/aedifex/hash.lux index a384c5368..db33a1e6a 100644 --- a/stdlib/source/program/aedifex/hash.lux +++ b/stdlib/source/program/aedifex/hash.lux @@ -21,7 +21,7 @@ ["n" nat] ["[0]" i64]]] [type - [abstract {"-" pattern}]]]]) + [abstract "*"]]]]) ... TODO: Replace with pure-Lux implementations of these algorithms ... https://en.wikipedia.org/wiki/SHA-1#SHA-1_pseudocode diff --git a/stdlib/source/test/aedifex/dependency/resolution.lux b/stdlib/source/test/aedifex/dependency/resolution.lux index bb2411590..1233cd1cb 100644 --- a/stdlib/source/test/aedifex/dependency/resolution.lux +++ b/stdlib/source/test/aedifex/dependency/resolution.lux @@ -1,6 +1,6 @@ (.using [library - [lux "*" + [lux {"-" all} ["_" test {"+" Test}] [abstract [monad {"+" do}] @@ -257,37 +257,37 @@ .let [good (..single expected_artifact expected_package) bad_sha-1 (..bad_sha-1 expected_artifact expected_package dummy_package) bad_md5 (..bad_md5 expected_artifact expected_package dummy_package)]] - (`` (all _.and - (in (do async.monad - [actual_package (/.one (///repository.mock good []) - [///dependency.#artifact expected_artifact - ///dependency.#type ///artifact/type.lux_library])] - (_.cover' [/.one] - (case actual_package - {try.#Success actual_package} - (# ///package.equivalence = - (has ///package.#origin {///repository/origin.#Remote ""} expected_package) - actual_package) - - {try.#Failure _} - false)))) - (~~ (template [ ] - [(in (do async.monad - [actual_package (/.one (///repository.mock []) - [///dependency.#artifact expected_artifact - ///dependency.#type ///artifact/type.lux_library])] - (_.cover' [] - (case actual_package - {try.#Failure error} - (exception.match? error) - - {try.#Success _} - false))))] - - [/.sha-1_does_not_match bad_sha-1] - [/.md5_does_not_match bad_md5] - )) - )))) + (`` (.all _.and + (in (do async.monad + [actual_package (/.one (///repository.mock good []) + [///dependency.#artifact expected_artifact + ///dependency.#type ///artifact/type.lux_library])] + (_.cover' [/.one] + (case actual_package + {try.#Success actual_package} + (# ///package.equivalence = + (has ///package.#origin {///repository/origin.#Remote ""} expected_package) + actual_package) + + {try.#Failure _} + false)))) + (~~ (template [ ] + [(in (do async.monad + [actual_package (/.one (///repository.mock []) + [///dependency.#artifact expected_artifact + ///dependency.#type ///artifact/type.lux_library])] + (_.cover' [] + (case actual_package + {try.#Failure error} + (exception.match? error) + + {try.#Success _} + false))))] + + [/.sha-1_does_not_match bad_sha-1] + [/.md5_does_not_match bad_md5] + )) + )))) (def: any Test @@ -302,39 +302,39 @@ .let [good (..single expected_artifact expected_package) bad_sha-1 (..bad_sha-1 expected_artifact expected_package dummy_package) bad_md5 (..bad_md5 expected_artifact expected_package dummy_package)]] - (all _.and - (in (do async.monad - [.let [console ($///version.echo "")] - actual_package (/.any console - (list (///repository.mock bad_sha-1 []) - (///repository.mock bad_md5 []) - (///repository.mock good [])) - [///dependency.#artifact expected_artifact - ///dependency.#type ///artifact/type.lux_library])] - (_.cover' [/.any] - (case actual_package - {try.#Success actual_package} - (# ///package.equivalence = - (has ///package.#origin {///repository/origin.#Remote ""} expected_package) - actual_package) - - {try.#Failure _} - false)))) - (in (do async.monad - [.let [console ($///version.echo "")] - actual_package (/.any console - (list (///repository.mock bad_sha-1 []) - (///repository.mock bad_md5 [])) - [///dependency.#artifact expected_artifact - ///dependency.#type ///artifact/type.lux_library])] - (_.cover' [/.cannot_resolve] - (case actual_package - {try.#Failure error} - (exception.match? /.cannot_resolve error) - - {try.#Success _} - false)))) - ))) + (.all _.and + (in (do async.monad + [.let [console ($///version.echo "")] + actual_package (/.any console + (list (///repository.mock bad_sha-1 []) + (///repository.mock bad_md5 []) + (///repository.mock good [])) + [///dependency.#artifact expected_artifact + ///dependency.#type ///artifact/type.lux_library])] + (_.cover' [/.any] + (case actual_package + {try.#Success actual_package} + (# ///package.equivalence = + (has ///package.#origin {///repository/origin.#Remote ""} expected_package) + actual_package) + + {try.#Failure _} + false)))) + (in (do async.monad + [.let [console ($///version.echo "")] + actual_package (/.any console + (list (///repository.mock bad_sha-1 []) + (///repository.mock bad_md5 [])) + [///dependency.#artifact expected_artifact + ///dependency.#type ///artifact/type.lux_library])] + (_.cover' [/.cannot_resolve] + (case actual_package + {try.#Failure error} + (exception.match? /.cannot_resolve error) + + {try.#Success _} + false)))) + ))) (def: artifacts (Random [Artifact Artifact Artifact]) @@ -405,40 +405,40 @@ [[dependee depender ignored] [dependee_package depender_package ignored_package]] (..packages [dependee_artifact depender_artifact ignored_artifact])] - (all _.and - (in (do async.monad - [.let [console ($///version.echo "")] - [successes failures resolution] (/.all console - (list (///repository.mock (..single dependee_artifact dependee_package) []) - (///repository.mock (..single depender_artifact depender_package) []) - (///repository.mock (..single ignored_artifact ignored_package) [])) - (function (_ url) - (///repository.mock ..nope [])) - (list depender) - /.empty)] - (_.cover' [/.all] - (and (dictionary.key? resolution depender) - (list.any? (///dependency#= depender) successes) - - (dictionary.key? resolution dependee) - (list.any? (///dependency#= dependee) successes) - - (list.empty? failures) - (not (dictionary.key? resolution ignored)))))) - ))) + (.all _.and + (in (do async.monad + [.let [console ($///version.echo "")] + [successes failures resolution] (/.all console + (list (///repository.mock (..single dependee_artifact dependee_package) []) + (///repository.mock (..single depender_artifact depender_package) []) + (///repository.mock (..single ignored_artifact ignored_package) [])) + (function (_ url) + (///repository.mock ..nope [])) + (list depender) + /.empty)] + (_.cover' [/.all] + (and (dictionary.key? resolution depender) + (list.any? (///dependency#= depender) successes) + + (dictionary.key? resolution dependee) + (list.any? (///dependency#= dependee) successes) + + (list.empty? failures) + (not (dictionary.key? resolution ignored)))))) + ))) (def: .public test Test (<| (_.covering /._) (_.for [/.Resolution]) - (all _.and - (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (.all _.and + (_.for [/.equivalence] + ($equivalence.spec /.equivalence ..random)) - (_.cover [/.empty] - (dictionary.empty? /.empty)) + (_.cover [/.empty] + (dictionary.empty? /.empty)) - ..one - ..any - ..all - ))) + ..one + ..any + ..all + ))) diff --git a/stdlib/source/test/lux/type/abstract.lux b/stdlib/source/test/lux/type/abstract.lux index 8af42ce34..df08a62ae 100644 --- a/stdlib/source/test/lux/type/abstract.lux +++ b/stdlib/source/test/lux/type/abstract.lux @@ -89,15 +89,6 @@ /.transmutation (is (g!Bar .Lux))) true))) - (_.cover [/.pattern] - (and (let [(/.pattern g!Foo actual_foo) - (is (g!Foo .Module) - (/.abstraction g!Foo expected_foo))] - (text#= expected_foo actual_foo)) - (let [(/.pattern actual_bar) - (is (g!Bar .Module) - (/.abstraction expected_bar))] - (n.= expected_bar actual_bar)))) (_.for [/.Frame] (all _.and (_.cover [/.current] -- cgit v1.2.3