aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library
diff options
context:
space:
mode:
authorEduardo Julian2021-08-01 03:36:11 -0400
committerEduardo Julian2021-08-01 03:36:11 -0400
commitbcd70df3568d71f14763959f454c15d8164e2d15 (patch)
tree2ec5fa437d008af01b8e3887f532a2b6064cddb5 /stdlib/source/library
parentfa320d22d0d7888feddcabe43a2bc9f1e0335032 (diff)
Even more renamings.
Diffstat (limited to '')
-rw-r--r--stdlib/source/library/lux.lux68
-rw-r--r--stdlib/source/library/lux/abstract/algebra.lux4
-rw-r--r--stdlib/source/library/lux/abstract/comonad.lux2
-rw-r--r--stdlib/source/library/lux/abstract/functor.lux6
-rw-r--r--stdlib/source/library/lux/abstract/monad.lux4
-rw-r--r--stdlib/source/library/lux/abstract/monad/indexed.lux2
-rw-r--r--stdlib/source/library/lux/control/concatenative.lux6
-rw-r--r--stdlib/source/library/lux/control/concurrency/async.lux2
-rw-r--r--stdlib/source/library/lux/control/exception.lux2
-rw-r--r--stdlib/source/library/lux/control/function/memo.lux4
-rw-r--r--stdlib/source/library/lux/control/parser.lux2
-rw-r--r--stdlib/source/library/lux/control/parser/analysis.lux2
-rw-r--r--stdlib/source/library/lux/control/parser/binary.lux2
-rw-r--r--stdlib/source/library/lux/control/parser/code.lux6
-rw-r--r--stdlib/source/library/lux/control/parser/environment.lux2
-rw-r--r--stdlib/source/library/lux/control/parser/synthesis.lux2
-rw-r--r--stdlib/source/library/lux/control/parser/text.lux18
-rw-r--r--stdlib/source/library/lux/control/parser/type.lux4
-rw-r--r--stdlib/source/library/lux/control/pipe.lux12
-rw-r--r--stdlib/source/library/lux/control/region.lux10
-rw-r--r--stdlib/source/library/lux/control/thread.lux2
-rw-r--r--stdlib/source/library/lux/data/binary.lux2
-rw-r--r--stdlib/source/library/lux/data/collection/array.lux14
-rw-r--r--stdlib/source/library/lux/data/collection/bits.lux8
-rw-r--r--stdlib/source/library/lux/data/collection/dictionary.lux55
-rw-r--r--stdlib/source/library/lux/data/collection/dictionary/ordered.lux4
-rw-r--r--stdlib/source/library/lux/data/collection/list.lux9
-rw-r--r--stdlib/source/library/lux/data/collection/queue.lux4
-rw-r--r--stdlib/source/library/lux/data/collection/row.lux20
-rw-r--r--stdlib/source/library/lux/data/collection/set.lux14
-rw-r--r--stdlib/source/library/lux/data/collection/set/multi.lux10
-rw-r--r--stdlib/source/library/lux/data/collection/set/ordered.lux6
-rw-r--r--stdlib/source/library/lux/data/collection/tree/finger.lux4
-rw-r--r--stdlib/source/library/lux/data/collection/tree/zipper.lux6
-rw-r--r--stdlib/source/library/lux/data/color.lux26
-rw-r--r--stdlib/source/library/lux/data/format/binary.lux2
-rw-r--r--stdlib/source/library/lux/data/format/tar.lux10
-rw-r--r--stdlib/source/library/lux/data/format/xml.lux6
-rw-r--r--stdlib/source/library/lux/data/name.lux28
-rw-r--r--stdlib/source/library/lux/data/product.lux35
-rw-r--r--stdlib/source/library/lux/data/sum.lux26
-rw-r--r--stdlib/source/library/lux/data/text.lux83
-rw-r--r--stdlib/source/library/lux/data/text/buffer.lux4
-rw-r--r--stdlib/source/library/lux/data/text/escape.lux4
-rw-r--r--stdlib/source/library/lux/data/text/regex.lux10
-rw-r--r--stdlib/source/library/lux/data/text/unicode/block.lux6
-rw-r--r--stdlib/source/library/lux/debug.lux4
-rw-r--r--stdlib/source/library/lux/ffi.jvm.lux39
-rw-r--r--stdlib/source/library/lux/locale/language.lux2
-rw-r--r--stdlib/source/library/lux/locale/territory.lux2
-rw-r--r--stdlib/source/library/lux/macro/poly.lux4
-rw-r--r--stdlib/source/library/lux/macro/syntax.lux6
-rw-r--r--stdlib/source/library/lux/macro/syntax/annotations.lux1
-rw-r--r--stdlib/source/library/lux/macro/syntax/check.lux1
-rw-r--r--stdlib/source/library/lux/macro/syntax/declaration.lux1
-rw-r--r--stdlib/source/library/lux/macro/syntax/type/variable.lux1
-rw-r--r--stdlib/source/library/lux/math/infix.lux9
-rw-r--r--stdlib/source/library/lux/math/number/i64.lux2
-rw-r--r--stdlib/source/library/lux/math/number/rev.lux2
-rw-r--r--stdlib/source/library/lux/math/random.lux12
-rw-r--r--stdlib/source/library/lux/target/js.lux2
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode.lux2
-rw-r--r--stdlib/source/library/lux/target/jvm/loader.lux2
-rw-r--r--stdlib/source/library/lux/target/jvm/type/alias.lux2
-rw-r--r--stdlib/source/library/lux/target/jvm/type/lux.lux2
-rw-r--r--stdlib/source/library/lux/target/lua.lux2
-rw-r--r--stdlib/source/library/lux/target/php.lux2
-rw-r--r--stdlib/source/library/lux/target/python.lux2
-rw-r--r--stdlib/source/library/lux/target/r.lux2
-rw-r--r--stdlib/source/library/lux/target/ruby.lux2
-rw-r--r--stdlib/source/library/lux/test.lux14
-rw-r--r--stdlib/source/library/lux/time.lux10
-rw-r--r--stdlib/source/library/lux/time/date.lux2
-rw-r--r--stdlib/source/library/lux/time/duration.lux32
-rw-r--r--stdlib/source/library/lux/time/instant.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/default/init.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/default/platform.lux16
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case/coverage.lux16
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/scope.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/structure.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/js.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux160
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lua.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/php.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/python.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/ruby.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/scheme.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/bundle.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/common_lisp.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/common_lisp/common.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/common.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/host.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/common.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux136
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/common.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/host.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/common.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/host.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/common.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/host.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/r.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/r/common.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/common.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/host.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/common.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/host.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/extension/common.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/case.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/loop.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/case.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/loop.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/case.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/case.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/extension/common.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/loop.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/case.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/loop.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/case.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/common.lux22
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/host.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/case.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/loop.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/case.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/extension/common.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/case.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/variable.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/synthesis.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/archive.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/archive/artifact.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/cache/dependency.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/io/archive.lux18
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/io/context.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux4
-rw-r--r--stdlib/source/library/lux/type.lux8
-rw-r--r--stdlib/source/library/lux/type/check.lux2
-rw-r--r--stdlib/source/library/lux/type/implicit.lux2
-rw-r--r--stdlib/source/library/lux/type/resource.lux186
-rw-r--r--stdlib/source/library/lux/world/file.lux2
-rw-r--r--stdlib/source/library/lux/world/file/watch.lux6
-rw-r--r--stdlib/source/library/lux/world/shell.lux4
155 files changed, 802 insertions, 802 deletions
diff --git a/stdlib/source/library/lux.lux b/stdlib/source/library/lux.lux
index 6f4d8071d..5b7f56b2a 100644
--- a/stdlib/source/library/lux.lux
+++ b/stdlib/source/library/lux.lux
@@ -1140,7 +1140,7 @@
("lux text concat" "(All [a] (-> a a))" __paragraph)
("lux text concat"
("lux text concat" "## A name can be provided, to specify a recursive type." __paragraph)
- "(All List [a] (| Any [a (List a)]))"))))]
+ "(All List [a] (Variant Any [a (List a)]))"))))]
#End)
(let'' [self_name tokens] ({(#Item [_ (#Identifier "" self_name)] tokens)
[self_name tokens]
@@ -1282,12 +1282,12 @@
(failure "Wrong syntax for list&")}
(list\reverse xs)))
-(macro:' #export (& tokens)
+(macro:' #export (Tuple tokens)
(#Item [(tag$ ["library/lux" "doc"])
(text$ ("lux text concat"
("lux text concat" "## Tuple types:" __paragraph)
("lux text concat"
- ("lux text concat" "(& Text Int Bit)" __paragraph)
+ ("lux text concat" "(Tuple Text Int Bit)" __paragraph)
("lux text concat"
("lux text concat" "## Any." __paragraph)
"(&)"))))]
@@ -1301,15 +1301,15 @@
prevs)))}
(list\reverse tokens)))
-(macro:' #export (| tokens)
+(macro:' #export (Variant tokens)
(#Item [(tag$ ["library/lux" "doc"])
(text$ ("lux text concat"
("lux text concat" "## Variant types:" __paragraph)
("lux text concat"
- ("lux text concat" "(| Text Int Bit)" __paragraph)
+ ("lux text concat" "(Variant Text Int Bit)" __paragraph)
("lux text concat"
("lux text concat" "## Nothing." __paragraph)
- "(|)"))))]
+ "(Variant)"))))]
#End)
({#End
(return (list (identifier$ ["library/lux" "Nothing"])))
@@ -1402,9 +1402,19 @@
(failure "Wrong syntax for def:'''")}
tokens))
+(def:''' #export Or
+ #End
+ Macro
+ ..Variant)
+
+(def:''' #export And
+ #End
+ Macro
+ ..Tuple)
+
(def:''' (pairs xs)
#End
- (All [a] (-> ($' List a) ($' List (& a a))))
+ (All [a] (-> ($' List a) ($' List (Tuple a a))))
({(#Item x (#Item y xs'))
(#Item [x y] (pairs xs'))
@@ -1414,7 +1424,7 @@
(macro:' (let' tokens)
({(#Item [[_ (#Tuple bindings)] (#Item [body #End])])
- (return (list (list\fold ("lux type check" (-> (& Code Code) Code
+ (return (list (list\fold ("lux type check" (-> (Tuple Code Code) Code
Code)
(function' [binding body]
({[label value]
@@ -1535,10 +1545,10 @@
("lux def type tagged" Monad
(#Named ["library/lux" "Monad"]
(All [m]
- (& (All [a] (-> a ($' m a)))
- (All [a b] (-> (-> a ($' m b))
- ($' m a)
- ($' m b))))))
+ (Tuple (All [a] (-> a ($' m a)))
+ (All [a b] (-> (-> a ($' m b))
+ ($' m a)
+ ($' m b))))))
(record$ (list))
["in" "bind"]
#0)
@@ -1577,7 +1587,7 @@
({(#Item monad (#Item [_ (#Tuple bindings)] (#Item body #End)))
(let' [g!in (local_identifier$ "in")
g!bind (local_identifier$ " bind ")
- body' (list\fold ("lux type check" (-> (& Code Code) Code Code)
+ body' (list\fold ("lux type check" (-> (Tuple Code Code) Code Code)
(function' [binding body']
(let' [[var value] binding]
({[_ (#Tag "" "let")]
@@ -1656,7 +1666,7 @@
(def:''' PList
#End
Type
- (All [a] ($' List (& Text a))))
+ (All [a] ($' List (Tuple Text a))))
(def:''' (get k plist)
#End
@@ -1882,7 +1892,7 @@
[_ [_ (#Record fields)]]
(do meta_monad
[=fields (monad\map meta_monad
- ("lux type check" (-> (& Code Code) ($' Meta Code))
+ ("lux type check" (-> (Tuple Code Code) ($' Meta Code))
(function' [kv]
(let' [[k v] kv]
(do meta_monad
@@ -2087,7 +2097,7 @@
[meta (#Form (list\map (apply_template env) elems))]
[meta (#Record members)]
- [meta (#Record (list\map ("lux type check" (-> (& Code Code) (& Code Code))
+ [meta (#Record (list\map ("lux type check" (-> (Tuple Code Code) (Tuple Code Code))
(function' [kv]
(let' [[slot value] kv]
[(apply_template env slot) (apply_template env value)])))
@@ -2296,7 +2306,7 @@
(def:''' (macro' modules current_module module name)
#End
- (-> ($' List (& Text Module))
+ (-> ($' List (Tuple Text Module))
Text Text Text
($' Maybe Macro))
(do maybe_monad
@@ -2462,7 +2472,7 @@
(form$ (#Item [(tag$ tag) (list\map walk_type parts)]))
[_ (#Tuple members)]
- (` (& (~+ (list\map walk_type members))))
+ (` (Tuple (~+ (list\map walk_type members))))
[_ (#Form (#Item [_ (#Text "lux in-module")]
(#Item [_ (#Text module)]
@@ -2536,7 +2546,7 @@
(template [<name> <type> <value>]
[(def:''' (<name> xy)
#End
- (All [a b] (-> (& a b) <type>))
+ (All [a b] (-> (Tuple a b) <type>))
(let' [[x y] xy] <value>))]
[first a x]
@@ -2544,7 +2554,7 @@
(def:''' (unfold_type_def type_codes)
#End
- (-> ($' List Code) ($' Meta (& Code ($' Maybe ($' List Text)))))
+ (-> ($' List Code) ($' Meta (Tuple Code ($' Maybe ($' List Text)))))
({(#Item [_ (#Record pairs)] #End)
(do meta_monad
[members (monad\map meta_monad
@@ -2557,7 +2567,7 @@
(failure "Wrong syntax for variant case.")}
pair)))
pairs)]
- (return [(` (& (~+ (list\map second members))))
+ (return [(` (Tuple (~+ (list\map second members))))
(#Some (list\map first members))]))
(#Item type #End)
@@ -2565,7 +2575,7 @@
(return [(` .Any) (#Some (list member_name))])
[_ (#Form (#Item [_ (#Tag "" member_name)] member_types))]
- (return [(` (& (~+ member_types))) (#Some (list member_name))])
+ (return [(` (Tuple (~+ member_types))) (#Some (list member_name))])
_
(return [type #None])}
@@ -2583,13 +2593,13 @@
(return [member_name member_type])
[_ (#Form (#Item [_ (#Tag "" member_name)] member_types))]
- (return [member_name (` (& (~+ member_types)))])
+ (return [member_name (` (Tuple (~+ member_types)))])
_
(failure "Wrong syntax for variant case.")}
case)))
(list& case cases))]
- (return [(` (| (~+ (list\map second members))))
+ (return [(` (..Variant (~+ (list\map second members))))
(#Some (list\map first members))]))
_
@@ -4208,7 +4218,7 @@
($_ text\compose "(" name " " (|> params (list\map type\encode) (interpose " ") list\reverse (list\fold text\compose "")) ")"))
(#Sum _)
- ($_ text\compose "(| " (|> (flat_variant type) (list\map type\encode) (interpose " ") list\reverse (list\fold text\compose "")) ")")
+ ($_ text\compose "(Or " (|> (flat_variant type) (list\map type\encode) (interpose " ") list\reverse (list\fold text\compose "")) ")")
(#Product _)
($_ text\compose "[" (|> (flat_tuple type) (list\map type\encode) (interpose " ") list\reverse (list\fold text\compose "")) "]")
@@ -4950,7 +4960,7 @@
(-> Location Location)
[file line (inc column)])
-(def: rejoin_all_pairs
+(def: un_paired
(-> (List [Code Code]) (List Code))
(|>> (list\map rejoin_pair) list\join))
@@ -4983,9 +4993,9 @@
<open>
parts_text
<close>)])])
- ([#Form "(" ")" ..function\identity]
- [#Tuple "[" "]" ..function\identity]
- [#Record "{" "}" rejoin_all_pairs])
+ ([#Form "(" ")" |>]
+ [#Tuple "[" "]" |>]
+ [#Record "{" "}" ..un_paired])
[new_location (#Rev value)]
("lux io error" "@doc_example_to_text Undefined behavior.")
diff --git a/stdlib/source/library/lux/abstract/algebra.lux b/stdlib/source/library/lux/abstract/algebra.lux
index 8e611b513..ca126b064 100644
--- a/stdlib/source/library/lux/abstract/algebra.lux
+++ b/stdlib/source/library/lux/abstract/algebra.lux
@@ -11,7 +11,7 @@
(-> a (f a)))
(type: #export (RAlgebra f a)
- (-> (f (& (Fix f) a)) a))
+ (-> (f (Tuple (Fix f) a)) a))
(type: #export (RCoAlgebra f a)
- (-> a (f (| (Fix f) a))))
+ (-> a (f (Or (Fix f) a))))
diff --git a/stdlib/source/library/lux/abstract/comonad.lux b/stdlib/source/library/lux/abstract/comonad.lux
index 2c1a731f3..3c2ce81b7 100644
--- a/stdlib/source/library/lux/abstract/comonad.lux
+++ b/stdlib/source/library/lux/abstract/comonad.lux
@@ -59,7 +59,7 @@
(` (|> (~ value) (~ g!split) ((~ g!map) (function ((~ g!_) (~ var)) (~ body')))))
))))
body
- (list.reverse (list.pairs bindings)))]
+ (list.reversed (list.pairs bindings)))]
(#.Right [state (list (case ?name
(#.Some name)
(let [name [location.dummy (#.Identifier ["" name])]]
diff --git a/stdlib/source/library/lux/abstract/functor.lux b/stdlib/source/library/lux/abstract/functor.lux
index f168eebe0..140376477 100644
--- a/stdlib/source/library/lux/abstract/functor.lux
+++ b/stdlib/source/library/lux/abstract/functor.lux
@@ -1,6 +1,6 @@
(.module:
[library
- [lux #*]])
+ [lux (#- Or And)]])
(interface: #export (Functor f)
(: (All [a b]
@@ -12,7 +12,7 @@
(f (Fix f)))
(type: #export (Or f g)
- (All [a] (| (f a) (g a))))
+ (All [a] (.Or (f a) (g a))))
(def: #export (sum (^open "f\.") (^open "g\."))
{#.doc (doc "Co-product (sum) composition for functors.")}
@@ -27,7 +27,7 @@
(#.Right (g\map f ga))))))
(type: #export (And f g)
- (All [a] (& (f a) (g a))))
+ (All [a] (.And (f a) (g a))))
(def: #export (product (^open "f\.") (^open "g\."))
{#.doc (doc "Product composition for functors.")}
diff --git a/stdlib/source/library/lux/abstract/monad.lux b/stdlib/source/library/lux/abstract/monad.lux
index b1f9847e7..b0e09b794 100644
--- a/stdlib/source/library/lux/abstract/monad.lux
+++ b/stdlib/source/library/lux/abstract/monad.lux
@@ -27,7 +27,7 @@
(#.Item _ xs')
(recur (inc counter) xs'))))
-(def: (reverse xs)
+(def: (reversed xs)
(All [a]
(-> (List a) (List a)))
(list\fold (function (_ head tail) (#.Item head tail))
@@ -91,7 +91,7 @@
(` (|> (~ value) ((~ g!map) (function ((~ g!_) (~ var)) (~ body'))) (~ g!join)))
))))
body
- (reverse (pairs bindings)))]
+ (reversed (pairs bindings)))]
(#.Right [state (list (case ?name
(#.Some name)
(let [name [location.dummy (#.Identifier ["" name])]]
diff --git a/stdlib/source/library/lux/abstract/monad/indexed.lux b/stdlib/source/library/lux/abstract/monad/indexed.lux
index 8fbd74b1f..c32aac5eb 100644
--- a/stdlib/source/library/lux/abstract/monad/indexed.lux
+++ b/stdlib/source/library/lux/abstract/monad/indexed.lux
@@ -70,7 +70,7 @@
(~ next))
(~ value)))))
expression
- (list.reverse context))]
+ (list.reversed context))]
(in (list (case ?name
(#.Some name)
(let [name (code.local_identifier name)]
diff --git a/stdlib/source/library/lux/control/concatenative.lux b/stdlib/source/library/lux/control/concatenative.lux
index 2a9e61ac7..2cf1c5e10 100644
--- a/stdlib/source/library/lux/control/concatenative.lux
+++ b/stdlib/source/library/lux/control/concatenative.lux
@@ -208,19 +208,19 @@
(def: #export &&
{#.doc (doc "Groups the 2 topmost stack values as a 2-tuple.")}
- (All [a b] (=> [a b] [(& a b)]))
+ (All [a b] (=> [a b] [(Tuple a b)]))
(function (_ [[stack l] r])
[stack [l r]]))
(def: #export ||L
{#.doc (doc "Left-injects the top into sum.")}
- (All [a b] (=> [a] [(| a b)]))
+ (All [a b] (=> [a] [(Or a b)]))
(function (_ [stack l])
[stack (0 #0 l)]))
(def: #export ||R
{#.doc (doc "Right-injects the top into sum.")}
- (All [a b] (=> [b] [(| a b)]))
+ (All [a b] (=> [b] [(Or a b)]))
(function (_ [stack r])
[stack (0 #1 r)]))
diff --git a/stdlib/source/library/lux/control/concurrency/async.lux b/stdlib/source/library/lux/control/concurrency/async.lux
index 4f96b2122..dc95a97e1 100644
--- a/stdlib/source/library/lux/control/concurrency/async.lux
+++ b/stdlib/source/library/lux/control/concurrency/async.lux
@@ -149,7 +149,7 @@
(def: #export (or left right)
{#.doc (doc "Yields the results of whichever async gets resolved first."
"You can tell which one was resolved first through pattern-matching.")}
- (All [a b] (-> (Async a) (Async b) (Async (| a b))))
+ (All [a b] (-> (Async a) (Async b) (Async (Or a b))))
(let [[a|b resolve] (..async [])]
(with_expansions
[<sides> (template [<async> <tag>]
diff --git a/stdlib/source/library/lux/control/exception.lux b/stdlib/source/library/lux/control/exception.lux
index ac913de17..8358da7b3 100644
--- a/stdlib/source/library/lux/control/exception.lux
+++ b/stdlib/source/library/lux/control/exception.lux
@@ -173,7 +173,7 @@
next)])
[0 #.End])
product.right
- list.reverse
+ list.reversed
..report'))
(def: separator
diff --git a/stdlib/source/library/lux/control/function/memo.lux b/stdlib/source/library/lux/control/function/memo.lux
index da293b1f6..9b66afa50 100644
--- a/stdlib/source/library/lux/control/function/memo.lux
+++ b/stdlib/source/library/lux/control/function/memo.lux
@@ -51,7 +51,7 @@
(All [i o]
(-> (Hash i) (Memo i o) (-> i o)))
(let [memo (//.mixin (//.inherit ..memoization (//.of_recursive memo)))
- empty (dictionary.new hash)]
+ empty (dictionary.empty hash)]
(|>> memo (state.run empty) product.right)))
(def: #export (none hash memo)
@@ -60,5 +60,5 @@
(All [i o]
(-> (Hash i) (Memo i o) (-> i o)))
(let [memo (//.mixin (//.of_recursive memo))
- empty (dictionary.new hash)]
+ empty (dictionary.empty hash)]
(|>> memo (state.run empty) product.right)))
diff --git a/stdlib/source/library/lux/control/parser.lux b/stdlib/source/library/lux/control/parser.lux
index b4169e2d5..ad639f00f 100644
--- a/stdlib/source/library/lux/control/parser.lux
+++ b/stdlib/source/library/lux/control/parser.lux
@@ -108,7 +108,7 @@
(def: #export (or left right)
{#.doc "Heterogeneous alternative combinator."}
(All [s a b]
- (-> (Parser s a) (Parser s b) (Parser s (| a b))))
+ (-> (Parser s a) (Parser s b) (Parser s (Or a b))))
(function (_ tokens)
(case (left tokens)
(#try.Success [tokens' output])
diff --git a/stdlib/source/library/lux/control/parser/analysis.lux b/stdlib/source/library/lux/control/parser/analysis.lux
index b94490a95..19b02e507 100644
--- a/stdlib/source/library/lux/control/parser/analysis.lux
+++ b/stdlib/source/library/lux/control/parser/analysis.lux
@@ -1,6 +1,6 @@
(.module:
[library
- [lux (#- nat int rev)
+ [lux (#- Variant Tuple nat int rev)
[abstract
[monad (#+ do)]]
[control
diff --git a/stdlib/source/library/lux/control/parser/binary.lux b/stdlib/source/library/lux/control/parser/binary.lux
index 66e2d6e77..ec683489f 100644
--- a/stdlib/source/library/lux/control/parser/binary.lux
+++ b/stdlib/source/library/lux/control/parser/binary.lux
@@ -124,7 +124,7 @@
_ (//.lift (exception.except ..invalid_tag [(~~ (template.amount <case>+)) flag]))))))
(def: #export (or left right)
- (All [l r] (-> (Parser l) (Parser r) (Parser (| l r))))
+ (All [l r] (-> (Parser l) (Parser r) (Parser (Or l r))))
(!variant [[0 #.Left left]
[1 #.Right right]]))
diff --git a/stdlib/source/library/lux/control/parser/code.lux b/stdlib/source/library/lux/control/parser/code.lux
index 7dd43ffa4..6edbb9ed1 100644
--- a/stdlib/source/library/lux/control/parser/code.lux
+++ b/stdlib/source/library/lux/control/parser/code.lux
@@ -21,11 +21,11 @@
["." frac]]]]]
["." //])
-(def: (join_pairs pairs)
+(def: (un_paired pairs)
(All [a] (-> (List [a a]) (List a)))
(case pairs
#.End #.End
- (#.Item [[x y] pairs']) (list& x y (join_pairs pairs'))))
+ (#.Item [[x y] pairs']) (list& x y (un_paired pairs'))))
(type: #export Parser
{#.doc "A Lux code parser."}
@@ -153,7 +153,7 @@
(function (_ tokens)
(case tokens
(#.Item [[_ (#.Record pairs)] tokens'])
- (case (p (join_pairs pairs))
+ (case (p (un_paired pairs))
(#try.Success [#.End x]) (#try.Success [tokens' x])
_ (#try.Failure ($_ text\compose "Parser was expected to fully consume record" (remaining_inputs tokens))))
diff --git a/stdlib/source/library/lux/control/parser/environment.lux b/stdlib/source/library/lux/control/parser/environment.lux
index ea3370c0a..b7d2d8ebf 100644
--- a/stdlib/source/library/lux/control/parser/environment.lux
+++ b/stdlib/source/library/lux/control/parser/environment.lux
@@ -31,7 +31,7 @@
(def: #export empty
{#.doc (doc "An empty environment.")}
Environment
- (dictionary.new text.hash))
+ (dictionary.empty text.hash))
(def: #export (property name)
(-> Property (Parser Text))
diff --git a/stdlib/source/library/lux/control/parser/synthesis.lux b/stdlib/source/library/lux/control/parser/synthesis.lux
index b902d4b81..d8406d3ec 100644
--- a/stdlib/source/library/lux/control/parser/synthesis.lux
+++ b/stdlib/source/library/lux/control/parser/synthesis.lux
@@ -1,6 +1,6 @@
(.module:
[library
- [lux (#- function loop i64)
+ [lux (#- Variant Tuple function loop i64)
[abstract
[monad (#+ do)]]
[control
diff --git a/stdlib/source/library/lux/control/parser/text.lux b/stdlib/source/library/lux/control/parser/text.lux
index 767565fc5..345eae8ee 100644
--- a/stdlib/source/library/lux/control/parser/text.lux
+++ b/stdlib/source/library/lux/control/parser/text.lux
@@ -92,7 +92,7 @@
(function (_ [offset tape])
(case (/.nth offset tape)
(#.Some output)
- (#try.Success [[("lux i64 +" 1 offset) tape] (/.of_code output)])
+ (#try.Success [[("lux i64 +" 1 offset) tape] (/.of_char output)])
_
(exception.except ..cannot_parse []))))
@@ -134,7 +134,7 @@
{#.doc (doc "Checks that a specific text shows up in the input.")}
(-> Text (Parser Any))
(function (_ [offset tape])
- (case (/.index_of' reference offset tape)
+ (case (/.index_of' offset reference tape)
(#.Some where)
(if (n.= offset where)
(#try.Success [[("lux i64 +" (/.size reference) offset) tape]
@@ -158,7 +158,7 @@
(function (_ (^@ input [offset tape]))
(case (/.nth offset tape)
(#.Some output)
- (#try.Success [input (/.of_code output)])
+ (#try.Success [input (/.of_char output)])
_
(exception.except ..cannot_parse []))))
@@ -175,7 +175,7 @@
(do //.monad
[char any
#let [char' (maybe.assume (/.nth 0 char))]
- _ (//.assertion ($_ /\compose "Character is not within range: " (/.of_code bottom) "-" (/.of_code top))
+ _ (//.assertion ($_ /\compose "Character is not within range: " (/.of_char bottom) "-" (/.of_char top))
(.and (n.>= bottom char')
(n.<= top char')))]
(in char)))
@@ -214,7 +214,7 @@
[(exception: #export (<name> {options Text} {character Char})
(exception.report
["Options" (/.format options)]
- ["Character" (/.format (/.of_code character))]))]
+ ["Character" (/.format (/.of_char character))]))]
[character_should_be]
[character_should_not_be]
@@ -227,7 +227,7 @@
(function (_ [offset tape])
(case (/.nth offset tape)
(#.Some output)
- (let [output' (/.of_code output)]
+ (let [output' (/.of_char output)]
(if (<modifier> (/.contains? output' options))
(#try.Success [[("lux i64 +" 1 offset) tape] output'])
(exception.except <exception> [options output])))
@@ -246,7 +246,7 @@
(function (_ [offset tape])
(case (/.nth offset tape)
(#.Some output)
- (let [output' (/.of_code output)]
+ (let [output' (/.of_char output)]
(if (<modifier> (/.contains? output' options))
(#try.Success [[("lux i64 +" 1 offset) tape]
{#basis offset
@@ -262,7 +262,7 @@
(exception: #export (character_does_not_satisfy_predicate {character Char})
(exception.report
- ["Character" (/.format (/.of_code character))]))
+ ["Character" (/.format (/.of_char character))]))
(def: #export (satisfies parser)
{#.doc "Yields characters that satisfy a predicate."}
@@ -271,7 +271,7 @@
(case (/.nth offset tape)
(#.Some output)
(if (parser output)
- (#try.Success [[("lux i64 +" 1 offset) tape] (/.of_code output)])
+ (#try.Success [[("lux i64 +" 1 offset) tape] (/.of_char output)])
(exception.except ..character_does_not_satisfy_predicate [output]))
_
diff --git a/stdlib/source/library/lux/control/parser/type.lux b/stdlib/source/library/lux/control/parser/type.lux
index c4438fbf8..7933f3a90 100644
--- a/stdlib/source/library/lux/control/parser/type.lux
+++ b/stdlib/source/library/lux/control/parser/type.lux
@@ -71,7 +71,7 @@
(def: #export fresh
{#.doc (doc "An empty parsing environment.")}
Env
- (dictionary.new n.hash))
+ (dictionary.empty n.hash))
(def: (run' env poly types)
(All [a] (-> Env (Parser a) (List Type) (Try a)))
@@ -208,7 +208,7 @@
partial_varL (label partial_varI)
partialC (` ((~ funcL) (~+ (|> (list.indices num_args)
(list\map (|>> (n.* 2) inc (n.+ funcI) label))
- list.reverse))))]
+ list.reversed))))]
(recur (inc current_arg)
(|> env'
(dictionary.put partialI [.Nothing partialC])
diff --git a/stdlib/source/library/lux/control/pipe.lux b/stdlib/source/library/lux/control/pipe.lux
index 128c8f036..5f40fc055 100644
--- a/stdlib/source/library/lux/control/pipe.lux
+++ b/stdlib/source/library/lux/control/pipe.lux
@@ -43,15 +43,15 @@
(in (list (` (let [(~ binding) (~ prev)]
(~ body))))))
-(def: _reverse_
+(def: _reversed_
(Parser Any)
(function (_ tokens)
- (#e.Success [(list.reverse tokens) []])))
+ (#e.Success [(list.reversed tokens) []])))
-(syntax: #export (cond> {_ _reverse_}
+(syntax: #export (cond> {_ _reversed_}
prev
{else body^}
- {_ _reverse_}
+ {_ _reversed_}
{branches (p.some (p.and body^ body^))})
{#.doc (doc "Branching for pipes."
"Both the tests and the bodies are piped-code, and must be given inside a tuple."
@@ -117,10 +117,10 @@
[(i.+ +4)]
[inc])))}
(with_gensyms [g!temp]
- (case (list.reverse steps)
+ (case (list.reversed steps)
(^ (list& last_step prev_steps))
(let [step_bindings (do list.monad
- [step (list.reverse prev_steps)]
+ [step (list.reversed prev_steps)]
(list g!temp (` (|> (~ g!temp) (~+ step)))))]
(in (list (` ((~! do) (~ monad)
[(~' #let) [(~ g!temp) (~ prev)]
diff --git a/stdlib/source/library/lux/control/region.lux b/stdlib/source/library/lux/control/region.lux
index 281c8d19e..a7cda544b 100644
--- a/stdlib/source/library/lux/control/region.lux
+++ b/stdlib/source/library/lux/control/region.lux
@@ -44,7 +44,7 @@
(format separator
error|output))))
-(def: (combine_outcomes clean_up output)
+(def: (clean clean_up output)
(All [a] (-> (Try Any) (Try a) (Try a)))
(case clean_up
(#try.Success _)
@@ -59,10 +59,10 @@
(-> (Monad !) (All [r] (Region r ! a))
(! (Try a))))
(do {! monad}
- [[cleaners output] (computation [[] (list)])
- results (monad.map ! (function (_ cleaner) (cleaner []))
- cleaners)]
- (in (list\fold combine_outcomes output results))))
+ [[cleaners output] (computation [[] (list)])]
+ (|> cleaners
+ (monad.map ! (function (_ cleaner) (cleaner [])))
+ (\ ! map (list\fold clean output)))))
(def: #export (acquire monad cleaner value)
{#.doc (doc "Acquire a resource while pairing it a function that knows how to reclaim it.")}
diff --git a/stdlib/source/library/lux/control/thread.lux b/stdlib/source/library/lux/control/thread.lux
index 236ded86b..b528d22aa 100644
--- a/stdlib/source/library/lux/control/thread.lux
+++ b/stdlib/source/library/lux/control/thread.lux
@@ -27,7 +27,7 @@
{#.doc (doc "A brand-new box initialized to the given value.")}
(All [a] (-> a (All [!] (Thread ! (Box ! a)))))
(function (_ !)
- (|> (array.new 1)
+ (|> (array.empty 1)
(array.write! 0 init)
:abstraction)))
diff --git a/stdlib/source/library/lux/data/binary.lux b/stdlib/source/library/lux/data/binary.lux
index deec60d53..1b320f241 100644
--- a/stdlib/source/library/lux/data/binary.lux
+++ b/stdlib/source/library/lux/data/binary.lux
@@ -188,7 +188,7 @@
(..make-bytevector size)}
## Default
- (array.new size)))
+ (array.empty size)))
(def: #export (fold f init binary)
(All [a] (-> (-> I64 a a) a Binary a))
diff --git a/stdlib/source/library/lux/data/collection/array.lux b/stdlib/source/library/lux/data/collection/array.lux
index 330ea38eb..9c07bef65 100644
--- a/stdlib/source/library/lux/data/collection/array.lux
+++ b/stdlib/source/library/lux/data/collection/array.lux
@@ -35,7 +35,7 @@
"jvm conversion long-to-int"))}
(as_is))
- (def: #export (new size)
+ (def: #export (empty size)
{#.doc (doc "An empty array of the specified size.")}
(All [a] (-> Nat (Array a)))
(for {@.old
@@ -274,14 +274,14 @@
(#.Some x)
(write! idx x ys)))
- (new arr_size)
+ (empty arr_size)
(list.indices arr_size))))
(def: #export (of_list xs)
(All [a] (-> (List a) (Array a)))
(product.right (list\fold (function (_ x [idx arr])
[(inc idx) (write! idx x arr)])
- [0 (new (list.size xs))]
+ [0 (empty (list.size xs))]
xs)))
(def: underflow
@@ -338,12 +338,12 @@
(implementation: #export monoid
(All [a] (Monoid (Array a)))
- (def: identity (new 0))
+ (def: identity (empty 0))
(def: (compose xs ys)
(let [sxs (size xs)
sxy (size ys)]
- (|> (new (n.+ sxy sxs))
+ (|> (empty (n.+ sxy sxs))
(copy! sxs 0 xs 0)
(copy! sxy 0 ys sxs)))))
@@ -353,7 +353,7 @@
(def: (map f ma)
(let [arr_size (size ma)]
(if (n.= 0 arr_size)
- (new arr_size)
+ (empty arr_size)
(list\fold (function (_ idx mb)
(case (read idx ma)
#.None
@@ -361,7 +361,7 @@
(#.Some x)
(write! idx (f x) mb)))
- (new arr_size)
+ (empty arr_size)
(list.indices arr_size))
))))
diff --git a/stdlib/source/library/lux/data/collection/bits.lux b/stdlib/source/library/lux/data/collection/bits.lux
index f45916a00..7820cfe4c 100644
--- a/stdlib/source/library/lux/data/collection/bits.lux
+++ b/stdlib/source/library/lux/data/collection/bits.lux
@@ -30,7 +30,7 @@
(def: #export empty
Bits
- (array.new 0))
+ (array.empty 0))
(def: #export (size bits)
{#.doc (doc "Measures the size of a bit-map by counting all the 1s in the bit-map.")}
@@ -85,7 +85,7 @@
chunk
(|> (if (is? ..empty output)
- (: Bits (array.new size|output))
+ (: Bits (array.empty size|output))
output)
(array.write! idx|output (.i64 chunk))
(recur (dec size|output))))
@@ -126,7 +126,7 @@
chunk
(if (n.> 0 size|output)
(|> (if (is? ..empty output)
- (: Bits (array.new size|output))
+ (: Bits (array.empty size|output))
output)
(array.write! idx (.i64 chunk))
(recur (dec size|output)))
@@ -153,7 +153,7 @@
chunk
(|> (if (is? ..empty output)
- (: Bits (array.new size|output))
+ (: Bits (array.empty size|output))
output)
(array.write! idx (.i64 chunk))
(recur (dec size|output))))
diff --git a/stdlib/source/library/lux/data/collection/dictionary.lux b/stdlib/source/library/lux/data/collection/dictionary.lux
index 42e421952..923d64c42 100644
--- a/stdlib/source/library/lux/data/collection/dictionary.lux
+++ b/stdlib/source/library/lux/data/collection/dictionary.lux
@@ -124,16 +124,16 @@
(i64.left_shifted branching_exponent 1))
## The cannonical empty node, which is just an empty #Base node.
-(def: empty
+(def: empty_node
Node
- (#Base clean_bitmap (array.new 0)))
+ (#Base clean_bitmap (array.empty 0)))
## Expands a copy of the array, to have 1 extra slot, which is used
## for storing the value.
(def: (insert! idx value old_array)
(All [a] (-> Index a (Array a) (Array a)))
(let [old_size (array.size old_array)]
- (|> (array.new (inc old_size))
+ (|> (array.empty (inc old_size))
(array.copy! idx 0 old_array 0)
(array.write! idx value)
(array.copy! (n.- idx old_size) idx old_array (inc idx)))))
@@ -152,7 +152,7 @@
(def: (remove! idx array)
(All [a] (-> Index (Array a) (Array a)))
(let [new_size (dec (array.size array))]
- (|> (array.new new_size)
+ (|> (array.empty new_size)
(array.copy! idx 0 array 0)
(array.copy! (n.- idx new_size) (inc idx) array idx))))
@@ -232,7 +232,7 @@
## When #Hierarchy nodes grow too small, they're demoted to #Base
## nodes to save space.
-(def: (demote_hierarchy except_idx [h_size h_array])
+(def: (demotion except_idx [h_size h_array])
(All [k v] (-> Index (Hierarchy k v) [Bit_Map (Base k v)]))
(product.right (list\fold (function (_ idx [insertion_idx node])
(let [[bitmap base] node]
@@ -245,14 +245,16 @@
(array.write! insertion_idx (#.Left sub_node) base)]])
)))
[0 [clean_bitmap
- (array.new (dec h_size))]]
+ (array.empty (dec h_size))]]
(list.indices (array.size h_array)))))
## When #Base nodes grow too large, they're promoted to #Hierarchy to
## add some depth to the tree and help keep its balance.
-(def: hierarchy_indices (List Index) (list.indices hierarchy_nodes_size))
+(def: hierarchy_indices
+ (List Index)
+ (list.indices hierarchy_nodes_size))
-(def: (promote_base put' key_hash level bitmap base)
+(def: (promotion put' key_hash level bitmap base)
(All [k v]
(-> (-> Level Hash_Code k v (Hash k) (Node k v) (Node k v))
(Hash k) Level
@@ -268,14 +270,14 @@
(#.Some (#.Right [key' val']))
(array.write! hierarchy_idx
- (put' (level_up level) (\ key_hash hash key') key' val' key_hash empty)
+ (put' (level_up level) (\ key_hash hash key') key' val' key_hash empty_node)
h_array)
#.None
(undefined))]
default))
[0
- (array.new hierarchy_nodes_size)]
+ (array.empty hierarchy_nodes_size)]
hierarchy_indices)))
## All empty nodes look the same (a #Base node with clean bitmap is
@@ -302,7 +304,7 @@
[_size sub_node]
_
- [(inc _size) empty])]
+ [(inc _size) empty_node])]
(#Hierarchy _size'
(update! idx (put' (level_up level) hash key val key_hash sub_node)
hierarchy)))
@@ -333,7 +335,7 @@
## the same, a new
## #Collisions node
## is added.
- (#Collisions hash (|> (array.new 2)
+ (#Collisions hash (|> (array.empty 2)
(array.write! 0 [key' val'])
(array.write! 1 [key val])))
## Otherwise, one can
@@ -342,7 +344,7 @@
## add both KV-pairs
## to the empty one.
(let [next_level (level_up level)]
- (|> empty
+ (|> empty_node
(put' next_level hash' key' val' key_hash)
(put' next_level hash key val key_hash))))))
base)))
@@ -356,9 +358,10 @@
## If so, promote it to a #Hierarchy node, and add the new
## KV-pair as a singleton node to it.
(#Hierarchy (inc base_count)
- (|> (promote_base put' key_hash level bitmap base)
+ (|> base
+ (promotion put' key_hash level bitmap)
(array.write! (level_index level hash)
- (put' (level_up level) hash key val key_hash empty))))
+ (put' (level_up level) hash key val key_hash empty_node))))
## Otherwise, just resize the #Base node to accommodate the
## new KV-pair.
(#Base (set_bit_position bit bitmap)
@@ -381,7 +384,7 @@
## If the hashes are not equal, create a new #Base node that
## contains the old #Collisions node, plus the new KV-pair.
(|> (#Base (bit_position level _hash)
- (|> (array.new 1)
+ (|> (array.empty 1)
(array.write! 0 (#.Left node))))
(put' level hash key val key_hash)))
))
@@ -410,7 +413,7 @@
## Check if it's due time for a demotion.
(if (n.<= demotion_threshold h_size)
## If so, perform it.
- (#Base (demote_hierarchy idx [h_size h_array]))
+ (#Base (demotion idx [h_size h_array]))
## Otherwise, just clear the space.
(#Hierarchy (dec h_size) (vacant! idx h_array)))
## But if the sub_removal yielded a non_empty node, then
@@ -436,7 +439,7 @@
### ... figure out whether that's the only position left.
(if (only_bit_position? bit bitmap)
## If so, removing it leaves this node empty too.
- empty
+ empty_node
## But if not, then just unset the position and
## remove the node.
(#Base (unset_bit_position bit bitmap)
@@ -473,7 +476,7 @@
(if (n.= 1 (array.size _colls))
## If there's only one left, then removing it leaves us with
## an empty node.
- empty
+ empty_node
## Otherwise, just shrink the array by removing the KV-pair.
(#Collisions _hash (remove! idx _colls))))
))
@@ -561,11 +564,11 @@
(All [k v] (-> (Dictionary k v) (Hash k)))
(get@ #..hash))
-(def: #export (new key_hash)
+(def: #export (empty key_hash)
{#.doc (doc "An empty dictionary.")}
(All [k v] (-> (Hash k) (Dictionary k v)))
{#hash key_hash
- #root empty})
+ #root empty_node})
(def: #export (put key val dict)
(All [k v] (-> k v (Dictionary k v) (Dictionary k v)))
@@ -632,7 +635,7 @@
(All [k v] (-> (Hash k) (List [k v]) (Dictionary k v)))
(list\fold (function (_ [k v] dict)
(..put k v dict))
- (new key_hash)
+ (empty key_hash)
kvs))
(template [<side> <name>]
@@ -647,7 +650,7 @@
[v values]
)
-(def: #export (merge dict2 dict1)
+(def: #export (merged dict2 dict1)
{#.doc (doc "Merges 2 dictionaries."
"If any collisions with keys occur, the values of dict2 will overwrite those of dict1.")}
(All [k v] (-> (Dictionary k v) (Dictionary k v) (Dictionary k v)))
@@ -655,7 +658,7 @@
dict1
(entries dict2)))
-(def: #export (merge_with f dict2 dict1)
+(def: #export (merged_with f dict2 dict1)
{#.doc (doc "Merges 2 dictionaries."
"If any collisions with keys occur, a new value will be computed by applying 'f' to the values of dict2 and dict1.")}
(All [k v] (-> (-> v v v) (Dictionary k v) (Dictionary k v) (Dictionary k v)))
@@ -681,7 +684,7 @@
(remove from_key)
(put to_key val))))
-(def: #export (select keys dict)
+(def: #export (sub keys dict)
{#.doc "A sub-dictionary, with only the specified keys."}
(All [k v] (-> (List k) (Dictionary k v) (Dictionary k v)))
(let [[key_hash _] dict]
@@ -689,7 +692,7 @@
(case (get key dict)
#.None new_dict
(#.Some val) (put key val new_dict)))
- (new key_hash)
+ (empty key_hash)
keys)))
(implementation: #export (equivalence (^open ",\."))
diff --git a/stdlib/source/library/lux/data/collection/dictionary/ordered.lux b/stdlib/source/library/lux/data/collection/dictionary/ordered.lux
index 8008cb8b0..ffe34dc92 100644
--- a/stdlib/source/library/lux/data/collection/dictionary/ordered.lux
+++ b/stdlib/source/library/lux/data/collection/dictionary/ordered.lux
@@ -49,7 +49,7 @@
{#&order (Order k)
#root (Maybe (Node k v))})
-(def: #export (new order)
+(def: #export (empty order)
{#.doc (doc "An empty dictionary, employing the given order.")}
(All [k v] (-> (Order k) (Dictionary k v)))
{#&order order
@@ -540,7 +540,7 @@
(All [k v] (-> (Order k) (List [k v]) (Dictionary k v)))
(list\fold (function (_ [key value] dict)
(put key value dict))
- (new order)
+ (empty order)
list))
(template [<name> <type> <output>]
diff --git a/stdlib/source/library/lux/data/collection/list.lux b/stdlib/source/library/lux/data/collection/list.lux
index f5d6dcf02..df4b33c2e 100644
--- a/stdlib/source/library/lux/data/collection/list.lux
+++ b/stdlib/source/library/lux/data/collection/list.lux
@@ -43,7 +43,7 @@
(#.Item [head tail])
(#.Item [init (folds f (f head init) tail)])))
-(def: #export (reverse xs)
+(def: #export (reversed xs)
(All [a]
(-> (List a) (List a)))
(fold (function (_ head tail) (#.Item head tail))
@@ -151,7 +151,7 @@
(All [a]
(-> (Predicate a) (List a) [(List a) (List a)]))
(let [[ys' xs'] (split_with' predicate #.End xs)]
- [(reverse ys') xs']))
+ [(reversed ys') xs']))
(def: #export (chunk size list)
{#.doc "Segment the list in chunks of the given size."}
@@ -221,7 +221,7 @@
#.None
tail))
#.End
- (reverse xs))}
+ (reversed xs))}
(case xs
#.End
#.End
@@ -372,7 +372,8 @@
(def: (in a)
(#.Item a #.End))
- (def: join (|>> reverse (fold compose identity))))
+ (def: join
+ (|>> reversed (fold compose identity))))
(def: #export (sort < xs)
{#.doc (doc "A list ordered by a comparison function.")}
diff --git a/stdlib/source/library/lux/data/collection/queue.lux b/stdlib/source/library/lux/data/collection/queue.lux
index 8a0b6d08b..0fa870a0c 100644
--- a/stdlib/source/library/lux/data/collection/queue.lux
+++ b/stdlib/source/library/lux/data/collection/queue.lux
@@ -29,7 +29,7 @@
(def: #export (to_list queue)
(All [a] (-> (Queue a) (List a)))
(let [(^slots [#front #rear]) queue]
- (list\compose front (list.reverse rear))))
+ (list\compose front (list.reversed rear))))
(def: #export peek
{#.doc (doc "Yields the first value in the queue, if any.")}
@@ -62,7 +62,7 @@
## Front has dried up...
(^ (list _))
(|> queue
- (set@ #front (list.reverse (get@ #rear queue)))
+ (set@ #front (list.reversed (get@ #rear queue)))
(set@ #rear (list)))
## Consume front!
diff --git a/stdlib/source/library/lux/data/collection/row.lux b/stdlib/source/library/lux/data/collection/row.lux
index 7ce9802d6..4e341dfbd 100644
--- a/stdlib/source/library/lux/data/collection/row.lux
+++ b/stdlib/source/library/lux/data/collection/row.lux
@@ -74,7 +74,7 @@
(def: (new_hierarchy _)
(All [a] (-> Any (Hierarchy a)))
- (array.new full_node_size))
+ (array.empty full_node_size))
(def: (tail_off row_size)
(-> Nat Nat)
@@ -94,7 +94,7 @@
(def: (new_tail singleton)
(All [a] (-> a (Base a)))
- (|> (array.new 1)
+ (|> (array.empty 1)
(array.write! 0 singleton)))
(def: (push_tail size level tail parent)
@@ -122,7 +122,7 @@
(def: (expand_tail val tail)
(All [a] (-> a (Base a) (Base a)))
(let [tail_size (array.size tail)]
- (|> (array.new (inc tail_size))
+ (|> (array.empty (inc tail_size))
(array.copy! tail_size 0 tail 0)
(array.write! tail_size val))))
@@ -178,7 +178,7 @@
(#Hierarchy hierarchy)
(|> hierarchy
array.to_list
- list.reverse
+ list.reversed
(list\fold (function (_ sub acc) (list\compose (to_list' sub) acc))
#.End))))
@@ -193,8 +193,8 @@
Row
{#level (level_up root_level)
#size 0
- #root (array.new full_node_size)
- #tail (array.new 0)})
+ #root (array.empty full_node_size)
+ #tail (array.empty 0)})
(def: #export (size row)
(All [a] (-> (Row a) Nat))
@@ -314,7 +314,7 @@
new_tail_size (dec (array.size old_tail))]
(|> row
(update@ #size dec)
- (set@ #tail (|> (array.new new_tail_size)
+ (set@ #tail (|> (array.empty new_tail_size)
(array.copy! new_tail_size 0 old_tail 0)))))
(maybe.assume
(do maybe.monad
@@ -465,9 +465,11 @@
(^open ".") ..monoid]
(fold (function (_ post pre) (compose pre post)) identity))))
-(def: #export reverse
+(def: #export reversed
(All [a] (-> (Row a) (Row a)))
- (|>> ..to_list list.reverse (list\fold add ..empty)))
+ (|>> ..to_list
+ list.reversed
+ (list\fold add ..empty)))
(template [<name> <array> <init> <op>]
[(def: #export <name>
diff --git a/stdlib/source/library/lux/data/collection/set.lux b/stdlib/source/library/lux/data/collection/set.lux
index 6c0c58a65..d6436be3b 100644
--- a/stdlib/source/library/lux/data/collection/set.lux
+++ b/stdlib/source/library/lux/data/collection/set.lux
@@ -24,9 +24,9 @@
(All [a] (-> (Set a) (Hash a)))
//.key_hash)
-(def: #export new
+(def: #export empty
(All [a] (-> (Hash a) (Set a)))
- //.new)
+ //.empty)
(def: #export size
(All [a] (-> (Set a) Nat))
@@ -50,7 +50,7 @@
(def: #export union
(All [a] (-> (Set a) (Set a) (Set a)))
- //.merge)
+ //.merged)
(def: #export (difference sub base)
(All [a] (-> (Set a) (Set a) (Set a)))
@@ -58,8 +58,8 @@
(def: #export (intersection filter base)
(All [a] (-> (Set a) (Set a) (Set a)))
- (//.select (//.keys filter)
- base))
+ (//.sub (//.keys filter)
+ base))
(implementation: #export equivalence
(All [a] (Equivalence (Set a)))
@@ -83,7 +83,7 @@
(implementation: #export (monoid hash)
(All [a] (-> (Hash a) (Monoid (Set a))))
- (def: identity (..new hash))
+ (def: identity (..empty hash))
(def: compose ..union))
(def: #export empty?
@@ -92,7 +92,7 @@
(def: #export (of_list hash elements)
(All [a] (-> (Hash a) (List a) (Set a)))
- (list\fold ..add (..new hash) elements))
+ (list\fold ..add (..empty hash) elements))
(def: #export (sub? super sub)
(All [a] (-> (Set a) (Set a) Bit))
diff --git a/stdlib/source/library/lux/data/collection/set/multi.lux b/stdlib/source/library/lux/data/collection/set/multi.lux
index fdbbe7b1b..df4db9a85 100644
--- a/stdlib/source/library/lux/data/collection/set/multi.lux
+++ b/stdlib/source/library/lux/data/collection/set/multi.lux
@@ -24,9 +24,9 @@
{#.doc (doc "A set that keeps track of repetition in its entries.")}
- (def: #export new
+ (def: #export empty
(All [a] (-> (Hash a) (Set a)))
- (|>> dictionary.new :abstraction))
+ (|>> dictionary.empty :abstraction))
(def: #export size
(All [a] (-> (Set a) Nat))
@@ -70,7 +70,7 @@
(template [<name> <compose>]
[(def: #export (<name> parameter subject)
(All [a] (-> (Set a) (Set a) (Set a)))
- (:abstraction (dictionary.merge_with <compose> (:representation parameter) (:representation subject))))]
+ (:abstraction (dictionary.merged_with <compose> (:representation parameter) (:representation subject))))]
[union n.max]
[sum n.+]
@@ -83,7 +83,7 @@
multiplicity)
elem
output))
- (..new (dictionary.key_hash subject))
+ (..empty (dictionary.key_hash subject))
(dictionary.entries subject)))
(def: #export (difference parameter subject)
@@ -150,7 +150,7 @@
(def: #export (of_list hash subject)
(All [a] (-> (Hash a) (List a) (Set a)))
- (list\fold (..add 1) (..new hash) subject))
+ (list\fold (..add 1) (..empty hash) subject))
(def: #export (of_set subject)
(All [a] (-> (//.Set a) (Set a)))
diff --git a/stdlib/source/library/lux/data/collection/set/ordered.lux b/stdlib/source/library/lux/data/collection/set/ordered.lux
index fbe72bada..d0916508f 100644
--- a/stdlib/source/library/lux/data/collection/set/ordered.lux
+++ b/stdlib/source/library/lux/data/collection/set/ordered.lux
@@ -17,9 +17,9 @@
{#.doc (doc "A set with ordered entries.")}
- (def: #export new
+ (def: #export empty
(All [a] (-> (Order a) (Set a)))
- (|>> /.new :abstraction))
+ (|>> /.empty :abstraction))
(def: #export (member? set elem)
(All [a] (-> (Set a) a Bit))
@@ -50,7 +50,7 @@
(def: #export (of_list &order list)
(All [a] (-> (Order a) (List a) (Set a)))
- (list\fold add (..new &order) list))
+ (list\fold add (..empty &order) list))
(def: #export (union left right)
(All [a] (-> (Set a) (Set a) (Set a)))
diff --git a/stdlib/source/library/lux/data/collection/tree/finger.lux b/stdlib/source/library/lux/data/collection/tree/finger.lux
index be444ba1a..ae6c21990 100644
--- a/stdlib/source/library/lux/data/collection/tree/finger.lux
+++ b/stdlib/source/library/lux/data/collection/tree/finger.lux
@@ -14,8 +14,8 @@
(abstract: #export (Tree @ t v)
{#monoid (Monoid t)
#tag t
- #root (| v
- [(Tree @ t v) (Tree @ t v)])}
+ #root (Or v
+ [(Tree @ t v) (Tree @ t v)])}
{#.doc (doc "A finger tree.")}
diff --git a/stdlib/source/library/lux/data/collection/tree/zipper.lux b/stdlib/source/library/lux/data/collection/tree/zipper.lux
index 45e3a109e..e47036a56 100644
--- a/stdlib/source/library/lux/data/collection/tree/zipper.lux
+++ b/stdlib/source/library/lux/data/collection/tree/zipper.lux
@@ -104,12 +104,12 @@
(for {@.old
(update@ #node (: (-> (Tree (:parameter 0))
(Tree (:parameter 0)))
- (set@ #//.children (list\compose (list.reverse lefts)
+ (set@ #//.children (list\compose (list.reversed lefts)
(#.Item (get@ #node zipper)
rights))))
parent)}
(set@ [#node #//.children]
- (list\compose (list.reverse lefts)
+ (list\compose (list.reversed lefts)
(#.Item (get@ #node zipper)
rights))
parent))))))
@@ -146,7 +146,7 @@
#.None
(#.Some family)
- (case (list.reverse (get@ <side> family))
+ (case (list.reversed (get@ <side> family))
#.End
#.None
diff --git a/stdlib/source/library/lux/data/color.lux b/stdlib/source/library/lux/data/color.lux
index 482b6435d..ad79c9fd8 100644
--- a/stdlib/source/library/lux/data/color.lux
+++ b/stdlib/source/library/lux/data/color.lux
@@ -314,26 +314,26 @@
## else
ratio))
-(def: #export (interpolate ratio end start)
+(def: #export (interpolated ratio end start)
(-> Frac Color Color Color)
(let [dS (..normal ratio)
dE (|> +1.0 (f.- dS))
- interpolate' (: (-> Nat Nat Nat)
- (function (_ end start)
- (|> (|> start .int int.frac (f.* dS))
- (f.+ (|> end .int int.frac (f.* dE)))
- f.int
- .nat)))
+ interpolated' (: (-> Nat Nat Nat)
+ (function (_ end start)
+ (|> (|> start .int int.frac (f.* dS))
+ (f.+ (|> end .int int.frac (f.* dE)))
+ f.int
+ .nat)))
[redS greenS blueS] (to_rgb start)
[redE greenE blueE] (to_rgb end)]
- (of_rgb {#red (interpolate' redE redS)
- #green (interpolate' greenE greenS)
- #blue (interpolate' blueE blueS)})))
+ (of_rgb {#red (interpolated' redE redS)
+ #green (interpolated' greenE greenS)
+ #blue (interpolated' blueE blueS)})))
(template [<name> <target>]
[(def: #export (<name> ratio color)
(-> Frac Color Color)
- (..interpolate ratio <target> color))]
+ (..interpolated ratio <target> color))]
[darker ..black]
[brighter ..white]
@@ -349,8 +349,8 @@
(f.min +1.0))
luminance])))]
- [f.+ saturate]
- [f.- de_saturate]
+ [f.+ saturated]
+ [f.- un_saturated]
)
(def: #export (gray_scale color)
diff --git a/stdlib/source/library/lux/data/format/binary.lux b/stdlib/source/library/lux/data/format/binary.lux
index b2464a488..b1279b292 100644
--- a/stdlib/source/library/lux/data/format/binary.lux
+++ b/stdlib/source/library/lux/data/format/binary.lux
@@ -87,7 +87,7 @@
)
(def: #export (or left right)
- (All [l r] (-> (Writer l) (Writer r) (Writer (| l r))))
+ (All [l r] (-> (Writer l) (Writer r) (Writer (Or l r))))
(function (_ altV)
(case altV
(^template [<number> <tag> <writer>]
diff --git a/stdlib/source/library/lux/data/format/tar.lux b/stdlib/source/library/lux/data/format/tar.lux
index 52e37991b..996bb27f9 100644
--- a/stdlib/source/library/lux/data/format/tar.lux
+++ b/stdlib/source/library/lux/data/format/tar.lux
@@ -113,7 +113,7 @@
["Expected" (%.nat expected)]
["Actual" (%.nat actual)]))
-(def: verify_small_suffix
+(def: small_suffix
(Parser Any)
(do <>.monad
[pre_end <binary>.bits/8
@@ -131,7 +131,7 @@
(do <>.monad
[digits (<binary>.segment ..small_size)
digits (<>.lift (\ utf8.codec decode digits))
- _ ..verify_small_suffix]
+ _ ..small_suffix]
(<>.lift
(do {! try.monad}
[value (\ n.octal decode digits)]
@@ -198,7 +198,7 @@
(do <>.monad
[ascii (<binary>.segment ..small_size)
digits (<>.lift (\ utf8.codec decode ascii))
- _ ..verify_small_suffix
+ _ ..small_suffix
value (<>.lift
(\ n.octal decode digits))]
(in [value
@@ -224,7 +224,7 @@
(def: #export name_size Size 31)
(def: #export path_size Size 99)
-(def: (un_pad string)
+(def: (un_padded string)
(-> Binary (Try Binary))
(case (binary.size string)
0 (#try.Success string)
@@ -281,7 +281,7 @@
(n.= expected end))]
(<>.lift
(do {! try.monad}
- [ascii (..un_pad string)
+ [ascii (..un_padded string)
text (\ utf8.codec decode ascii)]
(<in> text)))))
diff --git a/stdlib/source/library/lux/data/format/xml.lux b/stdlib/source/library/lux/data/format/xml.lux
index b7cf0323d..d065f1def 100644
--- a/stdlib/source/library/lux/data/format/xml.lux
+++ b/stdlib/source/library/lux/data/format/xml.lux
@@ -33,7 +33,7 @@
(def: #export attributes
{#.doc (doc "An empty set of XML attributes.")}
Attrs
- (dictionary.new name.hash))
+ (dictionary.empty name.hash))
(type: #export #rec XML
(#Text Text)
@@ -62,7 +62,7 @@
(#.Some _)
(<>.codec int.decimal (<text>.many <text>.hexadecimal)))]
- (in (|> code .nat text.of_code)))
+ (in (|> code .nat text.of_char)))
(<>.before (<text>.this ";"))
(<>.after (<text>.this "&#"))))
@@ -162,7 +162,7 @@
(def: null^
(Parser Any)
- (<text>.this (text.of_code 0)))
+ (<text>.this (text.of_char 0)))
(def: xml^
(Parser XML)
diff --git a/stdlib/source/library/lux/data/name.lux b/stdlib/source/library/lux/data/name.lux
index 6a89a1aa6..cd4b3b67d 100644
--- a/stdlib/source/library/lux/data/name.lux
+++ b/stdlib/source/library/lux/data/name.lux
@@ -13,13 +13,15 @@
## (type: Name
## [Text Text])
-(template [<name> <side>]
- [(def: #export (<name> [module short])
+(template [<name> <doc>]
+ [(def: #export (<name> name)
+ {#.doc (doc <doc>)}
(-> Name Text)
- <side>)]
+ (let [[module short] name]
+ <name>))]
- [module module]
- [short short]
+ [module "The module part of a name."]
+ [short "The short part of a name."]
)
(def: #export hash
@@ -51,14 +53,12 @@
_ ($_ text\compose module ..separator short)))
(def: (decode input)
- (if (text\= "" input)
- (#.Left (text\compose "Invalid format for Name: " input))
- (case (text.split_all_with ..separator input)
- (^ (list short))
- (#.Right ["" short])
+ (case (text.split_all_with ..separator input)
+ (^ (list short))
+ (#.Right ["" short])
- (^ (list module short))
- (#.Right [module short])
+ (^ (list module short))
+ (#.Right [module short])
- _
- (#.Left (text\compose "Invalid format for Name: " input))))))
+ _
+ (#.Left (text\compose "Invalid format for Name: " input)))))
diff --git a/stdlib/source/library/lux/data/product.lux b/stdlib/source/library/lux/data/product.lux
index 6cf05ac83..25e6b02d0 100644
--- a/stdlib/source/library/lux/data/product.lux
+++ b/stdlib/source/library/lux/data/product.lux
@@ -1,52 +1,59 @@
(.module:
- {#.doc "Functionality for working with tuples (particularly 2-tuples)."}
+ {#.doc "Functionality for working with tuples (particularly 2-tuples/pairs)."}
[library
[lux #*
[abstract
[equivalence (#+ Equivalence)]
[hash (#+ Hash)]]]])
-(template [<name> <type> <output>]
- [(def: #export (<name> xy)
- (All [a b] (-> (& a b) <type>))
- (let [[x y] xy]
- <output>))]
+(template [<name> <doc>]
+ [(def: #export (<name> pair)
+ {#.doc (doc <doc>)}
+ (All [left right]
+ (-> [left right] <name>))
+ (let [[left right] pair]
+ <name>))]
- [left a x]
- [right b y]
+ [left "The left side of a pair."]
+ [right "The right side of a pair."]
)
+## https://en.wikipedia.org/wiki/Currying
(def: #export (curry f)
+ {#.doc (doc "Converts a 2-argument function into nested single-argument functions.")}
(All [a b c]
- (-> (-> (& a b) c)
+ (-> (-> [a b] c)
(-> a b c)))
(function (_ x y)
(f [x y])))
(def: #export (uncurry f)
+ {#.doc (doc "Converts nested single-argument functions into a 2-argument function.")}
(All [a b c]
(-> (-> a b c)
- (-> (& a b) c)))
+ (-> [a b] c)))
(function (_ xy)
(let [[x y] xy]
(f x y))))
(def: #export (swap xy)
- (All [a b] (-> (& a b) (& b a)))
+ (All [a b] (-> [a b] [b a]))
(let [[x y] xy]
[y x]))
(def: #export (apply f g)
+ {#.doc (doc "Apply functions to both sides of a pair.")}
(All [a b c d]
(-> (-> a c) (-> b d)
- (-> (& a b) (& c d))))
+ (-> [a b] [c d])))
(function (_ [x y])
[(f x) (g y)]))
(def: #export (fork f g)
+ {#.doc (doc "Yields a pair by applying both functions to a single value.")}
(All [a l r]
(-> (-> a l) (-> a r)
- (-> a (& l r))))
+ (-> a [l r])))
(function (_ x)
[(f x) (g x)]))
@@ -58,7 +65,7 @@
(\ right = rr sr))))
(def: #export (hash left right)
- (All [l r] (-> (Hash l) (Hash r) (Hash (& l r))))
+ (All [l r] (-> (Hash l) (Hash r) (Hash [l r])))
(implementation
(def: &equivalence
(..equivalence (\ left &equivalence)
diff --git a/stdlib/source/library/lux/data/sum.lux b/stdlib/source/library/lux/data/sum.lux
index 2f0fddee9..224ba3878 100644
--- a/stdlib/source/library/lux/data/sum.lux
+++ b/stdlib/source/library/lux/data/sum.lux
@@ -6,27 +6,33 @@
[equivalence (#+ Equivalence)]
[hash (#+ Hash)]]]])
-(template [<name> <type> <right?>]
+(template [<right?> <name> <doc>]
[(def: #export (<name> value)
- (All [a b] (-> <type> (| a b)))
+ {#.doc (doc <doc>)}
+ (All [left right]
+ (-> <name> (Or left right)))
(0 <right?> value))]
- [left a #0]
- [right b #1])
+ [#0 left
+ "Lifts value to the left side of a 2-variant."]
+ [#1 right
+ "Lifts value to the right side of a 2-variant."])
(def: #export (either fl fr)
+ {#.doc (doc "Applies a function to either side of a 2-variant.")}
(All [a b c]
(-> (-> a c) (-> b c)
- (-> (| a b) c)))
+ (-> (Or a b) c)))
(function (_ input)
(case input
(0 #0 l) (fl l)
(0 #1 r) (fr r))))
(def: #export (apply fl fr)
+ {#.doc (doc "Applies functions to both sides of a 2-variant.")}
(All [l l' r r']
(-> (-> l l') (-> r r')
- (-> (| l r) (| l' r'))))
+ (-> (Or l r) (Or l' r'))))
(function (_ input)
(case input
(0 #0 l) (0 #0 (fl l))
@@ -34,7 +40,7 @@
(template [<name> <side> <right?>]
[(def: #export (<name> es)
- (All [a b] (-> (List (| a b)) (List <side>)))
+ (All [a b] (-> (List (Or a b)) (List <side>)))
(case es
#.End
#.End
@@ -50,7 +56,7 @@
)
(def: #export (partition xs)
- (All [a b] (-> (List (| a b)) [(List a) (List b)]))
+ (All [a b] (-> (List (Or a b)) [(List a) (List b)]))
(case xs
#.End
[#.End #.End]
@@ -62,7 +68,7 @@
(0 #1 x') [lefts (#.Item x' rights)]))))
(def: #export (equivalence left right)
- (All [l r] (-> (Equivalence l) (Equivalence r) (Equivalence (| l r))))
+ (All [l r] (-> (Equivalence l) (Equivalence r) (Equivalence (Or l r))))
(implementation
(def: (= reference sample)
(case [reference sample]
@@ -76,7 +82,7 @@
false))))
(def: #export (hash left right)
- (All [l r] (-> (Hash l) (Hash r) (Hash (| l r))))
+ (All [l r] (-> (Hash l) (Hash r) (Hash (Or l r))))
(implementation
(def: &equivalence
(..equivalence (\ left &equivalence)
diff --git a/stdlib/source/library/lux/data/text.lux b/stdlib/source/library/lux/data/text.lux
index b60a1f797..68ce8ec38 100644
--- a/stdlib/source/library/lux/data/text.lux
+++ b/stdlib/source/library/lux/data/text.lux
@@ -7,7 +7,7 @@
[monoid (#+ Monoid)]
[equivalence (#+ Equivalence)]
[order (#+ Order)]
- [monad (#+ Monad do)]
+ [monad (#+ do)]
[codec (#+ Codec)]]
[data
["." maybe]
@@ -19,16 +19,17 @@
["." i64]]]]])
(type: #export Char
+ {#.doc (doc "A character code number.")}
Nat)
## TODO: Instead of ints, chars should be produced fron nats.
## (The JVM specifies chars as 16-bit unsigned integers)
-(def: #export of_code
+(def: #export of_char
(-> Char Text)
(|>> .int "lux i64 char"))
(template [<code> <short> <long>]
- [(def: #export <long> (..of_code <code>))
+ [(def: #export <long> (..of_char <code>))
(def: #export <short> <long>)]
[00 \0 null]
@@ -42,52 +43,45 @@
[34 \'' double_quote]
)
-(def: #export line_feed ..new_line)
+(def: #export line_feed
+ {#.doc (doc "Same as 'new_line'.")}
+ ..new_line)
(def: #export size
(-> Text Nat)
(|>> "lux text size"))
-(def: #export (nth idx input)
+(def: #export (nth index input)
+ {#.doc (doc "Yields the character at the specified index.")}
(-> Nat Text (Maybe Char))
- (if (n.< ("lux text size" input) idx)
- (#.Some ("lux text char" idx input))
+ (if (n.< ("lux text size" input) index)
+ (#.Some ("lux text char" index input))
#.None))
-(def: #export (index_of' pattern from input)
- (-> Text Nat Text (Maybe Nat))
+(def: #export (index_of' from pattern input)
+ (-> Nat Text Text (Maybe Nat))
("lux text index" from pattern input))
(def: #export (index_of pattern input)
(-> Text Text (Maybe Nat))
- ("lux text index" 0 pattern input))
+ (index_of' 0 pattern input))
-(def: (last_index_of'' part since text)
- (-> Text Nat Text (Maybe Nat))
- (case ("lux text index" (inc since) part text)
- #.None
- (#.Some since)
+(def: #export (last_index_of' from part text)
+ (-> Nat Text Text (Maybe Nat))
+ (loop [from from
+ output (: (Maybe Nat)
+ #.None)]
+ (let [output' ("lux text index" from part text)]
+ (case output'
+ #.None
+ output
- (#.Some since')
- (last_index_of'' part since' text)))
-
-(def: #export (last_index_of' part from text)
- (-> Text Nat Text (Maybe Nat))
- (case ("lux text index" from part text)
- (#.Some since)
- (last_index_of'' part since text)
-
- #.None
- #.None))
+ (#.Some from')
+ (recur (inc from') output')))))
(def: #export (last_index_of part text)
(-> Text Text (Maybe Nat))
- (case ("lux text index" 0 part text)
- (#.Some since)
- (last_index_of'' part since text)
-
- #.None
- #.None))
+ (last_index_of' 0 part text))
(def: #export (starts_with? prefix x)
(-> Text Text Bit)
@@ -144,13 +138,15 @@
(-> Text Text)
(..enclosed' ..double_quote))
-(def: #export (clip offset characters input)
+(def: #export (clip offset size input)
+ {#.doc (doc "Clips a chunk of text from the input at the specified offset and of the specified size.")}
(-> Nat Nat Text (Maybe Text))
- (if (|> characters (n.+ offset) (n.<= ("lux text size" input)))
- (#.Some ("lux text clip" offset characters input))
+ (if (|> size (n.+ offset) (n.<= ("lux text size" input)))
+ (#.Some ("lux text clip" offset size input))
#.None))
(def: #export (clip' offset input)
+ {#.doc (doc "Clips the remaining text from the input at the specified offset.")}
(-> Nat Text (Maybe Text))
(let [size ("lux text size" input)]
(if (n.<= size offset)
@@ -187,7 +183,7 @@
#.None
(|> output
(#.Item input)
- list.reverse))))
+ list.reversed))))
(def: #export (replace_once pattern replacement template)
(-> Text Text Text Text)
@@ -284,24 +280,25 @@
(:as Nat))}
## Platform-independent default.
(let [length ("lux text size" input)]
- (loop [idx 0
+ (loop [index 0
hash 0]
- (if (n.< length idx)
- (recur (inc idx)
+ (if (n.< length index)
+ (recur (inc index)
(|> hash
(i64.left_shifted 5)
(n.- hash)
- (n.+ ("lux text char" idx input))))
+ (n.+ ("lux text char" index input))))
hash))))))
(def: #export concat
(-> (List Text) Text)
(let [(^open ".") ..monoid]
- (|>> list.reverse (list\fold compose identity))))
+ (|>> list.reversed
+ (list\fold compose identity))))
-(def: #export (join_with sep texts)
+(def: #export (join_with separator texts)
(-> Text (List Text) Text)
- (|> texts (list.interpose sep) concat))
+ (|> texts (list.interpose separator) concat))
(def: #export (empty? text)
(-> Text Bit)
diff --git a/stdlib/source/library/lux/data/text/buffer.lux b/stdlib/source/library/lux/data/text/buffer.lux
index 166f87a3b..d20dc21b9 100644
--- a/stdlib/source/library/lux/data/text/buffer.lux
+++ b/stdlib/source/library/lux/data/text/buffer.lux
@@ -121,12 +121,12 @@
(for {@.old <jvm>
@.jvm <jvm>
@.js (let [[capacity transform] (:representation buffer)]
- (|> (array.new 0)
+ (|> (array.empty 0)
(:as (JS_Array Text))
transform
(JS_Array::join [""])))
@.lua (let [[capacity transform] (:representation buffer)]
- (table/concat [(transform (array.new 0)) ""]))}
+ (table/concat [(transform (array.empty 0)) ""]))}
## default
(row\fold (function (_ chunk total)
(format total chunk))
diff --git a/stdlib/source/library/lux/data/text/escape.lux b/stdlib/source/library/lux/data/text/escape.lux
index 6c78dc7d5..02cb8baaa 100644
--- a/stdlib/source/library/lux/data/text/escape.lux
+++ b/stdlib/source/library/lux/data/text/escape.lux
@@ -150,7 +150,7 @@
(exception.report
["In" (%.text text)]
["At" (%.nat offset)]
- ["Name" (%.text (//.of_code sigil))]))
+ ["Name" (%.text (//.of_char sigil))]))
(exception: #export (invalid_unicode_escape {text Text} {offset Nat})
(exception.report
@@ -184,7 +184,7 @@
(let [limit' (|> limit (n.- offset) (n.- ..unicode_escape_offset))]
(#try.Success [(format previous
("lux text clip" 0 offset current)
- (//.of_code char))
+ (//.of_char char))
("lux text clip" (n.+ ..unicode_escape_offset offset) limit' current)
limit']))
diff --git a/stdlib/source/library/lux/data/text/regex.lux b/stdlib/source/library/lux/data/text/regex.lux
index 1e2128275..45798b920 100644
--- a/stdlib/source/library/lux/data/text/regex.lux
+++ b/stdlib/source/library/lux/data/text/regex.lux
@@ -137,7 +137,7 @@
(def: control^
(Parser Text)
(<>.either (<text>.range (hex "0") (hex "1F"))
- (<text>.one_of (//.of_code (hex "7F")))))
+ (<text>.one_of (//.of_char (hex "7F")))))
(def: punct^
(Parser Text)
@@ -151,7 +151,7 @@
(def: print^
(Parser Text)
(<>.either graph^
- (<text>.one_of (//.of_code (hex "20")))))
+ (<text>.one_of (//.of_char (hex "20")))))
(def: re_system_class^
(Parser Code)
@@ -321,8 +321,8 @@
0)
(` ((~! do) (~! <>.monad)
[(~ (' #let)) [(~ g!total) ""]
- (~+ (|> steps list.reverse list\join))]
- ((~ (' in)) [(~ g!total) (~+ (list.reverse names))])))])
+ (~+ (|> steps list.reversed list\join))]
+ ((~ (' in)) [(~ g!total) (~+ (list.reversed names))])))])
))
(def: (unflatten^ lexer)
@@ -330,7 +330,7 @@
(<>.and lexer (\ <>.monad in [])))
(def: (|||^ left right)
- (All [l r] (-> (Parser [Text l]) (Parser [Text r]) (Parser [Text (| l r)])))
+ (All [l r] (-> (Parser [Text l]) (Parser [Text r]) (Parser [Text (Or l r)])))
(function (_ input)
(case (left input)
(#try.Success [input' [lt lv]])
diff --git a/stdlib/source/library/lux/data/text/unicode/block.lux b/stdlib/source/library/lux/data/text/unicode/block.lux
index 5c4d9ec76..955b851d2 100644
--- a/stdlib/source/library/lux/data/text/unicode/block.lux
+++ b/stdlib/source/library/lux/data/text/unicode/block.lux
@@ -9,8 +9,6 @@
[control
[parser
["<.>" code]]]
- [data
- ["." text]]
[macro
[syntax (#+ syntax:)]
["." template]
@@ -21,7 +19,7 @@
["." i64]]]
[type
abstract]]]
- [/// (#+ Char)])
+ ["." /// (#+ Char)])
(abstract: #export Block
(Interval Char)
@@ -83,7 +81,7 @@
(..end value))))
(syntax: (block_name {name <code>.local_identifier})
- (in (list (code.text (text.replace_all "_" " " name)))))
+ (in (list (code.text (///.replace_all "_" " " name)))))
(template [<name> <start> <end>]
[(with_expansions [<block_name> (..block_name <name>)
diff --git a/stdlib/source/library/lux/debug.lux b/stdlib/source/library/lux/debug.lux
index 669bcbad3..bb4292eca 100644
--- a/stdlib/source/library/lux/debug.lux
+++ b/stdlib/source/library/lux/debug.lux
@@ -450,7 +450,7 @@
variantV variantV]
(case representations
(#.Item leftR (#.Item rightR extraR+))
- (case (:as (| Any Any) variantV)
+ (case (:as (Or Any Any) variantV)
(#.Left left)
[lefts #0 (leftR left)]
@@ -567,7 +567,7 @@
list.concat
## The list is reversed to make sure that, when building the dictionary,
## later bindings overshadow earlier ones if they have the same name.
- list.reverse
+ list.reversed
(dictionary.of_list text.hash))]
targets (: (Meta (List Target))
(case targets
diff --git a/stdlib/source/library/lux/ffi.jvm.lux b/stdlib/source/library/lux/ffi.jvm.lux
index 1067f8357..27233fb11 100644
--- a/stdlib/source/library/lux/ffi.jvm.lux
+++ b/stdlib/source/library/lux/ffi.jvm.lux
@@ -416,19 +416,19 @@
(~ value)
(~ (code.local_identifier self_name)))))))
-(def: (pre_walk_replace f input)
+(def: (replaced f input)
(-> (-> Code Code) Code Code)
(case (f input)
(^template [<tag>]
[[meta (<tag> parts)]
- [meta (<tag> (list\map (pre_walk_replace f) parts))]])
+ [meta (<tag> (list\map (replaced f) parts))]])
([#.Form]
[#.Tuple])
[meta (#.Record pairs)]
[meta (#.Record (list\map (: (-> [Code Code] [Code Code])
(function (_ [key val])
- [(pre_walk_replace f key) (pre_walk_replace f val)]))
+ [(replaced f key) (replaced f val)]))
pairs))]
ast'
@@ -568,12 +568,11 @@
(-> (-> (List (Type Var)) (Parser (Type Parameter)))
(-> (List (Type Var)) (Parser (Type Class))))
(do <>.monad
- [[name parameters] (: (Parser [External (List (Type Parameter))])
+ [#let [class_name^ (..valid_class_name type_vars)]
+ [name parameters] (: (Parser [External (List (Type Parameter))])
($_ <>.either
- (<>.and (valid_class_name type_vars)
- (<>\in (list)))
- (<code>.form (<>.and <code>.local_identifier
- (<>.some (parameter^ type_vars))))))]
+ (<>.and class_name^ (<>\in (list)))
+ (<code>.form (<>.and class_name^ (<>.some (parameter^ type_vars))))))]
(in (type.class (name.safe name) parameters))))
(exception: #export (unexpected_type_variable {name Text}
@@ -1109,7 +1108,7 @@
(~ (code.text self_name))
[(~+ (list\map argument$ arguments))]
[(~+ (list\map constructor_arg$ constructor_args))]
- (~ (pre_walk_replace replacer body))
+ (~ (replaced replacer body))
)))
(#VirtualMethod final? strict_fp? type_vars self_name arguments return_type body exs)
@@ -1127,7 +1126,7 @@
[(~+ (list\map argument$ arguments))]
(~ (return$ return_type))
[(~+ (list\map class$ exs))]
- (~ (pre_walk_replace replacer body)))))
+ (~ (replaced replacer body)))))
(#OverridenMethod strict_fp? declaration type_vars self_name arguments return_type body exs)
(let [replacer (|> (list\map (field->parser fully_qualified_class_name self_name) fields)
@@ -1154,8 +1153,8 @@
(~ (return$ return_type))
[(~+ (list\map class$ exs))]
(~ (|> body
- (pre_walk_replace replacer)
- (pre_walk_replace super_replacer)))
+ (replaced replacer)
+ (replaced super_replacer)))
)))
(#StaticMethod strict_fp? type_vars arguments return_type body exs)
@@ -1169,7 +1168,7 @@
[(~+ (list\map argument$ arguments))]
(~ (return$ return_type))
[(~+ (list\map class$ exs))]
- (~ (pre_walk_replace replacer body)))))
+ (~ (replaced replacer body)))))
(#AbstractMethod type_vars arguments return_type exs)
(` ("abstract"
@@ -1544,7 +1543,7 @@
[(type.class box.double (list)) (type.class box.double (list)) (list) [(` (.: (.primitive (~ (code.text box.double))))) (` (.:as .Frac))]]]]
)
-(def: (un_quote quoted)
+(def: (un_quoted quoted)
(-> Code Code)
(` ((~' ~) (~ quoted))))
@@ -1555,8 +1554,8 @@
(list\map (function (_ [class [maybe? input]])
(|> (if maybe?
(` (: (.primitive (~ (code.text (..reflection class))))
- ((~! !!!) (~ (un_quote input)))))
- (un_quote input))
+ ((~! !!!) (~ (..un_quoted input)))))
+ (..un_quoted input))
[class]
(with_automatic_input_conversion mode))))))
@@ -1637,7 +1636,7 @@
(~ (code.text import_method_name))
[(~+ (list\map ..var$ (get@ #import_member_tvars commons)))]
(~+ (|> object_ast
- (list\map ..un_quote)
+ (list\map ..un_quoted)
(list.zipped/2 (list (type.class full_name (list))))
(list\map (with_automatic_input_conversion (get@ #import_member_mode commons)))))
(~+ (|> (jvm_invoke_inputs (get@ #import_member_mode commons) input_jvm_types arg_function_inputs)
@@ -1674,7 +1673,7 @@
[import_field_type
(if import_field_static?
(get_static_field full_name import_field_name)
- (get_virtual_field full_name import_field_name (un_quote g!obj)))])
+ (get_virtual_field full_name import_field_name (..un_quoted g!obj)))])
getter_body (if import_field_maybe?
(` ((~! ???) (~ getter_body)))
getter_body)
@@ -1689,7 +1688,7 @@
(let [setter_call (if import_field_static?
(` ((~ setter_name) (~ g!value)))
(` ((~ setter_name) (~ g!value) (~ g!obj))))
- setter_value (|> [import_field_type (un_quote g!value)]
+ setter_value (|> [import_field_type (..un_quoted g!value)]
(with_automatic_input_conversion import_field_mode))
setter_value (if import_field_maybe?
(` ((~! !!!) (~ setter_value)))
@@ -1699,7 +1698,7 @@
g!obj+ (: (List Code)
(if import_field_static?
(list)
- (list (un_quote g!obj))))]
+ (list (..un_quoted g!obj))))]
(in (list (` ((~! syntax:) (~ setter_call)
((~' in) (.list (.` ((~! io.io) ((~ (code.text setter_command)) (~+ g!obj+) (~ setter_value))))))))))))
(in (list))))]
diff --git a/stdlib/source/library/lux/locale/language.lux b/stdlib/source/library/lux/locale/language.lux
index cceaf1777..4933a97a6 100644
--- a/stdlib/source/library/lux/locale/language.lux
+++ b/stdlib/source/library/lux/locale/language.lux
@@ -16,6 +16,8 @@
{#name Text
#code Text}
+ {#.doc (doc "An ISO 639 language.")}
+
(template [<name> <tag>]
[(def: #export <name>
(-> Language Text)
diff --git a/stdlib/source/library/lux/locale/territory.lux b/stdlib/source/library/lux/locale/territory.lux
index f824005b3..15ac79698 100644
--- a/stdlib/source/library/lux/locale/territory.lux
+++ b/stdlib/source/library/lux/locale/territory.lux
@@ -18,6 +18,8 @@
#long Text
#code Nat}
+ {#.doc (doc "An ISO 3166 territory.")}
+
(template [<name> <field> <type>]
[(def: #export <name>
(-> Territory <type>)
diff --git a/stdlib/source/library/lux/macro/poly.lux b/stdlib/source/library/lux/macro/poly.lux
index 892f23284..a92c9bd96 100644
--- a/stdlib/source/library/lux/macro/poly.lux
+++ b/stdlib/source/library/lux/macro/poly.lux
@@ -114,8 +114,8 @@
(^template [<macro> <tag> <flattener>]
[(<tag> left right)
(` (<macro> (~+ (list\map (to_code env) (<flattener> type)))))])
- ([| #.Sum type.flat_variant]
- [& #.Product type.flat_tuple])
+ ([.Variant #.Sum type.flat_variant]
+ [.Tuple #.Product type.flat_tuple])
(#.Named name sub_type)
(code.identifier name)
diff --git a/stdlib/source/library/lux/macro/syntax.lux b/stdlib/source/library/lux/macro/syntax.lux
index 35744c33f..1e80a355f 100644
--- a/stdlib/source/library/lux/macro/syntax.lux
+++ b/stdlib/source/library/lux/macro/syntax.lux
@@ -35,11 +35,11 @@
"Failed to parse: " (code.format binding) text.new_line
error)))))
-(def: (join_pairs pairs)
+(def: (un_paired pairs)
(All [a] (-> (List [a a]) (List a)))
(case pairs
#.End #.End
- (#.Item [[x y] pairs']) (list& x y (join_pairs pairs'))))
+ (#.Item [[x y] pairs']) (list& x y (un_paired pairs'))))
(macro: #export (syntax: tokens)
{#.doc (doc "A more advanced way to define macros than 'macro:'."
@@ -121,7 +121,7 @@
((~! </>.run)
(: ((~! </>.Parser) (Meta (List Code)))
((~! do) (~! <>.monad)
- [(~+ (..join_pairs vars+parsers))]
+ [(~+ (..un_paired vars+parsers))]
((~' in) (~ body))))
(~ g!tokens)))))))))
diff --git a/stdlib/source/library/lux/macro/syntax/annotations.lux b/stdlib/source/library/lux/macro/syntax/annotations.lux
index 28f5a233e..73738ebc5 100644
--- a/stdlib/source/library/lux/macro/syntax/annotations.lux
+++ b/stdlib/source/library/lux/macro/syntax/annotations.lux
@@ -16,6 +16,7 @@
["." code]]]])
(type: #export Annotations
+ {#.doc (doc "Definition/module annotations.")}
(List [Name Code]))
(def: #export equivalence
diff --git a/stdlib/source/library/lux/macro/syntax/check.lux b/stdlib/source/library/lux/macro/syntax/check.lux
index bd4214eab..2e60ed0cc 100644
--- a/stdlib/source/library/lux/macro/syntax/check.lux
+++ b/stdlib/source/library/lux/macro/syntax/check.lux
@@ -18,6 +18,7 @@
"lux check")
(type: #export Check
+ {#.doc (doc "A type annotation for an expression.")}
{#type Code
#value Code})
diff --git a/stdlib/source/library/lux/macro/syntax/declaration.lux b/stdlib/source/library/lux/macro/syntax/declaration.lux
index 550c3a4b0..429368764 100644
--- a/stdlib/source/library/lux/macro/syntax/declaration.lux
+++ b/stdlib/source/library/lux/macro/syntax/declaration.lux
@@ -15,6 +15,7 @@
["." code]]]])
(type: #export Declaration
+ {#.doc (doc "A declaration for either a constant or a function.")}
{#name Text
#arguments (List Text)})
diff --git a/stdlib/source/library/lux/macro/syntax/type/variable.lux b/stdlib/source/library/lux/macro/syntax/type/variable.lux
index e73020c42..a2e710e4d 100644
--- a/stdlib/source/library/lux/macro/syntax/type/variable.lux
+++ b/stdlib/source/library/lux/macro/syntax/type/variable.lux
@@ -12,6 +12,7 @@
["." code]]]])
(type: #export Variable
+ {#.doc (doc "A variable'S name.")}
Text)
(def: #export equivalence
diff --git a/stdlib/source/library/lux/math/infix.lux b/stdlib/source/library/lux/math/infix.lux
index a0db7975d..4b1a1ef8b 100644
--- a/stdlib/source/library/lux/math/infix.lux
+++ b/stdlib/source/library/lux/math/infix.lux
@@ -65,7 +65,7 @@
))
)))
-(def: (to_prefix infix)
+(def: (prefix infix)
(-> Infix Code)
(case infix
(#Const value)
@@ -75,11 +75,10 @@
(code.form parts)
(#Unary op subject)
- (` ((~ op) (~ (to_prefix subject))))
+ (` ((~ op) (~ (prefix subject))))
(#Binary left op right)
- (` ((~ op) (~ (to_prefix right)) (~ (to_prefix left))))
- ))
+ (` ((~ op) (~ (prefix right)) (~ (prefix left))))))
(syntax: #export (infix {expr infix^})
{#.doc (doc "Infix math syntax."
@@ -94,4 +93,4 @@
"If you want your binary function to work well with it."
"Then take the argument to the right (y) as your first argument,"
"and take the argument to the left (x) as your second argument.")}
- (in (list (..to_prefix expr))))
+ (in (list (..prefix expr))))
diff --git a/stdlib/source/library/lux/math/number/i64.lux b/stdlib/source/library/lux/math/number/i64.lux
index 6ddd718ec..a5d72f5e7 100644
--- a/stdlib/source/library/lux/math/number/i64.lux
+++ b/stdlib/source/library/lux/math/number/i64.lux
@@ -145,7 +145,7 @@
[conjunction ..true ..and]
)
-(def: #export reverse
+(def: #export reversed
(All [a] (-> (I64 a) (I64 a)))
(let [swapper (: (-> Nat (All [a] (-> (I64 a) (I64 a))))
(function (_ power)
diff --git a/stdlib/source/library/lux/math/number/rev.lux b/stdlib/source/library/lux/math/number/rev.lux
index d0c4ac406..66abd7e12 100644
--- a/stdlib/source/library/lux/math/number/rev.lux
+++ b/stdlib/source/library/lux/math/number/rev.lux
@@ -290,7 +290,7 @@
(def: (digits _)
(-> Any Digits)
- (array.new //i64.width))
+ (array.empty //i64.width))
(def: (digit idx digits)
(-> Nat Digits Nat)
diff --git a/stdlib/source/library/lux/math/random.lux b/stdlib/source/library/lux/math/random.lux
index 74857ba27..c2dce8f0a 100644
--- a/stdlib/source/library/lux/math/random.lux
+++ b/stdlib/source/library/lux/math/random.lux
@@ -100,7 +100,7 @@
#.None
(one check random))))
-(def: #export (refine refiner gen)
+(def: #export (refined refiner gen)
{#.doc "Retries the generator until the output can be refined."}
(All [t r] (-> (Refiner t r) (Random t) (Random (Refined t r))))
(do ..monad
@@ -110,7 +110,7 @@
(in refined)
#.None
- (refine refiner gen))))
+ (refined refiner gen))))
(def: #export bit
(Random Bit)
@@ -169,7 +169,7 @@
(do ..monad
[x char_gen
xs (text char_gen (dec size))]
- (in (text\compose (text.of_code x) xs)))))
+ (in (text\compose (text.of_char x) xs)))))
(template [<name> <set>]
[(def: #export <name>
@@ -207,7 +207,7 @@
(def: #export (or left right)
{#.doc "Heterogeneous alternative combinator."}
- (All [a b] (-> (Random a) (Random b) (Random (| a b))))
+ (All [a b] (-> (Random a) (Random b) (Random (Or a b))))
(do {! ..monad}
[? bit]
(if ?
@@ -282,7 +282,7 @@
(if (n.= size (set.size xs+))
(in xs+)
(recur [])))))
- (\ ..monad in (set.new Hash<a>))))
+ (\ ..monad in (set.empty Hash<a>))))
(def: #export (dictionary Hash<a> size key_gen value_gen)
(All [k v] (-> (Hash k) Nat (Random k) (Random v) (Random (Dictionary k v))))
@@ -297,7 +297,7 @@
(if (n.= size (dictionary.size kv+))
(in kv+)
(recur [])))))
- (\ ..monad in (dictionary.new Hash<a>))))
+ (\ ..monad in (dictionary.empty Hash<a>))))
(def: #export instant
(Random Instant)
diff --git a/stdlib/source/library/lux/target/js.lux b/stdlib/source/library/lux/target/js.lux
index f1eea8098..1ef296cdf 100644
--- a/stdlib/source/library/lux/target/js.lux
+++ b/stdlib/source/library/lux/target/js.lux
@@ -428,7 +428,7 @@
(list\fold (.function (_ [test then!] next!)
(..if test then! next!))
else!
- (list.reverse clauses)))
+ (list.reversed clauses)))
(template [<apply> <arg>+ <type>+ <function>+]
[(`` (def: #export (<apply> function)
diff --git a/stdlib/source/library/lux/target/jvm/bytecode.lux b/stdlib/source/library/lux/target/jvm/bytecode.lux
index 33df05fbb..539408dfc 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode.lux
@@ -64,7 +64,7 @@
Tracker
{#program_counter /address.start
#next 0
- #known (dictionary.new n.hash)})
+ #known (dictionary.empty n.hash)})
(type: #export Relative
(-> Resolver (Try [(Row Exception) Instruction])))
diff --git a/stdlib/source/library/lux/target/jvm/loader.lux b/stdlib/source/library/lux/target/jvm/loader.lux
index 67d786da5..a1f9d285b 100644
--- a/stdlib/source/library/lux/target/jvm/loader.lux
+++ b/stdlib/source/library/lux/target/jvm/loader.lux
@@ -97,7 +97,7 @@
(def: #export (new_library _)
(-> Any Library)
- (atom.atom (dictionary.new text.hash)))
+ (atom.atom (dictionary.empty text.hash)))
(def: #export (memory library)
(-> Library java/lang/ClassLoader)
diff --git a/stdlib/source/library/lux/target/jvm/type/alias.lux b/stdlib/source/library/lux/target/jvm/type/alias.lux
index 365460dc6..e4c4ccca3 100644
--- a/stdlib/source/library/lux/target/jvm/type/alias.lux
+++ b/stdlib/source/library/lux/target/jvm/type/alias.lux
@@ -29,7 +29,7 @@
(def: #export fresh
Aliasing
- (dictionary.new text.hash))
+ (dictionary.empty text.hash))
(def: (var aliasing)
(-> Aliasing (Parser (Type Var)))
diff --git a/stdlib/source/library/lux/target/jvm/type/lux.lux b/stdlib/source/library/lux/target/jvm/type/lux.lux
index 79104adaa..86184ebbd 100644
--- a/stdlib/source/library/lux/target/jvm/type/lux.lux
+++ b/stdlib/source/library/lux/target/jvm/type/lux.lux
@@ -40,7 +40,7 @@
(def: #export fresh
Mapping
- (dictionary.new text.hash))
+ (dictionary.empty text.hash))
(exception: #export (unknown_var {var Text})
(exception.report
diff --git a/stdlib/source/library/lux/target/lua.lux b/stdlib/source/library/lux/target/lua.lux
index ee245e6f6..0f24e59e4 100644
--- a/stdlib/source/library/lux/target/lua.lux
+++ b/stdlib/source/library/lux/target/lua.lux
@@ -367,7 +367,7 @@
(list\fold (.function (_ [test then!] next!)
(..if test then! next!))
else!
- (list.reverse clauses)))
+ (list.reversed clauses)))
(syntax: (arity_inputs {arity <code>.nat})
(in (case arity
diff --git a/stdlib/source/library/lux/target/php.lux b/stdlib/source/library/lux/target/php.lux
index 45bf1f33e..150833a70 100644
--- a/stdlib/source/library/lux/target/php.lux
+++ b/stdlib/source/library/lux/target/php.lux
@@ -538,7 +538,7 @@
(list\fold (function (_ [test then!] next!)
(..if test then! next!))
else!
- (list.reverse clauses)))
+ (list.reversed clauses)))
(def: #export command_line_arguments
Var
diff --git a/stdlib/source/library/lux/target/python.lux b/stdlib/source/library/lux/target/python.lux
index cf4917ac5..d507ba886 100644
--- a/stdlib/source/library/lux/target/python.lux
+++ b/stdlib/source/library/lux/target/python.lux
@@ -453,7 +453,7 @@
(list\fold (.function (_ [test then!] next!)
(..if test then! next!))
else!
- (list.reverse clauses)))
+ (list.reversed clauses)))
(syntax: (arity_inputs {arity <code>.nat})
(in (case arity
diff --git a/stdlib/source/library/lux/target/r.lux b/stdlib/source/library/lux/target/r.lux
index 9028c03f5..9907e7c84 100644
--- a/stdlib/source/library/lux/target/r.lux
+++ b/stdlib/source/library/lux/target/r.lux
@@ -265,7 +265,7 @@
(list\fold (.function (_ [test then] next)
(if test then next))
else
- (list.reverse clauses)))
+ (list.reversed clauses)))
(template [<name> <op>]
[(def: #export (<name> param subject)
diff --git a/stdlib/source/library/lux/target/ruby.lux b/stdlib/source/library/lux/target/ruby.lux
index 9af88a4fc..43f2c0243 100644
--- a/stdlib/source/library/lux/target/ruby.lux
+++ b/stdlib/source/library/lux/target/ruby.lux
@@ -429,7 +429,7 @@
(list\fold (.function (_ [test then!] next!)
(..if test then! next!))
else!
- (list.reverse clauses)))
+ (list.reversed clauses)))
(syntax: (arity_inputs {arity <code>.nat})
(in (case arity
diff --git a/stdlib/source/library/lux/test.lux b/stdlib/source/library/lux/test.lux
index 00ab760d3..59a5a6a12 100644
--- a/stdlib/source/library/lux/test.lux
+++ b/stdlib/source/library/lux/test.lux
@@ -47,7 +47,7 @@
#expected_coverage (Set Name)
#actual_coverage (Set Name)})
-(def: (add_tally parameter subject)
+(def: (total parameter subject)
(-> Tally Tally Tally)
{#successes (n.+ (get@ #successes parameter) (get@ #successes subject))
#failures (n.+ (get@ #failures parameter) (get@ #failures subject))
@@ -60,8 +60,8 @@
Tally
{#successes 0
#failures 0
- #expected_coverage (set.new name.hash)
- #actual_coverage (set.new name.hash)})
+ #expected_coverage (set.empty name.hash)
+ #actual_coverage (set.empty name.hash)})
(template [<name> <category>]
[(def: <name>
@@ -90,7 +90,7 @@
_ (|> left
(async.await (function (_ [l_tally l_documentation])
(async.await (function (_ [r_tally r_documentation])
- (write! [(add_tally l_tally r_tally)
+ (write! [(..total l_tally r_tally)
(format l_documentation ..separator r_documentation)]))
right)))
io.run)]
@@ -296,7 +296,7 @@
(def: coverage_separator
Text
- (text.of_code 31))
+ (text.of_char 31))
(def: encode_coverage
(-> (List Text) Text)
@@ -395,7 +395,7 @@
async.future
async\join))
state (: (Atom (Dictionary Nat [Tally Text]))
- (atom.atom (dictionary.new n.order)))
+ (atom.atom (dictionary.empty n.order)))
[read! write!] (: [Assertion
(async.Resolver [Tally Text])]
(async.async []))
@@ -410,7 +410,7 @@
(list\map product.right))]
(write! [(|> assertions
(list\map product.left)
- (list\fold ..add_tally ..start))
+ (list\fold ..total ..start))
(|> assertions
(list\map product.right)
(text.join_with ..separator))]))
diff --git a/stdlib/source/library/lux/time.lux b/stdlib/source/library/lux/time.lux
index 4a65fa4b8..42b850964 100644
--- a/stdlib/source/library/lux/time.lux
+++ b/stdlib/source/library/lux/time.lux
@@ -157,7 +157,7 @@
(def: (adjust_negative space duration)
(-> Duration Duration Duration)
(if (duration.negative? duration)
- (duration.merge space duration)
+ (duration.merged space duration)
duration))
(def: (millis_format millis)
@@ -177,9 +177,9 @@
(def: #export (clock time)
(-> Time Clock)
(let [time (|> time ..to_millis .int duration.of_millis)
- [hours time] [(duration.query duration.hour time) (duration.frame duration.hour time)]
- [minutes time] [(duration.query duration.minute time) (duration.frame duration.minute time)]
- [seconds millis] [(duration.query duration.second time) (duration.frame duration.second time)]]
+ [hours time] [(duration.query duration.hour time) (duration.framed duration.hour time)]
+ [minutes time] [(duration.query duration.minute time) (duration.framed duration.minute time)]
+ [seconds millis] [(duration.query duration.second time) (duration.framed duration.second time)]]
{#hour (.nat hours)
#minute (.nat minutes)
#second (.nat seconds)
@@ -190,7 +190,7 @@
(def: #export (time clock)
(-> Clock (Try Time))
- (|> ($_ duration.merge
+ (|> ($_ duration.merged
(duration.up (get@ #hour clock) duration.hour)
(duration.up (get@ #minute clock) duration.minute)
(duration.up (get@ #second clock) duration.second)
diff --git a/stdlib/source/library/lux/time/date.lux b/stdlib/source/library/lux/time/date.lux
index 1db01faf8..c634c8405 100644
--- a/stdlib/source/library/lux/time/date.lux
+++ b/stdlib/source/library/lux/time/date.lux
@@ -32,7 +32,7 @@
(Dictionary Nat Month)
(list\fold (function (_ month mapping)
(dictionary.put (//month.number month) month mapping))
- (dictionary.new n.hash)
+ (dictionary.empty n.hash)
//month.year))
(def: minimum_day
diff --git a/stdlib/source/library/lux/time/duration.lux b/stdlib/source/library/lux/time/duration.lux
index 72ee9debc..c133b1045 100644
--- a/stdlib/source/library/lux/time/duration.lux
+++ b/stdlib/source/library/lux/time/duration.lux
@@ -41,8 +41,8 @@
(-> Duration Duration Duration)
(:abstraction (<op> (:representation param) (:representation subject))))]
- [i.+ merge]
- [i.% frame]
+ [i.+ merged]
+ [i.% framed]
)
(template [<op> <name>]
@@ -106,13 +106,13 @@
)
(def: #export leap_year
- (..merge ..day ..normal_year))
+ (..merged ..day ..normal_year))
(implementation: #export monoid
(Monoid Duration)
(def: identity ..empty)
- (def: compose ..merge))
+ (def: compose ..merged))
(template [<value> <definition>]
[(def: <definition> <value>)]
@@ -134,16 +134,16 @@
(nat\encode 0)
..milli_second_suffix)
(let [signed? (negative? duration)
- [days time_left] [(query day duration) (frame day duration)]
+ [days time_left] [(query day duration) (framed day duration)]
days (if signed?
(i.abs days)
days)
time_left (if signed?
(..inverse time_left)
time_left)
- [hours time_left] [(query hour time_left) (frame hour time_left)]
- [minutes time_left] [(query minute time_left) (frame minute time_left)]
- [seconds time_left] [(query second time_left) (frame second time_left)]
+ [hours time_left] [(query hour time_left) (framed hour time_left)]
+ [minutes time_left] [(query minute time_left) (framed minute time_left)]
+ [seconds time_left] [(query second time_left) (framed second time_left)]
millis (to_millis time_left)]
($_ text\compose
(if signed? ..negative_sign ..positive_sign)
@@ -174,11 +174,11 @@
seconds (section ..second_suffix "")
millis (section ..milli_second_suffix "")
#let [span (|> ..empty
- (..merge (..up days ..day))
- (..merge (..up hours ..hour))
- (..merge (..up minutes ..minute))
- (..merge (..up seconds ..second))
- (..merge (..up millis ..milli_second)))]]
+ (..merged (..up days ..day))
+ (..merged (..up hours ..hour))
+ (..merged (..up minutes ..minute))
+ (..merged (..up seconds ..second))
+ (..merged (..up millis ..milli_second)))]]
(in (case sign
(#.Left _) (..inverse span)
(#.Right _) span)))))
@@ -191,13 +191,13 @@
(def: #export (difference from to)
(-> Duration Duration Duration)
- (|> from ..inverse (..merge to)))
+ (|> from ..inverse (..merged to)))
(implementation: #export enum
(Enum Duration)
(def: &order ..order)
(def: succ
- (..merge ..milli_second))
+ (..merged ..milli_second))
(def: pred
- (..merge (..inverse ..milli_second))))
+ (..merged (..inverse ..milli_second))))
diff --git a/stdlib/source/library/lux/time/instant.lux b/stdlib/source/library/lux/time/instant.lux
index e734e1bfc..c136a6e15 100644
--- a/stdlib/source/library/lux/time/instant.lux
+++ b/stdlib/source/library/lux/time/instant.lux
@@ -117,7 +117,7 @@
(def: (clock_time duration)
(-> Duration Time)
(|> (if (\ duration.order < duration.empty duration)
- (duration.merge duration.day duration)
+ (duration.merged duration.day duration)
duration)
duration.to_millis
.nat
@@ -144,7 +144,7 @@
(duration.up (.nat (i.* -1 days)))
duration.inverse)
(duration.up (.nat days) duration.day))
- (duration.merge (duration.up time duration.milli_second))
+ (duration.merged (duration.up time duration.milli_second))
..absolute))))
(implementation: #export codec
@@ -210,7 +210,7 @@
(-> Instant Day)
(let [offset (..relative instant)
days (duration.query duration.day offset)
- day_time (duration.frame duration.day offset)
+ day_time (duration.framed duration.day offset)
days (if (and (duration.negative? offset)
(not (duration.neutral? day_time)))
(dec days)
diff --git a/stdlib/source/library/lux/tool/compiler/default/init.lux b/stdlib/source/library/lux/tool/compiler/default/init.lux
index 8b668b60f..1a8617f53 100644
--- a/stdlib/source/library/lux/tool/compiler/default/init.lux
+++ b/stdlib/source/library/lux/tool/compiler/default/init.lux
@@ -84,8 +84,8 @@
(-> (///directive.State+ anchor expression directive)
(///directive.State+ anchor expression directive))))
(function (_ [directive_extensions sub_state])
- [(dictionary.merge directive_extensions
- (luxD.bundle expander host_analysis program anchorT,expressionT,directiveT extender))
+ [(dictionary.merged directive_extensions
+ (luxD.bundle expander host_analysis program anchorT,expressionT,directiveT extender))
sub_state]))
(type: Reader
diff --git a/stdlib/source/library/lux/tool/compiler/default/platform.lux b/stdlib/source/library/lux/tool/compiler/default/platform.lux
index c5f2cfb8e..1848c28bc 100644
--- a/stdlib/source/library/lux/tool/compiler/default/platform.lux
+++ b/stdlib/source/library/lux/tool/compiler/default/platform.lux
@@ -136,13 +136,13 @@
{#descriptor.hash 0
#descriptor.name archive.runtime_module
#descriptor.file ""
- #descriptor.references (set.new text.hash)
+ #descriptor.references (set.empty text.hash)
#descriptor.state #.Compiled
#descriptor.registry registry})
(def: runtime_document
(Document .Module)
- (document.write $.key (module.new 0)))
+ (document.write $.key (module.empty 0)))
(def: (process_runtime archive platform)
(All [<type_vars>]
@@ -219,7 +219,7 @@
[analysers
synthesizers
generators
- (dictionary.merge directives (host_directive_bundle phase_wrapper))])
+ (dictionary.merged directives (host_directive_bundle phase_wrapper))])
(def: #export (initialize static module expander host_analysis platform generation_bundle host_directive_bundle program anchorT,expressionT,directiveT extender
import compilation_sources)
@@ -297,7 +297,7 @@
(def: empty
(Set Module)
- (set.new text.hash))
+ (set.empty text.hash))
(type: Mapping
(Dictionary Module (Set Module)))
@@ -308,7 +308,7 @@
(def: independence
Dependence
- (let [empty (dictionary.new text.hash)]
+ (let [empty (dictionary.empty text.hash)]
{#depends_on empty
#depended_by empty}))
@@ -394,7 +394,7 @@
initial
(Var (Dictionary Module <Pending>))
- (:assume (stm.var (dictionary.new text.hash))))
+ (:assume (stm.var (dictionary.empty text.hash))))
dependence (: (Var Dependence)
(stm.var ..independence))]
(function (_ compile)
@@ -471,7 +471,7 @@
(#try.Success [resulting_archive resulting_state])
(stm.commit (do stm.monad
[[_ [merged_archive _]] (stm.update (function (_ [archive state])
- [(archive.merge resulting_archive archive)
+ [(archive.merged resulting_archive archive)
state])
current)]
(in (#try.Success [merged_archive resulting_state])))))
@@ -565,7 +565,7 @@
(monad.seq ..monad))
#let [archive (|> archive,document+
(list\map product.left)
- (list\fold archive.merge archive))]]
+ (list\fold archive.merged archive))]]
(in [archive (try.assumed
(..updated_state archive state))])))]
(case ((get@ #///.process compilation)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux.lux b/stdlib/source/library/lux/tool/compiler/language/lux.lux
index e5c8e654d..f8ddeff8e 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux.lux
@@ -104,4 +104,4 @@
(Key .Module)
(key.key {#signature.name (name_of ..compiler)
#signature.version /version.version}
- (module.new 0)))
+ (module.empty 0)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux b/stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux
index f188f3c7d..02100305d 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux
@@ -1,6 +1,6 @@
(.module:
[library
- [lux (#- nat int rev)
+ [lux (#- Variant Tuple nat int rev)
[abstract
[equivalence (#+ Equivalence)]
[hash (#+ Hash)]
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux
index b99a93f73..c7b843385 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux
@@ -220,7 +220,7 @@
(do !
[nextA next]
(in [(list) nextA]))
- (list.reverse matches))]
+ (list.reversed matches))]
(in [(/.pattern/tuple memberP+)
thenA])))
@@ -312,7 +312,7 @@
branchesT)
outputHC (|> outputH product.left /coverage.determine)
outputTC (monad.map ! (|>> product.left /coverage.determine) outputT)
- _ (.case (monad.fold try.monad /coverage.merge outputHC outputTC)
+ _ (.case (monad.fold try.monad /coverage.merged outputHC outputTC)
(#try.Success coverage)
(///.assertion non_exhaustive_pattern_matching [inputC branches coverage]
(/coverage.exhaustive? coverage))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case/coverage.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case/coverage.lux
index 3760c86cc..7799be183 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case/coverage.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case/coverage.lux
@@ -121,7 +121,7 @@
## Tuple patterns can be exhaustive if there is exhaustiveness for all of
## their sub-patterns.
(#/.Complex (#/.Tuple membersP+))
- (case (list.reverse membersP+)
+ (case (list.reversed membersP+)
(^or #.End (#.Item _ #.End))
(/.except ..invalid_tuple_pattern [])
@@ -151,7 +151,7 @@
(in (#Variant (if right?
(#.Some idx)
#.None)
- (|> (dictionary.new n.hash)
+ (|> (dictionary.empty n.hash)
(dictionary.put idx value_coverage)))))))
(def: (xor left right)
@@ -217,7 +217,7 @@
## necessary to merge them all to figure out if the entire
## pattern-matching expression is exhaustive and whether it contains
## redundant patterns.
-(def: #export (merge addition so_far)
+(def: #export (merged addition so_far)
(-> Coverage Coverage (Try Coverage))
(case [addition so_far]
[#Partial #Partial]
@@ -246,7 +246,7 @@
(case (dictionary.get tagA casesSF')
(#.Some coverageSF)
(do !
- [coverageM (merge coverageA coverageSF)]
+ [coverageM (merged coverageA coverageSF)]
(in (dictionary.put tagA coverageM casesSF')))
#.None
@@ -271,7 +271,7 @@
## Same prefix
[#1 #0]
(do try.monad
- [rightM (merge rightA rightSF)]
+ [rightM (merged rightA rightSF)]
(if (exhaustive? rightM)
## If all that follows is exhaustive, then it can be safely dropped
## (since only the "left" part would influence whether the
@@ -282,7 +282,7 @@
## Same suffix
[#0 #1]
(do try.monad
- [leftM (merge leftA leftSF)]
+ [leftM (merged leftA leftSF)]
(in (#Seq leftM rightA)))
## The 2 sequences cannot possibly be merged.
@@ -332,7 +332,7 @@
(in [#.None (list coverageA)])
(#.Item altSF altsSF')
- (case (merge coverageA altSF)
+ (case (merged coverageA altSF)
(#try.Success altMSF)
(case altMSF
(#Alt _)
@@ -356,7 +356,7 @@
(recur successA' possibilitiesSF'))
#.None
- (case (list.reverse possibilitiesSF)
+ (case (list.reversed possibilitiesSF)
(#.Item last prevs)
(in (list\fold (function (_ left right) (#Alt left right))
last
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/scope.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/scope.lux
index 31ce0998c..e9e68deb3 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/scope.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/scope.lux
@@ -97,7 +97,7 @@
scope)
(product.right ref+inner))]))
[init_ref #.End]
- (list.reverse inner))
+ (list.reversed inner))
scopes (list\compose inner' outer)]
(#.Right [(set@ #.scopes scopes state)
(#.Some [ref_type ref])]))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/structure.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/structure.lux
index f3e9d30a1..4ecca3d1a 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/structure.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/structure.lux
@@ -329,7 +329,7 @@
#.None
(/.except ..tag_does_not_belong_to_record [key recordT]))))
(: (Dictionary Nat Code)
- (dictionary.new n.hash))
+ (dictionary.empty n.hash))
record)
#let [ordered_tuple (list\map (function (_ idx) (maybe.assume (dictionary.get idx idx->val)))
tuple_range)]]
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux
index d0f8db7c5..aa78e8ade 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux
@@ -48,7 +48,7 @@
(def: #export empty
Bundle
- (dictionary.new text.hash))
+ (dictionary.empty text.hash))
(type: #export (State s i o)
{#bundle (Bundle s i o)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis.lux
index 93e1c6d1f..0def3e75d 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis.lux
@@ -12,5 +12,5 @@
(def: #export (bundle eval host_specific)
(-> Eval Bundle Bundle)
- (dictionary.merge host_specific
- (/lux.bundle eval)))
+ (dictionary.merged host_specific
+ (/lux.bundle eval)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/js.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/js.lux
index 4f185f810..64a9b36b0 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/js.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/js.lux
@@ -208,8 +208,8 @@
Bundle
(<| (bundle.prefix "js")
(|> bundle.empty
- (dictionary.merge bundle::array)
- (dictionary.merge bundle::object)
+ (dictionary.merged bundle::array)
+ (dictionary.merged bundle::object)
(bundle.install "constant" js::constant)
(bundle.install "apply" js::apply)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux
index acaf79ae9..0a60511ab 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux
@@ -698,50 +698,50 @@
Bundle
(<| (///bundle.prefix "array")
(|> ///bundle.empty
- (dictionary.merge (<| (///bundle.prefix "length")
- (|> ///bundle.empty
- (///bundle.install (reflection.reflection reflection.boolean) (primitive_array_length_handler jvm.boolean))
- (///bundle.install (reflection.reflection reflection.byte) (primitive_array_length_handler jvm.byte))
- (///bundle.install (reflection.reflection reflection.short) (primitive_array_length_handler jvm.short))
- (///bundle.install (reflection.reflection reflection.int) (primitive_array_length_handler jvm.int))
- (///bundle.install (reflection.reflection reflection.long) (primitive_array_length_handler jvm.long))
- (///bundle.install (reflection.reflection reflection.float) (primitive_array_length_handler jvm.float))
- (///bundle.install (reflection.reflection reflection.double) (primitive_array_length_handler jvm.double))
- (///bundle.install (reflection.reflection reflection.char) (primitive_array_length_handler jvm.char))
- (///bundle.install "object" array::length::object))))
- (dictionary.merge (<| (///bundle.prefix "new")
- (|> ///bundle.empty
- (///bundle.install (reflection.reflection reflection.boolean) (new_primitive_array_handler jvm.boolean))
- (///bundle.install (reflection.reflection reflection.byte) (new_primitive_array_handler jvm.byte))
- (///bundle.install (reflection.reflection reflection.short) (new_primitive_array_handler jvm.short))
- (///bundle.install (reflection.reflection reflection.int) (new_primitive_array_handler jvm.int))
- (///bundle.install (reflection.reflection reflection.long) (new_primitive_array_handler jvm.long))
- (///bundle.install (reflection.reflection reflection.float) (new_primitive_array_handler jvm.float))
- (///bundle.install (reflection.reflection reflection.double) (new_primitive_array_handler jvm.double))
- (///bundle.install (reflection.reflection reflection.char) (new_primitive_array_handler jvm.char))
- (///bundle.install "object" array::new::object))))
- (dictionary.merge (<| (///bundle.prefix "read")
- (|> ///bundle.empty
- (///bundle.install (reflection.reflection reflection.boolean) (read_primitive_array_handler ..boolean jvm.boolean))
- (///bundle.install (reflection.reflection reflection.byte) (read_primitive_array_handler ..byte jvm.byte))
- (///bundle.install (reflection.reflection reflection.short) (read_primitive_array_handler ..short jvm.short))
- (///bundle.install (reflection.reflection reflection.int) (read_primitive_array_handler ..int jvm.int))
- (///bundle.install (reflection.reflection reflection.long) (read_primitive_array_handler ..long jvm.long))
- (///bundle.install (reflection.reflection reflection.float) (read_primitive_array_handler ..float jvm.float))
- (///bundle.install (reflection.reflection reflection.double) (read_primitive_array_handler ..double jvm.double))
- (///bundle.install (reflection.reflection reflection.char) (read_primitive_array_handler ..char jvm.char))
- (///bundle.install "object" array::read::object))))
- (dictionary.merge (<| (///bundle.prefix "write")
- (|> ///bundle.empty
- (///bundle.install (reflection.reflection reflection.boolean) (write_primitive_array_handler ..boolean jvm.boolean))
- (///bundle.install (reflection.reflection reflection.byte) (write_primitive_array_handler ..byte jvm.byte))
- (///bundle.install (reflection.reflection reflection.short) (write_primitive_array_handler ..short jvm.short))
- (///bundle.install (reflection.reflection reflection.int) (write_primitive_array_handler ..int jvm.int))
- (///bundle.install (reflection.reflection reflection.long) (write_primitive_array_handler ..long jvm.long))
- (///bundle.install (reflection.reflection reflection.float) (write_primitive_array_handler ..float jvm.float))
- (///bundle.install (reflection.reflection reflection.double) (write_primitive_array_handler ..double jvm.double))
- (///bundle.install (reflection.reflection reflection.char) (write_primitive_array_handler ..char jvm.char))
- (///bundle.install "object" array::write::object))))
+ (dictionary.merged (<| (///bundle.prefix "length")
+ (|> ///bundle.empty
+ (///bundle.install (reflection.reflection reflection.boolean) (primitive_array_length_handler jvm.boolean))
+ (///bundle.install (reflection.reflection reflection.byte) (primitive_array_length_handler jvm.byte))
+ (///bundle.install (reflection.reflection reflection.short) (primitive_array_length_handler jvm.short))
+ (///bundle.install (reflection.reflection reflection.int) (primitive_array_length_handler jvm.int))
+ (///bundle.install (reflection.reflection reflection.long) (primitive_array_length_handler jvm.long))
+ (///bundle.install (reflection.reflection reflection.float) (primitive_array_length_handler jvm.float))
+ (///bundle.install (reflection.reflection reflection.double) (primitive_array_length_handler jvm.double))
+ (///bundle.install (reflection.reflection reflection.char) (primitive_array_length_handler jvm.char))
+ (///bundle.install "object" array::length::object))))
+ (dictionary.merged (<| (///bundle.prefix "new")
+ (|> ///bundle.empty
+ (///bundle.install (reflection.reflection reflection.boolean) (new_primitive_array_handler jvm.boolean))
+ (///bundle.install (reflection.reflection reflection.byte) (new_primitive_array_handler jvm.byte))
+ (///bundle.install (reflection.reflection reflection.short) (new_primitive_array_handler jvm.short))
+ (///bundle.install (reflection.reflection reflection.int) (new_primitive_array_handler jvm.int))
+ (///bundle.install (reflection.reflection reflection.long) (new_primitive_array_handler jvm.long))
+ (///bundle.install (reflection.reflection reflection.float) (new_primitive_array_handler jvm.float))
+ (///bundle.install (reflection.reflection reflection.double) (new_primitive_array_handler jvm.double))
+ (///bundle.install (reflection.reflection reflection.char) (new_primitive_array_handler jvm.char))
+ (///bundle.install "object" array::new::object))))
+ (dictionary.merged (<| (///bundle.prefix "read")
+ (|> ///bundle.empty
+ (///bundle.install (reflection.reflection reflection.boolean) (read_primitive_array_handler ..boolean jvm.boolean))
+ (///bundle.install (reflection.reflection reflection.byte) (read_primitive_array_handler ..byte jvm.byte))
+ (///bundle.install (reflection.reflection reflection.short) (read_primitive_array_handler ..short jvm.short))
+ (///bundle.install (reflection.reflection reflection.int) (read_primitive_array_handler ..int jvm.int))
+ (///bundle.install (reflection.reflection reflection.long) (read_primitive_array_handler ..long jvm.long))
+ (///bundle.install (reflection.reflection reflection.float) (read_primitive_array_handler ..float jvm.float))
+ (///bundle.install (reflection.reflection reflection.double) (read_primitive_array_handler ..double jvm.double))
+ (///bundle.install (reflection.reflection reflection.char) (read_primitive_array_handler ..char jvm.char))
+ (///bundle.install "object" array::read::object))))
+ (dictionary.merged (<| (///bundle.prefix "write")
+ (|> ///bundle.empty
+ (///bundle.install (reflection.reflection reflection.boolean) (write_primitive_array_handler ..boolean jvm.boolean))
+ (///bundle.install (reflection.reflection reflection.byte) (write_primitive_array_handler ..byte jvm.byte))
+ (///bundle.install (reflection.reflection reflection.short) (write_primitive_array_handler ..short jvm.short))
+ (///bundle.install (reflection.reflection reflection.int) (write_primitive_array_handler ..int jvm.int))
+ (///bundle.install (reflection.reflection reflection.long) (write_primitive_array_handler ..long jvm.long))
+ (///bundle.install (reflection.reflection reflection.float) (write_primitive_array_handler ..float jvm.float))
+ (///bundle.install (reflection.reflection reflection.double) (write_primitive_array_handler ..double jvm.double))
+ (///bundle.install (reflection.reflection reflection.char) (write_primitive_array_handler ..char jvm.char))
+ (///bundle.install "object" array::write::object))))
)))
(def: object::null
@@ -1163,11 +1163,11 @@
(-> (List Text) (List Text) [(List .Type) Mapping])
(let [jvm_tvars (list\compose owner_tvars method_tvars)
lux_tvars (|> jvm_tvars
- list.reverse
+ list.reversed
list.enumeration
(list\map (function (_ [idx name])
[name (idx_to_parameter idx)]))
- list.reverse)
+ list.reversed)
num_owner_tvars (list.size owner_tvars)
owner_tvarsT (|> lux_tvars (list.take num_owner_tvars) (list\map product.right))
mapping (dictionary.of_list text.hash lux_tvars)]
@@ -1295,8 +1295,8 @@
(function (_ method)
(do !
[#let [expected_method_tvars (method_type_variables method)
- aliasing (dictionary.merge (..aliasing expected_class_tvars actual_class_tvars)
- (..aliasing expected_method_tvars actual_method_tvars))]
+ aliasing (dictionary.merged (..aliasing expected_class_tvars actual_class_tvars)
+ (..aliasing expected_method_tvars actual_method_tvars))]
passes? (check_method aliasing class method_name method_style inputsJT method)]
(\ ! map (if passes?
(|>> #Pass)
@@ -1326,8 +1326,8 @@
(monad.map ! (function (_ constructor)
(do !
[#let [expected_method_tvars (constructor_type_variables constructor)
- aliasing (dictionary.merge (..aliasing expected_class_tvars actual_class_tvars)
- (..aliasing expected_method_tvars actual_method_tvars))]
+ aliasing (dictionary.merged (..aliasing expected_class_tvars actual_class_tvars)
+ (..aliasing expected_method_tvars actual_method_tvars))]
passes? (check_constructor aliasing class inputsJT constructor)]
(\ ! map
(if passes? (|>> #Pass) (|>> #Hint))
@@ -1476,22 +1476,22 @@
(-> java/lang/ClassLoader Bundle)
(<| (///bundle.prefix "member")
(|> ///bundle.empty
- (dictionary.merge (<| (///bundle.prefix "get")
- (|> ///bundle.empty
- (///bundle.install "static" (get::static class_loader))
- (///bundle.install "virtual" (get::virtual class_loader)))))
- (dictionary.merge (<| (///bundle.prefix "put")
- (|> ///bundle.empty
- (///bundle.install "static" (put::static class_loader))
- (///bundle.install "virtual" (put::virtual class_loader)))))
- (dictionary.merge (<| (///bundle.prefix "invoke")
- (|> ///bundle.empty
- (///bundle.install "static" (invoke::static class_loader))
- (///bundle.install "virtual" (invoke::virtual class_loader))
- (///bundle.install "special" (invoke::special class_loader))
- (///bundle.install "interface" (invoke::interface class_loader))
- (///bundle.install "constructor" (invoke::constructor class_loader))
- )))
+ (dictionary.merged (<| (///bundle.prefix "get")
+ (|> ///bundle.empty
+ (///bundle.install "static" (get::static class_loader))
+ (///bundle.install "virtual" (get::virtual class_loader)))))
+ (dictionary.merged (<| (///bundle.prefix "put")
+ (|> ///bundle.empty
+ (///bundle.install "static" (put::static class_loader))
+ (///bundle.install "virtual" (put::virtual class_loader)))))
+ (dictionary.merged (<| (///bundle.prefix "invoke")
+ (|> ///bundle.empty
+ (///bundle.install "static" (invoke::static class_loader))
+ (///bundle.install "virtual" (invoke::virtual class_loader))
+ (///bundle.install "special" (invoke::special class_loader))
+ (///bundle.install "interface" (invoke::interface class_loader))
+ (///bundle.install "constructor" (invoke::constructor class_loader))
+ )))
)))
(type: #export (Annotation_Parameter a)
@@ -1686,7 +1686,7 @@
arguments)
[scope bodyA] (|> arguments'
(#.Item [self_name selfT])
- list.reverse
+ list.reversed
(list\fold scope.with_local (analyse archive body))
(typeA.with_type .Any)
/////analysis.with_scope)]
@@ -1762,7 +1762,7 @@
arguments)
[scope bodyA] (|> arguments'
(#.Item [self_name selfT])
- list.reverse
+ list.reversed
(list\fold scope.with_local (analyse archive body))
(typeA.with_type returnT)
/////analysis.with_scope)]
@@ -1835,7 +1835,7 @@
(in [name luxT])))
arguments)
[scope bodyA] (|> arguments'
- list.reverse
+ list.reversed
(list\fold scope.with_local (analyse archive body))
(typeA.with_type returnT)
/////analysis.with_scope)]
@@ -2002,7 +2002,7 @@
returnT (boxed_reflection_return mapping return)
[scope bodyA] (|> arguments'
(#.Item [self_name selfT])
- list.reverse
+ list.reversed
(list\fold scope.with_local (analyse archive body))
(typeA.with_type returnT)
/////analysis.with_scope)]
@@ -2173,14 +2173,14 @@
(-> java/lang/ClassLoader Bundle)
(<| (///bundle.prefix "jvm")
(|> ///bundle.empty
- (dictionary.merge bundle::conversion)
- (dictionary.merge bundle::int)
- (dictionary.merge bundle::long)
- (dictionary.merge bundle::float)
- (dictionary.merge bundle::double)
- (dictionary.merge bundle::char)
- (dictionary.merge bundle::array)
- (dictionary.merge (bundle::object class_loader))
- (dictionary.merge (bundle::member class_loader))
- (dictionary.merge (bundle::class class_loader))
+ (dictionary.merged bundle::conversion)
+ (dictionary.merged bundle::int)
+ (dictionary.merged bundle::long)
+ (dictionary.merged bundle::float)
+ (dictionary.merged bundle::double)
+ (dictionary.merged bundle::char)
+ (dictionary.merged bundle::array)
+ (dictionary.merged (bundle::object class_loader))
+ (dictionary.merged (bundle::member class_loader))
+ (dictionary.merged (bundle::class class_loader))
)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lua.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lua.lux
index 9fc9ce902..923880ebd 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lua.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lua.lux
@@ -239,9 +239,9 @@
Bundle
(<| (bundle.prefix "lua")
(|> bundle.empty
- (dictionary.merge bundle::array)
- (dictionary.merge bundle::object)
- (dictionary.merge bundle::utf8)
+ (dictionary.merged bundle::array)
+ (dictionary.merged bundle::object)
+ (dictionary.merged bundle::utf8)
(bundle.install "constant" lua::constant)
(bundle.install "apply" lua::apply)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux
index 78d3b7aac..906b54e23 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux
@@ -293,9 +293,9 @@
(-> Eval Bundle)
(<| (///bundle.prefix "lux")
(|> ///bundle.empty
- (dictionary.merge (bundle::lux eval))
- (dictionary.merge bundle::i64)
- (dictionary.merge bundle::f64)
- (dictionary.merge bundle::text)
- (dictionary.merge bundle::io)
+ (dictionary.merged (bundle::lux eval))
+ (dictionary.merged bundle::i64)
+ (dictionary.merged bundle::f64)
+ (dictionary.merged bundle::text)
+ (dictionary.merged bundle::io)
)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/php.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/php.lux
index 40cf1f094..0a7fc2d7d 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/php.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/php.lux
@@ -204,8 +204,8 @@
Bundle
(<| (bundle.prefix "php")
(|> bundle.empty
- (dictionary.merge bundle::array)
- (dictionary.merge bundle::object)
+ (dictionary.merged bundle::array)
+ (dictionary.merged bundle::object)
(bundle.install "constant" php::constant)
(bundle.install "apply" php::apply)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/python.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/python.lux
index 6d5e3290f..b5a81bc65 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/python.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/python.lux
@@ -220,8 +220,8 @@
Bundle
(<| (bundle.prefix "python")
(|> bundle.empty
- (dictionary.merge bundle::array)
- (dictionary.merge bundle::object)
+ (dictionary.merged bundle::array)
+ (dictionary.merged bundle::object)
(bundle.install "constant" python::constant)
(bundle.install "import" python::import)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/ruby.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/ruby.lux
index 65650c837..a5328bc54 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/ruby.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/ruby.lux
@@ -189,8 +189,8 @@
Bundle
(<| (bundle.prefix "ruby")
(|> bundle.empty
- (dictionary.merge bundle::array)
- (dictionary.merge bundle::object)
+ (dictionary.merged bundle::array)
+ (dictionary.merged bundle::object)
(bundle.install "constant" ruby::constant)
(bundle.install "apply" ruby::apply)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/scheme.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/scheme.lux
index 8e309a9de..5a6776b13 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/scheme.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/scheme.lux
@@ -149,8 +149,8 @@
Bundle
(<| (bundle.prefix "scheme")
(|> bundle.empty
- (dictionary.merge bundle::array)
- (dictionary.merge bundle::object)
+ (dictionary.merged bundle::array)
+ (dictionary.merged bundle::object)
(bundle.install "constant" scheme::constant)
(bundle.install "apply" scheme::apply)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/bundle.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/bundle.lux
index 95b04daa2..1869c6ff4 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/bundle.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/bundle.lux
@@ -13,7 +13,7 @@
(def: #export empty
Bundle
- (dictionary.new text.hash))
+ (dictionary.empty text.hash))
(def: #export (install name anonymous)
(All [s i o]
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux
index d70b59aef..d12359d68 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux
@@ -448,4 +448,4 @@
(<| (///bundle.prefix "lux")
(|> ///bundle.empty
(dictionary.put "def" (lux::def expander host_analysis))
- (dictionary.merge (..bundle::def expander host_analysis program anchorT,expressionT,directiveT extender)))))
+ (dictionary.merged (..bundle::def expander host_analysis program anchorT,expressionT,directiveT extender)))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/common_lisp.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/common_lisp.lux
index f42aa31ff..740236dc8 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/common_lisp.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/common_lisp.lux
@@ -14,5 +14,5 @@
(def: #export bundle
Bundle
- (dictionary.merge /common.bundle
- /host.bundle))
+ (dictionary.merged /common.bundle
+ /host.bundle))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/common_lisp/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/common_lisp/common.lux
index 602c40504..4900dea03 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/common_lisp/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/common_lisp/common.lux
@@ -172,9 +172,9 @@
Bundle
(<| (/.prefix "lux")
(|> /.empty
- (dictionary.merge lux_procs)
- (dictionary.merge i64_procs)
- (dictionary.merge f64_procs)
- (dictionary.merge text_procs)
- (dictionary.merge io_procs)
+ (dictionary.merged lux_procs)
+ (dictionary.merged i64_procs)
+ (dictionary.merged f64_procs)
+ (dictionary.merged text_procs)
+ (dictionary.merged io_procs)
)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js.lux
index ba83e257f..64db8196b 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js.lux
@@ -14,5 +14,5 @@
(def: #export bundle
Bundle
- (dictionary.merge /common.bundle
- /host.bundle))
+ (dictionary.merged /common.bundle
+ /host.bundle))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/common.lux
index da9bbc7f8..33267e376 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/common.lux
@@ -184,8 +184,8 @@
Bundle
(<| (/.prefix "lux")
(|> lux_procs
- (dictionary.merge i64_procs)
- (dictionary.merge f64_procs)
- (dictionary.merge text_procs)
- (dictionary.merge io_procs)
+ (dictionary.merged i64_procs)
+ (dictionary.merged f64_procs)
+ (dictionary.merged text_procs)
+ (dictionary.merged io_procs)
)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/host.lux
index 8e9464e77..6bb747d54 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/host.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/host.lux
@@ -150,8 +150,8 @@
Bundle
(<| (/.prefix "js")
(|> /.empty
- (dictionary.merge ..array)
- (dictionary.merge ..object)
+ (dictionary.merged ..array)
+ (dictionary.merged ..object)
(/.install "constant" js::constant)
(/.install "apply" js::apply)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm.lux
index 396c3284e..16a34222e 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm.lux
@@ -14,7 +14,7 @@
(def: #export bundle
Bundle
- ($_ dictionary.merge
+ ($_ dictionary.merged
/common.bundle
/host.bundle
))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/common.lux
index 354537c19..78c75a17b 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/common.lux
@@ -408,7 +408,7 @@
Bundle
(<| (/////bundle.prefix "lux")
(|> bundle::lux
- (dictionary.merge ..bundle::i64)
- (dictionary.merge ..bundle::f64)
- (dictionary.merge ..bundle::text)
- (dictionary.merge ..bundle::io))))
+ (dictionary.merged ..bundle::i64)
+ (dictionary.merged ..bundle::f64)
+ (dictionary.merged ..bundle::text)
+ (dictionary.merged ..bundle::io))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux
index 58ac1efc1..2c78f5988 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux
@@ -462,50 +462,50 @@
Bundle
(<| (/////bundle.prefix "array")
(|> /////bundle.empty
- (dictionary.merge (<| (/////bundle.prefix "length")
- (|> /////bundle.empty
- (/////bundle.install (reflection.reflection reflection.boolean) (primitive_array_length_handler type.boolean))
- (/////bundle.install (reflection.reflection reflection.byte) (primitive_array_length_handler type.byte))
- (/////bundle.install (reflection.reflection reflection.short) (primitive_array_length_handler type.short))
- (/////bundle.install (reflection.reflection reflection.int) (primitive_array_length_handler type.int))
- (/////bundle.install (reflection.reflection reflection.long) (primitive_array_length_handler type.long))
- (/////bundle.install (reflection.reflection reflection.float) (primitive_array_length_handler type.float))
- (/////bundle.install (reflection.reflection reflection.double) (primitive_array_length_handler type.double))
- (/////bundle.install (reflection.reflection reflection.char) (primitive_array_length_handler type.char))
- (/////bundle.install "object" array::length::object))))
- (dictionary.merge (<| (/////bundle.prefix "new")
- (|> /////bundle.empty
- (/////bundle.install (reflection.reflection reflection.boolean) (new_primitive_array_handler __.t_boolean))
- (/////bundle.install (reflection.reflection reflection.byte) (new_primitive_array_handler __.t_byte))
- (/////bundle.install (reflection.reflection reflection.short) (new_primitive_array_handler __.t_short))
- (/////bundle.install (reflection.reflection reflection.int) (new_primitive_array_handler __.t_int))
- (/////bundle.install (reflection.reflection reflection.long) (new_primitive_array_handler __.t_long))
- (/////bundle.install (reflection.reflection reflection.float) (new_primitive_array_handler __.t_float))
- (/////bundle.install (reflection.reflection reflection.double) (new_primitive_array_handler __.t_double))
- (/////bundle.install (reflection.reflection reflection.char) (new_primitive_array_handler __.t_char))
- (/////bundle.install "object" array::new::object))))
- (dictionary.merge (<| (/////bundle.prefix "read")
- (|> /////bundle.empty
- (/////bundle.install (reflection.reflection reflection.boolean) (read_primitive_array_handler type.boolean _.baload))
- (/////bundle.install (reflection.reflection reflection.byte) (read_primitive_array_handler type.byte _.baload))
- (/////bundle.install (reflection.reflection reflection.short) (read_primitive_array_handler type.short _.saload))
- (/////bundle.install (reflection.reflection reflection.int) (read_primitive_array_handler type.int _.iaload))
- (/////bundle.install (reflection.reflection reflection.long) (read_primitive_array_handler type.long _.laload))
- (/////bundle.install (reflection.reflection reflection.float) (read_primitive_array_handler type.float _.faload))
- (/////bundle.install (reflection.reflection reflection.double) (read_primitive_array_handler type.double _.daload))
- (/////bundle.install (reflection.reflection reflection.char) (read_primitive_array_handler type.char _.caload))
- (/////bundle.install "object" array::read::object))))
- (dictionary.merge (<| (/////bundle.prefix "write")
- (|> /////bundle.empty
- (/////bundle.install (reflection.reflection reflection.boolean) (write_primitive_array_handler type.boolean _.bastore))
- (/////bundle.install (reflection.reflection reflection.byte) (write_primitive_array_handler type.byte _.bastore))
- (/////bundle.install (reflection.reflection reflection.short) (write_primitive_array_handler type.short _.sastore))
- (/////bundle.install (reflection.reflection reflection.int) (write_primitive_array_handler type.int _.iastore))
- (/////bundle.install (reflection.reflection reflection.long) (write_primitive_array_handler type.long _.lastore))
- (/////bundle.install (reflection.reflection reflection.float) (write_primitive_array_handler type.float _.fastore))
- (/////bundle.install (reflection.reflection reflection.double) (write_primitive_array_handler type.double _.dastore))
- (/////bundle.install (reflection.reflection reflection.char) (write_primitive_array_handler type.char _.castore))
- (/////bundle.install "object" array::write::object))))
+ (dictionary.merged (<| (/////bundle.prefix "length")
+ (|> /////bundle.empty
+ (/////bundle.install (reflection.reflection reflection.boolean) (primitive_array_length_handler type.boolean))
+ (/////bundle.install (reflection.reflection reflection.byte) (primitive_array_length_handler type.byte))
+ (/////bundle.install (reflection.reflection reflection.short) (primitive_array_length_handler type.short))
+ (/////bundle.install (reflection.reflection reflection.int) (primitive_array_length_handler type.int))
+ (/////bundle.install (reflection.reflection reflection.long) (primitive_array_length_handler type.long))
+ (/////bundle.install (reflection.reflection reflection.float) (primitive_array_length_handler type.float))
+ (/////bundle.install (reflection.reflection reflection.double) (primitive_array_length_handler type.double))
+ (/////bundle.install (reflection.reflection reflection.char) (primitive_array_length_handler type.char))
+ (/////bundle.install "object" array::length::object))))
+ (dictionary.merged (<| (/////bundle.prefix "new")
+ (|> /////bundle.empty
+ (/////bundle.install (reflection.reflection reflection.boolean) (new_primitive_array_handler __.t_boolean))
+ (/////bundle.install (reflection.reflection reflection.byte) (new_primitive_array_handler __.t_byte))
+ (/////bundle.install (reflection.reflection reflection.short) (new_primitive_array_handler __.t_short))
+ (/////bundle.install (reflection.reflection reflection.int) (new_primitive_array_handler __.t_int))
+ (/////bundle.install (reflection.reflection reflection.long) (new_primitive_array_handler __.t_long))
+ (/////bundle.install (reflection.reflection reflection.float) (new_primitive_array_handler __.t_float))
+ (/////bundle.install (reflection.reflection reflection.double) (new_primitive_array_handler __.t_double))
+ (/////bundle.install (reflection.reflection reflection.char) (new_primitive_array_handler __.t_char))
+ (/////bundle.install "object" array::new::object))))
+ (dictionary.merged (<| (/////bundle.prefix "read")
+ (|> /////bundle.empty
+ (/////bundle.install (reflection.reflection reflection.boolean) (read_primitive_array_handler type.boolean _.baload))
+ (/////bundle.install (reflection.reflection reflection.byte) (read_primitive_array_handler type.byte _.baload))
+ (/////bundle.install (reflection.reflection reflection.short) (read_primitive_array_handler type.short _.saload))
+ (/////bundle.install (reflection.reflection reflection.int) (read_primitive_array_handler type.int _.iaload))
+ (/////bundle.install (reflection.reflection reflection.long) (read_primitive_array_handler type.long _.laload))
+ (/////bundle.install (reflection.reflection reflection.float) (read_primitive_array_handler type.float _.faload))
+ (/////bundle.install (reflection.reflection reflection.double) (read_primitive_array_handler type.double _.daload))
+ (/////bundle.install (reflection.reflection reflection.char) (read_primitive_array_handler type.char _.caload))
+ (/////bundle.install "object" array::read::object))))
+ (dictionary.merged (<| (/////bundle.prefix "write")
+ (|> /////bundle.empty
+ (/////bundle.install (reflection.reflection reflection.boolean) (write_primitive_array_handler type.boolean _.bastore))
+ (/////bundle.install (reflection.reflection reflection.byte) (write_primitive_array_handler type.byte _.bastore))
+ (/////bundle.install (reflection.reflection reflection.short) (write_primitive_array_handler type.short _.sastore))
+ (/////bundle.install (reflection.reflection reflection.int) (write_primitive_array_handler type.int _.iastore))
+ (/////bundle.install (reflection.reflection reflection.long) (write_primitive_array_handler type.long _.lastore))
+ (/////bundle.install (reflection.reflection reflection.float) (write_primitive_array_handler type.float _.fastore))
+ (/////bundle.install (reflection.reflection reflection.double) (write_primitive_array_handler type.double _.dastore))
+ (/////bundle.install (reflection.reflection reflection.char) (write_primitive_array_handler type.char _.castore))
+ (/////bundle.install "object" array::write::object))))
)))
(def: (object::null _)
@@ -796,21 +796,21 @@
Bundle
(<| (/////bundle.prefix "member")
(|> (: Bundle /////bundle.empty)
- (dictionary.merge (<| (/////bundle.prefix "get")
- (|> (: Bundle /////bundle.empty)
- (/////bundle.install "static" get::static)
- (/////bundle.install "virtual" get::virtual))))
- (dictionary.merge (<| (/////bundle.prefix "put")
- (|> (: Bundle /////bundle.empty)
- (/////bundle.install "static" put::static)
- (/////bundle.install "virtual" put::virtual))))
- (dictionary.merge (<| (/////bundle.prefix "invoke")
- (|> (: Bundle /////bundle.empty)
- (/////bundle.install "static" invoke::static)
- (/////bundle.install "virtual" invoke::virtual)
- (/////bundle.install "special" invoke::special)
- (/////bundle.install "interface" invoke::interface)
- (/////bundle.install "constructor" invoke::constructor))))
+ (dictionary.merged (<| (/////bundle.prefix "get")
+ (|> (: Bundle /////bundle.empty)
+ (/////bundle.install "static" get::static)
+ (/////bundle.install "virtual" get::virtual))))
+ (dictionary.merged (<| (/////bundle.prefix "put")
+ (|> (: Bundle /////bundle.empty)
+ (/////bundle.install "static" put::static)
+ (/////bundle.install "virtual" put::virtual))))
+ (dictionary.merged (<| (/////bundle.prefix "invoke")
+ (|> (: Bundle /////bundle.empty)
+ (/////bundle.install "static" invoke::static)
+ (/////bundle.install "virtual" invoke::virtual)
+ (/////bundle.install "special" invoke::special)
+ (/////bundle.install "interface" invoke::interface)
+ (/////bundle.install "constructor" invoke::constructor))))
)))
(def: annotation_parameter
@@ -1094,13 +1094,13 @@
Bundle
(<| (/////bundle.prefix "jvm")
(|> ..bundle::conversion
- (dictionary.merge ..bundle::int)
- (dictionary.merge ..bundle::long)
- (dictionary.merge ..bundle::float)
- (dictionary.merge ..bundle::double)
- (dictionary.merge ..bundle::char)
- (dictionary.merge ..bundle::array)
- (dictionary.merge ..bundle::object)
- (dictionary.merge ..bundle::member)
- (dictionary.merge ..bundle::class)
+ (dictionary.merged ..bundle::int)
+ (dictionary.merged ..bundle::long)
+ (dictionary.merged ..bundle::float)
+ (dictionary.merged ..bundle::double)
+ (dictionary.merged ..bundle::char)
+ (dictionary.merged ..bundle::array)
+ (dictionary.merged ..bundle::object)
+ (dictionary.merged ..bundle::member)
+ (dictionary.merged ..bundle::class)
)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua.lux
index 1f1bd7f91..492f43b94 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua.lux
@@ -14,5 +14,5 @@
(def: #export bundle
Bundle
- (dictionary.merge /common.bundle
- /host.bundle))
+ (dictionary.merged /common.bundle
+ /host.bundle))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/common.lux
index e8022f806..3c8338304 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/common.lux
@@ -174,8 +174,8 @@
Bundle
(<| (/.prefix "lux")
(|> lux_procs
- (dictionary.merge i64_procs)
- (dictionary.merge f64_procs)
- (dictionary.merge text_procs)
- (dictionary.merge io_procs)
+ (dictionary.merged i64_procs)
+ (dictionary.merged f64_procs)
+ (dictionary.merged text_procs)
+ (dictionary.merged io_procs)
)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/host.lux
index 35d895177..a66a198c7 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/host.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/host.lux
@@ -187,9 +187,9 @@
Bundle
(<| (/.prefix "lua")
(|> /.empty
- (dictionary.merge ..array)
- (dictionary.merge ..object)
- (dictionary.merge ..utf8)
+ (dictionary.merged ..array)
+ (dictionary.merged ..object)
+ (dictionary.merged ..utf8)
(/.install "constant" lua::constant)
(/.install "apply" lua::apply)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php.lux
index 751e67a85..6805ccc27 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php.lux
@@ -14,5 +14,5 @@
(def: #export bundle
Bundle
- (dictionary.merge /common.bundle
- /host.bundle))
+ (dictionary.merged /common.bundle
+ /host.bundle))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/common.lux
index 3925bec4b..ca4de50cf 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/common.lux
@@ -185,8 +185,8 @@
Bundle
(<| (/.prefix "lux")
(|> /.empty
- (dictionary.merge lux_procs)
- (dictionary.merge i64_procs)
- (dictionary.merge f64_procs)
- (dictionary.merge text_procs)
- (dictionary.merge io_procs))))
+ (dictionary.merged lux_procs)
+ (dictionary.merged i64_procs)
+ (dictionary.merged f64_procs)
+ (dictionary.merged text_procs)
+ (dictionary.merged io_procs))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/host.lux
index a8ef44fc8..39ddd3df9 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/host.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/host.lux
@@ -133,8 +133,8 @@
Bundle
(<| (/.prefix "php")
(|> /.empty
- (dictionary.merge ..array)
- (dictionary.merge ..object)
+ (dictionary.merged ..array)
+ (dictionary.merged ..object)
(/.install "constant" php::constant)
(/.install "apply" php::apply)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python.lux
index 2309732f3..55e2e4756 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python.lux
@@ -14,5 +14,5 @@
(def: #export bundle
Bundle
- (dictionary.merge /common.bundle
- /host.bundle))
+ (dictionary.merged /common.bundle
+ /host.bundle))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/common.lux
index d9c7fe72f..81107aba9 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/common.lux
@@ -164,8 +164,8 @@
Bundle
(<| (/.prefix "lux")
(|> lux_procs
- (dictionary.merge i64_procs)
- (dictionary.merge f64_procs)
- (dictionary.merge text_procs)
- (dictionary.merge io_procs)
+ (dictionary.merged i64_procs)
+ (dictionary.merged f64_procs)
+ (dictionary.merged text_procs)
+ (dictionary.merged io_procs)
)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/host.lux
index a9215898d..56393387f 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/host.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/host.lux
@@ -154,8 +154,8 @@
Bundle
(<| (/.prefix "python")
(|> /.empty
- (dictionary.merge ..array)
- (dictionary.merge ..object)
+ (dictionary.merged ..array)
+ (dictionary.merged ..object)
(/.install "constant" python::constant)
(/.install "import" python::import)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/r.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/r.lux
index 7ca8195f7..f137406ab 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/r.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/r.lux
@@ -14,5 +14,5 @@
(def: #export bundle
Bundle
- (dictionary.merge /common.bundle
- /host.bundle))
+ (dictionary.merged /common.bundle
+ /host.bundle))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/r/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/r/common.lux
index 87c1e59cc..8604be023 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/r/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/r/common.lux
@@ -171,9 +171,9 @@
Bundle
(<| (/.prefix "lux")
(|> /.empty
- ## (dictionary.merge lux_procs)
- (dictionary.merge i64_procs)
- ## (dictionary.merge f64_procs)
- (dictionary.merge text_procs)
- ## (dictionary.merge io_procs)
+ ## (dictionary.merged lux_procs)
+ (dictionary.merged i64_procs)
+ ## (dictionary.merged f64_procs)
+ (dictionary.merged text_procs)
+ ## (dictionary.merged io_procs)
)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby.lux
index 417ccf847..dfeee165e 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby.lux
@@ -14,5 +14,5 @@
(def: #export bundle
Bundle
- (dictionary.merge /common.bundle
- /host.bundle))
+ (dictionary.merged /common.bundle
+ /host.bundle))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/common.lux
index 970566967..7eb4e2a5b 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/common.lux
@@ -179,8 +179,8 @@
Bundle
(<| (/.prefix "lux")
(|> lux_procs
- (dictionary.merge ..i64_procs)
- (dictionary.merge ..f64_procs)
- (dictionary.merge ..text_procs)
- (dictionary.merge ..io_procs)
+ (dictionary.merged ..i64_procs)
+ (dictionary.merged ..f64_procs)
+ (dictionary.merged ..text_procs)
+ (dictionary.merged ..io_procs)
)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/host.lux
index 0d0f94f50..9e6df81c7 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/host.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/host.lux
@@ -126,8 +126,8 @@
Bundle
(<| (/.prefix "ruby")
(|> /.empty
- (dictionary.merge ..array)
- (dictionary.merge ..object)
+ (dictionary.merged ..array)
+ (dictionary.merged ..object)
(/.install "constant" ruby::constant)
(/.install "apply" ruby::apply)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme.lux
index 7245ac4f6..9d74e5fc6 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme.lux
@@ -14,5 +14,5 @@
(def: #export bundle
Bundle
- (dictionary.merge /common.bundle
- /host.bundle))
+ (dictionary.merged /common.bundle
+ /host.bundle))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/common.lux
index 3663f845a..e725c9b95 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/common.lux
@@ -167,9 +167,9 @@
Bundle
(<| (/.prefix "lux")
(|> /.empty
- (dictionary.merge lux_procs)
- (dictionary.merge i64_procs)
- (dictionary.merge f64_procs)
- (dictionary.merge text_procs)
- (dictionary.merge io_procs)
+ (dictionary.merged lux_procs)
+ (dictionary.merged i64_procs)
+ (dictionary.merged f64_procs)
+ (dictionary.merged text_procs)
+ (dictionary.merged io_procs)
)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/host.lux
index 23f6056ae..0552946f9 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/host.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/host.lux
@@ -100,8 +100,8 @@
Bundle
(<| (/.prefix "scheme")
(|> /.empty
- (dictionary.merge ..array)
- (dictionary.merge ..object)
+ (dictionary.merged ..array)
+ (dictionary.merged ..object)
(/.install "constant" scheme::constant)
(/.install "apply" scheme::apply)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/extension/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/extension/common.lux
index ee472fe92..f5d416ee1 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/extension/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/extension/common.lux
@@ -130,8 +130,8 @@
Bundle
(<| (bundle.prefix "lux")
(|> lux_procs
- (dictionary.merge i64_procs)
- (dictionary.merge f64_procs)
- (dictionary.merge text_procs)
- (dictionary.merge io_procs)
+ (dictionary.merged i64_procs)
+ (dictionary.merged f64_procs)
+ (dictionary.merged text_procs)
+ (dictionary.merged io_procs)
)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/case.lux
index 7beef96cb..7758725c1 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/case.lux
@@ -85,7 +85,7 @@
[#.Right //runtime.tuple//right]))]
(method source)))
valueO
- (list.reverse pathP)))))
+ (list.reversed pathP)))))
(def: @savepoint (_.var "lux_pm_cursor_savepoint"))
(def: @cursor (_.var "lux_pm_cursor"))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/loop.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/loop.lux
index de6b0a500..dcb7daa43 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/loop.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/loop.lux
@@ -38,7 +38,7 @@
(if initial?
(_.define variable value)
(_.set variable value)))))
- list.reverse
+ list.reversed
(list\fold _.then body)))
(def: #export (scope! statement expression archive [start initsS+ bodyS])
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/case.lux
index 04d5926a7..bdf4fb89c 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/case.lux
@@ -250,7 +250,7 @@
(..right_projection lefts))]
(_.compose so_far next)))
recordG
- (list.reverse path)))))
+ (list.reversed path)))))
(def: #export (case phase archive [valueS path])
(Generator [Synthesis Path])
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/loop.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/loop.lux
index ba6cb27ef..f8961db37 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/loop.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/loop.lux
@@ -66,7 +66,7 @@
(list\map product.left)
(monad.seq _.monad))
(|> updatesG
- list.reverse
+ list.reversed
(list\map product.right)
(monad.seq _.monad))
(_.goto @begin)))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/case.lux
index 2114acc89..0e1b681c4 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/case.lux
@@ -71,7 +71,7 @@
[#.Right //runtime.tuple//right]))]
(method source)))
valueO
- (list.reverse pathP)))))
+ (list.reversed pathP)))))
(def: #export (if expression archive [testS thenS elseS])
(Generator [Synthesis Synthesis Synthesis])
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/case.lux
index af27eb9fc..5eb23e1a9 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/case.lux
@@ -92,7 +92,7 @@
[#.Right //runtime.tuple//right]))]
(method source)))
valueG
- (list.reverse pathP)))))
+ (list.reversed pathP)))))
(def: @savepoint (_.var "lux_pm_savepoint"))
(def: @cursor (_.var "lux_pm_cursor"))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/extension/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/extension/common.lux
index 8da358393..08a124e2c 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/extension/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/extension/common.lux
@@ -104,9 +104,9 @@
Bundle
(<| (bundle.prefix "lux")
(|> lux_procs
- (dictionary.merge i64_procs)
- (dictionary.merge int_procs)
- (dictionary.merge frac_procs)
- (dictionary.merge text_procs)
- (dictionary.merge io_procs)
+ (dictionary.merged i64_procs)
+ (dictionary.merged int_procs)
+ (dictionary.merged frac_procs)
+ (dictionary.merged text_procs)
+ (dictionary.merged io_procs)
)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/loop.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/loop.lux
index 82fe69b94..630e222e5 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/loop.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/loop.lux
@@ -44,7 +44,7 @@
(list\map (function (_ [register value])
(let [variable (//case.register (n.+ offset register))]
(_.set! variable value))))
- list.reverse
+ list.reversed
(list\fold _.then body)))
(def: #export (scope! statement expression archive [start initsS+ bodyS])
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/case.lux
index a3f993150..cdfaf74fe 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/case.lux
@@ -97,7 +97,7 @@
[#.Right //runtime.tuple::right]))]
(method source)))
valueO
- (list.reverse pathP)))))
+ (list.reversed pathP)))))
(def: @savepoint (_.var "lux_pm_savepoint"))
(def: @cursor (_.var "lux_pm_cursor"))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/loop.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/loop.lux
index 066925e96..830154cbd 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/loop.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/loop.lux
@@ -38,7 +38,7 @@
(list\map (function (_ [register value])
(_.set (list (//case.register (n.+ offset register)))
value)))
- list.reverse
+ list.reversed
(list\fold _.then body)))
(def: #export (set_scope body!)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/case.lux
index 133ce1fa8..8ef713643 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/case.lux
@@ -75,7 +75,7 @@
[#.Right //runtime.tuple::right]))]
(method source)))
valueO
- (list.reverse pathP)))))
+ (list.reversed pathP)))))
(def: $savepoint (_.var "lux_pm_cursor_savepoint"))
(def: $cursor (_.var "lux_pm_cursor"))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/common.lux
index b650c7e8d..7de7310d6 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/common.lux
@@ -139,7 +139,7 @@
(def: lux_procs
Bundle
- (|> (dict.new text.Hash<Text>)
+ (|> (dict.empty text.Hash<Text>)
(install "is" (binary lux//is))
(install "try" (unary lux//try))
(install "if" (trinary lux//if))
@@ -171,7 +171,7 @@
(def: bit_procs
Bundle
(<| (prefix "bit")
- (|> (dict.new text.Hash<Text>)
+ (|> (dict.empty text.Hash<Text>)
(install "and" (binary bit//and))
(install "or" (binary bit//or))
(install "xor" (binary bit//xor))
@@ -243,7 +243,7 @@
(def: int_procs
Bundle
(<| (prefix "int")
- (|> (dict.new text.Hash<Text>)
+ (|> (dict.empty text.Hash<Text>)
(install "+" (binary int//add))
(install "-" (binary int//sub))
(install "*" (binary int//mul))
@@ -261,7 +261,7 @@
(def: frac_procs
Bundle
(<| (prefix "frac")
- (|> (dict.new text.Hash<Text>)
+ (|> (dict.empty text.Hash<Text>)
(install "+" (binary frac//add))
(install "-" (binary frac//sub))
(install "*" (binary frac//mul))
@@ -296,7 +296,7 @@
(def: text_procs
Bundle
(<| (prefix "text")
- (|> (dict.new text.Hash<Text>)
+ (|> (dict.empty text.Hash<Text>)
(install "=" (binary text//=))
(install "<" (binary text//<))
(install "concat" (binary text//concat))
@@ -320,7 +320,7 @@
(def: io_procs
Bundle
(<| (prefix "io")
- (|> (dict.new text.Hash<Text>)
+ (|> (dict.empty text.Hash<Text>)
(install "log" (unary (|>> r.print ..void)))
(install "error" (unary r.stop))
(install "exit" (unary io//exit))
@@ -332,9 +332,9 @@
Bundle
(<| (prefix "lux")
(|> lux_procs
- (dict.merge bit_procs)
- (dict.merge int_procs)
- (dict.merge frac_procs)
- (dict.merge text_procs)
- (dict.merge io_procs)
+ (dict.merged bit_procs)
+ (dict.merged int_procs)
+ (dict.merged frac_procs)
+ (dict.merged text_procs)
+ (dict.merged io_procs)
)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/host.lux
index cb0f5e48d..f97ae27e0 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/host.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/host.lux
@@ -47,7 +47,7 @@
## (def: lua_procs
## @.Bundle
-## (|> (dict.new text.Hash<Text>)
+## (|> (dict.empty text.Hash<Text>)
## (@.install "nil" (@.nullary lua//nil))
## (@.install "table" (@.nullary lua//table))
## (@.install "global" lua//global)
@@ -76,7 +76,7 @@
## (def: table_procs
## @.Bundle
## (<| (@.prefix "table")
-## (|> (dict.new text.Hash<Text>)
+## (|> (dict.empty text.Hash<Text>)
## (@.install "call" table//call)
## (@.install "get" (@.binary table//get))
## (@.install "set" (@.trinary table//set)))))
@@ -84,7 +84,7 @@
(def: #export procedures
@.Bundle
(<| (@.prefix "lua")
- (dict.new text.Hash<Text>)
+ (dict.empty text.Hash<Text>)
## (|> lua_procs
- ## (dict.merge table_procs))
+ ## (dict.merged table_procs))
))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/case.lux
index 69df6f104..d1bbfae39 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/case.lux
@@ -99,7 +99,7 @@
[#.Right //runtime.tuple//right]))]
(method source)))
valueO
- (list.reverse pathP)))))
+ (list.reversed pathP)))))
(def: @savepoint (_.local "lux_pm_savepoint"))
(def: @cursor (_.local "lux_pm_cursor"))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/loop.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/loop.lux
index ed5370a68..d021df198 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/loop.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/loop.lux
@@ -38,7 +38,7 @@
(list\map (function (_ [register value])
(_.set (list (//case.register (n.+ offset register)))
value)))
- list.reverse
+ list.reversed
(list\fold _.then body)))
(def: symbol
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/case.lux
index 79d8950ce..25da6b501 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/case.lux
@@ -73,7 +73,7 @@
[#.Right //runtime.tuple//right]))]
(method source)))
valueO
- (list.reverse pathP)))))
+ (list.reversed pathP)))))
(def: @savepoint (_.var "lux_pm_cursor_savepoint"))
(def: @cursor (_.var "lux_pm_cursor"))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/extension/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/extension/common.lux
index a3a598808..28cf31cc1 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/extension/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/extension/common.lux
@@ -216,8 +216,8 @@
Bundle
(<| (bundle.prefix "lux")
(|> bundle::lux
- (dict.merge bundle::i64)
- (dict.merge bundle::f64)
- (dict.merge bundle::text)
- (dict.merge bundle::io)
+ (dict.merged bundle::i64)
+ (dict.merged bundle::f64)
+ (dict.merged bundle::text)
+ (dict.merged bundle::io)
)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/case.lux
index dc22dc355..f6f4d746c 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/case.lux
@@ -87,7 +87,7 @@
(when> [(new> (not end?') [])] [(///\map ..clean_up)])
nextC))))
thenC
- (list.reverse (list.enumeration tuple))))
+ (list.reversed (list.enumeration tuple))))
))
(def: (path archive synthesize pattern bodyA)
@@ -322,8 +322,8 @@
(def: empty
Storage
- {#bindings (set.new n.hash)
- #dependencies (set.new ///reference/variable.hash)})
+ {#bindings (set.empty n.hash)
+ #dependencies (set.empty ///reference/variable.hash)})
## TODO: Use this to declare all local variables at the beginning of
## script functions.
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/variable.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/variable.lux
index 80d3eb556..ab798a01b 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/variable.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/variable.lux
@@ -172,7 +172,7 @@
(def: initial
Redundancy
- (dictionary.new n.hash))
+ (dictionary.empty n.hash))
(def: redundant! true)
(def: necessary! false)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux b/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux
index a54350ccf..d6c43e896 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux
@@ -103,7 +103,7 @@
(def: #export no_aliases
Aliases
- (dictionary.new text.hash))
+ (dictionary.empty text.hash))
(def: #export prelude
.prelude_module)
@@ -230,7 +230,7 @@
(#.Left [source' error])
(if (is? <close> error)
(#.Right [source'
- [where (<tag> (list.reverse stack))]])
+ [where (<tag> (list.reversed stack))]])
(#.Left [source' error])))))]
## Form and tuple syntax is mostly the same, differing only in the
@@ -253,7 +253,7 @@
(#.Left [source' error])
(if (is? ..close_record error)
(#.Right [source'
- [where (#.Record (list.reverse stack))]])
+ [where (#.Record (list.reversed stack))]])
(#.Left [source' error])))))
(template: (!guarantee_no_new_lines where offset source_code content body)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/synthesis.lux b/stdlib/source/library/lux/tool/compiler/language/lux/synthesis.lux
index 8559afe35..d5a1e53a4 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/synthesis.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/synthesis.lux
@@ -44,7 +44,7 @@
(def: #export fresh_resolver
Resolver
- (dictionary.new variable.hash))
+ (dictionary.empty variable.hash))
(def: #export init
State
@@ -307,10 +307,10 @@
(format "(@ " (%.nat register) ")")
(#Alt left right)
- (format "(| " (%path' %then left) " " (%path' %then right) ")")
+ (format "(Variant " (%path' %then left) " " (%path' %then right) ")")
(#Seq left right)
- (format "(& " (%path' %then left) " " (%path' %then right) ")")
+ (format "(Tuple " (%path' %then left) " " (%path' %then right) ")")
(#Then then)
(|> (%then then)
diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive.lux b/stdlib/source/library/lux/tool/compiler/meta/archive.lux
index a5a8826a0..a45c7ad59 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/archive.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/archive.lux
@@ -85,7 +85,7 @@
(def: #export empty
Archive
(:abstraction {#next 0
- #resolver (dictionary.new text.hash)}))
+ #resolver (dictionary.empty text.hash)}))
(def: #export (id module archive)
(-> Module Archive (Try ID))
@@ -189,7 +189,7 @@
(list\map (function (_ [module [id _]])
[module id]))))
- (def: #export (merge additions archive)
+ (def: #export (merged additions archive)
(-> Archive Archive Archive)
(let [[+next +resolver] (:representation additions)]
(|> archive
diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive/artifact.lux b/stdlib/source/library/lux/tool/compiler/meta/archive/artifact.lux
index c7f699f87..7feeac2a0 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/archive/artifact.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/archive/artifact.lux
@@ -44,7 +44,7 @@
(def: #export empty
Registry
(:abstraction {#artifacts row.empty
- #resolver (dictionary.new text.hash)}))
+ #resolver (dictionary.empty text.hash)}))
(def: #export artifacts
(-> Registry (Row Artifact))
diff --git a/stdlib/source/library/lux/tool/compiler/meta/cache/dependency.lux b/stdlib/source/library/lux/tool/compiler/meta/cache/dependency.lux
index c51151b68..4d9af7859 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/cache/dependency.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/cache/dependency.lux
@@ -27,14 +27,14 @@
(def: fresh
Ancestry
- (set.new text.hash))
+ (set.empty text.hash))
(type: #export Graph
(Dictionary Module Ancestry))
(def: empty
Graph
- (dictionary.new text.hash))
+ (dictionary.empty text.hash))
(def: #export modules
(-> Graph (List Module))
diff --git a/stdlib/source/library/lux/tool/compiler/meta/io/archive.lux b/stdlib/source/library/lux/tool/compiler/meta/io/archive.lux
index 7290b74a5..c5ebc6bad 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/io/archive.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/io/archive.lux
@@ -205,10 +205,10 @@
(def: empty_bundles
Bundles
- [(dictionary.new text.hash)
- (dictionary.new text.hash)
- (dictionary.new text.hash)
- (dictionary.new text.hash)])
+ [(dictionary.empty text.hash)
+ (dictionary.empty text.hash)
+ (dictionary.empty text.hash)
+ (dictionary.empty text.hash)])
(def: (loaded_document extension host module_id expected actual document)
(All [expression directive]
@@ -218,7 +218,7 @@
[[definitions bundles] (: (Try [Definitions Bundles Output])
(loop [input (row.to_list expected)
definitions (: Definitions
- (dictionary.new text.hash))
+ (dictionary.empty text.hash))
bundles ..empty_bundles
output (: Output row.empty)]
(let [[analysers synthesizers generators directives] bundles]
@@ -452,10 +452,10 @@
analysis_state
(list\fold (function (_ [_ [+analysers +synthesizers +generators +directives]]
[analysers synthesizers generators directives])
- [(dictionary.merge +analysers analysers)
- (dictionary.merge +synthesizers synthesizers)
- (dictionary.merge +generators generators)
- (dictionary.merge +directives directives)])
+ [(dictionary.merged +analysers analysers)
+ (dictionary.merged +synthesizers synthesizers)
+ (dictionary.merged +generators generators)
+ (dictionary.merged +directives directives)])
..empty_bundles
loaded_caches)])))))
diff --git a/stdlib/source/library/lux/tool/compiler/meta/io/context.lux b/stdlib/source/library/lux/tool/compiler/meta/io/context.lux
index aae528bda..8903ab503 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/io/context.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/io/context.lux
@@ -165,5 +165,5 @@
(try.with async.monad))
(..enumerate_context fs)
(: Enumeration
- (dictionary.new text.hash))
+ (dictionary.empty text.hash))
contexts))
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 b1735f389..3ebdae788 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux
@@ -256,8 +256,8 @@
[entries duplicates sink] (|> host_dependencies
dictionary.values
(monad.fold ! ..write_host_dependency
- [(set.new text.hash)
- (set.new text.hash)
+ [(set.empty text.hash)
+ (set.empty text.hash)
sink]))
#let [_ (do_to sink
(java/io/Flushable::flush)
diff --git a/stdlib/source/library/lux/type.lux b/stdlib/source/library/lux/type.lux
index ce3b32921..f12adc89b 100644
--- a/stdlib/source/library/lux/type.lux
+++ b/stdlib/source/library/lux/type.lux
@@ -95,11 +95,11 @@
($_ text\compose <open>
(|> (<flat> type)
(list\map format)
- list.reverse
+ list.reversed
(list.interpose " ")
(list\fold text\compose ""))
<close>)])
- ([#.Sum "(| " ")" flat_variant]
+ ([#.Sum "(Or " ")" flat_variant]
[#.Product "[" "]" flat_tuple])
(#.Function input output)
@@ -107,7 +107,7 @@
($_ text\compose "(-> "
(|> ins
(list\map format)
- list.reverse
+ list.reversed
(list.interpose " ")
(list\fold text\compose ""))
" " (format out) ")"))
@@ -123,7 +123,7 @@
(#.Apply param fun)
(let [[type_func type_args] (flat_application type)]
- ($_ text\compose "(" (format type_func) " " (|> type_args (list\map format) list.reverse (list.interpose " ") (list\fold text\compose "")) ")"))
+ ($_ text\compose "(" (format type_func) " " (|> type_args (list\map format) list.reversed (list.interpose " ") (list\fold text\compose "")) ")"))
(^template [<tag> <desc>]
[(<tag> env body)
diff --git a/stdlib/source/library/lux/type/check.lux b/stdlib/source/library/lux/type/check.lux
index 121f1fb2f..882b723ff 100644
--- a/stdlib/source/library/lux/type/check.lux
+++ b/stdlib/source/library/lux/type/check.lux
@@ -298,7 +298,7 @@
(def: empty_ring
Ring
- (set.new n.hash))
+ (set.empty n.hash))
## TODO: Optimize this by not using sets anymore.
(def: (ring start)
diff --git a/stdlib/source/library/lux/type/implicit.lux b/stdlib/source/library/lux/type/implicit.lux
index 6141cadbb..167c25c0e 100644
--- a/stdlib/source/library/lux/type/implicit.lux
+++ b/stdlib/source/library/lux/type/implicit.lux
@@ -135,7 +135,7 @@
#let [total_locals (list\fold (function (_ [name type] table)
(try.else table (dictionary.try_put name type table)))
(: (Dictionary Text Type)
- (dictionary.new text.hash))
+ (dictionary.empty text.hash))
(list\join local_batches))]]
(in (|> total_locals
dictionary.entries
diff --git a/stdlib/source/library/lux/type/resource.lux b/stdlib/source/library/lux/type/resource.lux
index e68f820d0..2cda92c15 100644
--- a/stdlib/source/library/lux/type/resource.lux
+++ b/stdlib/source/library/lux/type/resource.lux
@@ -7,15 +7,10 @@
[indexed (#+ IxMonad)]]]
[control
["." exception (#+ exception:)]
- ["." io (#+ IO)]
- [concurrency
- ["." async (#+ Async)]]
["<>" parser
["<.>" code (#+ Parser)]]]
[data
- ["." identity (#+ Identity)]
["." maybe]
- ["." product]
[text
["%" format (#+ format)]]
[collection
@@ -45,41 +40,31 @@
(All [keys]
(Procedure monad [permissions keys] keys value)))
-(implementation: (indexed Monad<m>)
- (All [m] (-> (Monad m) (IxMonad (Procedure m))))
+(implementation: #export (monad monad)
+ (All [!] (-> (Monad !) (IxMonad (Procedure !))))
(def: (in value)
(function (_ keys)
- (\ Monad<m> in [keys value])))
+ (\ monad in [keys value])))
(def: (bind f input)
(function (_ keysI)
- (do Monad<m>
+ (do monad
[[keysT value] (input keysI)]
((f value) keysT)))))
-(template [<name> <m> <monad> <execute> <lift>]
- [(def: #export <name>
- (IxMonad (Procedure <m>))
- (..indexed <monad>))
-
- (def: #export (<execute> procedure)
- (All [v] (-> (Linear <m> v) (<m> v)))
- (do <monad>
- [[_ output] (procedure [])]
- (in output)))
-
- (def: #export (<lift> procedure)
- (All [v] (-> (<m> v) (Linear <m> v)))
- (function (_ keys)
- (do <monad>
- [output procedure]
- (in [keys output]))))]
-
- [pure Identity identity.monad run_pure lift_pure]
- [sync IO io.monad run_sync lift_sync]
- [async Async async.monad run_async lift_async]
- )
+(def: #export (run monad procedure)
+ (All [! v] (-> (Monad !) (Linear ! v) (! v)))
+ (do monad
+ [[_ output] (procedure [])]
+ (in output)))
+
+(def: #export (lifted monad procedure)
+ (All [! v] (-> (Monad !) (! v) (Linear ! v)))
+ (function (_ keys)
+ (do monad
+ [output procedure]
+ (in [keys output]))))
(abstract: #export Ordered Any)
@@ -102,31 +87,22 @@
{#.doc "A value locked by a key."}
- (template [<name> <m> <monad> <mode> <key>]
- [(def: #export (<name> value)
- (All [v] (Ex [k] (-> v (Affine <m> (Key <mode> k) (Res k v)))))
+ (template [<name> <mode> <key>]
+ [(def: #export (<name> monad value)
+ (All [! v] (Ex [k] (-> (Monad !) v (Affine ! (Key <mode> k) (Res k v)))))
(function (_ keys)
- (\ <monad> in [[(<key> []) keys] (:abstraction value)])))]
-
- [ordered_pure Identity identity.monad Ordered ordered_key]
- [ordered_sync IO io.monad Ordered ordered_key]
- [ordered_async Async async.monad Ordered ordered_key]
- [commutative_sync IO io.monad Commutative commutative_key]
- [commutative_pure Identity identity.monad Commutative commutative_key]
- [commutative_async Async async.monad Commutative commutative_key]
- )
+ (\ monad in [[(<key> []) keys] (:abstraction value)])))]
- (template [<name> <m> <monad>]
- [(def: #export (<name> resource)
- (All [v k m]
- (-> (Res k v) (Relevant <m> (Key m k) v)))
- (function (_ [key keys])
- (\ <monad> in [keys (:representation resource)])))]
+ [ordered Ordered ..ordered_key]
+ [commutative Commutative ..commutative_key]
+ )
- [read_pure Identity identity.monad]
- [read_sync IO io.monad]
- [read_async Async async.monad]
- ))
+ (def: #export (read monad resource)
+ (All [! v k m]
+ (-> (Monad !) (Res k v) (Relevant ! (Key m k) v)))
+ (function (_ [key keys])
+ (\ monad in [keys (:representation resource)])))
+ )
(exception: #export (index_cannot_be_repeated {index Nat})
(exception.report
@@ -136,7 +112,7 @@
(def: indices
(Parser (List Nat))
- (<code>.tuple (loop [seen (set.new n.hash)]
+ (<code>.tuple (loop [seen (set.empty n.hash)]
(do {! <>.monad}
[done? <code>.end?]
(if done?
@@ -148,45 +124,40 @@
tail (recur (set.add head seen))]
(in (list& head tail))))))))
-(def: (no_op Monad<m>)
+(def: (no_op monad)
(All [m] (-> (Monad m) (Linear m Any)))
(function (_ context)
- (\ Monad<m> in [context []])))
-
-(template [<name> <m> <monad>]
- [(syntax: #export (<name> {swaps ..indices})
- (macro.with_gensyms [g!_ g!context]
- (case swaps
- #.End
- (in (list (` ((~! no_op) <monad>))))
-
- (#.Item head tail)
- (do {! meta.monad}
- [#let [max_idx (list\fold n.max head tail)]
- g!inputs (<| (monad.seq !) (list.repeat (inc max_idx)) (macro.gensym "input"))
- #let [g!outputs (|> (monad.fold maybe.monad
- (function (_ from to)
- (do maybe.monad
- [input (list.nth from g!inputs)]
- (in (row.add input to))))
- (: (Row Code) row.empty)
- swaps)
- maybe.assume
- row.to_list)
- g!inputsT+ (list\map (|>> (~) (..Key ..Commutative) (`)) g!inputs)
- g!outputsT+ (list\map (|>> (~) (..Key ..Commutative) (`)) g!outputs)]]
- (in (list (` (: (All [(~+ g!inputs) (~ g!context)]
- (Procedure (~! <m>)
- [(~+ g!inputsT+) (~ g!context)]
- [(~+ g!outputsT+) (~ g!context)]
- .Any))
- (function ((~ g!_) [(~+ g!inputs) (~ g!context)])
- (\ (~! <monad>) (~' in) [[(~+ g!outputs) (~ g!context)] []]))))))))))]
-
- [exchange_pure Identity identity.monad]
- [exchange_sync IO io.monad]
- [exchange_async Async async.monad]
- )
+ (\ monad in [context []])))
+
+(syntax: #export (exchange {swaps ..indices})
+ (macro.with_gensyms [g!_ g!context g!!]
+ (case swaps
+ #.End
+ (in (list (` (~! no_op))))
+
+ (#.Item head tail)
+ (do {! meta.monad}
+ [#let [max_idx (list\fold n.max head tail)]
+ g!inputs (<| (monad.seq !) (list.repeat (inc max_idx)) (macro.gensym "input"))
+ #let [g!outputs (|> (monad.fold maybe.monad
+ (function (_ from to)
+ (do maybe.monad
+ [input (list.nth from g!inputs)]
+ (in (row.add input to))))
+ (: (Row Code) row.empty)
+ swaps)
+ maybe.assume
+ row.to_list)
+ g!inputsT+ (list\map (|>> (~) (..Key ..Commutative) (`)) g!inputs)
+ g!outputsT+ (list\map (|>> (~) (..Key ..Commutative) (`)) g!outputs)]]
+ (in (list (` (: (All [(~ g!!) (~+ g!inputs) (~ g!context)]
+ (-> ((~! monad.Monad) (~ g!!))
+ (Procedure (~ g!!)
+ [(~+ g!inputsT+) (~ g!context)]
+ [(~+ g!outputsT+) (~ g!context)]
+ .Any)))
+ (function ((~ g!_) (~ g!!) [(~+ g!inputs) (~ g!context)])
+ (\ (~ g!!) (~' in) [[(~+ g!outputs) (~ g!context)] []]))))))))))
(def: amount
(Parser Nat)
@@ -196,23 +167,22 @@
(n.> 0 raw))]
(in raw)))
-(template [<name> <m> <monad> <from> <to>]
+(template [<name> <from> <to>]
[(syntax: #export (<name> {amount ..amount})
- (macro.with_gensyms [g!_ g!context]
+ (macro.with_gensyms [g!_ g!context g!!]
(do {! meta.monad}
- [g!keys (<| (monad.seq !) (list.repeat amount) (macro.gensym "keys"))]
- (in (list (` (: (All [(~+ g!keys) (~ g!context)]
- (Procedure (~! <m>)
- [<from> (~ g!context)]
- [<to> (~ g!context)]
- .Any))
- (function ((~ g!_) [<from> (~ g!context)])
- (\ (~! <monad>) (~' in) [[<to> (~ g!context)] []])))))))))]
-
- [group_pure Identity identity.monad (~+ g!keys) [(~+ g!keys)]]
- [group_sync IO io.monad (~+ g!keys) [(~+ g!keys)]]
- [group_async Async async.monad (~+ g!keys) [(~+ g!keys)]]
- [un_group_pure Identity identity.monad [(~+ g!keys)] (~+ g!keys)]
- [un_group_sync IO io.monad [(~+ g!keys)] (~+ g!keys)]
- [un_group_async Async async.monad [(~+ g!keys)] (~+ g!keys)]
+ [g!keys (|> (macro.gensym "keys")
+ (list.repeat amount)
+ (monad.seq !))]
+ (in (list (` (: (All [(~ g!!) (~+ g!keys) (~ g!context)]
+ (-> ((~! monad.Monad) (~ g!!))
+ (Procedure (~ g!!)
+ [<from> (~ g!context)]
+ [<to> (~ g!context)]
+ .Any)))
+ (function ((~ g!_) (~ g!!) [<from> (~ g!context)])
+ (\ (~ g!!) (~' in) [[<to> (~ g!context)] []])))))))))]
+
+ [group (~+ g!keys) [(~+ g!keys)]]
+ [un_group [(~+ g!keys)] (~+ g!keys)]
)
diff --git a/stdlib/source/library/lux/world/file.lux b/stdlib/source/library/lux/world/file.lux
index 2003b9804..f3ce90305 100644
--- a/stdlib/source/library/lux/world/file.lux
+++ b/stdlib/source/library/lux/world/file.lux
@@ -1002,7 +1002,7 @@
(def: empty_mock
Mock
- (dictionary.new text.hash))
+ (dictionary.empty text.hash))
(def: (retrieve_mock_file! separator path mock)
(-> Text Path Mock (Try [Text Mock_File]))
diff --git a/stdlib/source/library/lux/world/file/watch.lux b/stdlib/source/library/lux/world/file/watch.lux
index e1e572023..bfe64cca1 100644
--- a/stdlib/source/library/lux/world/file/watch.lux
+++ b/stdlib/source/library/lux/world/file/watch.lux
@@ -128,7 +128,7 @@
[last_modified (\ fs last_modified file)]
(in (dictionary.put file last_modified tracker))))
(: File_Tracker
- (dictionary.new text.hash))
+ (dictionary.empty text.hash))
files)))
(def: (poll_files fs directory)
@@ -185,7 +185,7 @@
(def: #export (polling fs)
(-> (//.System Async) (Watcher Async))
(let [tracker (: (Var Directory_Tracker)
- (stm.var (dictionary.new text.hash)))]
+ (stm.var (dictionary.empty text.hash)))]
(implementation
(def: (start new_concern path)
(do {! async.monad}
@@ -411,7 +411,7 @@
[watcher (java/nio/file/FileSystem::newWatchService
(java/nio/file/FileSystems::getDefault))
#let [tracker (stm.var (: (Dictionary //.Path [Concern java/nio/file/WatchKey])
- (dictionary.new text.hash)))
+ (dictionary.empty text.hash)))
stop (: (-> //.Path (Async (Try Concern)))
(function (_ path)
diff --git a/stdlib/source/library/lux/world/shell.lux b/stdlib/source/library/lux/world/shell.lux
index 8c4614a32..4f389ce78 100644
--- a/stdlib/source/library/lux/world/shell.lux
+++ b/stdlib/source/library/lux/world/shell.lux
@@ -112,8 +112,8 @@
(def: safe_common_command
(-> Replacer (Sanitizer Command))
- (let [x0A (text.of_code (hex "0A"))
- xFF (text.of_code (hex "FF"))]
+ (let [x0A (text.of_char (hex "0A"))
+ xFF (text.of_char (hex "FF"))]
(function (_ replacer)
(|>> (..replace x0A replacer)
(..replace xFF replacer)