aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library
diff options
context:
space:
mode:
authorEduardo Julian2022-07-02 05:38:27 -0400
committerEduardo Julian2022-07-02 05:38:27 -0400
commitb96beb587c11fcfbce86ce2d62351600cf6cad1b (patch)
treec9a558ab1391ac97cb11e8777ea78299f1ab5555 /stdlib/source/library
parent104130efba46a875eba566384578f8aa8593ad37 (diff)
More traditional names for unquoting macros.
Diffstat (limited to 'stdlib/source/library')
-rw-r--r--stdlib/source/library/lux.lux328
-rw-r--r--stdlib/source/library/lux/abstract/comonad.lux20
-rw-r--r--stdlib/source/library/lux/abstract/enum.lux2
-rw-r--r--stdlib/source/library/lux/abstract/monad.lux20
-rw-r--r--stdlib/source/library/lux/abstract/monad/indexed.lux28
-rw-r--r--stdlib/source/library/lux/control/concatenative.lux26
-rw-r--r--stdlib/source/library/lux/control/concurrency/async.lux2
-rw-r--r--stdlib/source/library/lux/control/concurrency/atom.lux2
-rw-r--r--stdlib/source/library/lux/control/concurrency/semaphore.lux2
-rw-r--r--stdlib/source/library/lux/control/continuation.lux2
-rw-r--r--stdlib/source/library/lux/control/exception.lux22
-rw-r--r--stdlib/source/library/lux/control/function/contract.lux14
-rw-r--r--stdlib/source/library/lux/control/function/inline.lux20
-rw-r--r--stdlib/source/library/lux/control/function/mutual.lux72
-rw-r--r--stdlib/source/library/lux/control/io.lux4
-rw-r--r--stdlib/source/library/lux/control/lazy.lux2
-rw-r--r--stdlib/source/library/lux/control/maybe.lux14
-rw-r--r--stdlib/source/library/lux/control/pipe.lux58
-rw-r--r--stdlib/source/library/lux/control/remember.lux6
-rw-r--r--stdlib/source/library/lux/control/security/capability.lux18
-rw-r--r--stdlib/source/library/lux/control/security/policy.lux6
-rw-r--r--stdlib/source/library/lux/control/try.lux20
-rw-r--r--stdlib/source/library/lux/data/collection/dictionary.lux2
-rw-r--r--stdlib/source/library/lux/data/collection/dictionary/ordered.lux2
-rw-r--r--stdlib/source/library/lux/data/collection/list.lux62
-rw-r--r--stdlib/source/library/lux/data/collection/sequence.lux8
-rw-r--r--stdlib/source/library/lux/data/collection/stream.lux8
-rw-r--r--stdlib/source/library/lux/data/collection/tree.lux4
-rw-r--r--stdlib/source/library/lux/data/format/css/class.lux2
-rw-r--r--stdlib/source/library/lux/data/format/css/id.lux2
-rw-r--r--stdlib/source/library/lux/data/format/css/property.lux4
-rw-r--r--stdlib/source/library/lux/data/format/css/query.lux4
-rw-r--r--stdlib/source/library/lux/data/format/css/selector.lux4
-rw-r--r--stdlib/source/library/lux/data/format/css/value.lux22
-rw-r--r--stdlib/source/library/lux/data/format/html.lux2
-rw-r--r--stdlib/source/library/lux/data/format/json.lux14
-rw-r--r--stdlib/source/library/lux/data/format/tar.lux12
-rw-r--r--stdlib/source/library/lux/data/text.lux6
-rw-r--r--stdlib/source/library/lux/data/text/regex.lux114
-rw-r--r--stdlib/source/library/lux/debug.lux40
-rw-r--r--stdlib/source/library/lux/documentation.lux112
-rw-r--r--stdlib/source/library/lux/extension.lux24
-rw-r--r--stdlib/source/library/lux/ffi.jvm.lux578
-rw-r--r--stdlib/source/library/lux/ffi.lux210
-rw-r--r--stdlib/source/library/lux/ffi.old.lux210
-rw-r--r--stdlib/source/library/lux/ffi.php.lux106
-rw-r--r--stdlib/source/library/lux/ffi.scm.lux56
-rw-r--r--stdlib/source/library/lux/ffi/export.js.lux2
-rw-r--r--stdlib/source/library/lux/ffi/export.jvm.lux30
-rw-r--r--stdlib/source/library/lux/ffi/export.lua.lux2
-rw-r--r--stdlib/source/library/lux/ffi/export.py.lux2
-rw-r--r--stdlib/source/library/lux/ffi/export.rb.lux4
-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.lux8
-rw-r--r--stdlib/source/library/lux/macro/context.lux36
-rw-r--r--stdlib/source/library/lux/macro/local.lux8
-rw-r--r--stdlib/source/library/lux/macro/pattern.lux46
-rw-r--r--stdlib/source/library/lux/macro/syntax.lux28
-rw-r--r--stdlib/source/library/lux/macro/syntax/check.lux6
-rw-r--r--stdlib/source/library/lux/macro/syntax/declaration.lux2
-rw-r--r--stdlib/source/library/lux/macro/syntax/definition.lux14
-rw-r--r--stdlib/source/library/lux/macro/template.lux11
-rw-r--r--stdlib/source/library/lux/math.lux14
-rw-r--r--stdlib/source/library/lux/math/infix.lux4
-rw-r--r--stdlib/source/library/lux/math/modulus.lux2
-rw-r--r--stdlib/source/library/lux/math/number/complex.lux4
-rw-r--r--stdlib/source/library/lux/math/number/ratio.lux4
-rw-r--r--stdlib/source/library/lux/meta.lux4
-rw-r--r--stdlib/source/library/lux/meta/location.lux14
-rw-r--r--stdlib/source/library/lux/meta/type.lux54
-rw-r--r--stdlib/source/library/lux/meta/type/dynamic.lux16
-rw-r--r--stdlib/source/library/lux/meta/type/implicit.lux20
-rw-r--r--stdlib/source/library/lux/meta/type/poly.lux40
-rw-r--r--stdlib/source/library/lux/meta/type/primitive.lux26
-rw-r--r--stdlib/source/library/lux/meta/type/quotient.lux22
-rw-r--r--stdlib/source/library/lux/meta/type/refinement.lux22
-rw-r--r--stdlib/source/library/lux/meta/type/resource.lux38
-rw-r--r--stdlib/source/library/lux/meta/type/unit.lux10
-rw-r--r--stdlib/source/library/lux/meta/type/unit/scale.lux12
-rw-r--r--stdlib/source/library/lux/program.lux36
-rw-r--r--stdlib/source/library/lux/static.lux14
-rw-r--r--stdlib/source/library/lux/target/common_lisp.lux16
-rw-r--r--stdlib/source/library/lux/target/js.lux16
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode.lux4
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode/instruction.lux2
-rw-r--r--stdlib/source/library/lux/target/jvm/class.lux4
-rw-r--r--stdlib/source/library/lux/target/jvm/constant.lux4
-rw-r--r--stdlib/source/library/lux/target/jvm/field.lux2
-rw-r--r--stdlib/source/library/lux/target/jvm/method.lux2
-rw-r--r--stdlib/source/library/lux/target/jvm/modifier.lux10
-rw-r--r--stdlib/source/library/lux/target/jvm/reflection.lux4
-rw-r--r--stdlib/source/library/lux/target/jvm/type.lux4
-rw-r--r--stdlib/source/library/lux/target/jvm/type/category.lux2
-rw-r--r--stdlib/source/library/lux/target/jvm/type/lux.lux2
-rw-r--r--stdlib/source/library/lux/target/jvm/type/reflection.lux2
-rw-r--r--stdlib/source/library/lux/target/lua.lux8
-rw-r--r--stdlib/source/library/lux/target/php.lux8
-rw-r--r--stdlib/source/library/lux/target/python.lux8
-rw-r--r--stdlib/source/library/lux/target/r.lux8
-rw-r--r--stdlib/source/library/lux/target/ruby.lux10
-rw-r--r--stdlib/source/library/lux/target/scheme.lux14
-rw-r--r--stdlib/source/library/lux/test.lux24
-rw-r--r--stdlib/source/library/lux/time/instant.lux2
-rw-r--r--stdlib/source/library/lux/time/year.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/analysis/inference.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/generation.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux14
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/complex.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux16
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/declaration/jvm.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/runtime.lux30
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/extension.lux30
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux38
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/value.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/runtime.lux38
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux40
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux40
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/runtime.lux32
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/runtime.lux52
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/runtime.lux32
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux40
-rw-r--r--stdlib/source/library/lux/tool/compiler/reference.lux2
-rw-r--r--stdlib/source/library/lux/world/console.lux4
-rw-r--r--stdlib/source/library/lux/world/db/jdbc.lux2
-rw-r--r--stdlib/source/library/lux/world/db/jdbc/input.lux2
-rw-r--r--stdlib/source/library/lux/world/db/jdbc/output.lux2
-rw-r--r--stdlib/source/library/lux/world/db/sql.lux2
-rw-r--r--stdlib/source/library/lux/world/environment.lux10
-rw-r--r--stdlib/source/library/lux/world/file.lux60
-rw-r--r--stdlib/source/library/lux/world/shell.lux8
134 files changed, 1775 insertions, 1774 deletions
diff --git a/stdlib/source/library/lux.lux b/stdlib/source/library/lux.lux
index d142387b3..2e875d426 100644
--- a/stdlib/source/library/lux.lux
+++ b/stdlib/source/library/lux.lux
@@ -2041,7 +2041,7 @@
(def' .public literal_quote Macro ')
-(def' .public ~
+(def' .public ,
UnQuote
(..unquote
(macro (_ tokens)
@@ -2051,12 +2051,12 @@
it))))
_
- (failure (wrong_syntax_error [..prelude "~"]))}
+ (failure (wrong_syntax_error [..prelude ","]))}
tokens))))
-(def' .public but UnQuote ~)
+(def' .public but UnQuote ,)
-(def' .public ~!
+(def' .public ,!
UnQuote
(..unquote
(macro (_ tokens)
@@ -2070,12 +2070,12 @@
independent))))))))
_
- (failure (wrong_syntax_error [..prelude "~!"]))}
+ (failure (wrong_syntax_error [..prelude ",!"]))}
tokens))))
-(def' .public specifically UnQuote ~!)
+(def' .public specifically UnQuote ,!)
-(def' .public ~'
+(def' .public ,'
UnQuote
(..unquote
(macro (_ tokens)
@@ -2086,12 +2086,12 @@
(in (list it)))
_
- (failure (wrong_syntax_error [..prelude "~'"]))}
+ (failure (wrong_syntax_error [..prelude ",'"]))}
tokens))))
-(def' .public literally UnQuote ~')
+(def' .public literally UnQuote ,')
-(def' .public ~+
+(def' .public ,*
Spliced_UnQuote
(let' [g!list#composite (form$ (list (text$ "lux in-module")
(text$ ..prelude)
@@ -2102,10 +2102,10 @@
(meta#in (list (form$ (list g!list#composite (|List<Code>| it) tail))))
_
- (failure (wrong_syntax_error [..prelude "~+"]))}
+ (failure (wrong_syntax_error [..prelude ",*"]))}
tokens)))))
-(def' .public also Spliced_UnQuote ~+)
+(def' .public also Spliced_UnQuote ,*)
(def' .public |>
Macro
@@ -2123,7 +2123,7 @@
(form$ (list#composite parts (list acc)))
_
- (` ((~ app) (~ acc)))}
+ (` ((, app) (, acc)))}
app)))
init
apps)))
@@ -2148,7 +2148,7 @@
(form$ (list#composite parts (list acc)))
_
- (` ((~ app) (~ acc)))}
+ (` ((, app) (, acc)))}
app)))
init
apps)))
@@ -2613,12 +2613,12 @@
({[_ {#Variant {#Item [_ {#Symbol symbol}] parts}}]
(do meta#monad
[parts (monad#each meta#monad normal_type parts)]
- (in (` {(~ (symbol$ symbol)) (~+ parts)})))
+ (in (` {(, (symbol$ symbol)) (,* parts)})))
[_ {#Tuple members}]
(do meta#monad
[members (monad#each meta#monad normal_type members)]
- (in (` (Tuple (~+ members)))))
+ (in (` (Tuple (,* members)))))
[_ {#Form {#Item [_ {#Text "lux in-module"}]
{#Item [_ {#Text module}]
@@ -2626,9 +2626,9 @@
{#End}}}}}]
(do meta#monad
[type' (normal_type type')]
- (in (` ("lux in-module" (~ (text$ module)) (~ type')))))
+ (in (` ("lux in-module" (, (text$ module)) (, type')))))
- [_ {#Form {#Item [_ {#Symbol ["" "~"]}] {#Item expression {#End}}}}]
+ [_ {#Form {#Item [_ {#Symbol ["" ","]}] {#Item expression {#End}}}}]
(meta#in expression)
[_0 {#Form {#Item [_1 {#Variant {#Item binding {#Item body {#End}}}}]
@@ -2658,7 +2658,7 @@
[type_fn (normal_type type_fn)
args (monad#each meta#monad normal_type args)]
(in (list#mix ("lux type check" (-> Code Code Code)
- (function' [arg type_fn] (` {.#Apply (~ arg) (~ type_fn)})))
+ (function' [arg type_fn] (` {.#Apply (, arg) (, type_fn)})))
type_fn
args)))
@@ -2764,8 +2764,8 @@
(macro (_ tokens)
({{#Item type {#Item value {#End}}}
(meta#in (list (` ("lux type check"
- (..type_literal (~ type))
- (~ value)))))
+ (..type_literal (, type))
+ (, value)))))
_
(failure (wrong_syntax_error [..prelude "is"]))}
@@ -2776,8 +2776,8 @@
(macro (_ tokens)
({{#Item type {#Item value {#End}}}
(meta#in (list (` ("lux type as"
- (..type_literal (~ type))
- (~ value)))))
+ (..type_literal (, type))
+ (, value)))))
_
(failure (wrong_syntax_error [..prelude "as"]))}
@@ -2821,8 +2821,8 @@
({{#Item value actions}
(let' [dummy (local$ "")]
(meta#in (list (list#mix ("lux type check" (-> Code Code Code)
- (function' [pre post] (` ({(~ dummy) (~ post)}
- (~ pre)))))
+ (function' [pre post] (` ({(, dummy) (, post)}
+ (, pre)))))
value
actions))))
@@ -2869,7 +2869,7 @@
({{#Item value branches}
(do meta#monad
[expansion (case_expansion branches)]
- (in (list (` ((~ (variant$ expansion)) (~ value))))))
+ (in (list (` ((, (variant$ expansion)) (, value))))))
_
(failure "Wrong syntax for case")}
@@ -2914,7 +2914,7 @@
(macro (_ tokens)
(case tokens
(pattern (list [_ {#Symbol [module name]}]))
- (meta#in (list (` [(~ (text$ module)) (~ (text$ name))])))
+ (meta#in (list (` [(, (text$ module)) (, (text$ name))])))
_
(failure (..wrong_syntax_error [..prelude "symbol"])))))
@@ -2941,8 +2941,8 @@
(function' [lr body']
(let' [[l r] lr]
(if (symbol? l)
- (` ({(~ l) (~ body')} (~ r)))
- (` (case (~ r) (~ l) (~ body')))))))
+ (` ({(, l) (, body')} (, r)))
+ (` (case (, r) (, l) (, body')))))))
body)
list
meta#in)
@@ -2969,9 +2969,9 @@
(function' [g!name]
(function' [arg body']
(if (symbol? arg)
- (` ([(~ g!name) (~ arg)] (~ body')))
- (` ([(~ g!name) (~ g!blank)]
- (.case (~ g!blank) (~ arg) (~ body'))))))))]
+ (` ([(, g!name) (, arg)] (, body')))
+ (` ([(, g!name) (, g!blank)]
+ (.case (, g!blank) (, arg) (, body'))))))))]
(meta#in (list (nest (..local$ g!name) head
(list#mix (nest g!blank) body (list#reversed tail))))))
@@ -3270,18 +3270,18 @@
body
_
- (` (function ((~ (..local$ name)) (~+ parameters))
- (~ body))))
+ (` (function ((, (..local$ name)) (,* parameters))
+ (, body))))
body (case ?type
{#Some type}
- (` (is (~ type)
- (~ body)))
+ (` (is (, type)
+ (, body)))
{#None}
body)]
- (meta#in (list (` ("lux def" (~ (..local$ name))
- (~ body)
- (~ export_policy))))))
+ (meta#in (list (` ("lux def" (, (..local$ name))
+ (, body)
+ (, export_policy))))))
{#None}
(failure (..wrong_syntax_error (symbol ..def))))))
@@ -3299,8 +3299,8 @@
_
(failure <message>))))]
- [and (if (~ pre) (~ post) #0) "'and' requires >=1 clauses."]
- [or (if (~ pre) #1 (~ post)) "'or' requires >=1 clauses."])
+ [and (if (, pre) (, post) #0) "'and' requires >=1 clauses."]
+ [or (if (, pre) #1 (, post)) "'or' requires >=1 clauses."])
(def (index part text)
(-> Text Text (Maybe Nat))
@@ -3315,12 +3315,12 @@
(case tokens
(pattern (list else maybe))
(let [g!temp (is Code [dummy_location {#Symbol ["" ""]}])
- code (` (case (~ maybe)
- {.#Some (~ g!temp)}
- (~ g!temp)
+ code (` (case (, maybe)
+ {.#Some (, g!temp)}
+ (, g!temp)
{.#None}
- (~ else)))]
+ (, else)))]
{#Right [state (list code)]})
_
@@ -3684,7 +3684,7 @@
{#Some [tokens' [niladic (` .Any)]]}
(pattern (partial_list [_ {#Variant (partial_list [_ {#Symbol ["" polyadic]}] caseT)}] tokens'))
- {#Some [tokens' [polyadic (` (..Tuple (~+ caseT)))]]}
+ {#Some [tokens' [polyadic (` (..Tuple (,* caseT)))]]}
_
{#None}))
@@ -3693,7 +3693,7 @@
(macro (_ tokens)
(case (everyP caseP tokens)
{#Some cases}
- (meta#in (list (` (..Union (~+ (list#each product#right cases))))
+ (meta#in (list (` (..Union (,* (list#each product#right cases))))
(variant$ (list#each (function (_ case)
(text$ (product#left case)))
cases))))
@@ -3716,7 +3716,7 @@
(pattern (list [_ {#Tuple record}]))
(case (everyP slotP record)
{#Some slots}
- (meta#in (list (` (..Tuple (~+ (list#each product#right slots))))
+ (meta#in (list (` (..Tuple (,* (list#each product#right slots))))
(tuple$ (list#each (function (_ slot)
(text$ (product#left slot)))
slots))))
@@ -3793,30 +3793,30 @@
{#Some type}
_
- {#Some (` (.All ((~ type_name) (~+ (list#each local$ args)))
- (~ type)))}))]]
+ {#Some (` (.All ((, type_name) (,* (list#each local$ args)))
+ (, type)))}))]]
(case type'
{#Some type''}
- (let [typeC (` {.#Named [(~ (text$ module_name))
- (~ (text$ name))]
- (..type_literal (~ type''))})]
+ (let [typeC (` {.#Named [(, (text$ module_name))
+ (, (text$ name))]
+ (..type_literal (, type''))})]
(meta#in (list (case labels??
{#Some labels}
- (` ("lux def type tagged" (~ type_name)
- (~ typeC)
- (~ (case labels
+ (` ("lux def type tagged" (, type_name)
+ (, typeC)
+ (, (case labels
{#Left tags}
- (` {(~+ (list#each text$ tags))})
+ (` {(,* (list#each text$ tags))})
{#Right slots}
- (` [(~+ (list#each text$ slots))])))
- (~ export_policy)))
+ (` [(,* (list#each text$ slots))])))
+ (, export_policy)))
_
- (` ("lux def" (~ type_name)
+ (` ("lux def" (, type_name)
("lux type check type"
- (~ typeC))
- (~ export_policy)))))))
+ (, typeC))
+ (, export_policy)))))))
{#None}
(failure (..wrong_syntax_error (symbol ..type)))))
@@ -4116,7 +4116,7 @@
(def (alias_definition imported_module def)
(-> Text Text Code)
- (` ("lux def alias" (~ (local$ def)) (~ (symbol$ [imported_module def])))))
+ (` ("lux def alias" (, (local$ def)) (, (symbol$ [imported_module def])))))
(def .public only
(macro (_ tokens)
@@ -4140,14 +4140,14 @@
(do meta#monad
[g!_ (..generated_symbol "_")
g!arg (..generated_symbol "arg")]
- (meta#in (list (` (function ((~ g!_) (~ g!arg)) (|> (~ g!arg) (~+ tokens)))))))))
+ (meta#in (list (` (function ((, g!_) (, g!arg)) (|> (, g!arg) (,* tokens)))))))))
(def .public <<|
(macro (_ tokens)
(do meta#monad
[g!_ (..generated_symbol "_")
g!arg (..generated_symbol "arg")]
- (meta#in (list (` (function ((~ g!_) (~ g!arg)) (<| (~+ tokens) (~ g!arg)))))))))
+ (meta#in (list (` (function ((, g!_) (, g!arg)) (<| (,* tokens) (, g!arg)))))))))
(def .public except
(macro (_ tokens)
@@ -4265,7 +4265,7 @@
(pattern (partial_list [_ {#Form (list [_ {#Text alias}])}] body branches))
(do meta#monad
[g!temp (..generated_symbol "temp")]
- (in (partial_list g!temp (` (..open (~ g!temp) (~ (text$ alias)) (~ body))) branches)))
+ (in (partial_list g!temp (` (..open (, g!temp) (, (text$ alias)) (, body))) branches)))
(pattern (list [_ {#Symbol name}] [_ {#Text alias}] body))
(do meta#monad
@@ -4309,7 +4309,7 @@
(in enhanced_target))))
target
(zipped_2 locals members))]
- (in (` ({(~ pattern) (~ enhanced_target)} (~ (symbol$ source)))))))))
+ (in (` ({(, pattern) (, enhanced_target)} (, (symbol$ source)))))))))
name tags&members body)]
(in (list full_body)))))
@@ -4325,7 +4325,7 @@
(meta#in (list (list#mix (is (-> [Code Code] Code Code)
(function (_ branch else)
(let [[then ?] branch]
- (` (if (~ ?) (~ then) (~ else))))))
+ (` (if (, ?) (, then) (, else))))))
else
branches')))
@@ -4371,7 +4371,7 @@
g!_)))))
list#conjoint
tuple$)]
- (meta#in (list (` ({(~ pattern) (~ g!output)} (~ record))))))
+ (meta#in (list (` ({(, pattern) (, g!output)} (, record))))))
_
(failure "the can only use records.")))
@@ -4379,7 +4379,7 @@
(pattern (list [_ {#Tuple slots}] record))
(meta#in (list (list#mix (is (-> Code Code Code)
(function (_ slot inner)
- (` (..the (~ slot) (~ inner)))))
+ (` (..the (, slot) (, inner)))))
record
slots)))
@@ -4387,7 +4387,7 @@
(do meta#monad
[g!_ (..generated_symbol "_")
g!record (..generated_symbol "record")]
- (in (list (` (function ((~ g!_) (~ g!record)) (..the (~ selector) (~ g!record)))))))
+ (in (list (` (function ((, g!_) (, g!record)) (..the (, selector) (, g!record)))))))
_
(failure (..wrong_syntax_error (symbol ..the))))))
@@ -4405,7 +4405,7 @@
g!output
g!_)))
tuple$)
- source+ (` ({(~ pattern) (~ g!output)} (~ source)))]]
+ source+ (` ({(, pattern) (, g!output)} (, source)))]]
(case output
{#Some [tags' members']}
(do meta#monad
@@ -4417,8 +4417,8 @@
(in (list#conjoint decls')))
_
- (in (list (` ("lux def" (~ (local$ (..module_alias (list short imported_module) alias)))
- (~ source+)
+ (in (list (` ("lux def" (, (local$ (..module_alias (list short imported_module) alias)))
+ (, source+)
#0)))))))
(def (implementation_declarations imported_module alias implementation)
@@ -4490,18 +4490,18 @@
_
(do meta#monad
[g!implementation (..generated_symbol "implementation")]
- (in [{#Item (` ("lux def" (~ g!implementation) (~ it) #0)) pre_defs}
+ (in [{#Item (` ("lux def" (, g!implementation) (, it) #0)) pre_defs}
{#Item g!implementation implementations}]))))
[(list) (list)]
implementations))
.let [[pre_defs implementations] pre_defs,implementations]]
(in (|> pre_defs
{#Item (` (..use
- (~ (text$ current_module))
- (~ (text$ imported_module))
- (~ (text$ import_alias))
- (~ (text$ alias))
- (~+ implementations)))}
+ (, (text$ current_module))
+ (, (text$ imported_module))
+ (, (text$ import_alias))
+ (, (text$ alias))
+ (,* implementations)))}
list#reversed)))))
@@ -4545,11 +4545,11 @@
[referrals (..referrals imported_module options)
current_module ..current_module_name]
(in (list#each (function (_ [macro parameters])
- (` ((~ (symbol$ macro))
- (~ (text$ current_module))
- (~ (text$ imported_module))
- (~ (text$ alias))
- (~+ parameters))))
+ (` ((, (symbol$ macro))
+ (, (text$ current_module))
+ (, (text$ imported_module))
+ (, (text$ alias))
+ (,* parameters))))
referrals)))
_
@@ -4560,8 +4560,8 @@
(case (..parsed (..andP ..anyP ..anyP)
tokens)
{.#Some [implementation expression]}
- (meta#in (list (` (..let [(..open (~ (text$ (alias_stand_in 0)))) (~ implementation)]
- (~ expression)))))
+ (meta#in (list (` (..let [(..open (, (text$ (alias_stand_in 0)))) (, implementation)]
+ (, expression)))))
{.#None}
(failure (..wrong_syntax_error (symbol ..with))))))
@@ -4570,10 +4570,10 @@
(macro (_ tokens)
(case tokens
(pattern (list implementation [_ {#Symbol member}]))
- (meta#in (list (` (..with (~ implementation) (~ (symbol$ member))))))
+ (meta#in (list (` (..with (, implementation) (, (symbol$ member))))))
(pattern (partial_list struct member args))
- (meta#in (list (` ((..at (~ struct) (~ member)) (~+ args)))))
+ (meta#in (list (` ((..at (, struct) (, member)) (,* args)))))
_
(failure (..wrong_syntax_error (symbol ..at))))))
@@ -4612,7 +4612,7 @@
r_var)))))
list#conjoint
tuple$)]
- (meta#in (list (` ({(~ pattern) (~ output)} (~ record)))))))
+ (meta#in (list (` ({(, pattern) (, output)} (, record)))))))
_
(failure "has can only use records.")))
@@ -4631,33 +4631,33 @@
.let [pairs (zipped_2 slots bindings)
update_expr (list#mix (is (-> [Code Code] Code Code)
(function (_ [s b] v)
- (` (..has (~ s) (~ v) (~ b)))))
+ (` (..has (, s) (, v) (, b)))))
value
(list#reversed pairs))
[_ accesses'] (list#mix (is (-> [Code Code] [Code (List (List Code))] [Code (List (List Code))])
(function (_ [new_slot new_binding] [old_record accesses'])
- [(` (the (~ new_slot) (~ new_binding)))
+ [(` (the (, new_slot) (, new_binding)))
{#Item (list new_binding old_record) accesses'}]))
[record (is (List (List Code)) {#End})]
pairs)
accesses (list#conjoint (list#reversed accesses'))]]
- (in (list (` (let [(~+ accesses)]
- (~ update_expr)))))))
+ (in (list (` (let [(,* accesses)]
+ (, update_expr)))))))
(pattern (list selector value))
(do meta#monad
[g!_ (..generated_symbol "_")
g!record (..generated_symbol "record")]
- (in (list (` (function ((~ g!_) (~ g!record))
- (..has (~ selector) (~ value) (~ g!record)))))))
+ (in (list (` (function ((, g!_) (, g!record))
+ (..has (, selector) (, value) (, g!record)))))))
(pattern (list selector))
(do meta#monad
[g!_ (..generated_symbol "_")
g!value (..generated_symbol "value")
g!record (..generated_symbol "record")]
- (in (list (` (function ((~ g!_) (~ g!value) (~ g!record))
- (..has (~ selector) (~ g!value) (~ g!record)))))))
+ (in (list (` (function ((, g!_) (, g!value) (, g!record))
+ (..has (, selector) (, g!value) (, g!record)))))))
_
(failure (..wrong_syntax_error (symbol ..has))))))
@@ -4692,11 +4692,11 @@
(function (_ [r_slot_name r_idx r_var])
(list (symbol$ r_slot_name)
(if ("lux i64 =" idx r_idx)
- (` ((~ fun) (~ r_var)))
+ (` ((, fun) (, r_var)))
r_var)))))
list#conjoint
tuple$)]
- (meta#in (list (` ({(~ pattern) (~ output)} (~ record)))))))
+ (meta#in (list (` ({(, pattern) (, output)} (, record)))))))
_
(failure "revised can only use records.")))
@@ -4710,24 +4710,24 @@
(do meta#monad
[g!record (..generated_symbol "record")
g!temp (..generated_symbol "temp")]
- (in (list (` (let [(~ g!record) (~ record)
- (~ g!temp) (the [(~+ slots)] (~ g!record))]
- (has [(~+ slots)] ((~ fun) (~ g!temp)) (~ g!record))))))))
+ (in (list (` (let [(, g!record) (, record)
+ (, g!temp) (the [(,* slots)] (, g!record))]
+ (has [(,* slots)] ((, fun) (, g!temp)) (, g!record))))))))
(pattern (list selector fun))
(do meta#monad
[g!_ (..generated_symbol "_")
g!record (..generated_symbol "record")]
- (in (list (` (function ((~ g!_) (~ g!record))
- (..revised (~ selector) (~ fun) (~ g!record)))))))
+ (in (list (` (function ((, g!_) (, g!record))
+ (..revised (, selector) (, fun) (, g!record)))))))
(pattern (list selector))
(do meta#monad
[g!_ (..generated_symbol "_")
g!fun (..generated_symbol "fun")
g!record (..generated_symbol "record")]
- (in (list (` (function ((~ g!_) (~ g!fun) (~ g!record))
- (..revised (~ selector) (~ g!fun) (~ g!record)))))))
+ (in (list (` (function ((, g!_) (, g!fun) (, g!record))
+ (..revised (, selector) (, g!fun) (, g!record)))))))
_
(failure (..wrong_syntax_error (symbol ..revised))))))
@@ -4791,31 +4791,31 @@
(-> Type Code)
(case type
{#Primitive name params}
- (` {.#Primitive (~ (text$ name)) (~ (untemplated_list (list#each type_code params)))})
+ (` {.#Primitive (, (text$ name)) (, (untemplated_list (list#each type_code params)))})
(with_template#pattern [<tag>]
[{<tag> left right}
- (` {<tag> (~ (type_code left)) (~ (type_code right))})])
+ (` {<tag> (, (type_code left)) (, (type_code right))})])
([.#Sum] [.#Product]
[.#Function]
[.#Apply])
(with_template#pattern [<tag>]
[{<tag> id}
- (` {<tag> (~ (nat$ id))})])
+ (` {<tag> (, (nat$ id))})])
([.#Parameter] [.#Var] [.#Ex])
(with_template#pattern [<tag>]
[{<tag> env type}
(let [env' (untemplated_list (list#each type_code env))]
- (` {<tag> (~ env') (~ (type_code type))}))])
+ (` {<tag> (, env') (, (type_code type))}))])
([.#UnivQ] [.#ExQ])
{#Named [module name] anonymous}
... TODO: Generate the explicit type definition instead of using
... the "symbol$" shortcut below.
- ... (` {.#Named [(~ (text$ module)) (~ (text$ name))]
- ... (~ (type_code anonymous))})
+ ... (` {.#Named [(, (text$ module)) (, (text$ name))]
+ ... (, (type_code anonymous))})
(symbol$ [module name])))
(def .public loop
@@ -4841,19 +4841,19 @@
init_types (monad#each meta#monad type_definition inits')
expected ..expected_type]
(meta#in (list (` (("lux type check"
- (-> (~+ (list#each type_code init_types))
- (~ (type_code expected)))
- (function ((~ name) (~+ vars))
- (~ body)))
- (~+ inits))))))
+ (-> (,* (list#each type_code init_types))
+ (, (type_code expected)))
+ (function ((, name) (,* vars))
+ (, body)))
+ (,* inits))))))
(do meta#monad
[aliases (monad#each meta#monad
(is (-> Code (Meta Code))
(function (_ _) (..generated_symbol "")))
inits)]
- (meta#in (list (` (..let [(~+ (..interleaved aliases inits))]
- (..loop ((~ name) [(~+ (..interleaved vars aliases))])
- (~ body)))))))))
+ (meta#in (list (` (..let [(,* (..interleaved aliases inits))]
+ (..loop ((, name) [(,* (..interleaved vars aliases))])
+ (, body)))))))))
{#None}
(failure (..wrong_syntax_error (symbol ..loop))))
@@ -5020,14 +5020,14 @@
_
#0)]
- (` (case (~ calculation)
- (~ pattern)
- (~ success)
+ (` (case (, calculation)
+ (, pattern)
+ (, success)
- (~+ (if bind?
+ (,* (if bind?
(list)
(list g!_ (` {.#None}))))))))
- (` {.#Some (~ body)})
+ (` {.#Some (, body)})
(is (List [Code Code]) (list#reversed levels)))]
(list init_pattern inner_pattern_body)))
@@ -5046,17 +5046,17 @@
expected ..expected_type
g!temp (..generated_symbol "temp")]
(in (list g!temp
- (` ({{.#Some (~ g!temp)}
- (~ g!temp)
+ (` ({{.#Some (, g!temp)}
+ (, g!temp)
{.#None}
- (case (~ g!temp)
- (~+ next_branches))}
- ("lux type check" {.#Apply (~ (type_code expected)) Maybe}
- (case (~ g!temp)
- (~+ (multi_level_case$ g!temp [mlc body]))
+ (case (, g!temp)
+ (,* next_branches))}
+ ("lux type check" {.#Apply (, (type_code expected)) Maybe}
+ (case (, g!temp)
+ (,* (multi_level_case$ g!temp [mlc body]))
- (~+ (if initial_bind?
+ (,* (if initial_bind?
(list)
(list g!temp (` {.#None})))))))))))
@@ -5074,7 +5074,7 @@
(pattern (list expr))
(do meta#monad
[type ..expected_type]
- (in (list (` ("lux type as" (~ (type_code type)) (~ expr))))))
+ (in (list (` ("lux type as" (, (type_code type)) (, expr))))))
_
(failure (..wrong_syntax_error (symbol ..as_expected))))))
@@ -5093,7 +5093,7 @@
.let [[module line column] location
location (all "lux text concat" (text#encoded module) "," (nat#encoded line) "," (nat#encoded column))
message (all "lux text concat" "Undefined behavior @ " location)]]
- (in (list (` (..panic! (~ (text$ message)))))))
+ (in (list (` (..panic! (, (text$ message)))))))
_
(failure (..wrong_syntax_error (symbol ..undefined))))))
@@ -5109,8 +5109,8 @@
(pattern (list expression))
(do meta#monad
[g!temp (..generated_symbol "g!temp")]
- (in (list (` (let [(~ g!temp) (~ expression)]
- (..type_of (~ g!temp)))))))
+ (in (list (` (let [(, g!temp) (, expression)]
+ (..type_of (, g!temp)))))))
_
(failure (..wrong_syntax_error (symbol ..type_of))))))
@@ -5134,19 +5134,19 @@
g!compiler (..generated_symbol "compiler")
g!_ (..generated_symbol "_")
.let [rep_env (list#each (function (_ arg)
- [arg (` ((~' ~) (~ (local$ arg))))])
+ [arg (` ((,' ,) (, (local$ arg))))])
args)]
this_module current_module_name]
- (in (list (` (..macro ((~ (local$ name)) (~ g!tokens) (~ g!compiler))
- (case (~ g!tokens)
- (pattern (list (~+ (list#each local$ args))))
- {.#Right [(~ g!compiler)
- (list (~+ (list#each (function (_ template)
- (` (`' (~ (with_replacements rep_env
+ (in (list (` (..macro ((, (local$ name)) (, g!tokens) (, g!compiler))
+ (case (, g!tokens)
+ (pattern (list (,* (list#each local$ args))))
+ {.#Right [(, g!compiler)
+ (list (,* (list#each (function (_ template)
+ (` (`' (, (with_replacements rep_env
template)))))
input_templates)))]}
- (~ g!_)
+ (, g!_)
{.#Left "Invalid syntax."}))))))
{#None}
@@ -5259,7 +5259,7 @@
[stvs ..scope_type_vars]
(case (..item idx (list#reversed stvs))
{#Some var_id}
- (in (list (` {.#Ex (~ (nat$ var_id))})))
+ (in (list (` {.#Ex (, (nat$ var_id))})))
{#None}
(failure (text#composite "Indexed-type does not exist: " (nat#encoded idx)))))
@@ -5270,11 +5270,11 @@
(def (refer_code imported_module alias referrals)
(-> Text Text (List Referral) Code)
- (` ((~! ..refer)
- (~ (text$ imported_module))
- (~ (text$ alias))
- (~+ (list#each (function (_ [macro parameters])
- (` ((~ (symbol$ macro)) (~+ parameters))))
+ (` ((,! ..refer)
+ (, (text$ imported_module))
+ (, (text$ alias))
+ (,* (list#each (function (_ [macro parameters])
+ (` ((, (symbol$ macro)) (,* parameters))))
referrals)))))
(def .public require
@@ -5285,13 +5285,13 @@
.let [=imports (|> imports
(list#each (is (-> Importation Code)
(function (_ [module_name m_alias =refer])
- (` [(~ (text$ module_name)) (~ (text$ (..maybe#else "" m_alias)))]))))
+ (` [(, (text$ module_name)) (, (text$ (..maybe#else "" m_alias)))]))))
tuple$)
=refers (list#each (is (-> Importation Code)
(function (_ [module_name m_alias =refer])
(refer_code module_name (..maybe#else "" m_alias) =refer)))
imports)
- =module (` ("lux def module" (~ =imports)))]
+ =module (` ("lux def module" (, =imports)))]
g!_ (..generated_symbol "")]
(in {#Item =module
(for "Python"
@@ -5300,7 +5300,7 @@
... {library/lux/tool/compiler/language/lux/generation.no_buffer_for_saving_code}
... Artifact ID: 0
... Which only ever happens for the Python compiler.
- (partial_list (` ("lux def" (~ g!_) [] #0))
+ (partial_list (` ("lux def" (, g!_) [] #0))
=refers)
=refers)}))))
@@ -5315,7 +5315,7 @@
(-> Immediate_UnQuote Macro')
(|>> (as Macro')))
-(def .public ~~
+(def .public ,,
(..immediate_unquote
(macro (_ it)
(case it
@@ -5323,7 +5323,7 @@
(meta#in (list it))
_
- (failure (wrong_syntax_error (symbol ..~~)))))))
+ (failure (wrong_syntax_error (symbol ..,,)))))))
(def aggregate_embedded_expansions
(template (_ embedded_expansions <@> <tag> <*>)
@@ -5390,8 +5390,8 @@
(do meta#monad
[=raw (..embedded_expansions raw)
.let [[labels labelled] =raw]]
- (in (list (` (with_expansions [(~+ labels)]
- (~ labelled))))))
+ (in (list (` (with_expansions [(,* labels)]
+ (, labelled))))))
_
(failure (..wrong_syntax_error (symbol ..``))))))
@@ -5410,8 +5410,8 @@
(do meta#monad
[g!_ (..generated_symbol "g!_")]
(in (list (` ("lux try"
- (.function ((~ g!_) (~ g!_))
- (~ expression)))))))
+ (.function ((, g!_) (, g!_))
+ (, expression)))))))
_
(..failure (..wrong_syntax_error (symbol ..try))))))
@@ -5434,7 +5434,7 @@
[methods' (monad#each meta#monad expansion tokens)]
(case (everyP methodP (list#conjoint methods'))
{#Some methods}
- (in (list (` (..Tuple (~+ (list#each product#right methods))))
+ (in (list (` (..Tuple (,* (list#each product#right methods))))
(tuple$ (list#each (|>> product#left text$) methods))))
{#None}
@@ -5443,8 +5443,8 @@
(def (recursive_type g!self g!dummy name body)
(-> Code Code Text Code Code)
(` {.#Apply (..Primitive "")
- (.All ((~ g!self) (~ g!dummy))
- (~ (let$ (local$ name) (` {.#Apply (..Primitive "") (~ g!self)})
+ (.All ((, g!self) (, g!dummy))
+ (, (let$ (local$ name) (` {.#Apply (..Primitive "") (, g!self)})
body)))}))
(def .public Rec
diff --git a/stdlib/source/library/lux/abstract/comonad.lux b/stdlib/source/library/lux/abstract/comonad.lux
index 3bb200239..fbe61f780 100644
--- a/stdlib/source/library/lux/abstract/comonad.lux
+++ b/stdlib/source/library/lux/abstract/comonad.lux
@@ -46,14 +46,14 @@
g!disjoint (symbol "disjoint")
body' (list#mix (is (-> [Code Code] Code Code)
(function (_ binding body')
- (with_expansions [<default> (` (|> (~ value) (~ g!disjoint) ((~ g!each) (function ((~ g!_) (~ var)) (~ body')))))]
+ (with_expansions [<default> (` (|> (, value) (, g!disjoint) ((, g!each) (function ((, g!_) (, var)) (, body')))))]
(let [[var value] binding]
(case var
[_ {.#Symbol ["" _]}]
<default>
[_ {.#Symbol _}]
- (` ((~ var) (~ value) (~ body')))
+ (` ((, var) (, value) (, body')))
_
<default>)))))
@@ -62,16 +62,16 @@
{.#Right [state (list (case ?name
{.#Some name}
(let [name [location.dummy {.#Symbol ["" name]}]]
- (` (.case (~ comonad)
- (~ name)
- (.case (~ name)
- [(~ g!each) (~' out) (~ g!disjoint)]
- (~ body')))))
+ (` (.case (, comonad)
+ (, name)
+ (.case (, name)
+ [(, g!each) (,' out) (, g!disjoint)]
+ (, body')))))
{.#None}
- (` (.case (~ comonad)
- [(~ g!each) (~' out) (~ g!disjoint)]
- (~ body')))))]})
+ (` (.case (, comonad)
+ [(, g!each) (,' out) (, g!disjoint)]
+ (, body')))))]})
{.#None}
{.#Left "'be' bindings must have an even number of parts."})
diff --git a/stdlib/source/library/lux/abstract/enum.lux b/stdlib/source/library/lux/abstract/enum.lux
index eea9320df..9a79beb54 100644
--- a/stdlib/source/library/lux/abstract/enum.lux
+++ b/stdlib/source/library/lux/abstract/enum.lux
@@ -14,7 +14,7 @@
(All (_ a) (-> (Enum a) a a (List a)))
(let [(open "/#[0]") enum]
(loop (again [end to
- output (`` (is (List (~~ (type_of from)))
+ output (`` (is (List (,, (type_of from)))
{.#End}))])
(cond (/#< end from)
(again (/#pred end) {.#Item end output})
diff --git a/stdlib/source/library/lux/abstract/monad.lux b/stdlib/source/library/lux/abstract/monad.lux
index 3bf10fca1..33faf1290 100644
--- a/stdlib/source/library/lux/abstract/monad.lux
+++ b/stdlib/source/library/lux/abstract/monad.lux
@@ -76,14 +76,14 @@
g!conjoint (symbol "conjoint")
body' (list#mix (is (-> [Code Code] Code Code)
(function (_ binding body')
- (with_expansions [<default> (` (|> (~ value) ((~ g!each) (function ((~ g!_) (~ var)) (~ body'))) (~ g!conjoint)))]
+ (with_expansions [<default> (` (|> (, value) ((, g!each) (function ((, g!_) (, var)) (, body'))) (, g!conjoint)))]
(let [[var value] binding]
(case var
[_ {.#Symbol ["" _]}]
<default>
[_ {.#Symbol _}]
- (` ((~ var) (~ value) (~ body')))
+ (` ((, var) (, value) (, body')))
_
<default>)))))
@@ -92,16 +92,16 @@
{.#Right [state (list (case ?name
{.#Some name}
(let [name [location.dummy {.#Symbol ["" name]}]]
- (` (.case (~ monad)
- (~ name)
- (.case (~ name)
- [(~ g!each) (~' in) (~ g!conjoint)]
- (~ body')))))
+ (` (.case (, monad)
+ (, name)
+ (.case (, name)
+ [(, g!each) (,' in) (, g!conjoint)]
+ (, body')))))
{.#None}
- (` (.case (~ monad)
- [(~ g!each) (~' in) (~ g!conjoint)]
- (~ body')))))]})
+ (` (.case (, monad)
+ [(, g!each) (,' in) (, g!conjoint)]
+ (, body')))))]})
{.#Left "'do' bindings must have an even number of parts."})
{.#None}
diff --git a/stdlib/source/library/lux/abstract/monad/indexed.lux b/stdlib/source/library/lux/abstract/monad/indexed.lux
index cba3ac6e1..f6dd6a461 100644
--- a/stdlib/source/library/lux/abstract/monad/indexed.lux
+++ b/stdlib/source/library/lux/abstract/monad/indexed.lux
@@ -70,26 +70,26 @@
(let [body (list#mix (function (_ context next)
(case context
{#Macro macro parameter}
- (` ((~ (code.symbol macro))
- (~ parameter)
- (~ next)))
+ (` ((, (code.symbol macro))
+ (, parameter)
+ (, next)))
{#Binding [binding value]}
- (` ((~ g!then)
- (.function ((~ g!_) (~ binding))
- (~ next))
- (~ value)))))
+ (` ((, g!then)
+ (.function ((, g!_) (, binding))
+ (, next))
+ (, value)))))
expression
(list.reversed context))]
(in (list (case ?name
{.#Some name}
(let [name (code.local name)]
- (` (let [(~ name) (~ monad)
- [..in (~' in)
- ..then (~ g!then)] (~ name)]
- (~ body))))
+ (` (let [(, name) (, monad)
+ [..in (,' in)
+ ..then (, g!then)] (, name)]
+ (, body))))
{.#None}
- (` (let [[..in (~' in)
- ..then (~ g!then)] (~ monad)]
- (~ body))))))))))
+ (` (let [[..in (,' in)
+ ..then (, g!then)] (, monad)]
+ (, body))))))))))
diff --git a/stdlib/source/library/lux/control/concatenative.lux b/stdlib/source/library/lux/control/concatenative.lux
index 795d387cb..ac78d307a 100644
--- a/stdlib/source/library/lux/control/concatenative.lux
+++ b/stdlib/source/library/lux/control/concatenative.lux
@@ -50,7 +50,7 @@
(def (stack_type tops bottom)
(-> (List Code) Code Code)
(list#mix (function (_ top bottom)
- (` [(~ bottom) (~ top)]))
+ (` [(, bottom) (, top)]))
bottom
tops))
@@ -64,11 +64,11 @@
output_stack (stack_type (the #top outputs) output_bottom)]
(in (list (.if (or (same? common_bottom input_bottom)
(same? common_bottom output_bottom))
- (` (All ((~ g!_) (~ common_bottom))
- (-> (~ input_stack)
- (~ output_stack))))
- (` (-> (~ input_stack)
- (~ output_stack))))))))))
+ (` (All ((, g!_) (, common_bottom))
+ (-> (, input_stack)
+ (, output_stack))))
+ (` (-> (, input_stack)
+ (, output_stack))))))))))
(def .public (value it)
(All (_ ,,, a)
@@ -82,15 +82,15 @@
(with_symbols [g!_ g!func g!stack g!output]
(monad.do [! meta.monad]
[g!inputs (|> (macro.symbol "input") (list.repeated arity) (monad.all !))]
- (in (list (` (is (All ((~ g!_) (~+ g!inputs) (~ g!output))
- (-> (-> (~+ g!inputs) (~ g!output))
- (=> [(~+ g!inputs)] [(~ g!output)])))
- (function ((~ g!_) (~ g!func))
- (function ((~ g!_) (~ (stack_type g!inputs g!stack)))
- [(~ g!stack) ((~ g!func) (~+ g!inputs))]))))))))))
+ (in (list (` (is (All ((, g!_) (,* g!inputs) (, g!output))
+ (-> (-> (,* g!inputs) (, g!output))
+ (=> [(,* g!inputs)] [(, g!output)])))
+ (function ((, g!_) (, g!func))
+ (function ((, g!_) (, (stack_type g!inputs g!stack)))
+ [(, g!stack) ((, g!func) (,* g!inputs))]))))))))))
(with_template [<arity>]
- [(`` (def .public (~~ (template.symbol ["apply_" <arity>]))
+ [(`` (def .public (,, (template.symbol ["apply_" <arity>]))
(..apply <arity>)))]
[1] [2] [3] [4]
diff --git a/stdlib/source/library/lux/control/concurrency/async.lux b/stdlib/source/library/lux/control/concurrency/async.lux
index 0098f0f1b..37ab82cbe 100644
--- a/stdlib/source/library/lux/control/concurrency/async.lux
+++ b/stdlib/source/library/lux/control/concurrency/async.lux
@@ -186,7 +186,7 @@
(is [(Async a) (Resolver a)]
(..async [])))]
(`` (exec
- (~~ (with_template [<async>]
+ (,, (with_template [<async>]
[(io.run! (upon! resolve <async>))]
[left]
diff --git a/stdlib/source/library/lux/control/concurrency/atom.lux b/stdlib/source/library/lux/control/concurrency/atom.lux
index 3c81d2841..4ba43632f 100644
--- a/stdlib/source/library/lux/control/concurrency/atom.lux
+++ b/stdlib/source/library/lux/control/concurrency/atom.lux
@@ -58,7 +58,7 @@
(All (_ r w) (-> r w (Atom' r w) (IO Bit)))
(io.io (for @.old (ffi.of_boolean
(java/util/concurrent/atomic/AtomicReference::compareAndSet (variance.write
- (`` (as (~~ (type_of new))
+ (`` (as (,, (type_of new))
current)))
(variance.write new)
(representation atom)))
diff --git a/stdlib/source/library/lux/control/concurrency/semaphore.lux b/stdlib/source/library/lux/control/concurrency/semaphore.lux
index 2b6b0692f..d9ba28ef1 100644
--- a/stdlib/source/library/lux/control/concurrency/semaphore.lux
+++ b/stdlib/source/library/lux/control/concurrency/semaphore.lux
@@ -123,7 +123,7 @@
(refinement.refiner (n.> 0)))
(type .public Limit
- (~ (refinement.type limit)))
+ (, (refinement.type limit)))
(primitive .public Barrier
(Record
diff --git a/stdlib/source/library/lux/control/continuation.lux b/stdlib/source/library/lux/control/continuation.lux
index 8a398b377..756804d7d 100644
--- a/stdlib/source/library/lux/control/continuation.lux
+++ b/stdlib/source/library/lux/control/continuation.lux
@@ -36,7 +36,7 @@
(def .public pending
(syntax (_ [expr <code>.any])
(with_symbols [g!_ g!k]
- (in (list (` (.function ((~ g!_) (~ g!k)) ((~ g!k) (~ expr)))))))))
+ (in (list (` (.function ((, g!_) (, g!k)) ((, g!k) (, expr)))))))))
(def .public (reset scope)
(All (_ i o) (-> (Cont i i) (Cont i o)))
diff --git a/stdlib/source/library/lux/control/exception.lux b/stdlib/source/library/lux/control/exception.lux
index 073db8397..cf9c51105 100644
--- a/stdlib/source/library/lux/control/exception.lux
+++ b/stdlib/source/library/lux/control/exception.lux
@@ -96,15 +96,15 @@
[current_module meta.current_module_name
.let [descriptor (all text#composite "{" current_module "." name "}" text.new_line)
g!self (code.local name)]]
- (in (list (` (def (~ export_policy)
- (~ g!self)
- (All ((~ g!_) (~+ (list#each |type_variable|.format t_vars)))
- (..Exception [(~+ (list#each (the |input|.#type) inputs))]))
- (let [(~ g!descriptor) (~ (code.text descriptor))]
- [..#label (~ g!descriptor)
- ..#constructor (function ((~ g!self) [(~+ (list#each (the |input|.#binding) inputs))])
- ((~! text#composite) (~ g!descriptor)
- (~ (maybe.else (' "") body))))])))))))))
+ (in (list (` (def (, export_policy)
+ (, g!self)
+ (All ((, g!_) (,* (list#each |type_variable|.format t_vars)))
+ (..Exception [(,* (list#each (the |input|.#type) inputs))]))
+ (let [(, g!descriptor) (, (code.text descriptor))]
+ [..#label (, g!descriptor)
+ ..#constructor (function ((, g!self) [(,* (list#each (the |input|.#binding) inputs))])
+ ((,! text#composite) (, g!descriptor)
+ (, (maybe.else (' "") body))))])))))))))
(def (report' entries)
(-> (List [Text Text]) Text)
@@ -139,9 +139,9 @@
(def .public report
(syntax (_ [entries (<>.many (<>.and <code>.any <code>.any))])
- (in (list (` ((~! ..report') (list (~+ (|> entries
+ (in (list (` ((,! ..report') (list (,* (|> entries
(list#each (function (_ [header message])
- (` [(~ header) (~ message)]))))))))))))
+ (` [(, header) (, message)]))))))))))))
(def .public (listing format entries)
(All (_ a)
diff --git a/stdlib/source/library/lux/control/function/contract.lux b/stdlib/source/library/lux/control/function/contract.lux
index bb6ef6731..7b093341f 100644
--- a/stdlib/source/library/lux/control/function/contract.lux
+++ b/stdlib/source/library/lux/control/function/contract.lux
@@ -34,16 +34,16 @@
(syntax (_ [test <code>.any
expr <code>.any])
(in (list (` (exec
- ((~! ..assert!) (~ (code.text (exception.error ..pre_condition_failed test)))
- (~ test))
- (~ expr)))))))
+ ((,! ..assert!) (, (code.text (exception.error ..pre_condition_failed test)))
+ (, test))
+ (, expr)))))))
(def .public post
(syntax (_ [test <code>.any
expr <code>.any])
(with_symbols [g!output]
- (in (list (` (let [(~ g!output) (~ expr)]
+ (in (list (` (let [(, g!output) (, expr)]
(exec
- ((~! ..assert!) (~ (code.text (exception.error ..post_condition_failed test)))
- ((~ test) (~ g!output)))
- (~ g!output)))))))))
+ ((,! ..assert!) (, (code.text (exception.error ..post_condition_failed test)))
+ ((, test) (, g!output)))
+ (, g!output)))))))))
diff --git a/stdlib/source/library/lux/control/function/inline.lux b/stdlib/source/library/lux/control/function/inline.lux
index 0564edc3d..135674144 100644
--- a/stdlib/source/library/lux/control/function/inline.lux
+++ b/stdlib/source/library/lux/control/function/inline.lux
@@ -36,17 +36,17 @@
(list.repeated (list.size parameters))
(monad.all !))
.let [inlined (` (("lux in-module"
- (~ (code.text @))
- (.is (~ type)
- (.function ((~ (code.local name)) (~+ parameters))
- (~ term))))
- (~+ (list#each (function (_ g!parameter)
- (` ((~' ~) (~ g!parameter))))
+ (, (code.text @))
+ (.is (, type)
+ (.function ((, (code.local name)) (,* parameters))
+ (, term))))
+ (,* (list#each (function (_ g!parameter)
+ (` ((,' ,) (, g!parameter))))
g!parameters))))
g!parameters (|> g!parameters
(list#each (function (_ parameter)
- (list parameter (` (~! <code>.any)))))
+ (list parameter (` (,! <code>.any)))))
list#conjoint)]]
- (in (list (` (def (~ privacy) (~ (code.local name))
- ((~! syntax) ((~ (code.local name)) [(~+ g!parameters)])
- (.at (~! meta.monad) (~' in) (.list (.`' (~ inlined))))))))))))
+ (in (list (` (def (, privacy) (, (code.local name))
+ ((,! syntax) ((, (code.local name)) [(,* g!parameters)])
+ (.at (,! meta.monad) (,' in) (.list (.`' (, inlined))))))))))))
diff --git a/stdlib/source/library/lux/control/function/mutual.lux b/stdlib/source/library/lux/control/function/mutual.lux
index f00643060..0dcf766f5 100644
--- a/stdlib/source/library/lux/control/function/mutual.lux
+++ b/stdlib/source/library/lux/control/function/mutual.lux
@@ -37,17 +37,17 @@
(.def (mutual_definition context g!context [g!name mutual])
(-> (List Code) Code [Code Mutual] Code)
- (` (function ((~ g!name) (~ g!context))
- (.let [[(~+ context)] (~ g!context)]
- (function (~ (declaration.format (the #declaration mutual)))
- (~ (the #body mutual)))))))
+ (` (function ((, g!name) (, g!context))
+ (.let [[(,* context)] (, g!context)]
+ (function (, (declaration.format (the #declaration mutual)))
+ (, (the #body mutual)))))))
(.def (macro g!context g!self)
(-> Code Code Macro)
(<| (as Macro)
(is Macro')
(function (_ parameters)
- (at meta.monad in (list (` (((~ g!self) (~ g!context)) (~+ parameters))))))))
+ (at meta.monad in (list (` (((, g!self) (, g!context)) (,* parameters))))))))
(.def .public let
(syntax (_ [functions (<code>.tuple (<>.some ..mutual))
@@ -58,10 +58,10 @@
{.#Item mutual {.#End}}
(.let [g!name (|> mutual (the [#declaration declaration.#name]) code.local)]
- (in (list (` (.let [(~ g!name) (is (~ (the #type mutual))
- (function (~ (declaration.format (the #declaration mutual)))
- (~ (the #body mutual))))]
- (~ body))))))
+ (in (list (` (.let [(, g!name) (is (, (the #type mutual))
+ (function (, (declaration.format (the #declaration mutual)))
+ (, (the #body mutual))))]
+ (, body))))))
_
(macro.with_symbols [g!context g!output]
@@ -73,7 +73,7 @@
(list.zipped_2 hidden_names
functions))
context_types (list#each (function (_ mutual)
- (` (-> (~ g!context) (~ (the #type mutual)))))
+ (` (-> (, g!context) (, (the #type mutual)))))
functions)
user_names (list#each (|>> (the [#declaration declaration.#name]) code.local)
functions)]
@@ -82,16 +82,16 @@
(..macro g!context g!name)])
(list.zipped_2 hidden_names
functions)))]
- (in (list (` (.let [(~ g!context) (is (Rec (~ g!context)
- [(~+ context_types)])
- [(~+ definitions)])
- [(~+ user_names)] (.let [[(~+ user_names)] (~ g!context)]
- [(~+ (list#each (function (_ g!name)
- (` ((~ g!name) (~ g!context))))
+ (in (list (` (.let [(, g!context) (is (Rec (, g!context)
+ [(,* context_types)])
+ [(,* definitions)])
+ [(,* user_names)] (.let [[(,* user_names)] (, g!context)]
+ [(,* (list#each (function (_ g!name)
+ (` ((, g!name) (, g!context))))
user_names))])
- (~ g!output) (~ body)]
- (exec (~ g!pop)
- (~ g!output)))))))))))
+ (, g!output) (, body)]
+ (exec (, g!pop)
+ (, g!output)))))))))))
(type Definition
(Record
@@ -112,9 +112,9 @@
{.#Item definition {.#End}}
(.let [(open "_[0]") definition
(open "_[0]") _#mutual]
- (in (list (` (.def (~ _#export_policy) (~ (declaration.format _#declaration))
- (~ _#type)
- (~ _#body))))))
+ (in (list (` (.def (, _#export_policy) (, (declaration.format _#declaration))
+ (, _#type)
+ (, _#body))))))
_
(macro.with_symbols [g!context g!output]
@@ -126,7 +126,7 @@
(list.zipped_2 hidden_names
(list#each (the #mutual) functions)))
context_types (list#each (function (_ mutual)
- (` (-> (~ g!context) (~ (the [#mutual #type] mutual)))))
+ (` (-> (, g!context) (, (the [#mutual #type] mutual)))))
functions)
user_names (list#each (|>> (the [#mutual #declaration declaration.#name]) code.local)
functions)]
@@ -135,22 +135,22 @@
(..macro g!context g!name)])
(list.zipped_2 hidden_names
functions)))]
- (in (list.partial (` (.def (~ g!context)
- [(~+ (list#each (the [#mutual #type]) functions))]
- (.let [(~ g!context) (is (Rec (~ g!context)
- [(~+ context_types)])
- [(~+ definitions)])
- [(~+ user_names)] (~ g!context)]
- [(~+ (list#each (function (_ g!name)
- (` ((~ g!name) (~ g!context))))
+ (in (list.partial (` (.def (, g!context)
+ [(,* (list#each (the [#mutual #type]) functions))]
+ (.let [(, g!context) (is (Rec (, g!context)
+ [(,* context_types)])
+ [(,* definitions)])
+ [(,* user_names)] (, g!context)]
+ [(,* (list#each (function (_ g!name)
+ (` ((, g!name) (, g!context))))
user_names))])))
g!pop
(list#each (function (_ mutual)
(.let [g!name (|> mutual (the [#mutual #declaration declaration.#name]) code.local)]
(` (.def
- (~ (the #export_policy mutual))
- (~ g!name)
- (~ (the [#mutual #type] mutual))
- (.let [[(~+ user_names)] (~ g!context)]
- (~ g!name))))))
+ (, (the #export_policy mutual))
+ (, g!name)
+ (, (the [#mutual #type] mutual))
+ (.let [[(,* user_names)] (, g!context)]
+ (, g!name))))))
functions))))))))
diff --git a/stdlib/source/library/lux/control/io.lux b/stdlib/source/library/lux/control/io.lux
index bd0e441e2..318c96682 100644
--- a/stdlib/source/library/lux/control/io.lux
+++ b/stdlib/source/library/lux/control/io.lux
@@ -36,8 +36,8 @@
(def .public io
(syntax (_ [computation <code>.any])
(with_symbols [g!func g!arg]
- (in (list (` ((~! ..label) (function ((~ g!func) (~ g!arg))
- (~ computation)))))))))
+ (in (list (` ((,! ..label) (function ((, g!func) (, g!arg))
+ (, computation)))))))))
(def .public run!
(All (_ a) (-> (IO a) a))
diff --git a/stdlib/source/library/lux/control/lazy.lux b/stdlib/source/library/lux/control/lazy.lux
index 857fdccff..b280b48e0 100644
--- a/stdlib/source/library/lux/control/lazy.lux
+++ b/stdlib/source/library/lux/control/lazy.lux
@@ -46,7 +46,7 @@
(def .public lazy
(syntax (_ [expression <code>.any])
(with_symbols [g!_]
- (in (list (` ((~! ..lazy') (function ((~ g!_) (~ g!_)) (~ expression)))))))))
+ (in (list (` ((,! ..lazy') (function ((, g!_) (, g!_)) (, expression)))))))))
(def .public (equivalence (open "_#[0]"))
(All (_ a) (-> (Equivalence a) (Equivalence (Lazy a))))
diff --git a/stdlib/source/library/lux/control/maybe.lux b/stdlib/source/library/lux/control/maybe.lux
index e703c718f..15daadb8b 100644
--- a/stdlib/source/library/lux/control/maybe.lux
+++ b/stdlib/source/library/lux/control/maybe.lux
@@ -130,13 +130,13 @@
(case tokens
(pattern (.list else maybe))
(let [g!temp (is Code [location.dummy {.#Symbol ["" ""]}])]
- {.#Right [state (.list (` (.case (~ maybe)
- {.#Some (~ g!temp)}
- (~ g!temp)
+ {.#Right [state (.list (` (.case (, maybe)
+ {.#Some (, g!temp)}
+ (, g!temp)
... {.#None}
- (~ g!temp)
- (~ else))))]})
+ (, g!temp)
+ (, else))))]})
_
{.#Left "Wrong syntax for 'else'"})))
@@ -159,8 +159,8 @@
(macro (_ tokens state)
(case tokens
(pattern (.list test then))
- {.#Right [state (.list (` (.if (~ test)
- (~ then)
+ {.#Right [state (.list (` (.if (, test)
+ (, then)
{.#None})))]}
_
diff --git a/stdlib/source/library/lux/control/pipe.lux b/stdlib/source/library/lux/control/pipe.lux
index cdd6589b8..b16b4a167 100644
--- a/stdlib/source/library/lux/control/pipe.lux
+++ b/stdlib/source/library/lux/control/pipe.lux
@@ -28,14 +28,14 @@
(syntax (_ [start <code>.any
body ..body
prev <code>.any])
- (in (list (` (|> (~ start) (~+ body)))))))
+ (in (list (` (|> (, start) (,* body)))))))
(def .public let
(syntax (_ [binding <code>.any
body <code>.any
prev <code>.any])
- (in (list (` (.let [(~ binding) (~ prev)]
- (~ body)))))))
+ (in (list (` (.let [(, binding) (, prev)]
+ (, body)))))))
(def _reversed_
(Parser Any)
@@ -49,39 +49,39 @@
_ _reversed_
branches (<>.some (<>.and ..body ..body))])
(with_symbols [g!temp]
- (in (list (` (.let [(~ g!temp) (~ prev)]
- (.cond (~+ (monad.do list.monad
+ (in (list (` (.let [(, g!temp) (, prev)]
+ (.cond (,* (monad.do list.monad
[[test then] branches]
- (list (` (|> (~ g!temp) (~+ test)))
- (` (|> (~ g!temp) (~+ then))))))
- (|> (~ g!temp) (~+ else))))))))))
+ (list (` (|> (, g!temp) (,* test)))
+ (` (|> (, g!temp) (,* then))))))
+ (|> (, g!temp) (,* else))))))))))
(def .public if
(syntax (_ [test ..body
then ..body
else ..body
prev <code>.any])
- (in (list (` (..cond [(~+ test)] [(~+ then)]
- [(~+ else)]
- (~ prev)))))))
+ (in (list (` (..cond [(,* test)] [(,* then)]
+ [(,* else)]
+ (, prev)))))))
(def .public when
(syntax (_ [test ..body
then ..body
prev <code>.any])
- (in (list (` (..cond [(~+ test)] [(~+ then)]
+ (in (list (` (..cond [(,* test)] [(,* then)]
[]
- (~ prev)))))))
+ (, prev)))))))
(def .public while
(syntax (_ [test ..body
then ..body
prev <code>.any])
(with_symbols [g!temp g!again]
- (in (list (` (.loop ((~ g!again) [(~ g!temp) (~ prev)])
- (.if (|> (~ g!temp) (~+ test))
- ((~ g!again) (|> (~ g!temp) (~+ then)))
- (~ g!temp)))))))))
+ (in (list (` (.loop ((, g!again) [(, g!temp) (, prev)])
+ (.if (|> (, g!temp) (,* test))
+ ((, g!again) (|> (, g!temp) (,* then)))
+ (, g!temp)))))))))
(def .public do
(syntax (_ [monad <code>.any
@@ -92,11 +92,11 @@
(pattern (list.partial last_step prev_steps))
(.let [step_bindings (monad.do list.monad
[step (list.reversed prev_steps)]
- (list g!temp (` (|> (~ g!temp) (~+ step)))))]
- (in (list (` ((~! monad.do) (~ monad)
- [.let [(~ g!temp) (~ prev)]
- (~+ step_bindings)]
- (|> (~ g!temp) (~+ last_step)))))))
+ (list g!temp (` (|> (, g!temp) (,* step)))))]
+ (in (list (` ((,! monad.do) (, monad)
+ [.let [(, g!temp) (, prev)]
+ (,* step_bindings)]
+ (|> (, g!temp) (,* last_step)))))))
_
(in (list prev))))))
@@ -105,22 +105,22 @@
(syntax (_ [body ..body
prev <code>.any])
(with_symbols [g!temp]
- (in (list (` (.let [(~ g!temp) (~ prev)]
- (.exec (|> (~ g!temp) (~+ body))
- (~ g!temp)))))))))
+ (in (list (` (.let [(, g!temp) (, prev)]
+ (.exec (|> (, g!temp) (,* body))
+ (, g!temp)))))))))
(def .public tuple
(syntax (_ [paths (<>.many ..body)
prev <code>.any])
(with_symbols [g!temp]
- (in (list (` (.let [(~ g!temp) (~ prev)]
- [(~+ (list#each (function (_ body) (` (|> (~ g!temp) (~+ body))))
+ (in (list (` (.let [(, g!temp) (, prev)]
+ [(,* (list#each (function (_ body) (` (|> (, g!temp) (,* body))))
paths))])))))))
(def .public case
(syntax (_ [branches (<>.many (<>.and <code>.any <code>.any))
prev <code>.any])
- (in (list (` (.case (~ prev)
- (~+ (|> branches
+ (in (list (` (.case (, prev)
+ (,* (|> branches
(list#each (function (_ [pattern body]) (list pattern body)))
list#conjoint))))))))
diff --git a/stdlib/source/library/lux/control/remember.lux b/stdlib/source/library/lux/control/remember.lux
index 227a7bd4b..5165e2800 100644
--- a/stdlib/source/library/lux/control/remember.lux
+++ b/stdlib/source/library/lux/control/remember.lux
@@ -70,9 +70,9 @@
(syntax (_ [deadline ..deadline
message <code>.text
focus (<>.maybe <code>.any)])
- (in (list (` (..remember (~ (code.text (%.date deadline)))
- (~ (code.text (format <message> " " message)))
- (~+ (case focus
+ (in (list (` (..remember (, (code.text (%.date deadline)))
+ (, (code.text (format <message> " " message)))
+ (,* (case focus
{.#Some focus}
(list focus)
diff --git a/stdlib/source/library/lux/control/security/capability.lux b/stdlib/source/library/lux/control/security/capability.lux
index 2a8627855..1a2cb4ed3 100644
--- a/stdlib/source/library/lux/control/security/capability.lux
+++ b/stdlib/source/library/lux/control/security/capability.lux
@@ -52,15 +52,15 @@
.let [[name vars] declaration]
g!brand (at ! each (|>> %.code code.text)
(macro.symbol (format (%.symbol [this_module name]))))
- .let [capability (` (..Capability (.Primitive (~ g!brand)) (~ input) (~ output)))]]
- (in (list (` (type (~ export_policy)
- (~ (|declaration|.format declaration))
- (~ capability)))
- (` (def (~ (code.local forger))
- (All ((~ g!_) (~+ (list#each code.local vars)))
- (-> (-> (~ input) (~ output))
- (~ capability)))
- (~! ..capability)))
+ .let [capability (` (..Capability (.Primitive (, g!brand)) (, input) (, output)))]]
+ (in (list (` (type (, export_policy)
+ (, (|declaration|.format declaration))
+ (, capability)))
+ (` (def (, (code.local forger))
+ (All ((, g!_) (,* (list#each code.local vars)))
+ (-> (-> (, input) (, output))
+ (, capability)))
+ (,! ..capability)))
))))))
(def .public (async capability)
diff --git a/stdlib/source/library/lux/control/security/policy.lux b/stdlib/source/library/lux/control/security/policy.lux
index 2aa55af59..58c895a05 100644
--- a/stdlib/source/library/lux/control/security/policy.lux
+++ b/stdlib/source/library/lux/control/security/policy.lux
@@ -56,13 +56,13 @@
(constructor (All (_ value) (Policy brand value label))))))
(def .public functor
- (~ (..of_policy Functor))
+ (, (..of_policy Functor))
(implementation
(def (each f fa)
(|> fa representation f abstraction))))
(def .public apply
- (~ (..of_policy Apply))
+ (, (..of_policy Apply))
(implementation
(def functor ..functor)
@@ -70,7 +70,7 @@
(abstraction ((representation ff) (representation fa))))))
(def .public monad
- (~ (..of_policy Monad))
+ (, (..of_policy Monad))
(implementation
(def functor ..functor)
(def in (|>> abstraction))
diff --git a/stdlib/source/library/lux/control/try.lux b/stdlib/source/library/lux/control/try.lux
index 794b00f7c..2e86903c7 100644
--- a/stdlib/source/library/lux/control/try.lux
+++ b/stdlib/source/library/lux/control/try.lux
@@ -135,20 +135,20 @@
{#Success value}
{.#None}
- {#Failure (`` (("lux in-module" (~~ (static .prelude)) .symbol#encoded)
+ {#Failure (`` (("lux in-module" (,, (static .prelude)) .symbol#encoded)
(symbol ..of_maybe)))}))
(def .public else
(macro (_ tokens compiler)
(case tokens
(pattern (list else try))
- {#Success [compiler (list (` (case (~ try)
- {..#Success (~' g!temp)}
- (~' g!temp)
+ {#Success [compiler (list (` (case (, try)
+ {..#Success (,' g!temp)}
+ (,' g!temp)
- ... {..#Failure (~' g!temp)}
- (~' g!temp)
- (~ else))))]}
+ ... {..#Failure (,' g!temp)}
+ (,' g!temp)
+ (, else))))]}
_
{#Failure "Wrong syntax for 'else'"})))
@@ -159,9 +159,9 @@
(pattern (.list test then))
(let [code#encoded ("lux in-module" "library/lux" .code#encoded)
text$ ("lux in-module" "library/lux" .text$)]
- {.#Right [state (.list (` (.if (~ test)
- (~ then)
- {..#Failure (~ (text$ (all "lux text concat"
+ {.#Right [state (.list (` (.if (, test)
+ (, then)
+ {..#Failure (, (text$ (all "lux text concat"
"[" (code#encoded (` .when)) "]"
" " "Invalid condition:")))})))]})
diff --git a/stdlib/source/library/lux/data/collection/dictionary.lux b/stdlib/source/library/lux/data/collection/dictionary.lux
index afb711861..cd14464e8 100644
--- a/stdlib/source/library/lux/data/collection/dictionary.lux
+++ b/stdlib/source/library/lux/data/collection/dictionary.lux
@@ -289,7 +289,7 @@
(def (node#empty? node)
(All (_ k v) (-> (Node k v) Bit))
(`` (case node
- {#Base (~~ (static ..clean_bitmap)) _}
+ {#Base (,, (static ..clean_bitmap)) _}
#1
_
diff --git a/stdlib/source/library/lux/data/collection/dictionary/ordered.lux b/stdlib/source/library/lux/data/collection/dictionary/ordered.lux
index aba1374d3..77729c0b3 100644
--- a/stdlib/source/library/lux/data/collection/dictionary/ordered.lux
+++ b/stdlib/source/library/lux/data/collection/dictionary/ordered.lux
@@ -259,7 +259,7 @@
{.#Some root}
(let [reference (the #key root)]
- (`` (cond (~~ (with_template [<comp> <tag> <add>]
+ (`` (cond (,, (with_template [<comp> <tag> <add>]
[(<comp> reference key)
(let [side_root (the <tag> root)
outcome (again side_root)]
diff --git a/stdlib/source/library/lux/data/collection/list.lux b/stdlib/source/library/lux/data/collection/list.lux
index 478a3d6aa..176b9d9b4 100644
--- a/stdlib/source/library/lux/data/collection/list.lux
+++ b/stdlib/source/library/lux/data/collection/list.lux
@@ -79,7 +79,7 @@
(def wrong_syntax_error
(template (_ <it>)
- [((`` ("lux in-module" (~~ (static .prelude)) .wrong_syntax_error))
+ [((`` ("lux in-module" (,, (static .prelude)) .wrong_syntax_error))
(symbol <it>))]))
(def .public partial
@@ -87,7 +87,7 @@
(case (reversed tokens)
{.#Item tail heads}
{.#Right [state (list (..mix (function (_ head tail)
- (` {.#Item (~ head) (~ tail)}))
+ (` {.#Item (, head) (, tail)}))
tail
heads))]}
@@ -401,9 +401,9 @@
(if (< x x')
[{.#Item x' pre} post]
[pre {.#Item x' post}]))
- (`` [(is (~~ (type_of xs))
+ (`` [(is (,, (type_of xs))
(list))
- (is (~~ (type_of xs))
+ (is (,, (type_of xs))
(list))])
xs')]
(.all composite (sorted < pre) (list x) (sorted < post)))))
@@ -481,29 +481,29 @@
(let [(open "[0]") ..functor
indices (..indices num_lists)
type_vars (is (List Code) (each (|>> nat#encoded symbol$) indices))
- zipped_type (` (.All ((~ (symbol$ "0_")) (~+ type_vars))
- (-> (~+ (each (is (-> Code Code) (function (_ var) (` (List (~ var)))))
+ zipped_type (` (.All ((, (symbol$ "0_")) (,* type_vars))
+ (-> (,* (each (is (-> Code Code) (function (_ var) (` (List (, var)))))
type_vars))
- (List [(~+ type_vars)]))))
+ (List [(,* type_vars)]))))
vars+lists (|> indices
(each ++)
(each (function (_ idx)
(let [base (nat#encoded idx)]
[(symbol$ base)
(symbol$ ("lux text concat" base "'"))]))))
- pattern (` [(~+ (each (function (_ [v vs]) (` {.#Item (~ v) (~ vs)}))
+ pattern (` [(,* (each (function (_ [v vs]) (` {.#Item (, v) (, vs)}))
vars+lists))])
g!step (symbol$ "0step0")
g!blank (symbol$ "0,0")
list_vars (each product.right vars+lists)
- code (` (is (~ zipped_type)
- (function ((~ g!step) (~+ list_vars))
- (case [(~+ list_vars)]
- (~ pattern)
- {.#Item [(~+ (each product.left vars+lists))]
- ((~ g!step) (~+ list_vars))}
-
- (~ g!blank)
+ code (` (is (, zipped_type)
+ (function ((, g!step) (,* list_vars))
+ (case [(,* list_vars)]
+ (, pattern)
+ {.#Item [(,* (each product.left vars+lists))]
+ ((, g!step) (,* list_vars))}
+
+ (, g!blank)
{.#End}))))]
{.#Right [state (list code)]})
{.#Left "Cannot zipped 0 lists."})
@@ -524,30 +524,30 @@
g!return_type (symbol$ "0return_type0")
g!func (symbol$ "0func0")
type_vars (is (List Code) (each (|>> nat#encoded symbol$) indices))
- zipped_type (` (All ((~ (symbol$ "0_")) (~+ type_vars) (~ g!return_type))
- (-> (-> (~+ type_vars) (~ g!return_type))
- (~+ (each (is (-> Code Code) (function (_ var) (` (List (~ var)))))
+ zipped_type (` (All ((, (symbol$ "0_")) (,* type_vars) (, g!return_type))
+ (-> (-> (,* type_vars) (, g!return_type))
+ (,* (each (is (-> Code Code) (function (_ var) (` (List (, var)))))
type_vars))
- (List (~ g!return_type)))))
+ (List (, g!return_type)))))
vars+lists (|> indices
(each ++)
(each (function (_ idx)
(let [base (nat#encoded idx)]
[(symbol$ base)
(symbol$ ("lux text concat" base "'"))]))))
- pattern (` [(~+ (each (function (_ [v vs]) (` {.#Item (~ v) (~ vs)}))
+ pattern (` [(,* (each (function (_ [v vs]) (` {.#Item (, v) (, vs)}))
vars+lists))])
g!step (symbol$ "0step0")
g!blank (symbol$ "0,0")
list_vars (each product.right vars+lists)
- code (` (is (~ zipped_type)
- (function ((~ g!step) (~ g!func) (~+ list_vars))
- (case [(~+ list_vars)]
- (~ pattern)
- {.#Item ((~ g!func) (~+ (each product.left vars+lists)))
- ((~ g!step) (~ g!func) (~+ list_vars))}
-
- (~ g!blank)
+ code (` (is (, zipped_type)
+ (function ((, g!step) (, g!func) (,* list_vars))
+ (case [(,* list_vars)]
+ (, pattern)
+ {.#Item ((, g!func) (,* (each product.left vars+lists)))
+ ((, g!step) (, g!func) (,* list_vars))}
+
+ (, g!blank)
{.#End}))))]
{.#Right [state (list code)]})
{.#Left "Cannot zipped_with 0 lists."})
@@ -631,8 +631,8 @@
(macro (_ tokens state)
(case tokens
(pattern (.list test then))
- {.#Right [state (.list (` (.if (~ test)
- (~ then)
+ {.#Right [state (.list (` (.if (, test)
+ (, then)
(.list))))]}
_
diff --git a/stdlib/source/library/lux/data/collection/sequence.lux b/stdlib/source/library/lux/data/collection/sequence.lux
index 77873fa40..93bea49d4 100644
--- a/stdlib/source/library/lux/data/collection/sequence.lux
+++ b/stdlib/source/library/lux/data/collection/sequence.lux
@@ -227,7 +227,7 @@
... If so, a brand-new root must be established, that is
... 1-level taller.
(|> sequence
- (.has #root (|> (`` (is (Hierarchy (~~ (type_of val)))
+ (.has #root (|> (`` (is (Hierarchy (,, (type_of val)))
(empty_hierarchy [])))
(array.has! 0 {#Hierarchy (the #root sequence)})
(array.has! 1 (..path (the #level sequence) (the #tail sequence)))))
@@ -293,8 +293,8 @@
{try.#Success (if (n.< (tail_off sequence_size) idx)
(.revised #root (hierarchy#has (the #level sequence) idx val)
sequence)
- (.revised #tail (`` (is (-> (Base (~~ (type_of val)))
- (Base (~~ (type_of val))))
+ (.revised #tail (`` (is (-> (Base (,, (type_of val)))
+ (Base (,, (type_of val))))
(|>> array.clone (array.has! (branch_idx idx) val))))
sequence))}
(exception.except ..index_out_of_bounds [sequence idx]))))
@@ -369,7 +369,7 @@
(def .public sequence
(syntax (_ [elems (<>.some <code>.any)])
- (in (.list (` (..of_list (.list (~+ elems))))))))
+ (in (.list (` (..of_list (.list (,* elems))))))))
(def (node_equivalence //#=)
(All (_ a) (-> (Equivalence a) (Equivalence (Node a))))
diff --git a/stdlib/source/library/lux/data/collection/stream.lux b/stdlib/source/library/lux/data/collection/stream.lux
index 3c41ccda0..67708962c 100644
--- a/stdlib/source/library/lux/data/collection/stream.lux
+++ b/stdlib/source/library/lux/data/collection/stream.lux
@@ -133,10 +133,10 @@
body <code>.any
branches (<>.some <code>.any)])
(with_symbols [g!stream]
- (let [body+ (` (let [(~+ (|> patterns
+ (let [body+ (` (let [(,* (|> patterns
(list#each (function (_ pattern)
- (list (` [(~ pattern) (~ g!stream)])
- (` ((~! //.result) (~ g!stream))))))
+ (list (` [(, pattern) (, g!stream)])
+ (` ((,! //.result) (, g!stream))))))
list#conjoint))]
- (~ body)))]
+ (, body)))]
(in (list.partial g!stream body+ branches))))))
diff --git a/stdlib/source/library/lux/data/collection/tree.lux b/stdlib/source/library/lux/data/collection/tree.lux
index 2e7c7b59d..7bde19f24 100644
--- a/stdlib/source/library/lux/data/collection/tree.lux
+++ b/stdlib/source/library/lux/data/collection/tree.lux
@@ -58,8 +58,8 @@
(def .public tree
(syntax (_ [root tree^])
(in (list (loop (again [[value children] root])
- (` [#value (~ value)
- #children (list (~+ (list#each again children)))]))))))
+ (` [#value (, value)
+ #children (list (,* (list#each again children)))]))))))
(def .public (equivalence super)
(All (_ a) (-> (Equivalence a) (Equivalence (Tree a))))
diff --git a/stdlib/source/library/lux/data/format/css/class.lux b/stdlib/source/library/lux/data/format/css/class.lux
index cf0d3423a..1ddfdfebd 100644
--- a/stdlib/source/library/lux/data/format/css/class.lux
+++ b/stdlib/source/library/lux/data/format/css/class.lux
@@ -30,6 +30,6 @@
(do meta.monad
[module meta.current_module_name
class meta.seed]
- (in (list (` (..custom (~ (code.text (format "c" (%.nat_16 class)
+ (in (list (` (..custom (, (code.text (format "c" (%.nat_16 class)
"_" (%.nat_16 (text#hash module))))))))))))
)
diff --git a/stdlib/source/library/lux/data/format/css/id.lux b/stdlib/source/library/lux/data/format/css/id.lux
index ee61013bf..45746b427 100644
--- a/stdlib/source/library/lux/data/format/css/id.lux
+++ b/stdlib/source/library/lux/data/format/css/id.lux
@@ -30,6 +30,6 @@
(do meta.monad
[module meta.current_module_name
id meta.seed]
- (in (list (` (..custom (~ (code.text (format "i" (%.nat_16 id)
+ (in (list (` (..custom (, (code.text (format "i" (%.nat_16 id)
"_" (%.nat_16 (text#hash module))))))))))))
)
diff --git a/stdlib/source/library/lux/data/format/css/property.lux b/stdlib/source/library/lux/data/format/css/property.lux
index 1a3b8ee02..353efa6c5 100644
--- a/stdlib/source/library/lux/data/format/css/property.lux
+++ b/stdlib/source/library/lux/data/format/css/property.lux
@@ -71,11 +71,11 @@
(Property <brand>)
(abstraction <property>))]
- (~~ (template.spliced <alias>+))))
+ (,, (template.spliced <alias>+))))
(with_expansions [<rows> (template.spliced <property>+)]
(with_template [<property>]
- [(`` (def .public (~~ (text_symbol <property>))
+ [(`` (def .public (,, (text_symbol <property>))
(Property <brand>)
(abstraction <property>)))]
diff --git a/stdlib/source/library/lux/data/format/css/query.lux b/stdlib/source/library/lux/data/format/css/query.lux
index d3edc6d31..859eb7910 100644
--- a/stdlib/source/library/lux/data/format/css/query.lux
+++ b/stdlib/source/library/lux/data/format/css/query.lux
@@ -32,7 +32,7 @@
(|>> representation))
(with_template [<media>]
- [(`` (def .public (~~ (text_symbol <media>))
+ [(`` (def .public (,, (text_symbol <media>))
Media
(abstraction <media>)))]
@@ -50,7 +50,7 @@
(|>> representation))
(with_template [<feature> <brand>]
- [(`` (def .public ((~~ (text_symbol <feature>)) input)
+ [(`` (def .public ((,, (text_symbol <feature>)) input)
(-> (Value <brand>) Feature)
(abstraction (format "(" <feature> ": " (//value.value input) ")"))))]
diff --git a/stdlib/source/library/lux/data/format/css/selector.lux b/stdlib/source/library/lux/data/format/css/selector.lux
index 1e8d3e0b9..a994398fd 100644
--- a/stdlib/source/library/lux/data/format/css/selector.lux
+++ b/stdlib/source/library/lux/data/format/css/selector.lux
@@ -68,7 +68,7 @@
<combinator>
(representation right))))]
- (~~ (template.spliced <combinator>+))))]
+ (,, (template.spliced <combinator>+))))]
[Can_Chain (Generic Any)
[["" and]]]
@@ -113,7 +113,7 @@
(Selector <kind>)
(abstraction <pseudo>))]
- (~~ (template.spliced <pseudo>+))))]
+ (,, (template.spliced <pseudo>+))))]
[Can_Chain
[[active ":active"]
diff --git a/stdlib/source/library/lux/data/format/css/value.lux b/stdlib/source/library/lux/data/format/css/value.lux
index d4732c5da..877e4f8e6 100644
--- a/stdlib/source/library/lux/data/format/css/value.lux
+++ b/stdlib/source/library/lux/data/format/css/value.lux
@@ -45,7 +45,7 @@
(`` (with_template [<name> <value>]
[(def .public <name> <abstraction> (abstraction <value>))]
- (~~ (template.spliced <sample>+))
+ (,, (template.spliced <sample>+))
))
(template.spliced <definition>+))]))
@@ -94,11 +94,11 @@
(Value <brand>)
(abstraction <value>))]
- (~~ (template.spliced <alias>+))))
+ (,, (template.spliced <alias>+))))
(with_expansions [<rows> (template.spliced <value>+)]
(with_template [<value>]
- [(`` (def .public (~~ (..text_symbol <value>))
+ [(`` (def .public (,, (..text_symbol <value>))
(Value <brand>)
(abstraction <value>)))]
@@ -990,7 +990,7 @@
(-> <input> (Value Filter))
(|>> <pre> (list) (..apply <function>)))]
- (~~ (template.spliced <function>+))))]
+ (,, (template.spliced <function>+))))]
[Nat (<| representation ..px n.frac)
[[blur "blur"]]]
@@ -1115,7 +1115,7 @@
(def .public (clip rectangle)
(-> Rectangle (Value Clip))
- (`` (..apply "rect" (list (~~ (with_template [<side>]
+ (`` (..apply "rect" (list (,, (with_template [<side>]
[(representation (the <side> rectangle))]
[#top] [#right] [#bottom] [#left]))))))
@@ -1260,9 +1260,9 @@
(..apply "matrix3d")))
(with_template [<name> <function> <input_types> <input_values>]
- [(`` (def .public (<name> [(~~ (template.spliced <input_values>))])
- (-> [(~~ (template.spliced <input_types>))] (Value Transform))
- (|> (list (~~ (template.spliced <input_values>)))
+ [(`` (def .public (<name> [(,, (template.spliced <input_values>))])
+ (-> [(,, (template.spliced <input_types>))] (Value Transform))
+ (|> (list (,, (template.spliced <input_values>)))
(list#each %number)
(..apply <function>))))]
@@ -1282,9 +1282,9 @@
)
(with_template [<name> <function> <input_types> <input_values>]
- [(`` (def .public (<name> [(~~ (template.spliced <input_values>))])
- (-> [(~~ (template.spliced <input_types>))] (Value Transform))
- (|> (list (~~ (template.spliced <input_values>)))
+ [(`` (def .public (<name> [(,, (template.spliced <input_values>))])
+ (-> [(,, (template.spliced <input_types>))] (Value Transform))
+ (|> (list (,, (template.spliced <input_values>)))
(list#each ..angle)
(..apply <function>))))]
diff --git a/stdlib/source/library/lux/data/format/html.lux b/stdlib/source/library/lux/data/format/html.lux
index d6560ccfe..ba8f5ab31 100644
--- a/stdlib/source/library/lux/data/format/html.lux
+++ b/stdlib/source/library/lux/data/format/html.lux
@@ -109,7 +109,7 @@
[(primitive <sub_raw> Any)
(type .public <sub> (HTML (<super_raw> <sub_raw>)))]
- (~~ (template.spliced <sub>+))))]
+ (,, (template.spliced <sub>+))))]
[Element Element'
[[Content Content']
diff --git a/stdlib/source/library/lux/data/format/json.lux b/stdlib/source/library/lux/data/format/json.lux
index d419ac68f..1af453bb9 100644
--- a/stdlib/source/library/lux/data/format/json.lux
+++ b/stdlib/source/library/lux/data/format/json.lux
@@ -104,28 +104,28 @@
(^.with_template [<ctor> <input_tag> <output_tag>]
[{<input_tag> value}
- (` {<output_tag> (~ (<ctor> value))})])
+ (` {<output_tag> (, (<ctor> value))})])
([code.bit ..#Boolean' ..#Boolean]
[code.frac ..#Number' ..#Number]
[code.text ..#String' ..#String])
{#Array' members}
- (` {..#Array ((~! sequence.sequence) (~+ (sequence.list (sequence#each jsonF members))))})
+ (` {..#Array ((,! sequence.sequence) (,* (sequence.list (sequence#each jsonF members))))})
{#Object' pairs}
- (` {..#Object ((~! dictionary.of_list)
- (~! text.hash)
- (list (~+ (|> pairs
+ (` {..#Object ((,! dictionary.of_list)
+ (,! text.hash)
+ (list (,* (|> pairs
dictionary.entries
(list#each (function (_ [key_name value])
- (` [(~ (code.text key_name)) (~ (jsonF value))])))))))})
+ (` [(, (code.text key_name)) (, (jsonF value))])))))))})
{#Code' code}
code))
(def .public json
(syntax (_ [token ..jsonP])
- (in (list (` (is JSON (~ (jsonF token))))))))
+ (in (list (` (is JSON (, (jsonF token))))))))
(def .public (fields json)
(-> JSON (Try (List String)))
diff --git a/stdlib/source/library/lux/data/format/tar.lux b/stdlib/source/library/lux/data/format/tar.lux
index e0ed3924f..38746e8eb 100644
--- a/stdlib/source/library/lux/data/format/tar.lux
+++ b/stdlib/source/library/lux/data/format/tar.lux
@@ -126,12 +126,12 @@
(Parser Any)
(do <>.monad
[pre_end <binary>.bits_8
- _ (let [expected (`` (char (~~ (static ..blank))))]
+ _ (let [expected (`` (char (,, (static ..blank))))]
(<>.assertion (exception.error ..wrong_character [expected pre_end])
(n.= expected pre_end)))
end <binary>.bits_8
- _ (let [expected (`` (char (~~ (static ..null))))]
+ _ (let [expected (`` (char (,, (static ..null))))]
(<>.assertion (exception.error ..wrong_character [expected end])
(n.= expected end)))]
(in [])))
@@ -153,7 +153,7 @@
[digits (<binary>.segment ..big_size)
digits (<>.lifted (at utf8.codec decoded digits))
end <binary>.bits_8
- _ (let [expected (`` (char (~~ (static ..blank))))]
+ _ (let [expected (`` (char (,, (static ..blank))))]
(<>.assertion (exception.error ..wrong_character [expected end])
(n.= expected end)))]
(<>.lifted
@@ -243,7 +243,7 @@
0 (at utf8.codec encoded "")
_ (let [last_char (binary!.bits_8 end string)]
(`` (case (.nat last_char)
- (pattern (char (~~ (static ..null))))
+ (pattern (char (,, (static ..null))))
(again (-- end))
_
@@ -288,7 +288,7 @@
(do <>.monad
[string (<binary>.segment <size>)
end <binary>.bits_8
- .let [expected (`` (char (~~ (static ..null))))]
+ .let [expected (`` (char (,, (static ..null))))]
_ (<>.assertion (exception.error ..wrong_character [expected end])
(n.= expected end))]
(<>.lifted
@@ -330,7 +330,7 @@
(do <>.monad
[string (<binary>.segment ..magic_size)
end <binary>.bits_8
- .let [expected (`` (char (~~ (static ..null))))]
+ .let [expected (`` (char (,, (static ..null))))]
_ (<>.assertion (exception.error ..wrong_character [expected end])
(n.= expected end))]
(<>.lifted
diff --git a/stdlib/source/library/lux/data/text.lux b/stdlib/source/library/lux/data/text.lux
index 7bf3cd997..3ab11ff3a 100644
--- a/stdlib/source/library/lux/data/text.lux
+++ b/stdlib/source/library/lux/data/text.lux
@@ -188,11 +188,11 @@
(macro (_ tokens lux)
(case tokens
(pattern (list it))
- {.#Right [lux (list (` (.case ("js type-of" ("js constant" (~ it)))
+ {.#Right [lux (list (` (.case ("js type-of" ("js constant" (, it)))
"undefined"
.false
- (~' _)
+ (,' _)
.true)))]}
_
@@ -338,7 +338,7 @@
(def .public (space? char)
(-> Char Bit)
(with_expansions [<options> (with_template [<char>]
- [(pattern (.char (~~ (static <char>))))]
+ [(pattern (.char (,, (static <char>))))]
[..tab]
[..vertical_tab]
diff --git a/stdlib/source/library/lux/data/text/regex.lux b/stdlib/source/library/lux/data/text/regex.lux
index 39fb077d0..674a53f67 100644
--- a/stdlib/source/library/lux/data/text/regex.lux
+++ b/stdlib/source/library/lux/data/text/regex.lux
@@ -82,7 +82,7 @@
(-> Text (Parser Code))
(do <>.monad
[symbol (<text>.enclosed ["\@<" ">"] (symbol^ current_module))]
- (in (` (is ((~! <text>.Parser) Text) (~ (code.symbol symbol)))))))
+ (in (` (is ((,! <text>.Parser) Text) (, (code.symbol symbol)))))))
(def re_range^
(Parser Code)
@@ -90,19 +90,19 @@
[from (|> regex_char^ (at ! each (|>> (//.char 0) maybe.trusted)))
_ (<text>.this "-")
to (|> regex_char^ (at ! each (|>> (//.char 0) maybe.trusted)))]
- (in (` ((~! <text>.range) (~ (code.nat from)) (~ (code.nat to)))))))
+ (in (` ((,! <text>.range) (, (code.nat from)) (, (code.nat to)))))))
(def re_char^
(Parser Code)
(do <>.monad
[char escaped_char^]
- (in (` ((~! ..copy) (~ (code.text char)))))))
+ (in (` ((,! ..copy) (, (code.text char)))))))
(def re_options^
(Parser Code)
(do <>.monad
[options (<text>.many escaped_char^)]
- (in (` ((~! <text>.one_of) (~ (code.text options)))))))
+ (in (` ((,! <text>.one_of) (, (code.text options)))))))
(def re_user_class^'
(Parser Code)
@@ -112,8 +112,8 @@
re_range^
re_options^))]
(in (case negate?
- {.#Some _} (` ((~! <text>.not) (all ((~! <>.either)) (~+ parts))))
- {.#None} (` (all ((~! <>.either)) (~+ parts)))))))
+ {.#Some _} (` ((,! <text>.not) (all ((,! <>.either)) (,* parts))))
+ {.#None} (` (all ((,! <>.either)) (,* parts)))))))
(def re_user_class^
(Parser Code)
@@ -123,7 +123,7 @@
(<text>.enclosed ["[" "]"]
..re_user_class^')))]
(in (list#mix (function (_ refinement base)
- (` ((~! refine^) (~ refinement) (~ base))))
+ (` ((,! refine^) (, refinement) (, base))))
init
rest))))
@@ -159,28 +159,28 @@
(do <>.monad
[]
(all <>.either
- (<>.after (<text>.this ".") (in (` (~! <text>.any))))
- (<>.after (<text>.this "\d") (in (` (~! <text>.decimal))))
- (<>.after (<text>.this "\D") (in (` ((~! <text>.not) (~! <text>.decimal)))))
- (<>.after (<text>.this "\s") (in (` (~! <text>.space))))
- (<>.after (<text>.this "\S") (in (` ((~! <text>.not) (~! <text>.space)))))
- (<>.after (<text>.this "\w") (in (` (~! word^))))
- (<>.after (<text>.this "\W") (in (` ((~! <text>.not) (~! word^)))))
-
- (<>.after (<text>.this "\p{Lower}") (in (` (~! <text>.lower))))
- (<>.after (<text>.this "\p{Upper}") (in (` (~! <text>.upper))))
- (<>.after (<text>.this "\p{Alpha}") (in (` (~! <text>.alpha))))
- (<>.after (<text>.this "\p{Digit}") (in (` (~! <text>.decimal))))
- (<>.after (<text>.this "\p{Alnum}") (in (` (~! <text>.alpha_num))))
- (<>.after (<text>.this "\p{Space}") (in (` (~! <text>.space))))
- (<>.after (<text>.this "\p{HexDigit}") (in (` (~! <text>.hexadecimal))))
- (<>.after (<text>.this "\p{OctDigit}") (in (` (~! <text>.octal))))
- (<>.after (<text>.this "\p{Blank}") (in (` (~! blank^))))
- (<>.after (<text>.this "\p{ASCII}") (in (` (~! ascii^))))
- (<>.after (<text>.this "\p{Contrl}") (in (` (~! control^))))
- (<>.after (<text>.this "\p{Punct}") (in (` (~! punct^))))
- (<>.after (<text>.this "\p{Graph}") (in (` (~! graph^))))
- (<>.after (<text>.this "\p{Print}") (in (` (~! print^))))
+ (<>.after (<text>.this ".") (in (` (,! <text>.any))))
+ (<>.after (<text>.this "\d") (in (` (,! <text>.decimal))))
+ (<>.after (<text>.this "\D") (in (` ((,! <text>.not) (,! <text>.decimal)))))
+ (<>.after (<text>.this "\s") (in (` (,! <text>.space))))
+ (<>.after (<text>.this "\S") (in (` ((,! <text>.not) (,! <text>.space)))))
+ (<>.after (<text>.this "\w") (in (` (,! word^))))
+ (<>.after (<text>.this "\W") (in (` ((,! <text>.not) (,! word^)))))
+
+ (<>.after (<text>.this "\p{Lower}") (in (` (,! <text>.lower))))
+ (<>.after (<text>.this "\p{Upper}") (in (` (,! <text>.upper))))
+ (<>.after (<text>.this "\p{Alpha}") (in (` (,! <text>.alpha))))
+ (<>.after (<text>.this "\p{Digit}") (in (` (,! <text>.decimal))))
+ (<>.after (<text>.this "\p{Alnum}") (in (` (,! <text>.alpha_num))))
+ (<>.after (<text>.this "\p{Space}") (in (` (,! <text>.space))))
+ (<>.after (<text>.this "\p{HexDigit}") (in (` (,! <text>.hexadecimal))))
+ (<>.after (<text>.this "\p{OctDigit}") (in (` (,! <text>.octal))))
+ (<>.after (<text>.this "\p{Blank}") (in (` (,! blank^))))
+ (<>.after (<text>.this "\p{ASCII}") (in (` (,! ascii^))))
+ (<>.after (<text>.this "\p{Contrl}") (in (` (,! control^))))
+ (<>.after (<text>.this "\p{Punct}") (in (` (,! punct^))))
+ (<>.after (<text>.this "\p{Graph}") (in (` (,! graph^))))
+ (<>.after (<text>.this "\p{Print}") (in (` (,! print^))))
)))
(def re_class^
@@ -198,12 +198,12 @@
(<>.either (do <>.monad
[_ (<text>.this "\")
id number^]
- (in (` ((~! ..copy) (~ (code.symbol ["" (n#encoded id)]))))))
+ (in (` ((,! ..copy) (, (code.symbol ["" (n#encoded id)]))))))
(do <>.monad
[_ (<text>.this "\k<")
captured_symbol symbol_part^
_ (<text>.this ">")]
- (in (` ((~! ..copy) (~ (code.symbol ["" captured_symbol]))))))))
+ (in (` ((,! ..copy) (, (code.symbol ["" captured_symbol]))))))))
(def (re_simple^ current_module)
(-> Text (Parser Code))
@@ -221,14 +221,14 @@
quantifier (<text>.one_of "?*+")]
(case quantifier
"?"
- (in (` ((~! <>.else) "" (~ base))))
+ (in (` ((,! <>.else) "" (, base))))
"*"
- (in (` ((~! together^) ((~! <>.some) (~ base)))))
+ (in (` ((,! together^) ((,! <>.some) (, base)))))
... "+"
_
- (in (` ((~! together^) ((~! <>.many) (~ base)))))
+ (in (` ((,! together^) ((,! <>.many) (, base)))))
)))
(exception .public (incorrect_quantification [from Nat
@@ -247,19 +247,19 @@
[[from to] (<>.and number^ (<>.after (<text>.this ",") number^))
_ (<>.assertion (exception.error ..incorrect_quantification [from to])
(n.<= to from))]
- (in (` ((~! together^) ((~! <>.between)
- (~ (code.nat from))
- (~ (code.nat (n.- from to)))
- (~ base))))))
+ (in (` ((,! together^) ((,! <>.between)
+ (, (code.nat from))
+ (, (code.nat (n.- from to)))
+ (, base))))))
(do !
[limit (<>.after (<text>.this ",") number^)]
- (in (` ((~! together^) ((~! <>.at_most) (~ (code.nat limit)) (~ base))))))
+ (in (` ((,! together^) ((,! <>.at_most) (, (code.nat limit)) (, base))))))
(do !
[limit (<>.before (<text>.this ",") number^)]
- (in (` ((~! together^) ((~! <>.at_least) (~ (code.nat limit)) (~ base))))))
+ (in (` ((,! together^) ((,! <>.at_least) (, (code.nat limit)) (, base))))))
(do !
[limit number^]
- (in (` ((~! together^) ((~! <>.exactly) (~ (code.nat limit)) (~ base))))))))))
+ (in (` ((,! together^) ((,! <>.exactly) (, (code.nat limit)) (, base))))))))))
(def (re_quantified^ current_module)
(-> Text (Parser Code))
@@ -297,7 +297,7 @@
[idx
names
(list.partial (list g!temp complex
- (` .let) (` [(~ g!total) (at (~! //.monoid) (~' composite) (~ g!total) (~ g!temp))]))
+ (` .let) (` [(, g!total) (at (,! //.monoid) (,' composite) (, g!total) (, g!temp))]))
steps)]
{.#Right [{#Capturing [?name num_captures]} scoped]}
@@ -308,12 +308,12 @@
{.#None}
[(++ idx) (code.symbol ["" (n#encoded idx)])])
access (if (n.> 0 num_captures)
- (` ((~! product.left) (~ name!)))
+ (` ((,! product.left) (, name!)))
name!)]
[idx!
(list.partial name! names)
(list.partial (list name! scoped
- (` .let) (` [(~ g!total) (at (~! //.monoid) (~' composite) (~ g!total) (~ access))]))
+ (` .let) (` [(, g!total) (at (,! //.monoid) (,' composite) (, g!total) (, access))]))
steps)])
)))
[0
@@ -323,10 +323,10 @@
(in [(if capturing?
(list.size names)
0)
- (` ((~! do) (~! <>.monad)
- [.let [(~ g!total) ""]
- (~+ (|> steps list.reversed list#conjoint))]
- ((~ (' in)) [(~ g!total) (~+ (list.reversed names))])))])
+ (` ((,! do) (,! <>.monad)
+ [.let [(, g!total) ""]
+ (,* (|> steps list.reversed list#conjoint))]
+ ((, (' in)) [(, g!total) (,* (list.reversed names))])))])
))
(def (unflatten^ lexer)
@@ -367,7 +367,7 @@
(-> [Nat Code] Code)
(if (n.> 0 num_captures)
alt
- (` ((~! unflatten^) (~ alt)))))
+ (` ((,! unflatten^) (, alt)))))
(def (re_alternative^ capturing? re_scoped^ current_module)
(-> Bit
@@ -381,11 +381,11 @@
(if (list.empty? tail)
(in head)
(in [(list#mix n.max (product.left head) (list#each product.left tail))
- (` (all ((~ (if capturing?
- (` (~! |||^))
- (` (~! |||_^)))))
- (~ (prep_alternative head))
- (~+ (list#each prep_alternative tail))))]))))
+ (` (all ((, (if capturing?
+ (` (,! |||^))
+ (` (,! |||_^)))))
+ (, (prep_alternative head))
+ (,* (list#each prep_alternative tail))))]))))
(def (re_scoped^ current_module)
(-> Text (Parser [Re_Group Code]))
@@ -433,8 +433,8 @@
body <code>.any
branches (<>.many <code>.any)])
(with_symbols [g!temp]
- (in (list.partial (` (^.multi (~ g!temp)
- [((~! <text>.result) (..regex (~ (code.text pattern))) (~ g!temp))
- {try.#Success (~ (maybe.else g!temp bindings))}]))
+ (in (list.partial (` (^.multi (, g!temp)
+ [((,! <text>.result) (..regex (, (code.text pattern))) (, g!temp))
+ {try.#Success (, (maybe.else g!temp bindings))}]))
body
branches)))))
diff --git a/stdlib/source/library/lux/debug.lux b/stdlib/source/library/lux/debug.lux
index 217cb3947..6813e7cc2 100644
--- a/stdlib/source/library/lux/debug.lux
+++ b/stdlib/source/library/lux/debug.lux
@@ -135,8 +135,8 @@
(def (tuple_inspection inspection)
(-> Inspector Inspector)
- (with_expansions [<adaption> (for @.lua (~~ (these ..tuple_array))
- (~~ (these)))]
+ (with_expansions [<adaption> (for @.lua (,, (these ..tuple_array))
+ (,, (these)))]
(`` (|>> (as (array.Array Any))
<adaption>
(array.list {.#None})
@@ -147,10 +147,10 @@
(def .public (inspection value)
Inspector
(with_expansions [<jvm> (let [object (as java/lang/Object value)]
- (`` (<| (~~ (with_template [<class> <processing>]
+ (`` (<| (,, (with_template [<class> <processing>]
[(case (ffi.as <class> object)
{.#Some value}
- (`` (|> value (~~ (template.spliced <processing>))))
+ (`` (|> value (,, (template.spliced <processing>))))
{.#None})]
@@ -187,7 +187,7 @@
(case (ffi.type_of value)
(^.with_template [<type_of> <then>]
[<type_of>
- (`` (|> value (~~ (template.spliced <then>))))])
+ (`` (|> value (,, (template.spliced <then>))))])
(["boolean" [(as .Bit) %.bit]]
["number" [(as .Frac) %.frac]]
["string" [(as .Text) %.text]]
@@ -222,7 +222,7 @@
(case (..str (..type value))
(^.with_template [<type_of> <class_of> <then>]
[(^.or <type_of> <class_of>)
- (`` (|> value (~~ (template.spliced <then>))))])
+ (`` (|> value (,, (template.spliced <then>))))])
(["<type 'bool'>" "<class 'bool'>" [(as .Bit) %.bit]]
["<type 'int'>" "<class 'int'>" [(as .Int) %.int]]
["<type 'float'>" "<class 'float'>" [(as .Frac) %.frac]]
@@ -254,7 +254,7 @@
(case (..type value)
(^.with_template [<type_of> <then>]
[<type_of>
- (`` (|> value (~~ (template.spliced <then>))))])
+ (`` (|> value (,, (template.spliced <then>))))])
(["boolean" [(as .Bit) %.bit]]
["string" [(as .Text) %.text]]
["nil" [(pipe.new "nil" [])]])
@@ -293,7 +293,7 @@
(as ..Object)
Object::to_s)]]
(let [value_class (class_of value)]
- (`` (cond (~~ (with_template [<literal> <type> <format>]
+ (`` (cond (,, (with_template [<literal> <type> <format>]
[(same? (class_of <literal>) value_class)
(|> value (as <type>) <format>)]
@@ -327,7 +327,7 @@
(case (..gettype value)
(^.with_template [<type_of> <then>]
[<type_of>
- (`` (|> value (~~ (template.spliced <then>))))])
+ (`` (|> value (,, (template.spliced <then>))))])
(["boolean" [(as .Bit) %.bit]]
["integer" [(as .Int) %.int]]
["double" [(as .Frac) %.frac]]
@@ -351,9 +351,9 @@
(..strval value))
@.scheme
- (`` (cond (~~ (with_template [<when> <then>]
+ (`` (cond (,, (with_template [<when> <then>]
[(<when> value)
- (`` (|> value (~~ (template.spliced <then>))))]
+ (`` (|> value (,, (template.spliced <then>))))]
[..boolean? [(as .Bit) %.bit]]
[..integer? [(as .Int) %.int]]
@@ -395,7 +395,7 @@
[_ (<type>.exactly Any)]
(in (function.constant "[]")))
- (~~ (with_template [<type> <formatter>]
+ (,, (with_template [<type> <formatter>]
[(do <>.monad
[_ (<type>.sub <type>)]
(in (|>> (as <type>) <formatter>)))]
@@ -411,7 +411,7 @@
(def (special_representation representation)
(-> (Parser Representation) (Parser Representation))
(`` (all <>.either
- (~~ (with_template [<type> <formatter>]
+ (,, (with_template [<type> <formatter>]
[(do <>.monad
[_ (<type>.sub <type>)]
(in (|>> (as <type>) <formatter>)))]
@@ -527,8 +527,8 @@
(syntax (_ [definition <code>.symbol])
(let [[module _] definition]
(in (list (` ("lux in-module"
- (~ (code.text module))
- (~ (code.symbol definition)))))))))
+ (, (code.text module))
+ (, (code.symbol definition)))))))))
(def .public (log! message)
(-> Text Any)
@@ -590,16 +590,16 @@
(function.constant (exception.except ..unknown_local_binding [name]))))
targets)))]
(in (list (` (..log! ("lux text concat"
- (~ (code.text (%.format (%.location location) text.new_line)))
- ((~! exception.report)
- (~+ (|> targets
+ (, (code.text (%.format (%.location location) text.new_line)))
+ ((,! exception.report)
+ (,* (|> targets
(list#each (function (_ [name format])
(let [format (case format
{.#None}
- (` (~! ..inspection))
+ (` (,! ..inspection))
{.#Some format}
format)]
(list (code.text name)
- (` ((~ format) (~ (code.local name))))))))
+ (` ((, format) (, (code.local name))))))))
list#conjoint)))))))))))
diff --git a/stdlib/source/library/lux/documentation.lux b/stdlib/source/library/lux/documentation.lux
index 1aaf71e5c..128cf5780 100644
--- a/stdlib/source/library/lux/documentation.lux
+++ b/stdlib/source/library/lux/documentation.lux
@@ -104,7 +104,7 @@
(^.with_template [<tag> <format>]
[[new_location {<tag> value}]
- (let [documentation (`` (|> value (~~ (template.spliced <format>))))]
+ (let [documentation (`` (|> value (,, (template.spliced <format>))))]
[(revised .#column (n.+ (text.size documentation)) new_location)
(format (padding reference_column old_location new_location)
documentation)])])
@@ -505,66 +505,66 @@
[.let [g!module (code.text (product.left name))]
[[_ def_type def_value]] (meta.export name)
tags (meta.tags_of name)]
- (with_expansions [<\n> (~! text.\n)]
+ (with_expansions [<\n> (,! text.\n)]
(macro.with_symbols [g!type]
- (in (list (` (all ((~! md.then))
+ (in (list (` (all ((,! md.then))
... Name
- (<| ((~! md.heading/3))
- (~ (code.text (%.code (let [g!name (|> name product.right code.local)]
+ (<| ((,! md.heading/3))
+ (, (code.text (%.code (let [g!name (|> name product.right code.local)]
(case parameters
{.#End}
g!name
_
- (` ((~ g!name) (~+ (list#each code.local parameters))))))))))
+ (` ((, g!name) (,* (list#each code.local parameters))))))))))
... Type
- (let [(~ g!type) ("lux in-module"
- (~ g!module)
- (.type_of (~ (code.symbol name))))]
- ((~! md.code) "clojure"
- (~ (if (type#= .Type def_type)
- (` (|> (~ (code.symbol name))
+ (let [(, g!type) ("lux in-module"
+ (, g!module)
+ (.type_of (, (code.symbol name))))]
+ ((,! md.code) "clojure"
+ (, (if (type#= .Type def_type)
+ (` (|> (, (code.symbol name))
(as .Type)
- ((~! type.anonymous))
- ((~! ..type_definition)
- (~ g!module)
- [(~ (code.text (product.right name))) (list (~+ (list#each code.text parameters)))]
- (.list (~+ (|> tags
+ ((,! type.anonymous))
+ ((,! ..type_definition)
+ (, g!module)
+ [(, (code.text (product.right name))) (list (,* (list#each code.text parameters)))]
+ (.list (,* (|> tags
(maybe.else (list))
(list#each (|>> product.right code.text))))))
- ((~! %.format)
- ((~! ..single_line_comment) ((~! ..type) (~ g!module) (~ g!type)))
+ ((,! %.format)
+ ((,! ..single_line_comment) ((,! ..type) (, g!module) (, g!type)))
<\n>)))
- (` ((~! ..type) (~ g!module) (~ g!type))))))))
+ (` ((,! ..type) (, g!module) (, g!type))))))))
))))))))
(def definition_documentation
(syntax (_ [[name parameters] ..declaration
description ..description
examples (<>.some ..example)])
- (with_expansions [<\n> (~! text.\n)]
- (in (list (` (all ((~! md.then))
- ((~! ..minimal_definition_documentation)
- ((~ (code.symbol name))
- (~+ (list#each code.local parameters))))
+ (with_expansions [<\n> (,! text.\n)]
+ (in (list (` (all ((,! md.then))
+ ((,! ..minimal_definition_documentation)
+ ((, (code.symbol name))
+ (,* (list#each code.local parameters))))
... Description
- (~+ (case description
+ (,* (case description
{.#Some description}
- (list (` (<| ((~! md.paragraph))
- ((~! md.text))
- (~ description))))
+ (list (` (<| ((,! md.paragraph))
+ ((,! md.text))
+ (, description))))
{.#None}
(list)))
... Examples
- (~+ (case examples
+ (,* (case examples
{.#End}
(list)
_
- (list (` (<| ((~! md.code) "clojure")
- ((~! %.format)
- (~+ (|> examples
+ (list (` (<| ((,! md.code) "clojure")
+ ((,! %.format)
+ (,* (|> examples
(list#each (..example_documentation (product.left name)))
(list.interposed ..example_separator))))))))))
))))))
@@ -585,27 +585,27 @@
(syntax (_ [[name parameters] ..declaration])
(macro.with_symbols [g!_]
(let [[_ short] name]
- (in (list (` (.let [(~ g!_) (.is (.-> .Any (.List ..Definition))
- (.function ((~ g!_) (~ g!_))
- (.list [..#definition (~ (code.text short))
- ..#documentation ((~! ..minimal_definition_documentation)
- ((~ (code.symbol name))
- (~+ (list#each code.local parameters))))])))]
- ((~ g!_) [])))))))))
+ (in (list (` (.let [(, g!_) (.is (.-> .Any (.List ..Definition))
+ (.function ((, g!_) (, g!_))
+ (.list [..#definition (, (code.text short))
+ ..#documentation ((,! ..minimal_definition_documentation)
+ ((, (code.symbol name))
+ (,* (list#each code.local parameters))))])))]
+ ((, g!_) [])))))))))
(def .public documentation
(syntax (_ [[name parameters] ..declaration
extra (<>.some <code>.any)])
(macro.with_symbols [g!_]
(let [[_ short] name]
- (in (list (` (.let [(~ g!_) (.is (.-> .Any (.List ..Definition))
- (.function ((~ g!_) (~ g!_))
- (.list [..#definition (~ (code.text short))
- ..#documentation ((~! ..definition_documentation)
- ((~ (code.symbol name))
- (~+ (list#each code.local parameters)))
- (~+ extra))])))]
- ((~ g!_) [])))))))))
+ (in (list (` (.let [(, g!_) (.is (.-> .Any (.List ..Definition))
+ (.function ((, g!_) (, g!_))
+ (.list [..#definition (, (code.text short))
+ ..#documentation ((,! ..definition_documentation)
+ ((, (code.symbol name))
+ (,* (list#each code.local parameters)))
+ (,* extra))])))]
+ ((, g!_) [])))))))))
(def definitions_documentation
(-> (List Definition) (Markdown Block))
@@ -640,17 +640,17 @@
(do meta.monad
[expected (meta.exports name)]
(in (list (` (is (List Module)
- ((~! list.partial) [..#module (~ (code.text name))
- ..#description (~ description)
- ..#expected ((~! ..expected)
- (~ (code.text (|> expected
+ ((,! list.partial) [..#module (, (code.text name))
+ ..#description (, description)
+ ..#expected ((,! ..expected)
+ (, (code.text (|> expected
(list#each product.left)
..expected_format))))
- ..#definitions ((~! list.together) (list (~+ definitions)))]
- (all (at (~! list.monoid) (~' composite))
+ ..#definitions ((,! list.together) (list (,* definitions)))]
+ (all (at (,! list.monoid) (,' composite))
(is (List Module)
- (at (~! list.monoid) (~' identity)))
- (~+ subs))))))))))
+ (at (,! list.monoid) (,' identity)))
+ (,* subs))))))))))
(def listing
(-> (List Text) (Markdown Block))
diff --git a/stdlib/source/library/lux/extension.lux b/stdlib/source/library/lux/extension.lux
index abd125701..de3c150af 100644
--- a/stdlib/source/library/lux/extension.lux
+++ b/stdlib/source/library/lux/extension.lux
@@ -49,19 +49,19 @@
g!phase (code.local phase)
g!archive (code.local archive)]
(with_symbols [g!handler g!inputs g!error g!_]
- (in (list (` (<extension> (~ name)
- (.function ((~ g!handler) (~ g!name) (~ g!phase) (~ g!archive) (~ g!inputs))
- (.case ((~! <result>)
- ((~! monad.do) (~! <>.monad)
- [(~+ inputs)
- (~ g!_) <end>]
- (.at (~! <>.monad) (~' in) (~ body)))
- (~ g!inputs))
- {.#Right (~ g!_)}
- (~ g!_)
+ (in (list (` (<extension> (, name)
+ (.function ((, g!handler) (, g!name) (, g!phase) (, g!archive) (, g!inputs))
+ (.case ((,! <result>)
+ ((,! monad.do) (,! <>.monad)
+ [(,* inputs)
+ (, g!_) <end>]
+ (.at (,! <>.monad) (,' in) (, body)))
+ (, g!inputs))
+ {.#Right (, g!_)}
+ (, g!_)
- {.#Left (~ g!error)}
- ((~! phase.failure) (~ g!error)))
+ {.#Left (, g!error)}
+ ((,! phase.failure) (, g!error)))
)))))))))]
[<c>.any <c>.end <c>.and <c>.result "lux def analysis" analysis]
diff --git a/stdlib/source/library/lux/ffi.jvm.lux b/stdlib/source/library/lux/ffi.jvm.lux
index 405d5bf09..5beaf4478 100644
--- a/stdlib/source/library/lux/ffi.jvm.lux
+++ b/stdlib/source/library/lux/ffi.jvm.lux
@@ -94,15 +94,15 @@
(def (get_static_field class field)
(-> Text Text Code)
(` ("jvm member get static"
- (~ (code.text class))
- (~ (code.text field)))))
+ (, (code.text class))
+ (, (code.text field)))))
(def (get_virtual_field class field object)
(-> Text Text Code Code)
(` ("jvm member get virtual"
- (~ (code.text class))
- (~ (code.text field))
- (~ object))))
+ (, (code.text class))
+ (, (code.text field))
+ (, object))))
(def boxes
(Dictionary (Type Value) Text)
@@ -120,10 +120,10 @@
[(def (<name> unboxed boxed raw)
(-> (Type Value) Text Code Code)
(let [unboxed (..reflection unboxed)]
- (` (|> (~ raw)
- (.is (.Primitive (~ (code.text <pre>))))
+ (` (|> (, raw)
+ (.is (.Primitive (, (code.text <pre>))))
"jvm object cast"
- (.is (.Primitive (~ (code.text <post>))))))))]
+ (.is (.Primitive (, (code.text <post>))))))))]
[unbox boxed unboxed]
[box unboxed boxed]
@@ -370,7 +370,7 @@
(def (parameter_type value_type type)
(-> (-> (Type Value) Code)
(-> (Type Parameter) Code))
- (`` (<| (~~ (with_template [<when> <binding> <then>]
+ (`` (<| (,, (with_template [<when> <binding> <then>]
[(case (<when> type)
{.#Some <binding>}
<then>
@@ -382,22 +382,22 @@
[parser.lower? _ (` .Any)]
[parser.upper? limit (parameter_type value_type limit)]
[parser.class? [name parameters]
- (` (.Primitive (~ (code.text name))
- [(~+ (list#each (parameter_type value_type) parameters))]))]
+ (` (.Primitive (, (code.text name))
+ [(,* (list#each (parameter_type value_type) parameters))]))]
[parser.array? elementT
(case (parser.primitive? elementT)
{.#Some elementT}
- (` {.#Primitive (~ (code.text (..reflection (jvm.array elementT)))) {.#End}})
+ (` {.#Primitive (, (code.text (..reflection (jvm.array elementT)))) {.#End}})
{.#None}
- (` ((~! array.Array) (~ (value_type elementT)))))]))
+ (` ((,! array.Array) (, (value_type elementT)))))]))
... else
(undefined)
)))
(def (value_type mode type)
(-> Primitive_Mode (Type Value) Code)
- (`` (<| (~~ (with_template [<when> <binding> <then>]
+ (`` (<| (,, (with_template [<when> <binding> <then>]
[(case (<when> type)
{.#Some <binding>}
<then>
@@ -415,7 +415,7 @@
(def (decorate_input [class value])
(-> [(Type Value) Code] Code)
- (` [(~ (code.text (..signature class))) (~ value)]))
+ (` [(, (code.text (..signature class))) (, value)]))
(def privacy_modifier^
(Parser Privacy)
@@ -901,11 +901,11 @@
(def (annotation_parameter$ [name value])
(-> Annotation_Parameter Code)
- (` [(~ (code.text name)) (~ value)]))
+ (` [(, (code.text name)) (, value)]))
(def (annotation$ [name params])
(-> Annotation Code)
- (` ((~ (code.text name)) (~+ (list#each annotation_parameter$ params)))))
+ (` ((, (code.text name)) (,* (list#each annotation_parameter$ params)))))
(with_template [<name> <category>]
[(def <name>
@@ -927,12 +927,12 @@
(def (method_decl$ [[name pm anns] method_decl])
(-> [Member_Declaration MethodDecl] Code)
(let [(open "[0]") method_decl]
- (` ((~ (code.text name))
- [(~+ (list#each annotation$ anns))]
- [(~+ (list#each var$ #method_tvars))]
- [(~+ (list#each class$ #method_exs))]
- [(~+ (list#each value$ #method_inputs))]
- (~ (return$ #method_output))))))
+ (` ((, (code.text name))
+ [(,* (list#each annotation$ anns))]
+ [(,* (list#each var$ #method_tvars))]
+ [(,* (list#each class$ #method_exs))]
+ [(,* (list#each value$ #method_inputs))]
+ (, (return$ #method_output))))))
(def (state_modifier$ it)
(-> State Code)
@@ -945,31 +945,31 @@
(-> [Member_Declaration FieldDecl] Code)
(case field
{#ConstantField class value}
- (` ("constant" (~ (code.text name))
- [(~+ (list#each annotation$ anns))]
- (~ (value$ class))
- (~ value)
+ (` ("constant" (, (code.text name))
+ [(,* (list#each annotation$ anns))]
+ (, (value$ class))
+ (, value)
))
{#VariableField [state static? class]}
- (` ("variable" (~ (code.text name))
- (~ (privacy_modifier$ pm))
- (~ (state_modifier$ state))
- (~+ (if static?
+ (` ("variable" (, (code.text name))
+ (, (privacy_modifier$ pm))
+ (, (state_modifier$ state))
+ (,* (if static?
(list (' "static"))
(list)))
- [(~+ (list#each annotation$ anns))]
- (~ (value$ class))
+ [(,* (list#each annotation$ anns))]
+ (, (value$ class))
))
))
(def (argument$ [name type])
(-> Argument Code)
- (` [(~ (code.text name)) (~ (value$ type))]))
+ (` [(, (code.text name)) (, (value$ type))]))
(def (constructor_arg$ [class term])
(-> (Typed Code) Code)
- (` [(~ (value$ class)) (~ term)]))
+ (` [(, (value$ class)) (, term)]))
(.type Super
[[External (List (Type Var))]
@@ -1012,12 +1012,12 @@
(def (method_decl$$ [[name pm anns] method_decl])
(-> [Member_Declaration MethodDecl] Code)
(let [(open "[0]") method_decl]
- (` ([(~+ (list#each var$ #method_tvars))]
- (~ (code.text name))
- [(~+ (list#each annotation$ anns))]
- [(~+ (list#each value$ #method_inputs))]
- (~ (return$ #method_output))
- [(~+ (list#each class$ #method_exs))]))))
+ (` ([(,* (list#each var$ #method_tvars))]
+ (, (code.text name))
+ [(,* (list#each annotation$ anns))]
+ [(,* (list#each value$ #method_inputs))]
+ (, (return$ #method_output))
+ [(,* (list#each class$ #method_exs))]))))
(def with_super
(syntax (_ [declaration,method (<code>.tuple
@@ -1044,13 +1044,13 @@
actual_arguments (list.size inputs)]]
(if (n.= expected_arguments actual_arguments)
(in (list (` ("jvm member invoke special"
- [(~+ (list#each (|>> ..signature code.text) super_vars))]
- (~ (code.text super_name))
- (~ (code.text (the #member_name member)))
- [(~+ (list#each (|>> ..signature code.text) (the #method_tvars method)))]
- ("jvm object cast" (~ self))
- (~+ (|> inputs
- (list#each (|>> ~ "jvm object cast" `))
+ [(,* (list#each (|>> ..signature code.text) super_vars))]
+ (, (code.text super_name))
+ (, (code.text (the #member_name member)))
+ [(,* (list#each (|>> ..signature code.text) (the #method_tvars method)))]
+ ("jvm object cast" (, self))
+ (,* (|> inputs
+ (list#each (|>> , "jvm object cast" `))
(list.zipped_2 (the #method_inputs method))
(list#each ..decorate_input)))))))
(meta.failure (exception.error ..insufficient_parameters [expected_arguments actual_arguments]))))))
@@ -1132,14 +1132,14 @@
(case [static? this]
[#1 {.#None}]
(in (list (` ("jvm member get static"
- (~ (code.text class_name))
- (~ (code.text (the #member_name member)))))))
+ (, (code.text class_name))
+ (, (code.text (the #member_name member)))))))
[#0 {.#Some this}]
(in (list (` ("jvm member get virtual"
- (~ (code.text class_name))
- (~ (code.text (the #member_name member)))
- (~ this)))))
+ (, (code.text class_name))
+ (, (code.text (the #member_name member)))
+ (, this)))))
_
(meta.failure (exception.error ..cannot_get_field [class_name field])))
@@ -1167,16 +1167,16 @@
(case [static? this]
[#1 {.#None}]
(in (list (` ("jvm member put static"
- (~ (code.text class_name))
- (~ (code.text (the #member_name member)))
- (~ value)))))
+ (, (code.text class_name))
+ (, (code.text (the #member_name member)))
+ (, value)))))
[#0 {.#Some this}]
(in (list (` ("jvm member put virtual"
- (~ (code.text class_name))
- (~ (code.text (the #member_name member)))
- (~ value)
- (~ this)))))
+ (, (code.text class_name))
+ (, (code.text (the #member_name member)))
+ (, value)
+ (, this)))))
_
(meta.failure (exception.error ..cannot_set_field [class_name field]))))
@@ -1217,13 +1217,13 @@
actual_arguments (list.size inputs)]
(if (n.= expected_arguments actual_arguments)
(in (list (` ("jvm member invoke virtual"
- [(~+ (list#each (|>> ..signature code.text) class_vars))]
- (~ (code.text class_name))
- (~ (code.text (the #member_name member)))
- [(~+ (list#each (|>> ..signature code.text) (the #method_tvars method)))]
- ("jvm object cast" (~ self))
- (~+ (|> inputs
- (list#each (|>> ~ "jvm object cast" `))
+ [(,* (list#each (|>> ..signature code.text) class_vars))]
+ (, (code.text class_name))
+ (, (code.text (the #member_name member)))
+ [(,* (list#each (|>> ..signature code.text) (the #method_tvars method)))]
+ ("jvm object cast" (, self))
+ (,* (|> inputs
+ (list#each (|>> , "jvm object cast" `))
(list.zipped_2 (the #method_inputs method))
(list#each ..decorate_input)))))))
(meta.failure (exception.error ..insufficient_parameters [expected_arguments actual_arguments]))))
@@ -1253,104 +1253,104 @@
(list)
virtual_methods
- (list (` ((~! ..with_call) [(~ (declaration$ (jvm.declaration fully_qualified_class_name class_vars)))
- [(~+ (list#each method_decl$$ virtual_methods))]]))))]
+ (list (` ((,! ..with_call) [(, (declaration$ (jvm.declaration fully_qualified_class_name class_vars)))
+ [(,* (list#each method_decl$$ virtual_methods))]]))))]
(case method_def
{#ConstructorMethod strict_fp? type_vars self_name arguments constructor_args body exs}
(meta#in (` ("init"
- (~ (privacy_modifier$ pm))
- (~ (code.bit strict_fp?))
- [(~+ (list#each annotation$ anns))]
- [(~+ (list#each var$ type_vars))]
- [(~+ (list#each class$ exs))]
- (~ (code.text self_name))
- [(~+ (list#each argument$ arguments))]
- [(~+ (list#each constructor_arg$ constructor_args))]
- (<| ((~! ..with_get|set) [(~ (code.text fully_qualified_class_name))
- [(~+ (list#each field_decl$ fields))]])
- (~+ virtual_methods)
- (~ body))
+ (, (privacy_modifier$ pm))
+ (, (code.bit strict_fp?))
+ [(,* (list#each annotation$ anns))]
+ [(,* (list#each var$ type_vars))]
+ [(,* (list#each class$ exs))]
+ (, (code.text self_name))
+ [(,* (list#each argument$ arguments))]
+ [(,* (list#each constructor_arg$ constructor_args))]
+ (<| ((,! ..with_get|set) [(, (code.text fully_qualified_class_name))
+ [(,* (list#each field_decl$ fields))]])
+ (,* virtual_methods)
+ (, body))
)))
{#VirtualMethod final? strict_fp? type_vars self_name arguments return_type body exs}
(meta#in (` ("virtual"
- (~ (code.text name))
- (~ (privacy_modifier$ pm))
- (~ (code.bit final?))
- (~ (code.bit strict_fp?))
- [(~+ (list#each annotation$ anns))]
- [(~+ (list#each var$ type_vars))]
- (~ (code.text self_name))
- [(~+ (list#each argument$ arguments))]
- (~ (return$ return_type))
- [(~+ (list#each class$ exs))]
- (<| ((~! ..with_get|set) [(~ (code.text fully_qualified_class_name))
- [(~+ (list#each field_decl$ fields))]])
- (~+ virtual_methods)
- (~ body))
+ (, (code.text name))
+ (, (privacy_modifier$ pm))
+ (, (code.bit final?))
+ (, (code.bit strict_fp?))
+ [(,* (list#each annotation$ anns))]
+ [(,* (list#each var$ type_vars))]
+ (, (code.text self_name))
+ [(,* (list#each argument$ arguments))]
+ (, (return$ return_type))
+ [(,* (list#each class$ exs))]
+ (<| ((,! ..with_get|set) [(, (code.text fully_qualified_class_name))
+ [(,* (list#each field_decl$ fields))]])
+ (,* virtual_methods)
+ (, body))
)))
{#OverridenMethod strict_fp? declaration type_vars self_name expected_arguments return_type body exs}
(do meta.monad
[@ meta.current_module_name]
(in (` ("override"
- (~ (declaration$ declaration))
- (~ (code.text name))
- (~ (code.bit strict_fp?))
- [(~+ (list#each annotation$ anns))]
- [(~+ (list#each var$ type_vars))]
- (~ (code.text self_name))
- [(~+ (list#each argument$ expected_arguments))]
- (~ (return$ return_type))
- [(~+ (list#each class$ exs))]
- (<| ((~! ..with_super) [(~ (declaration$ declaration))
- (~ (method_decl$$ [method_declaration
+ (, (declaration$ declaration))
+ (, (code.text name))
+ (, (code.bit strict_fp?))
+ [(,* (list#each annotation$ anns))]
+ [(,* (list#each var$ type_vars))]
+ (, (code.text self_name))
+ [(,* (list#each argument$ expected_arguments))]
+ (, (return$ return_type))
+ [(,* (list#each class$ exs))]
+ (<| ((,! ..with_super) [(, (declaration$ declaration))
+ (, (method_decl$$ [method_declaration
[#method_tvars type_vars
#method_inputs (list#each product.right expected_arguments)
#method_output return_type
#method_exs exs]]))])
- ((~! ..with_get|set) [(~ (code.text fully_qualified_class_name))
- [(~+ (list#each field_decl$ fields))]])
- (~+ virtual_methods)
- (~ body))
+ ((,! ..with_get|set) [(, (code.text fully_qualified_class_name))
+ [(,* (list#each field_decl$ fields))]])
+ (,* virtual_methods)
+ (, body))
))))
{#StaticMethod strict_fp? type_vars arguments return_type body exs}
(meta#in (` ("static"
- (~ (code.text name))
- (~ (privacy_modifier$ pm))
- (~ (code.bit strict_fp?))
- [(~+ (list#each annotation$ anns))]
- [(~+ (list#each var$ type_vars))]
- [(~+ (list#each argument$ arguments))]
- (~ (return$ return_type))
- [(~+ (list#each class$ exs))]
- (~ body))))
+ (, (code.text name))
+ (, (privacy_modifier$ pm))
+ (, (code.bit strict_fp?))
+ [(,* (list#each annotation$ anns))]
+ [(,* (list#each var$ type_vars))]
+ [(,* (list#each argument$ arguments))]
+ (, (return$ return_type))
+ [(,* (list#each class$ exs))]
+ (, body))))
{#AbstractMethod type_vars arguments return_type exs}
(meta#in (` ("abstract"
- (~ (code.text name))
- (~ (privacy_modifier$ pm))
- [(~+ (list#each annotation$ anns))]
- [(~+ (list#each var$ type_vars))]
- [(~+ (list#each argument$ arguments))]
- (~ (return$ return_type))
- [(~+ (list#each class$ exs))])))
+ (, (code.text name))
+ (, (privacy_modifier$ pm))
+ [(,* (list#each annotation$ anns))]
+ [(,* (list#each var$ type_vars))]
+ [(,* (list#each argument$ arguments))]
+ (, (return$ return_type))
+ [(,* (list#each class$ exs))])))
{#NativeMethod type_vars arguments return_type exs}
(meta#in (` ("native"
- (~ (code.text name))
- (~ (privacy_modifier$ pm))
- [(~+ (list#each annotation$ anns))]
- [(~+ (list#each var$ type_vars))]
- [(~+ (list#each class$ exs))]
- [(~+ (list#each argument$ arguments))]
- (~ (return$ return_type)))))
+ (, (code.text name))
+ (, (privacy_modifier$ pm))
+ [(,* (list#each annotation$ anns))]
+ [(,* (list#each var$ type_vars))]
+ [(,* (list#each class$ exs))]
+ [(,* (list#each argument$ arguments))]
+ (, (return$ return_type)))))
)))
(def (complete_call$ g!obj [method args])
(-> Code Partial_Call Code)
- (` ((~ (code.symbol method)) (~+ args) (~ g!obj))))
+ (` ((, (code.symbol method)) (,* args) (, g!obj))))
(def $Object
(Type Class)
@@ -1370,13 +1370,13 @@
(do meta.monad
[methods (monad.each ! (method_def$ full_class_name class_vars super fields methods) methods)]
(in (list (` ("jvm class"
- (~ (declaration$ (jvm.declaration full_class_name class_vars)))
- (~ (class$ super))
- [(~+ (list#each class$ interfaces))]
- (~ (inheritance_modifier$ im))
- [(~+ (list#each annotation$ annotations))]
- [(~+ (list#each field_decl$ fields))]
- [(~+ methods)])))))))
+ (, (declaration$ (jvm.declaration full_class_name class_vars)))
+ (, (class$ super))
+ [(,* (list#each class$ interfaces))]
+ (, (inheritance_modifier$ im))
+ [(,* (list#each annotation$ annotations))]
+ [(,* (list#each field_decl$ fields))]
+ [(,* methods)])))))))
(def .public interface
(syntax (_ [.let [! <>.monad]
@@ -1386,10 +1386,10 @@
annotations ..annotations^
members (<>.some (..method_decl^ class_vars))])
(in (list (` ("jvm class interface"
- (~ (declaration$ (jvm.declaration full_class_name class_vars)))
- [(~+ (list#each class$ supers))]
- [(~+ (list#each annotation$ annotations))]
- (~+ (list#each method_decl$ members))))))))
+ (, (declaration$ (jvm.declaration full_class_name class_vars)))
+ [(,* (list#each class$ supers))]
+ [(,* (list#each annotation$ annotations))]
+ (,* (list#each method_decl$ members))))))))
(def .public object
(syntax (_ [class_vars ..vars^
@@ -1402,11 +1402,11 @@
(do [! meta.monad]
[methods (monad.each ! (method_def$ "" (list) super (list) methods) methods)]
(in (list (` ("jvm class anonymous"
- [(~+ (list#each var$ class_vars))]
- (~ (class$ super))
- [(~+ (list#each class$ interfaces))]
- [(~+ (list#each constructor_arg$ constructor_args))]
- [(~+ methods)])))))))
+ [(,* (list#each var$ class_vars))]
+ (, (class$ super))
+ [(,* (list#each class$ interfaces))]
+ [(,* (list#each constructor_arg$ constructor_args))]
+ [(,* methods)])))))))
(def .public null
(syntax (_ [])
@@ -1419,17 +1419,17 @@
(def .public ???
(syntax (_ [expr <code>.any])
(with_symbols [g!temp]
- (in (list (` (let [(~ g!temp) (~ expr)]
- (if (not ("jvm object null?" (~ g!temp)))
- {.#Some (~ g!temp)}
+ (in (list (` (let [(, g!temp) (, expr)]
+ (if (not ("jvm object null?" (, g!temp)))
+ {.#Some (, g!temp)}
{.#None}))))))))
(def .public !!!
(syntax (_ [expr <code>.any])
(with_symbols [g!value]
- (in (list (` (.case (~ expr)
- {.#Some (~ g!value)}
- (~ g!value)
+ (in (list (` (.case (, expr)
+ {.#Some (, g!value)}
+ (, g!value)
{.#None}
("jvm object null"))))))))
@@ -1439,36 +1439,36 @@
unchecked (<>.maybe <code>.any)])
(with_symbols [g!_ g!unchecked]
(let [class_name (..reflection class)
- class_type (` (.Primitive (~ (code.text class_name))))
- check_type (` (.Maybe (~ class_type)))
- check_code (` (if ("jvm object instance?" (~ (code.text class_name)) (~ g!unchecked))
- {.#Some (.as (~ class_type)
- (~ g!unchecked))}
+ class_type (` (.Primitive (, (code.text class_name))))
+ check_type (` (.Maybe (, class_type)))
+ check_code (` (if ("jvm object instance?" (, (code.text class_name)) (, g!unchecked))
+ {.#Some (.as (, class_type)
+ (, g!unchecked))}
{.#None}))]
(case unchecked
{.#Some unchecked}
- (in (list (` (.is (~ check_type)
- (let [(~ g!unchecked) (~ unchecked)]
- (~ check_code))))))
+ (in (list (` (.is (, check_type)
+ (let [(, g!unchecked) (, unchecked)]
+ (, check_code))))))
{.#None}
- (in (list (` (.is (-> (.Primitive "java.lang.Object") (~ check_type))
- (function ((~ g!_) (~ g!unchecked))
- (~ check_code))))))
+ (in (list (` (.is (-> (.Primitive "java.lang.Object") (, check_type))
+ (function ((, g!_) (, g!unchecked))
+ (, check_code))))))
)))))
(def .public synchronized
(syntax (_ [lock <code>.any
body <code>.any])
- (in (list (` ("jvm object synchronized" (~ lock) (~ body)))))))
+ (in (list (` ("jvm object synchronized" (, lock) (, body)))))))
(def .public do_to
(syntax (_ [obj <code>.any
methods (<>.some partial_call^)])
(with_symbols [g!obj]
- (in (list (` (let [(~ g!obj) (~ obj)]
- (exec (~+ (list#each (complete_call$ g!obj) methods))
- (~ g!obj)))))))))
+ (in (list (` (let [(, g!obj) (, obj)]
+ (exec (,* (list#each (complete_call$ g!obj) methods))
+ (, g!obj)))))))))
(def (class_import$ declaration)
(-> (Type Declaration) Code)
@@ -1476,11 +1476,11 @@
def_name (..internal full_name)
params' (list#each ..var$' params)]
(template.with_locals [g!_]
- (` (def (~ (code.symbol ["" def_name]))
+ (` (def (, (code.symbol ["" def_name]))
.Type
- (All ((~ (' g!_)) (~+ params'))
- (.Primitive (~ (code.text full_name))
- [(~+ params')])))))))
+ (All ((, (' g!_)) (,* params'))
+ (.Primitive (, (code.text full_name))
+ [(,* params')])))))))
(def (member_type_vars class_tvars member)
(-> (List (Type Var)) Import_Member_Declaration (List (Type Var)))
@@ -1516,7 +1516,7 @@
(function (_ [maybe? arg])
(let [arg_type (value_type (the #import_member_mode commons) arg)]
(if maybe?
- (` (Maybe (~ arg_type)))
+ (` (Maybe (, arg_type)))
arg_type))))
#import_member_args)]]
(in [arg_inputs input_jvm_types arg_types])))
@@ -1533,14 +1533,14 @@
return_term
(the #import_member_maybe? commons)
- (` (??? (~ return_term)))
+ (` (??? (, return_term)))
... else
- (let [g!temp (` ((~' ~') (~ (code.symbol ["" " Ω "]))))]
- (` (let [(~ g!temp) (~ return_term)]
+ (let [g!temp (` ((,' ,') (, (code.symbol ["" " Ω "]))))]
+ (` (let [(, g!temp) (, return_term)]
(if (not (..null? (.as (.Primitive "java.lang.Object")
- (~ g!temp))))
- (~ g!temp)
+ (, g!temp))))
+ (, g!temp)
(panic! "Cannot produce null references from method calls."))))))
_
@@ -1558,8 +1558,8 @@
_
return_term))]
- [with_return_try #import_member_try? (` (.try (~ return_term)))]
- [with_return_io #import_member_io? (` ((~! io.io) (~ return_term)))]
+ [with_return_try #import_member_try? (` (.try (, return_term)))]
+ [with_return_io #import_member_io? (` ((,! io.io) (, return_term)))]
)
(with_template [<input?> <name> <unbox/box> <special+>]
@@ -1576,7 +1576,7 @@
[(at jvm.equivalence = <primitive> unboxed)
(with_expansions [<post>' (template.spliced <post>)]
[<primitive>
- (` (.|> (~ raw) (~+ <pre>)))
+ (` (.|> (, raw) (,* <pre>)))
(list <post>')])]
<special+>')]
@@ -1584,7 +1584,7 @@
... else
[unboxed
(if <input?>
- (` ("jvm object cast" (~ raw)))
+ (` ("jvm object cast" (, raw)))
raw)
(list)]))))
unboxed/boxed (case (dictionary.value unboxed ..boxes)
@@ -1598,31 +1598,31 @@
unboxed/boxed
_
- (` (.|> (~ unboxed/boxed) (~+ post))))))]
+ (` (.|> (, unboxed/boxed) (,* post))))))]
[#1 with_automatic_input_conversion ..unbox
- [[jvm.boolean (list (` (.as (.Primitive (~ (code.text box.boolean)))))) []]
- [jvm.byte (list (` (.as (.Primitive (~ (code.text box.byte)))))) []]
- [jvm.short (list (` (.as (.Primitive (~ (code.text box.short)))))) []]
- [jvm.int (list (` (.is (.Primitive (~ (code.text box.int)))))) []]
- [jvm.long (list (` (.as (.Primitive (~ (code.text box.long)))))) []]
- [jvm.char (list (` (.as (.Primitive (~ (code.text box.char)))))) []]
- [jvm.float (list (` (.as (.Primitive (~ (code.text box.float)))))) []]
- [jvm.double (list (` (.as (.Primitive (~ (code.text box.double)))))) []]]]
+ [[jvm.boolean (list (` (.as (.Primitive (, (code.text box.boolean)))))) []]
+ [jvm.byte (list (` (.as (.Primitive (, (code.text box.byte)))))) []]
+ [jvm.short (list (` (.as (.Primitive (, (code.text box.short)))))) []]
+ [jvm.int (list (` (.is (.Primitive (, (code.text box.int)))))) []]
+ [jvm.long (list (` (.as (.Primitive (, (code.text box.long)))))) []]
+ [jvm.char (list (` (.as (.Primitive (, (code.text box.char)))))) []]
+ [jvm.float (list (` (.as (.Primitive (, (code.text box.float)))))) []]
+ [jvm.double (list (` (.as (.Primitive (, (code.text box.double)))))) []]]]
[#0 with_automatic_output_conversion ..box
- [[jvm.boolean (list) [(` (.is (.Primitive (~ (code.text box.boolean)))))]]
- [jvm.byte (list) [(` (.is (.Primitive (~ (code.text box.byte)))))]]
- [jvm.short (list) [(` (.is (.Primitive (~ (code.text box.short)))))]]
- [jvm.int (list) [(` (.is (.Primitive (~ (code.text box.int)))))]]
- [jvm.long (list) [(` (.is (.Primitive (~ (code.text box.long)))))]]
- [jvm.char (list) [(` (.is (.Primitive (~ (code.text box.char)))))]]
- [jvm.float (list) [(` (.is (.Primitive (~ (code.text box.float)))))]]
- [jvm.double (list) [(` (.is (.Primitive (~ (code.text box.double)))))]]]]
+ [[jvm.boolean (list) [(` (.is (.Primitive (, (code.text box.boolean)))))]]
+ [jvm.byte (list) [(` (.is (.Primitive (, (code.text box.byte)))))]]
+ [jvm.short (list) [(` (.is (.Primitive (, (code.text box.short)))))]]
+ [jvm.int (list) [(` (.is (.Primitive (, (code.text box.int)))))]]
+ [jvm.long (list) [(` (.is (.Primitive (, (code.text box.long)))))]]
+ [jvm.char (list) [(` (.is (.Primitive (, (code.text box.char)))))]]
+ [jvm.float (list) [(` (.is (.Primitive (, (code.text box.float)))))]]
+ [jvm.double (list) [(` (.is (.Primitive (, (code.text box.double)))))]]]]
)
(def (un_quoted quoted)
(-> Code Code)
- (` ((~' ~) (~ quoted))))
+ (` ((,' ,) (, quoted))))
(def (jvm_invoke_inputs mode classes inputs)
(-> Primitive_Mode (List (Type Value)) (List [Bit Code]) (List Code))
@@ -1630,8 +1630,8 @@
(list.zipped_2 classes)
(list#each (function (_ [class [maybe? input]])
(|> (if maybe?
- (` (.is (.Primitive (~ (code.text (..reflection class))))
- ((~! !!!) (~ (..un_quoted input)))))
+ (` (.is (.Primitive (, (code.text (..reflection class))))
+ ((,! !!!) (, (..un_quoted input)))))
(..un_quoted input))
[class]
(with_automatic_input_conversion mode))))))
@@ -1645,7 +1645,7 @@
(def syntax_inputs
(-> (List Code) (List Code))
(|>> (list#each (function (_ name)
- (list name (` (~! <code>.any)))))
+ (list name (` (,! <code>.any)))))
list#conjoint))
(exception .public (cannot_write_to_field [class Text
@@ -1664,18 +1664,18 @@
[.let [enum_type (.is Code
(case class_tvars
{.#End}
- (` (.Primitive (~ (code.text full_name))))
+ (` (.Primitive (, (code.text full_name))))
_
(let [=class_tvars (list#each ..var$' class_tvars)]
- (` (All ((~ g!_) (~+ =class_tvars))
- (.Primitive (~ (code.text full_name)) [(~+ =class_tvars)]))))))
+ (` (All ((, g!_) (,* =class_tvars))
+ (.Primitive (, (code.text full_name)) [(,* =class_tvars)]))))))
getter_interop (.is (-> Text Code)
(function (_ name)
(let [getter_name (code.symbol ["" (..import_name import_format method_prefix name)])]
- (` (def (~ getter_name)
- (~ enum_type)
- (~ (get_static_field full_name name)))))))]]
+ (` (def (, getter_name)
+ (, enum_type)
+ (, (get_static_field full_name name)))))))]]
(in (list#each getter_interop enum_members))))
{#ConstructorDecl [commons _]}
@@ -1684,19 +1684,19 @@
def_name (code.symbol ["" (..import_name import_format method_prefix (the #import_member_alias commons))])
jvm_interop (|> [classT
(` ("jvm member invoke constructor"
- [(~+ (list#each ..var$ class_tvars))]
- (~ (code.text full_name))
- [(~+ (list#each ..var$ (the #import_member_tvars commons)))]
- (~+ (|> (jvm_invoke_inputs (the #import_member_mode commons) input_jvm_types arg_function_inputs)
+ [(,* (list#each ..var$ class_tvars))]
+ (, (code.text full_name))
+ [(,* (list#each ..var$ (the #import_member_tvars commons)))]
+ (,* (|> (jvm_invoke_inputs (the #import_member_mode commons) input_jvm_types arg_function_inputs)
(list.zipped_2 input_jvm_types)
(list#each ..decorate_input)))))]
(with_automatic_output_conversion (the #import_member_mode commons))
(with_return_maybe member true classT)
(with_return_try member)
(with_return_io member))]]
- (in (list (` (def (~ def_name)
- ((~! syntax) ((~ def_name) [(~+ (syntax_inputs (list#each product.right arg_function_inputs)))])
- ((~' in) (.list (.` (~ jvm_interop))))))))))
+ (in (list (` (def (, def_name)
+ ((,! syntax) ((, def_name) [(,* (syntax_inputs (list#each product.right arg_function_inputs)))])
+ ((,' in) (.list (.` (, jvm_interop))))))))))
{#MethodDecl [commons method]}
(with_symbols [g!obj]
@@ -1722,16 +1722,16 @@
)))
method_return (the #import_method_return method)
callC (.is Code
- (` ((~ (code.text jvm_op))
- [(~+ (list#each ..var$ class_tvars))]
- (~ (code.text full_name))
- (~ (code.text #import_method_name))
- [(~+ (list#each ..var$ (the #import_member_tvars commons)))]
- (~+ (|> object_ast
+ (` ((, (code.text jvm_op))
+ [(,* (list#each ..var$ class_tvars))]
+ (, (code.text full_name))
+ (, (code.text #import_method_name))
+ [(,* (list#each ..var$ (the #import_member_tvars commons)))]
+ (,* (|> object_ast
(list#each ..un_quoted)
(list.zipped_2 (list (jvm.class full_name (list))))
(list#each (with_automatic_input_conversion (the #import_member_mode commons)))))
- (~+ (|> (jvm_invoke_inputs (the #import_member_mode commons) input_jvm_types arg_function_inputs)
+ (,* (|> (jvm_invoke_inputs (the #import_member_mode commons) input_jvm_types arg_function_inputs)
(list.zipped_2 input_jvm_types)
(list#each ..decorate_input))))))
jvm_interop (.is Code
@@ -1749,10 +1749,10 @@
(|> callC
(with_return_try member)
(with_return_io member))))]]
- (in (list (` (def (~ def_name)
- ((~! syntax) ((~ def_name) [(~+ (syntax_inputs (list#each product.right arg_function_inputs)))
- (~+ (syntax_inputs object_ast))])
- ((~' in) (.list (.` (~ jvm_interop)))))))))))
+ (in (list (` (def (, def_name)
+ ((,! syntax) ((, def_name) [(,* (syntax_inputs (list#each product.right arg_function_inputs)))
+ (,* (syntax_inputs object_ast))])
+ ((,' in) (.list (.` (, jvm_interop)))))))))))
{#FieldAccessDecl fad}
(do meta.monad
@@ -1765,16 +1765,16 @@
(get_static_field full_name _#import_field_name)
(get_virtual_field full_name _#import_field_name (..un_quoted g!obj)))])
getter_body (if _#import_field_maybe?
- (` ((~! ???) (~ getter_body)))
+ (` ((,! ???) (, getter_body)))
getter_body)
getter_body (if _#import_field_setter?
- (` ((~! io.io) (~ getter_body)))
+ (` ((,! io.io) (, getter_body)))
getter_body)
setter_value (|> [_#import_field_type (..un_quoted g!value)]
(with_automatic_input_conversion _#import_field_mode))
setter_value (if _#import_field_maybe?
- (` ((~! !!!) (~ setter_value)))
+ (` ((,! !!!) (, setter_value)))
setter_value)
setter_command (if _#import_field_static? "jvm member put static" "jvm member put virtual")
g!obj+ (.is (List Code)
@@ -1783,33 +1783,33 @@
(list (..un_quoted g!obj))))
parser (let [write (if _#import_field_static?
- (` (~! <code>.any))
- (` ((~! <>.and)
- (~! <code>.any)
- (~! <code>.any))))
+ (` (,! <code>.any))
+ (` ((,! <>.and)
+ (,! <code>.any)
+ (,! <code>.any))))
read (if _#import_field_static?
- (` (~! <code>.end))
- (` (~! <code>.any)))]
- (` ((~! <>.or) (~ write) (~ read))))
+ (` (,! <code>.end))
+ (` (,! <code>.any)))]
+ (` ((,! <>.or) (, write) (, read))))
write (list (if _#import_field_static?
- (` {.#Left [(~ g!value)]})
- (` {.#Left [(~ g!value) (~ g!obj)]}))
+ (` {.#Left [(, g!value)]})
+ (` {.#Left [(, g!value) (, g!obj)]}))
(if _#import_field_setter?
- (` ((~' in) (.list (.` ((~! io.io) ((~ (code.text setter_command))
- (~ (code.text full_name))
- (~ (code.text _#import_field_name))
- (~ setter_value)
- (~+ g!obj+)))))))
- (` ((~! meta.failure) (~ (code.text (exception.error ..cannot_write_to_field [full_name _#import_field_name])))))))
+ (` ((,' in) (.list (.` ((,! io.io) ((, (code.text setter_command))
+ (, (code.text full_name))
+ (, (code.text _#import_field_name))
+ (, setter_value)
+ (,* g!obj+)))))))
+ (` ((,! meta.failure) (, (code.text (exception.error ..cannot_write_to_field [full_name _#import_field_name])))))))
read (list (if _#import_field_static?
(` {.#Right []})
- (` {.#Right [(~ g!obj)]}))
- (` ((~' in) (.list (.` (~ getter_body))))))]
- (list (` (def (~ g!name)
- ((~! syntax) ((~ g!name) [(~ write|read) (~ parser)])
- (case (~ write|read)
- (~+ write)
- (~+ read))))))))))
+ (` {.#Right [(, g!obj)]}))
+ (` ((,' in) (.list (.` (, getter_body))))))]
+ (list (` (def (, g!name)
+ ((,! syntax) ((, g!name) [(, write|read) (, parser)])
+ (case (, write|read)
+ (,* write)
+ (,* read))))))))))
)))
(def (member_import$ vars kind class [import_format member])
@@ -1861,14 +1861,14 @@
(def .public array
(syntax (_ [type (..type^ (list))
size <code>.any])
- (let [g!size (` (|> (~ size)
+ (let [g!size (` (|> (, size)
(.is .Nat)
- (.as (.Primitive (~ (code.text box.long))))
+ (.as (.Primitive (, (code.text box.long))))
"jvm object cast"
"jvm conversion long-to-int"))]
- (`` (cond (~~ (with_template [<primitive> <array_op>]
+ (`` (cond (,, (with_template [<primitive> <array_op>]
[(at jvm.equivalence = <primitive> type)
- (in (list (` (<array_op> (~ g!size)))))]
+ (in (list (` (<array_op> (, g!size)))))]
[jvm.boolean "jvm array new boolean"]
[jvm.byte "jvm array new byte"]
@@ -1879,9 +1879,9 @@
[jvm.double "jvm array new double"]
[jvm.char "jvm array new char"]))
... else
- (in (list (` (.as ((~! array.Array) (~ (value_type {#ManualPrM} type)))
- (.is (~ (value_type {#ManualPrM} (jvm.array type)))
- ("jvm array new object" (~ g!size))))))))))))
+ (in (list (` (.as ((,! array.Array) (, (value_type {#ManualPrM} type)))
+ (.is (, (value_type {#ManualPrM} (jvm.array type)))
+ ("jvm array new object" (, g!size))))))))))))
(exception .public (cannot_convert_to_jvm_type [type .Type])
(exception.report
@@ -1894,7 +1894,7 @@
(at meta.monad in $Object)
(case type
{.#Primitive name params}
- (`` (cond (~~ (with_template [<type>]
+ (`` (cond (,, (with_template [<type>]
[(text#= (..reflection <type>) name)
(case params
{.#End}
@@ -1912,7 +1912,7 @@
[jvm.double]
[jvm.char]))
- (~~ (with_template [<type>]
+ (,, (with_template [<type>]
[(text#= (..reflection (jvm.array <type>)) name)
(case params
{.#End}
@@ -1994,7 +1994,7 @@
[array_type (meta.type array_name)
context meta.type_context
array_jvm_type (lux_type->jvm_type context array_type)
- .let [g!extension (code.text (`` (cond (~~ (with_template [<primitive> <extension>]
+ .let [g!extension (code.text (`` (cond (,, (with_template [<primitive> <extension>]
[(at jvm.equivalence =
(jvm.array <primitive>)
array_jvm_type)
@@ -2011,16 +2011,16 @@
... else
"jvm array length object")))]]
- (in (list (` (.|> ((~ g!extension) (~ array))
+ (in (list (` (.|> ((, g!extension) (, array))
"jvm conversion int-to-long"
"jvm object cast"
- (.is (.Primitive (~ (code.text box.long))))
+ (.is (.Primitive (, (code.text box.long))))
(.as .Nat))))))
_
(with_symbols [g!array]
- (in (list (` (let [(~ g!array) (~ array)]
- (..length (~ g!array))))))))))
+ (in (list (` (let [(, g!array) (, array)]
+ (..length (, g!array))))))))))
(def .public read!
(syntax (_ [idx <code>.any
@@ -2031,18 +2031,18 @@
[array_type (meta.type array_name)
context meta.type_context
array_jvm_type (lux_type->jvm_type context array_type)
- .let [g!idx (` (.|> (~ idx)
+ .let [g!idx (` (.|> (, idx)
(.is .Nat)
- (.as (.Primitive (~ (code.text box.long))))
+ (.as (.Primitive (, (code.text box.long))))
"jvm object cast"
"jvm conversion long-to-int"))]]
- (`` (cond (~~ (with_template [<primitive> <extension> <box>]
+ (`` (cond (,, (with_template [<primitive> <extension> <box>]
[(at jvm.equivalence =
(jvm.array <primitive>)
array_jvm_type)
- (in (list (` (.|> (<extension> (~ g!idx) (~ array))
+ (in (list (` (.|> (<extension> (, g!idx) (, array))
"jvm object cast"
- (.is (.Primitive (~ (code.text <box>))))))))]
+ (.is (.Primitive (, (code.text <box>))))))))]
[jvm.boolean "jvm array read boolean" box.boolean]
[jvm.byte "jvm array read byte" box.byte]
@@ -2054,12 +2054,12 @@
[jvm.char "jvm array read char" box.char]))
... else
- (in (list (` ("jvm array read object" (~ g!idx) (~ array))))))))
+ (in (list (` ("jvm array read object" (, g!idx) (, array))))))))
_
(with_symbols [g!array]
- (in (list (` (let [(~ g!array) (~ array)]
- (..read! (~ idx) (~ g!array))))))))))
+ (in (list (` (let [(, g!array) (, array)]
+ (..read! (, idx) (, g!array))))))))))
(def .public write!
(syntax (_ [idx <code>.any
@@ -2071,19 +2071,19 @@
[array_type (meta.type array_name)
context meta.type_context
array_jvm_type (lux_type->jvm_type context array_type)
- .let [g!idx (` (.|> (~ idx)
+ .let [g!idx (` (.|> (, idx)
(.is .Nat)
- (.as (.Primitive (~ (code.text box.long))))
+ (.as (.Primitive (, (code.text box.long))))
"jvm object cast"
"jvm conversion long-to-int"))]]
- (`` (cond (~~ (with_template [<primitive> <extension> <box>]
+ (`` (cond (,, (with_template [<primitive> <extension> <box>]
[(at jvm.equivalence =
(jvm.array <primitive>)
array_jvm_type)
- (let [g!value (` (.|> (~ value)
- (.as (.Primitive (~ (code.text <box>))))
+ (let [g!value (` (.|> (, value)
+ (.as (.Primitive (, (code.text <box>))))
"jvm object cast"))]
- (in (list (` (<extension> (~ g!idx) (~ g!value) (~ array))))))]
+ (in (list (` (<extension> (, g!idx) (, g!value) (, array))))))]
[jvm.boolean "jvm array write boolean" box.boolean]
[jvm.byte "jvm array write byte" box.byte]
@@ -2095,16 +2095,16 @@
[jvm.char "jvm array write char" box.char]))
... else
- (in (list (` ("jvm array write object" (~ g!idx) (~ value) (~ array))))))))
+ (in (list (` ("jvm array write object" (, g!idx) (, value) (, array))))))))
_
(with_symbols [g!array]
- (in (list (` (let [(~ g!array) (~ array)]
- (..write! (~ idx) (~ value) (~ g!array))))))))))
+ (in (list (` (let [(, g!array) (, array)]
+ (..write! (, idx) (, value) (, g!array))))))))))
(def .public class_for
(syntax (_ [type (..type^ (list))])
- (in (list (` ("jvm object class" (~ (code.text (..reflection type)))))))))
+ (in (list (` ("jvm object class" (, (code.text (..reflection type)))))))))
(def .public type
(syntax (_ [type (..type^ (list))])
@@ -2121,8 +2121,8 @@
(case [(parser.array? type)
(parser.class? type)]
(^.or [{.#Some _} _] [_ {.#Some _}])
- (in (list (` (.is (~ (..value_type {#ManualPrM} type))
- ("jvm object cast" (~ object))))))
+ (in (list (` (.is (, (..value_type {#ManualPrM} type))
+ ("jvm object cast" (, object))))))
_
(meta.failure (exception.error ..cannot_cast_to_non_object [type])))))
diff --git a/stdlib/source/library/lux/ffi.lux b/stdlib/source/library/lux/ffi.lux
index 90681746d..3dd10ebe6 100644
--- a/stdlib/source/library/lux/ffi.lux
+++ b/stdlib/source/library/lux/ffi.lux
@@ -234,8 +234,8 @@
(`` (`` (type Sub
(Variant
- (~~ (for @.lua (~~ (these))
- @.ruby (~~ (these))
+ (,, (for @.lua (,, (these))
+ @.ruby (,, (these))
{#Constructor Constructor}))
{#Field Field}
{#Method Method}))))
@@ -243,8 +243,8 @@
(`` (`` (def sub
(Parser Sub)
(all <>.or
- (~~ (for @.lua (~~ (these))
- @.ruby (~~ (these))
+ (,, (for @.lua (,, (these))
+ @.ruby (,, (these))
..constructor))
..field
..method
@@ -260,7 +260,7 @@
(def (output_type it)
(-> Optional Code)
(if (the #optional? it)
- (` (.Maybe (~ (the #mandatory it))))
+ (` (.Maybe (, (the #mandatory it))))
(the #mandatory it)))
(`` (with_template [<lux_it> <host_it>
@@ -278,9 +278,9 @@
(def (host_optional it)
(-> Optional Code)
(.if (.the #optional? it)
- (` (.case (~ (the #mandatory it))
- {.#Some (~ g!it')}
- (~ g!it')
+ (` (.case (, (the #mandatory it))
+ {.#Some (, g!it')}
+ (, g!it')
{.#None}
(<host_it>)))
@@ -288,16 +288,16 @@
(def (lux_optional it output)
(-> Optional Code Code)
- (` (.let [(~ g!it') (~ output)]
- (~ (if (the #optional? it)
- (` (.if (<host_?> (~ g!it'))
+ (` (.let [(, g!it') (, output)]
+ (, (if (the #optional? it)
+ (` (.if (<host_?> (, g!it'))
{.#None}
- {.#Some (~ g!it')}))
- (` (.if (.not (<host_?> (~ g!it')))
- (~ g!it')
+ {.#Some (, g!it')}))
+ (` (.if (.not (<host_?> (, g!it')))
+ (, g!it')
(.panic! "Invalid output."))))))))))]
- (~~ (for @.js [null "js object null"
+ (,, (for @.js [null "js object null"
null? "js object null?"]
@.python [none "python object none"
none? "python object none?"]
@@ -347,19 +347,19 @@
(def (input_type input :it:)
(-> Input Code Code)
(let [:it: (if (the #try? input)
- (` (.Either .Text (~ :it:)))
+ (` (.Either .Text (, :it:)))
:it:)]
(if (the #io? input)
- (` ((~! io.IO) (~ :it:)))
+ (` ((,! io.IO) (, :it:)))
:it:)))
(def (input_term input term)
(-> Input Code Code)
(let [term (if (the #try? input)
- (` (.try (~ term)))
+ (` (.try (, term)))
term)]
(if (the #io? input)
- (` ((~! io.io) (~ term)))
+ (` ((,! io.io) (, term)))
term)))
(def (procedure_definition import! source it)
@@ -378,21 +378,21 @@
parameters
(list#each ..output_type :parameters:))]
- (` (.def ((~ g!it) (~+ (case g!parameters
+ (` (.def ((, g!it) (,* (case g!parameters
{.#End} (list g!it)
_ (list#each (the #mandatory) g!parameters))))
- (.All ((~ g!it) (~+ g!variables))
- (-> (~+ :input:/*)
- (~ (|> :output:
+ (.All ((, g!it) (,* g!variables))
+ (-> (,* :input:/*)
+ (, (|> :output:
..output_type
(..input_type input)))))
(.exec
- (~+ import!)
+ (,* import!)
(.as_expected
- (~ (<| (..input_term input)
+ (, (<| (..input_term input)
(..lux_optional :output:)
- (` (<apply> (.as_expected (~ source))
- [(~+ (list#each ..host_optional g!parameters))]))))))))))
+ (` (<apply> (.as_expected (, source))
+ [(,* (list#each ..host_optional g!parameters))]))))))))))
(def (namespaced namespace class alias member)
(-> Namespace Text Alias Text Text)
@@ -411,14 +411,14 @@
(case (text.all_split_by .module_separator class)
{.#Item head tail}
(list#mix (.function (_ sub super)
- (` (<get> (~ (code.text sub))
+ (` (<get> (, (code.text sub))
(.as (..Object .Any)
- (~ super)))))
- (` (<import> (~ (code.text head))))
+ (, super)))))
+ (` (<import> (, (code.text head))))
tail)
{.#End}
- (` (<import> (~ (code.text class)))))))
+ (` (<import> (, (code.text class)))))))
(def (global_definition import! it)
(-> (List Code) Global Code)
@@ -426,13 +426,13 @@
(maybe.else (the #name it))
code.local)
:output: (the #anonymous it)]
- (` (.def (~ g!name)
- (~ (..output_type :output:))
+ (` (.def (, g!name)
+ (, (..output_type :output:))
(.exec
- (~+ import!)
+ (,* import!)
(.as_expected
- (~ (<| (lux_optional :output:)
- (` (<constant> (~ (code.text (..host_path (the #name it))))))))))))))
+ (, (<| (lux_optional :output:)
+ (` (<constant> (, (code.text (..host_path (the #name it))))))))))))))
(for @.lua (these)
@.ruby (these)
@@ -448,23 +448,23 @@
:parameters: (the #parameters input)
g!parameters (..parameters :parameters:)
g!class_variables (list#each code.local class_parameters)
- g!class (` ((~ (code.local (maybe.else class_name alias))) (~+ g!class_variables)))
+ g!class (` ((, (code.local (maybe.else class_name alias))) (,* g!class_variables)))
:output: [#optional? false #mandatory g!class]]
- (` (.def ((~ g!it) (~+ (case g!parameters
+ (` (.def ((, g!it) (,* (case g!parameters
{.#End} (list g!it)
_ (list#each (the #mandatory) g!parameters))))
- (.All ((~ g!it) (~+ g!class_variables) (~+ g!input_variables))
- (.-> (~+ (list#each ..output_type :parameters:))
- (~ (|> :output:
+ (.All ((, g!it) (,* g!class_variables) (,* g!input_variables))
+ (.-> (,* (list#each ..output_type :parameters:))
+ (, (|> :output:
..output_type
(..input_type input)))))
(.as_expected
- (~ (<| (..input_term input)
+ (, (<| (..input_term input)
(..lux_optional :output:)
- (` (<new> (~ (for @.js (` (<constant> (~ (code.text (..host_path class_name)))))
+ (` (<new> (, (for @.js (` (<constant> (, (code.text (..host_path class_name)))))
@.python (` (.as ..Function
- (~ (..imported class_name))))))
- [(~+ (list#each ..host_optional g!parameters))]))))))))))
+ (, (..imported class_name))))))
+ [(,* (list#each ..host_optional g!parameters))]))))))))))
(def (static_field_definition import! [class_name class_parameters] alias namespace it)
(-> (List Code) Declaration Alias Namespace (Named Output) Code)
@@ -474,17 +474,17 @@
(..namespaced namespace class_name alias)
code.local)
:field: (the #anonymous it)]
- (` (def (~ g!it)
- ((~! syntax) ((~ g!it) [])
- (.at (~! meta.monad) (~' in)
+ (` (def (, g!it)
+ ((,! syntax) ((, g!it) [])
+ (.at (,! meta.monad) (,' in)
(.list (`' (.exec
- (~+ import!)
- (.as (~ (..output_type :field:))
- (~ (<| (lux_optional :field:)
- (for @.js (` (<constant> (~ (code.text (%.format (..host_path class_name) "." field)))))
- @.ruby (` (<constant> (~ (code.text (%.format (..host_path class_name) "::" field)))))
- (` (<get> (~ (code.text field))
- (~ (..imported class_name)))))))))))))))))
+ (,* import!)
+ (.as (, (..output_type :field:))
+ (, (<| (lux_optional :field:)
+ (for @.js (` (<constant> (, (code.text (%.format (..host_path class_name) "." field)))))
+ @.ruby (` (<constant> (, (code.text (%.format (..host_path class_name) "::" field)))))
+ (` (<get> (, (code.text field))
+ (, (..imported class_name)))))))))))))))))
(def (virtual_field_definition [class_name class_parameters] alias namespace it)
(-> Declaration Alias Namespace (Named Output) Code)
@@ -496,14 +496,14 @@
path (%.format (..host_path class_name) "." name)
:field: (the #anonymous it)
g!variables (list#each code.local class_parameters)
- g!class (` ((~ (code.local (maybe.else class_name alias))) (~+ g!variables)))]
- (` (.def ((~ g!it) (~ g!it))
- (.All ((~ g!it) (~+ g!variables))
- (.-> (~ g!class)
- (~ (..output_type :field:))))
+ g!class (` ((, (code.local (maybe.else class_name alias))) (,* g!variables)))]
+ (` (.def ((, g!it) (, g!it))
+ (.All ((, g!it) (,* g!variables))
+ (.-> (, g!class)
+ (, (..output_type :field:))))
(.as_expected
- (~ (<| (lux_optional :field:)
- (` (<get> (~ (code.text name)) (~ g!it))))))))))
+ (, (<| (lux_optional :field:)
+ (` (<get> (, (code.text name)) (, g!it))))))))))
(def (field_definition import! class alias namespace it)
(-> (List Code) Declaration Alias Namespace Field Code)
@@ -520,11 +520,11 @@
(|> it
(has #alias {.#Some name})
(..procedure_definition import!
- (for @.js (` (<constant> (~ (code.text (%.format (..host_path class_name) "." method)))))
- @.ruby (` (<constant> (~ (code.text (%.format (..host_path class_name) "::" method)))))
- (` (<get> (~ (code.text method))
+ (for @.js (` (<constant> (, (code.text (%.format (..host_path class_name) "." method)))))
+ @.ruby (` (<constant> (, (code.text (%.format (..host_path class_name) "::" method)))))
+ (` (<get> (, (code.text method))
(.as (..Object .Any)
- (~ (..imported class_name))))))))))
+ (, (..imported class_name))))))))))
(def (virtual_method_definition [class_name class_parameters] alias namespace it)
(-> Declaration Alias Namespace (Named Procedure) Code)
@@ -539,21 +539,21 @@
:parameters: (the #parameters input)
g!parameters (..parameters :parameters:)
g!class_variables (list#each code.local class_parameters)
- g!class (` ((~ (code.local (maybe.else class_name alias))) (~+ g!class_variables)))
+ g!class (` ((, (code.local (maybe.else class_name alias))) (,* g!class_variables)))
:output: (the #output procedure)]
- (` (.def ((~ g!it) (~+ (list#each (the #mandatory) g!parameters)) (~ g!it))
- (.All ((~ g!it) (~+ g!class_variables) (~+ g!input_variables))
- (.-> (~+ (list#each ..output_type :parameters:))
- (~ g!class)
- (~ (|> :output:
+ (` (.def ((, g!it) (,* (list#each (the #mandatory) g!parameters)) (, g!it))
+ (.All ((, g!it) (,* g!class_variables) (,* g!input_variables))
+ (.-> (,* (list#each ..output_type :parameters:))
+ (, g!class)
+ (, (|> :output:
..output_type
(..input_type input)))))
(.as_expected
- (~ (<| (..input_term input)
+ (, (<| (..input_term input)
(..lux_optional :output:)
- (` (<do> (~ (code.text method))
- (~ g!it)
- [(~+ (list#each ..host_optional g!parameters))])))))))))
+ (` (<do> (, (code.text method))
+ (, g!it)
+ [(,* (list#each ..host_optional g!parameters))])))))))))
(def (method_definition import! class alias namespace it)
(-> (List Code) Declaration Alias Namespace Method Code)
@@ -567,7 +567,7 @@
(let [host_module_import! (is (List Code)
(case host_module
{.#Some host_module}
- (list (` (<import> (~ (code.text host_module)))))
+ (list (` (<import> (, (code.text host_module)))))
{.#None}
(list)))]
@@ -577,7 +577,7 @@
{#Procedure it}
(in (list (..procedure_definition host_module_import!
- (` (<constant> (~ (code.text (..host_path (the #name it))))))
+ (` (<constant> (, (code.text (..host_path (the #name it))))))
it)))
{#Class it}
@@ -586,16 +586,16 @@
[class_name class_parameters] class
namespace (the #namespace it)
g!class_variables (list#each code.local class_parameters)
- declaration (` ((~ (code.local (maybe.else class_name alias)))
- (~+ g!class_variables)))]
- (in (list.partial (` (.type (~ declaration)
- (..Object (.Primitive (~ (code.text (..host_path class_name)))
- [(~+ g!class_variables)]))))
+ declaration (` ((, (code.local (maybe.else class_name alias)))
+ (,* g!class_variables)))]
+ (in (list.partial (` (.type (, declaration)
+ (..Object (.Primitive (, (code.text (..host_path class_name)))
+ [(,* g!class_variables)]))))
(list#each (.function (_ member)
(`` (`` (case member
- (~~ (for @.lua (~~ (these))
- @.ruby (~~ (these))
- (~~ (these {#Constructor it}
+ (,, (for @.lua (,, (these))
+ @.ruby (,, (these))
+ (,, (these {#Constructor it}
(..constructor_definition class alias namespace it)))))
{#Field it}
@@ -615,13 +615,13 @@
type <code>.any
term <code>.any])
(in (list (` (.<| (.as ..Function)
- (<function> (~ (code.nat (list.size inputs))))
- (.as (.-> [(~+ (list.repeated (list.size inputs) (` .Any)))]
+ (<function> (, (code.nat (list.size inputs))))
+ (.as (.-> [(,* (list.repeated (list.size inputs) (` .Any)))]
.Any))
- (.is (.-> [(~+ (list#each product.right inputs))]
- (~ type)))
- (.function ((~ (code.local self)) [(~+ (list#each product.left inputs))])
- (~ term)))))))))
+ (.is (.-> [(,* (list#each product.right inputs))]
+ (, type)))
+ (.function ((, (code.local self)) [(,* (list#each product.left inputs))])
+ (, term)))))))))
(for @.js (these (def .public type_of
(template (type_of object)
@@ -631,27 +631,27 @@
(syntax (_ [type <code>.any
[head tail] (<code>.tuple (<>.and <code>.local (<>.some <code>.local)))])
(with_symbols [g!_]
- (let [global (` ("js constant" (~ (code.text head))))]
+ (let [global (` ("js constant" (, (code.text head))))]
(case tail
{.#End}
- (in (list (` (is (.Maybe (~ type))
- (case (..type_of (~ global))
+ (in (list (` (is (.Maybe (, type))
+ (case (..type_of (, global))
"undefined"
{.#None}
- (~ g!_)
- {.#Some (as (~ type) (~ global))})))))
+ (, g!_)
+ {.#Some (as (, type) (, global))})))))
{.#Item [next tail]}
(let [separator "."]
- (in (list (` (is (.Maybe (~ type))
- (case (..type_of (~ global))
+ (in (list (` (is (.Maybe (, type))
+ (case (..type_of (, global))
"undefined"
{.#None}
- (~ g!_)
- (..global (~ type) [(~ (code.local (%.format head "." next)))
- (~+ (list#each code.local tail))]))))))))))))
+ (, g!_)
+ (..global (, type) [(, (code.local (%.format head "." next)))
+ (,* (list#each code.local tail))]))))))))))))
(def !defined?
(template (_ <global>)
@@ -748,7 +748,7 @@
<code>.any
it
(do try.monad
- [[state it] (phase archive (` (.is .Any (~ it))) state)]
+ [[state it] (phase archive (` (.is .Any (, it))) state)]
(in [state (extension_analysis name (list it))])))
(generation <undefined?>
@@ -769,7 +769,7 @@
(do [! try.monad]
[[state output] (monad.mix ! (.function (_ [key value] [state output])
(do !
- [[state value] (phase archive (` (.is .Any (~ value))) state)]
+ [[state value] (phase archive (` (.is .Any (, value))) state)]
(in [state (list.partial value (text_analysis key) output)])))
[state (list)]
it)]
@@ -812,7 +812,7 @@
(def .public object
(syntax (_ [it (<>.some <code>.any)])
(in (list (` (.as (..Object .Any)
- (<object> (~+ it))))))))
+ (<object> (,* it))))))))
)))
(these))
)
diff --git a/stdlib/source/library/lux/ffi.old.lux b/stdlib/source/library/lux/ffi.old.lux
index e35e7844d..329fce274 100644
--- a/stdlib/source/library/lux/ffi.old.lux
+++ b/stdlib/source/library/lux/ffi.old.lux
@@ -342,7 +342,7 @@
[[name params] _ _]
(let [name (safe name)
=params (list#each (class_type' mode type_params in_array?) params)]
- (` (Primitive (~ (code.text name)) [(~+ =params)])))))
+ (` (Primitive (, (code.text name)) [(,* =params)])))))
(def (class_type' mode type_params in_array? class)
(-> Primitive_Mode (List Type_Parameter) Bit GenericType Code)
@@ -364,7 +364,7 @@
{#GenericArray param}
(let [=param (class_type' mode type_params #1 param)]
- (` ((~! array.Array) (~ =param))))
+ (` ((,! array.Array) (, =param))))
(^.or {#GenericWildcard {.#None}}
{#GenericWildcard {.#Some [{#LowerBound} _]}})
@@ -393,8 +393,8 @@
{.#Item bound1 _}
(class_type {#ManualPrM} #class_params bound1))))
#class_params)]
- (` (Primitive (~ (code.text (safe #class_name)))
- [(~+ =params)]))))
+ (` (Primitive (, (code.text (safe #class_name)))
+ [(,* =params)]))))
(def type_var_class Text "java.lang.Object")
@@ -448,14 +448,14 @@
(do <>.monad
[.let [dotted_name (format "::" field_name)]
_ (<code>.this (code.symbol ["" dotted_name]))]
- (in (`' ((~ (code.text (format "jvm getstatic" ":" class_name ":" field_name))))))))
+ (in (`' ((, (code.text (format "jvm getstatic" ":" class_name ":" field_name))))))))
(def (get_var_parser class_name field_name)
(-> Text Text (Parser Code))
(do <>.monad
[.let [dotted_name (format "::" field_name)]
_ (<code>.this (code.symbol ["" dotted_name]))]
- (in (`' ((~ (code.text (format "jvm getfield" ":" class_name ":" field_name))) _jvm_this)))))
+ (in (`' ((, (code.text (format "jvm getfield" ":" class_name ":" field_name))) _jvm_this)))))
(def (put_var_parser class_name field_name)
(-> Text Text (Parser Code))
@@ -463,7 +463,7 @@
[.let [dotted_name (format "::" field_name)]
[_ _ value] (.is (Parser [Any Any Code])
(<code>.form (all <>.and (<code>.this (' :=)) (<code>.this (code.symbol ["" dotted_name])) <code>.any)))]
- (in (`' ((~ (code.text (format "jvm putfield" ":" class_name ":" field_name))) _jvm_this (~ value))))))
+ (in (`' ((, (code.text (format "jvm putfield" ":" class_name ":" field_name))) _jvm_this (, value))))))
(def (pre_walk_replace f input)
(-> (-> Code Code) Code Code)
@@ -505,8 +505,8 @@
(<code>.form (<>.after (<code>.this (' ::new!))
(<code>.tuple (<>.exactly (list.size arg_decls) <code>.any)))))
.let [arg_decls' (.is (List Text) (list#each (|>> product.right (simple_class$ params)) arg_decls))]]
- (in (` ((~ (code.text (format "jvm new" ":" class_name ":" (text.interposed "," arg_decls'))))
- (~+ args))))))
+ (in (` ((, (code.text (format "jvm new" ":" class_name ":" (text.interposed "," arg_decls'))))
+ (,* args))))))
(def (static_method_parser params class_name method_name arg_decls)
(-> (List Type_Parameter) Text Text (List ArgDecl) (Parser Code))
@@ -516,8 +516,8 @@
(<code>.form (<>.after (<code>.this (code.symbol ["" dotted_name]))
(<code>.tuple (<>.exactly (list.size arg_decls) <code>.any)))))
.let [arg_decls' (.is (List Text) (list#each (|>> product.right (simple_class$ params)) arg_decls))]]
- (in (`' ((~ (code.text (format "jvm invokestatic" ":" class_name ":" method_name ":" (text.interposed "," arg_decls'))))
- (~+ args))))))
+ (in (`' ((, (code.text (format "jvm invokestatic" ":" class_name ":" method_name ":" (text.interposed "," arg_decls'))))
+ (,* args))))))
(with_template [<name> <jvm_op>]
[(def (<name> params class_name method_name arg_decls)
@@ -528,8 +528,8 @@
(<code>.form (<>.after (<code>.this (code.symbol ["" dotted_name]))
(<code>.tuple (<>.exactly (list.size arg_decls) <code>.any)))))
.let [arg_decls' (.is (List Text) (list#each (|>> product.right (simple_class$ params)) arg_decls))]]
- (in (`' ((~ (code.text (format <jvm_op> ":" class_name ":" method_name ":" (text.interposed "," arg_decls'))))
- (~' _jvm_this) (~+ args))))))]
+ (in (`' ((, (code.text (format <jvm_op> ":" class_name ":" method_name ":" (text.interposed "," arg_decls'))))
+ (,' _jvm_this) (,* args))))))]
[special_method_parser "jvm invokespecial"]
[virtual_method_parser "jvm invokevirtual"]
@@ -1125,8 +1125,8 @@
(with_brackets (spaced (list#each generic_type$ exs)))
(with_brackets (spaced (list#each arg_decl$ arg_decls)))
(generic_type$ return_type)
- (code.format (pre_walk_replace replacer (` (let [(~ (code.local this_name)) (~' _jvm_this)]
- (~ body))))))))
+ (code.format (pre_walk_replace replacer (` (let [(, (code.local this_name)) (,' _jvm_this)]
+ (, body))))))))
{#OverridenMethod strict_fp? class_decl type_vars this_name arg_decls return_type body exs}
(let [super_replacer (parser_replacer (<code>.form (do <>.monad
@@ -1134,11 +1134,11 @@
args (<code>.tuple (<>.exactly (list.size arg_decls) <code>.any))
.let [arg_decls' (.is (List Text) (list#each (|>> product.right (simple_class$ (list)))
arg_decls))]]
- (in (`' ((~ (code.text (format "jvm invokespecial"
+ (in (`' ((, (code.text (format "jvm invokespecial"
":" (the #super_class_name super_class)
":" name
":" (text.interposed "," arg_decls'))))
- (~' _jvm_this) (~+ args)))))))]
+ (,' _jvm_this) (,* args)))))))]
(with_parens
(spaced (list "override"
(class_decl$ class_decl)
@@ -1149,8 +1149,8 @@
(with_brackets (spaced (list#each generic_type$ exs)))
(with_brackets (spaced (list#each arg_decl$ arg_decls)))
(generic_type$ return_type)
- (|> (` (let [(~ (code.local this_name)) (~' _jvm_this)]
- (~ body)))
+ (|> (` (let [(, (code.local this_name)) (,' _jvm_this)]
+ (, body)))
(pre_walk_replace replacer)
(pre_walk_replace super_replacer)
(code.format))
@@ -1194,7 +1194,7 @@
(def (complete_call$ g!obj [method args])
(-> Code Partial_Call Code)
- (` ((~ (code.symbol method)) (~+ args) (~ g!obj))))
+ (` ((, (code.symbol method)) (,* args) (, g!obj))))
... [Syntax]
(def object_super_class
@@ -1230,7 +1230,7 @@
(with_brackets (spaced (list#each annotation$ annotations)))
(with_brackets (spaced (list#each field_decl$ fields)))
(with_brackets (spaced (list#each (method_def$ replacer super) methods))))))]]
- (in (list (` ((~ (code.text def_code)))))))))
+ (in (list (` ((, (code.text def_code)))))))))
(def .public interface
(syntax (_ [class_decl ..class_decl^
@@ -1244,7 +1244,7 @@
(with_brackets (spaced (list#each super_class_decl$ supers)))
(with_brackets (spaced (list#each annotation$ annotations)))
(spaced (list#each method_decl$ members)))))]
- (in (list (` ((~ (code.text def_code)))))))))
+ (in (list (` ((, (code.text def_code)))))))))
(def .public object
(syntax (_ [class_vars (<code>.tuple (<>.some ..type_param^))
@@ -1259,7 +1259,7 @@
(with_brackets (spaced (list#each super_class_decl$ interfaces)))
(with_brackets (spaced (list#each constructor_arg$ constructor_args)))
(with_brackets (spaced (list#each (method_def$ function.identity super) methods))))))]
- (in (list (` ((~ (code.text def_code)))))))))
+ (in (list (` ((, (code.text def_code)))))))))
(def .public null
(syntax (_ [])
@@ -1272,17 +1272,17 @@
(def .public ???
(syntax (_ [expr <code>.any])
(with_symbols [g!temp]
- (in (list (` (let [(~ g!temp) (~ expr)]
- (if ("jvm object null?" (~ g!temp))
+ (in (list (` (let [(, g!temp) (, expr)]
+ (if ("jvm object null?" (, g!temp))
{.#None}
- {.#Some (~ g!temp)}))))))))
+ {.#Some (, g!temp)}))))))))
(def .public !!!
(syntax (_ [expr <code>.any])
(with_symbols [g!value]
- (in (list (` (.case (~ expr)
- {.#Some (~ g!value)}
- (~ g!value)
+ (in (list (` (.case (, expr)
+ {.#Some (, g!value)}
+ (, g!value)
{.#None}
("jvm object null"))))))))
@@ -1292,46 +1292,46 @@
unchecked (<>.maybe <code>.any)])
(with_symbols [g!_ g!unchecked]
(let [class_name (simple_class$ (list) class)
- class_type (` (.Primitive (~ (code.text class_name))))
- check_type (` (.Maybe (~ class_type)))
- check_code (` (if ((~ (code.text (format "jvm instanceof" ":" class_name))) (~ g!unchecked))
- {.#Some (.as (~ class_type)
- (~ g!unchecked))}
+ class_type (` (.Primitive (, (code.text class_name))))
+ check_type (` (.Maybe (, class_type)))
+ check_code (` (if ((, (code.text (format "jvm instanceof" ":" class_name))) (, g!unchecked))
+ {.#Some (.as (, class_type)
+ (, g!unchecked))}
{.#None}))]
(case unchecked
{.#Some unchecked}
- (in (list (` (.is (~ check_type)
- (let [(~ g!unchecked) (~ unchecked)]
- (~ check_code))))))
+ (in (list (` (.is (, check_type)
+ (let [(, g!unchecked) (, unchecked)]
+ (, check_code))))))
{.#None}
- (in (list (` (.is (-> (Primitive "java.lang.Object") (~ check_type))
- (function ((~ g!_) (~ g!unchecked))
- (~ check_code))))))
+ (in (list (` (.is (-> (Primitive "java.lang.Object") (, check_type))
+ (function ((, g!_) (, g!unchecked))
+ (, check_code))))))
)))))
(def .public synchronized
(syntax (_ [lock <code>.any
body <code>.any])
- (in (list (` ("jvm object synchronized" (~ lock) (~ body)))))))
+ (in (list (` ("jvm object synchronized" (, lock) (, body)))))))
(def .public do_to
(syntax (_ [obj <code>.any
methods (<>.some partial_call^)])
(with_symbols [g!obj]
- (in (list (` (let [(~ g!obj) (~ obj)]
- (exec (~+ (list#each (complete_call$ g!obj) methods))
- (~ g!obj)))))))))
+ (in (list (` (let [(, g!obj) (, obj)]
+ (exec (,* (list#each (complete_call$ g!obj) methods))
+ (, g!obj)))))))))
(def (class_import$ [full_name params])
(-> Class_Declaration Code)
(let [params' (list#each (|>> product.left code.local) params)]
(template.with_locals [g!_]
- (` (def (~ (code.symbol ["" full_name]))
+ (` (def (, (code.symbol ["" full_name]))
Type
- (All ((~ (' g!_)) (~+ params'))
- (Primitive (~ (code.text (safe full_name)))
- [(~+ params')])))))))
+ (All ((, (' g!_)) (,* params'))
+ (Primitive (, (code.text (safe full_name)))
+ [(,* params')])))))))
(def (member_type_vars class_tvars member)
(-> (List Type_Parameter) Import_Member_Declaration (List Type_Parameter))
@@ -1369,7 +1369,7 @@
(function (_ [maybe? arg])
(let [arg_type (class_type (the #import_member_mode commons) type_params arg)]
(if maybe?
- (` (Maybe (~ arg_type)))
+ (` (Maybe (, arg_type)))
arg_type))))
#import_member_args)]]
(in [arg_inputs arg_classes arg_types])))
@@ -1382,13 +1382,13 @@
(case member
(^.or {#ConstructorDecl [commons _]} {#MethodDecl [commons _]})
(if (the #import_member_maybe? commons)
- (` (??? (~ return_term)))
- (let [g!temp (` ((~' ~') (~ (code.symbol ["" " Ω "]))))]
- (` (let [(~ g!temp) (~ return_term)]
+ (` (??? (, return_term)))
+ (let [g!temp (` ((,' ,') (, (code.symbol ["" " Ω "]))))]
+ (` (let [(, g!temp) (, return_term)]
(if (not (..null? (.as (Primitive "java.lang.Object")
- (~ g!temp))))
- (~ g!temp)
- (panic! (~ (code.text (format "Cannot produce null references from method calls @ "
+ (, g!temp))))
+ (, g!temp)
+ (panic! (, (code.text (format "Cannot produce null references from method calls @ "
(the #class_name class)
"." (the #import_member_alias commons))))))))))
@@ -1407,8 +1407,8 @@
_
return_term))]
- [decorate_return_try #import_member_try? (` (.try (~ return_term)))]
- [decorate_return_io #import_member_io? (` ((~! io.io) (~ return_term)))]
+ [decorate_return_try #import_member_try? (` (.try (, return_term)))]
+ [decorate_return_io #import_member_io? (` ((,! io.io) (, return_term)))]
)
(def (free_type_param? [name bounds])
@@ -1437,14 +1437,14 @@
(def (un_quote quoted)
(-> Code Code)
- (` ((~' ~) (~ quoted))))
+ (` ((,' ,) (, quoted))))
(def (jvm_extension_inputs mode classes inputs)
(-> Primitive_Mode (List Text) (List [Bit Code]) (List Code))
(|> inputs
(list#each (function (_ [maybe? input])
(if maybe?
- (` ((~! !!!) (~ (un_quote input))))
+ (` ((,! !!!) (, (un_quote input))))
(un_quote input))))
(list.zipped_2 classes)
(list#each (auto_convert_input mode))))
@@ -1458,7 +1458,7 @@
(def syntax_inputs
(-> (List Code) (List Code))
(|>> (list#each (function (_ name)
- (list name (` (~! <code>.any)))))
+ (list name (` (,! <code>.any)))))
list#conjoint))
(def (member_def_interop type_params kind class [arg_function_inputs arg_classes arg_types] member method_prefix import_format)
@@ -1475,33 +1475,33 @@
[.let [enum_type (.is Code
(case class_tvars
{.#End}
- (` (Primitive (~ (code.text full_name))))
+ (` (Primitive (, (code.text full_name))))
_
(let [=class_tvars (|> class_tvars
(list.only free_type_param?)
(list#each lux_type_parameter))]
- (` (All ((~ g!_) (~+ =class_tvars)) (Primitive (~ (code.text full_name)) [(~+ =class_tvars)]))))))
+ (` (All ((, g!_) (,* =class_tvars)) (Primitive (, (code.text full_name)) [(,* =class_tvars)]))))))
getter_interop (.is (-> Text Code)
(function (_ name)
(let [getter_name (code.symbol ["" (..import_name import_format method_prefix name)])]
- (` (def (~ getter_name)
- (~ enum_type)
- ((~ (code.text (format "jvm getstatic" ":" full_name ":" name)))))))))]]
+ (` (def (, getter_name)
+ (, enum_type)
+ ((, (code.text (format "jvm getstatic" ":" full_name ":" name)))))))))]]
(in (list#each getter_interop enum_members))))
{#ConstructorDecl [commons _]}
(do meta.monad
[.let [def_name (code.symbol ["" (..import_name import_format method_prefix (the #import_member_alias commons))])
jvm_extension (code.text (format "jvm new" ":" full_name ":" (text.interposed "," arg_classes)))
- jvm_interop (|> (` ((~ jvm_extension)
- (~+ (jvm_extension_inputs (the #import_member_mode commons) arg_classes arg_function_inputs))))
+ jvm_interop (|> (` ((, jvm_extension)
+ (,* (jvm_extension_inputs (the #import_member_mode commons) arg_classes arg_function_inputs))))
(decorate_return_maybe class member)
(decorate_return_try member)
(decorate_return_io member))]]
- (in (list (` (def (~ def_name)
- ((~! syntax) ((~ def_name) [(~+ (syntax_inputs (list#each product.right arg_function_inputs)))])
- ((~' in) (.list (.` (~ jvm_interop))))))))))
+ (in (list (` (def (, def_name)
+ ((,! syntax) ((, def_name) [(,* (syntax_inputs (list#each product.right arg_function_inputs)))])
+ ((,' in) (.list (.` (, jvm_interop))))))))))
{#MethodDecl [commons method]}
(with_symbols [g!obj]
@@ -1527,16 +1527,16 @@
)))
jvm_extension (code.text (format "jvm " jvm_op ":" full_name ":" #import_method_name ":" (text.interposed "," arg_classes)))
jvm_interop (|> [(simple_class$ (list) (the #import_method_return method))
- (` ((~ jvm_extension) (~+ (list#each un_quote object_ast))
- (~+ (jvm_extension_inputs (the #import_member_mode commons) arg_classes arg_function_inputs))))]
+ (` ((, jvm_extension) (,* (list#each un_quote object_ast))
+ (,* (jvm_extension_inputs (the #import_member_mode commons) arg_classes arg_function_inputs))))]
(auto_convert_output (the #import_member_mode commons))
(decorate_return_maybe class member)
(decorate_return_try member)
(decorate_return_io member))]]
- (in (list (` (def (~ def_name)
- ((~! syntax) ((~ def_name) [(~+ (syntax_inputs (list#each product.right arg_function_inputs)))
- (~+ (syntax_inputs object_ast))])
- ((~' in) (.list (.` (~ jvm_interop)))))))))))
+ (in (list (` (def (, def_name)
+ ((,! syntax) ((, def_name) [(,* (syntax_inputs (list#each product.right arg_function_inputs)))
+ (,* (syntax_inputs object_ast))])
+ ((,' in) (.list (.` (, jvm_interop)))))))))))
{#FieldAccessDecl fad}
(do meta.monad
@@ -1544,7 +1544,7 @@
base_gtype (class_type #import_field_mode type_params #import_field_type)
classC (class_decl_type$ class)
typeC (if #import_field_maybe?
- (` (Maybe (~ base_gtype)))
+ (` (Maybe (, base_gtype)))
base_gtype)
tvar_asts (.is (List Code)
(|> class_tvars
@@ -1554,35 +1554,35 @@
setter_name (code.symbol ["" (..import_name import_format method_prefix (format #import_field_name "!"))])]
getter_interop (with_symbols [g!obj]
(let [getter_call (if #import_field_static?
- (` ((~ getter_name) []))
- (` ((~ getter_name) [(~ g!obj) (~! <code>.any)])))
+ (` ((, getter_name) []))
+ (` ((, getter_name) [(, g!obj) (,! <code>.any)])))
getter_body (<| (auto_convert_output #import_field_mode)
[(simple_class$ (list) #import_field_type)
(if #import_field_static?
(let [jvm_extension (code.text (format "jvm getstatic" ":" full_name ":" #import_field_name))]
- (` ((~ jvm_extension))))
+ (` ((, jvm_extension))))
(let [jvm_extension (code.text (format "jvm getfield" ":" full_name ":" #import_field_name))]
- (` ((~ jvm_extension) (~ (un_quote g!obj))))))])
+ (` ((, jvm_extension) (, (un_quote g!obj))))))])
getter_body (if #import_field_maybe?
- (` ((~! ???) (~ getter_body)))
+ (` ((,! ???) (, getter_body)))
getter_body)
getter_body (if #import_field_setter?
- (` ((~! io.io) (~ getter_body)))
+ (` ((,! io.io) (, getter_body)))
getter_body)]
- (in (` (def (~ getter_name)
- ((~! syntax) (~ getter_call)
- ((~' in) (.list (.` (~ getter_body))))))))))
+ (in (` (def (, getter_name)
+ ((,! syntax) (, getter_call)
+ ((,' in) (.list (.` (, getter_body))))))))))
setter_interop (.is (Meta (List Code))
(if #import_field_setter?
(with_symbols [g!obj g!value]
(let [setter_call (if #import_field_static?
- (` ((~ setter_name) [(~ g!value) (~! <code>.any)]))
- (` ((~ setter_name) [(~ g!value) (~! <code>.any)
- (~ g!obj) (~! <code>.any)])))
+ (` ((, setter_name) [(, g!value) (,! <code>.any)]))
+ (` ((, setter_name) [(, g!value) (,! <code>.any)
+ (, g!obj) (,! <code>.any)])))
setter_value (auto_convert_input #import_field_mode
[(simple_class$ (list) #import_field_type) (un_quote g!value)])
setter_value (if #import_field_maybe?
- (` ((~! !!!) (~ setter_value)))
+ (` ((,! !!!) (, setter_value)))
setter_value)
setter_command (format (if #import_field_static? "jvm putstatic" "jvm putfield")
":" full_name ":" #import_field_name)
@@ -1590,9 +1590,9 @@
(if #import_field_static?
(list)
(list (un_quote g!obj))))]
- (in (list (` (def (~ setter_name)
- ((~! syntax) (~ setter_call)
- ((~' in) (.list (.` ((~! io.io) ((~ (code.text setter_command)) (~+ g!obj+) (~ setter_value)))))))))))))
+ (in (list (` (def (, setter_name)
+ ((,! syntax) (, setter_call)
+ ((,' in) (.list (.` ((,! io.io) ((, (code.text setter_command)) (,* g!obj+) (, setter_value)))))))))))))
(in (list))))]
(in (list.partial getter_interop setter_interop)))
)))
@@ -1645,7 +1645,7 @@
(case type
(^.with_template [<type> <array_op>]
[(pattern {#GenericClass <type> (list)})
- (in (list (` (<array_op> (~ size)))))])
+ (in (list (` (<array_op> (, size)))))])
(["boolean" "jvm znewarray"]
["byte" "jvm bnewarray"]
["short" "jvm snewarray"]
@@ -1656,11 +1656,11 @@
["char" "jvm cnewarray"])
_
- (in (list (` ("jvm anewarray" (~ (code.text (generic_type$ type))) (~ size))))))))
+ (in (list (` ("jvm anewarray" (, (code.text (generic_type$ type))) (, size))))))))
(def .public length
(syntax (_ [array <code>.any])
- (in (list (` ("jvm arraylength" (~ array)))))))
+ (in (list (` ("jvm arraylength" (, array)))))))
(def (type_class_name type)
(-> Type (Meta Text))
@@ -1695,7 +1695,7 @@
(case array_jvm_type
(^.with_template [<type> <array_op>]
[<type>
- (in (list (` (<array_op> (~ array) (~ idx)))))])
+ (in (list (` (<array_op> (, array) (, idx)))))])
(["[Z" "jvm zaload"]
["[B" "jvm baload"]
["[S" "jvm saload"]
@@ -1706,12 +1706,12 @@
["[C" "jvm caload"])
_
- (in (list (` ("jvm aaload" (~ array) (~ idx)))))))
+ (in (list (` ("jvm aaload" (, array) (, idx)))))))
_
(with_symbols [g!array]
- (in (list (` (let [(~ g!array) (~ array)]
- (..read! (~ idx) (~ g!array))))))))))
+ (in (list (` (let [(, g!array) (, array)]
+ (..read! (, idx) (, g!array))))))))))
(def .public write!
(syntax (_ [idx <code>.any
@@ -1725,7 +1725,7 @@
(case array_jvm_type
(^.with_template [<type> <array_op>]
[<type>
- (in (list (` (<array_op> (~ array) (~ idx) (~ value)))))])
+ (in (list (` (<array_op> (, array) (, idx) (, value)))))])
(["[Z" "jvm zastore"]
["[B" "jvm bastore"]
["[S" "jvm sastore"]
@@ -1736,16 +1736,16 @@
["[C" "jvm castore"])
_
- (in (list (` ("jvm aastore" (~ array) (~ idx) (~ value)))))))
+ (in (list (` ("jvm aastore" (, array) (, idx) (, value)))))))
_
(with_symbols [g!array]
- (in (list (` (let [(~ g!array) (~ array)]
- (..write! (~ idx) (~ value) (~ g!array))))))))))
+ (in (list (` (let [(, g!array) (, array)]
+ (..write! (, idx) (, value) (, g!array))))))))))
(def .public class_for
(syntax (_ [type (..generic_type^ (list))])
- (in (list (` ("jvm object class" (~ (code.text (simple_class$ (list) type)))))))))
+ (in (list (` ("jvm object class" (, (code.text (simple_class$ (list) type)))))))))
(def .public type
(syntax (_ [type (..generic_type^ (list))])
diff --git a/stdlib/source/library/lux/ffi.php.lux b/stdlib/source/library/lux/ffi.php.lux
index 42df739ad..fecdf259a 100644
--- a/stdlib/source/library/lux/ffi.php.lux
+++ b/stdlib/source/library/lux/ffi.php.lux
@@ -141,15 +141,15 @@
(def (nullable_type [nullable? type])
(-> Nullable Code)
(if nullable?
- (` (.Maybe (~ type)))
+ (` (.Maybe (, type)))
type))
(def (with_null g!temp [nullable? input])
(-> Code [Bit Code] Code)
(if nullable?
- (` (case (~ input)
- {.#Some (~ g!temp)}
- (~ g!temp)
+ (` (case (, input)
+ {.#Some (, g!temp)}
+ (, g!temp)
{.#Null}
("php object null")))
@@ -158,13 +158,13 @@
(def (without_null g!temp [nullable? outputT] output)
(-> Code Nullable Code Code)
(if nullable?
- (` (let [(~ g!temp) (~ output)]
- (if ("php object null?" (~ g!temp))
+ (` (let [(, g!temp) (, output)]
+ (if ("php object null?" (, g!temp))
{.#None}
- {.#Some (~ g!temp)})))
- (` (let [(~ g!temp) (~ output)]
- (if (not ("php object null?" (~ g!temp)))
- (~ g!temp)
+ {.#Some (, g!temp)})))
+ (` (let [(, g!temp) (, output)]
+ (if (not ("php object null?" (, g!temp)))
+ (, g!temp)
(.panic! "Null is an invalid value!"))))))
(type Import
@@ -194,48 +194,48 @@
... {.#Left error}
... (recover_from_failure error)))}
- (in (list (` ("lux try" ((~! io.io) (~ expression))))))))
+ (in (list (` ("lux try" ((,! io.io) (, expression))))))))
(def (with_io with? without)
(-> Bit Code Code)
(if with?
- (` ((~! io.io) (~ without)))
+ (` ((,! io.io) (, without)))
without))
(def (io_type io? rawT)
(-> Bit Code Code)
(if io?
- (` ((~! io.IO) (~ rawT)))
+ (` ((,! io.IO) (, rawT)))
rawT))
(def (with_try with? without_try)
(-> Bit Code Code)
(if with?
- (` (..try (~ without_try)))
+ (` (..try (, without_try)))
without_try))
(def (try_type try? rawT)
(-> Bit Code Code)
(if try?
- (` (.Either .Text (~ rawT)))
+ (` (.Either .Text (, rawT)))
rawT))
(def (make_function g!method g!temp source inputsT io? try? outputT)
(-> Code Code Code (List Nullable) Bit Bit Nullable Code)
(let [g!inputs (input_variables inputsT)]
- (` (def ((~ g!method)
- [(~+ (list#each product.right g!inputs))])
- (-> [(~+ (list#each nullable_type inputsT))]
- (~ (|> (nullable_type outputT)
+ (` (def ((, g!method)
+ [(,* (list#each product.right g!inputs))])
+ (-> [(,* (list#each nullable_type inputsT))]
+ (, (|> (nullable_type outputT)
(try_type try?)
(io_type io?))))
(as_expected
- (~ (<| (with_io io?)
+ (, (<| (with_io io?)
(with_try try?)
(without_null g!temp outputT)
(` ("php apply"
- (as ..Function (~ source))
- (~+ (list#each (with_null g!temp) g!inputs)))))))))))
+ (as ..Function (, source))
+ (,* (list#each (with_null g!temp) g!inputs)))))))))))
(def .public import
(syntax (_ [import ..import])
@@ -250,34 +250,34 @@
(text.replaced "[0]" member_name)
code.local)))
g!type (code.local (maybe.else class alias))
- class_import (` ("php constant" (~ (code.text class))))]
- (in (list.partial (` (type (~ g!type)
- (..Object (Primitive (~ (code.text class))))))
+ class_import (` ("php constant" (, (code.text class))))]
+ (in (list.partial (` (type (, g!type)
+ (..Object (Primitive (, (code.text class))))))
(list#each (function (_ member)
(case member
{#Field [static? field alias fieldT]}
(let [g!field (qualify (maybe.else field alias))]
(if static?
- (` (def (~ g!field)
- ((~! syntax) ((~ g!field) [])
- (at (~! meta.monad) (~' in)
- (list (` (.as (~ (nullable_type fieldT))
- ("php constant" (~ (code.text (%.format class "::" field)))))))))))
- (` (def ((~ g!field) (~ g!object))
- (-> (~ g!type)
- (~ (nullable_type fieldT)))
+ (` (def (, g!field)
+ ((,! syntax) ((, g!field) [])
+ (at (,! meta.monad) (,' in)
+ (list (` (.as (, (nullable_type fieldT))
+ ("php constant" (, (code.text (%.format class "::" field)))))))))))
+ (` (def ((, g!field) (, g!object))
+ (-> (, g!type)
+ (, (nullable_type fieldT)))
(as_expected
- (~ (without_null g!temp fieldT (` ("php object get" (~ (code.text field))
- (as (..Object .Any) (~ g!object)))))))))))
+ (, (without_null g!temp fieldT (` ("php object get" (, (code.text field))
+ (as (..Object .Any) (, g!object)))))))))))
{#Method method}
(case method
{#Static [method alias inputsT io? try? outputT]}
(..make_function (qualify (maybe.else method alias))
g!temp
- (` ("php object get" (~ (code.text method))
+ (` ("php object get" (, (code.text method))
(as (..Object .Any)
- ("php constant" (~ (code.text (%.format class "::" method)))))))
+ ("php constant" (, (code.text (%.format class "::" method)))))))
inputsT
io?
try?
@@ -285,26 +285,26 @@
{#Virtual [method alias inputsT io? try? outputT]}
(let [g!inputs (input_variables inputsT)]
- (` (def ((~ (qualify (maybe.else method alias)))
- [(~+ (list#each product.right g!inputs))]
- (~ g!object))
- (-> [(~+ (list#each nullable_type inputsT))]
- (~ g!type)
- (~ (|> (nullable_type outputT)
+ (` (def ((, (qualify (maybe.else method alias)))
+ [(,* (list#each product.right g!inputs))]
+ (, g!object))
+ (-> [(,* (list#each nullable_type inputsT))]
+ (, g!type)
+ (, (|> (nullable_type outputT)
(try_type try?)
(io_type io?))))
(as_expected
- (~ (<| (with_io io?)
+ (, (<| (with_io io?)
(with_try try?)
(without_null g!temp outputT)
(` ("php object do"
- (~ (code.text method))
- (~ g!object)
- (~+ (list#each (with_null g!temp) g!inputs)))))))))))))
+ (, (code.text method))
+ (, g!object)
+ (,* (list#each (with_null g!temp) g!inputs)))))))))))))
members)))))
{#Function [name alias inputsT io? try? outputT]}
- (let [imported (` ("php constant" (~ (code.text name))))]
+ (let [imported (` ("php constant" (, (code.text name))))]
(in (list (..make_function (code.local (maybe.else name alias))
g!temp
imported
@@ -314,10 +314,10 @@
outputT))))
{#Constant [_ name alias fieldT]}
- (let [imported (` ("php constant" (~ (code.text name))))
+ (let [imported (` ("php constant" (, (code.text name))))
g!name (code.local (maybe.else name alias))]
- (in (list (` (def (~ g!name)
- ((~! syntax) ((~ g!name) [])
- (at (~! meta.monad) (~' in)
- (list (` (.as (~ (nullable_type fieldT)) (~ imported)))))))))))
+ (in (list (` (def (, g!name)
+ ((,! syntax) ((, g!name) [])
+ (at (,! meta.monad) (,' in)
+ (list (` (.as (, (nullable_type fieldT)) (, imported)))))))))))
))))
diff --git a/stdlib/source/library/lux/ffi.scm.lux b/stdlib/source/library/lux/ffi.scm.lux
index 04d157393..a324365fa 100644
--- a/stdlib/source/library/lux/ffi.scm.lux
+++ b/stdlib/source/library/lux/ffi.scm.lux
@@ -113,15 +113,15 @@
(def (nilable_type [nilable? type])
(-> Nilable Code)
(if nilable?
- (` (.Maybe (~ type)))
+ (` (.Maybe (, type)))
type))
(def (with_nil g!temp [nilable? input])
(-> Code [Bit Code] Code)
(if nilable?
- (` (case (~ input)
- {.#Some (~ g!temp)}
- (~ g!temp)
+ (` (case (, input)
+ {.#Some (, g!temp)}
+ (, g!temp)
{.#None}
("scheme object nil")))
@@ -130,13 +130,13 @@
(def (without_nil g!temp [nilable? outputT] output)
(-> Code Nilable Code Code)
(if nilable?
- (` (let [(~ g!temp) (~ output)]
- (if ("scheme object nil?" (~ g!temp))
+ (` (let [(, g!temp) (, output)]
+ (if ("scheme object nil?" (, g!temp))
{.#None}
- {.#Some (~ g!temp)})))
- (` (let [(~ g!temp) (~ output)]
- (if (not ("scheme object nil?" (~ g!temp)))
- (~ g!temp)
+ {.#Some (, g!temp)})))
+ (` (let [(, g!temp) (, output)]
+ (if (not ("scheme object nil?" (, g!temp)))
+ (, g!temp)
(.panic! "Nil is an invalid value!"))))))
(type Import
@@ -159,55 +159,55 @@
... {.#Left error}
... (recover_from_failure error)))}
- (in (list (` ("lux try" ((~! io.io) (~ expression))))))))
+ (in (list (` ("lux try" ((,! io.io) (, expression))))))))
(def (with_io with? without)
(-> Bit Code Code)
(if with?
- (` ((~! io.io) (~ without)))
+ (` ((,! io.io) (, without)))
without))
(def (io_type io? rawT)
(-> Bit Code Code)
(if io?
- (` ((~! io.IO) (~ rawT)))
+ (` ((,! io.IO) (, rawT)))
rawT))
(def (with_try with? without_try)
(-> Bit Code Code)
(if with?
- (` (..try (~ without_try)))
+ (` (..try (, without_try)))
without_try))
(def (try_type try? rawT)
(-> Bit Code Code)
(if try?
- (` (.Either .Text (~ rawT)))
+ (` (.Either .Text (, rawT)))
rawT))
(def (make_function g!method g!temp source inputsT io? try? outputT)
(-> Code Code Code (List Nilable) Bit Bit Nilable Code)
(let [g!inputs (input_variables inputsT)]
- (` (def ((~ g!method)
- [(~+ (list#each product.right g!inputs))])
- (-> [(~+ (list#each nilable_type inputsT))]
- (~ (|> (nilable_type outputT)
+ (` (def ((, g!method)
+ [(,* (list#each product.right g!inputs))])
+ (-> [(,* (list#each nilable_type inputsT))]
+ (, (|> (nilable_type outputT)
(try_type try?)
(io_type io?))))
(as_expected
- (~ (<| (with_io io?)
+ (, (<| (with_io io?)
(with_try try?)
(without_nil g!temp outputT)
(` ("scheme apply"
- (as ..Function (~ source))
- (~+ (list#each (with_nil g!temp) g!inputs)))))))))))
+ (as ..Function (, source))
+ (,* (list#each (with_nil g!temp) g!inputs)))))))))))
(def .public import
(syntax (_ [import ..import])
(with_symbols [g!temp]
(case import
{#Function [name alias inputsT io? try? outputT]}
- (let [imported (` ("scheme constant" (~ (code.text name))))]
+ (let [imported (` ("scheme constant" (, (code.text name))))]
(in (list (..make_function (code.local (maybe.else name alias))
g!temp
imported
@@ -217,10 +217,10 @@
outputT))))
{#Constant [_ name alias fieldT]}
- (let [imported (` ("scheme constant" (~ (code.text name))))
+ (let [imported (` ("scheme constant" (, (code.text name))))
g!name (code.local (maybe.else name alias))]
- (in (list (` (def (~ g!name)
- ((~! syntax) ((~ g!name) [])
- (at (~! meta.monad) (~' in)
- (list (` (.as (~ (nilable_type fieldT)) (~ imported)))))))))))
+ (in (list (` (def (, g!name)
+ ((,! syntax) ((, g!name) [])
+ (at (,! meta.monad) (,' in)
+ (list (` (.as (, (nilable_type fieldT)) (, imported)))))))))))
))))
diff --git a/stdlib/source/library/lux/ffi/export.js.lux b/stdlib/source/library/lux/ffi/export.js.lux
index 2a0d25f6f..511ef27a2 100644
--- a/stdlib/source/library/lux/ffi/export.js.lux
+++ b/stdlib/source/library/lux/ffi/export.js.lux
@@ -94,4 +94,4 @@
(monad.each ! ..definition)))
(at ! conjoint)
(at ! each (list#each (function (_ [name term])
- (` (<extension> (~ (code.text name)) (~ term)))))))))))
+ (` (<extension> (, (code.text name)) (, term)))))))))))
diff --git a/stdlib/source/library/lux/ffi/export.jvm.lux b/stdlib/source/library/lux/ffi/export.jvm.lux
index 876491f0a..95a779da2 100644
--- a/stdlib/source/library/lux/ffi/export.jvm.lux
+++ b/stdlib/source/library/lux/ffi/export.jvm.lux
@@ -77,32 +77,32 @@
_
{.#None}))
exports))]
- (in (list (` (//.class "final" (~ (code.local api))
- (~+ (list#each (.function (_ it)
+ (in (list (` (//.class "final" (, (code.local api))
+ (,* (list#each (.function (_ it)
(case it
{#Constant [name type term]}
- (` ("public" "final" "static" (~ (code.local name)) (~ type)))
+ (` ("public" "final" "static" (, (code.local name)) (, type)))
{#Function [[variables name requirements] type term]}
(` ("public" "strict" "static"
- [(~+ (list#each code.local variables))]
- ((~ (code.local name))
- [(~+ (|> requirements
+ [(,* (list#each code.local variables))]
+ ((, (code.local name))
+ [(,* (|> requirements
(list#each (.function (_ [name type])
(list (code.local name)
type)))
list#conjoint))])
- (~ type)
- (~ term)))))
+ (, type)
+ (, term)))))
exports))
... Useless constructor
- ("private" [] ((~' new) (~' self) []) [] [])
- ("public" "strict" "static" [] ((~' <clinit>) [])
- (~' void)
- [(~+ (list#each (.function (_ [name type term])
+ ("private" [] ((,' new) (,' self) []) [] [])
+ ("public" "strict" "static" [] ((,' <clinit>) [])
+ (,' void)
+ [(,* (list#each (.function (_ [name type term])
(` ("jvm member put static"
- (~ (code.text api))
- (~ (code.text name))
- ("jvm object cast" (~ term)))))
+ (, (code.text api))
+ (, (code.text name))
+ ("jvm object cast" (, term)))))
initialization))])
)))))))
diff --git a/stdlib/source/library/lux/ffi/export.lua.lux b/stdlib/source/library/lux/ffi/export.lua.lux
index ef326c6ab..13efe101b 100644
--- a/stdlib/source/library/lux/ffi/export.lua.lux
+++ b/stdlib/source/library/lux/ffi/export.lua.lux
@@ -110,4 +110,4 @@
(monad.each ! ..definition)))
(at ! conjoint)
(at ! each (list#each (function (_ [name term])
- (` (<extension> (~ (code.text name)) (~ term)))))))))))
+ (` (<extension> (, (code.text name)) (, term)))))))))))
diff --git a/stdlib/source/library/lux/ffi/export.py.lux b/stdlib/source/library/lux/ffi/export.py.lux
index 4c1fe2cc0..9427d0b4c 100644
--- a/stdlib/source/library/lux/ffi/export.py.lux
+++ b/stdlib/source/library/lux/ffi/export.py.lux
@@ -87,4 +87,4 @@
(monad.each ! ..definition)))
(at ! conjoint)
(at ! each (list#each (function (_ [name term])
- (` (<extension> (~ (code.text name)) (~ term)))))))))))
+ (` (<extension> (, (code.text name)) (, term)))))))))))
diff --git a/stdlib/source/library/lux/ffi/export.rb.lux b/stdlib/source/library/lux/ffi/export.rb.lux
index ff00305b6..f11e4e0c4 100644
--- a/stdlib/source/library/lux/ffi/export.rb.lux
+++ b/stdlib/source/library/lux/ffi/export.rb.lux
@@ -136,10 +136,10 @@
(monad.each ! ..definition)))
(at ! conjoint)
(at ! each (list#each (function (_ [name term])
- (` (<extension> (~+ (case name
+ (` (<extension> (,* (case name
{#Method name}
(list (code.bit #0) (code.text name))
{#Global name}
(list (code.bit #1) (code.text name))))
- (~ term)))))))))))
+ (, term)))))))))))
diff --git a/stdlib/source/library/lux/locale/language.lux b/stdlib/source/library/lux/locale/language.lux
index f5d9b051f..c5b008d11 100644
--- a/stdlib/source/library/lux/locale/language.lux
+++ b/stdlib/source/library/lux/locale/language.lux
@@ -39,7 +39,7 @@
Language
<definition>)]
- (~~ (template.spliced <alias>+))))]
+ (,, (template.spliced <alias>+))))]
<bundle>'
))]
diff --git a/stdlib/source/library/lux/locale/territory.lux b/stdlib/source/library/lux/locale/territory.lux
index f89f8a619..153e0afd9 100644
--- a/stdlib/source/library/lux/locale/territory.lux
+++ b/stdlib/source/library/lux/locale/territory.lux
@@ -43,7 +43,7 @@
(`` (with_template [<neighbor>]
[(def .public <neighbor> Territory <main>)]
- (~~ (template.spliced <neighbor>+))))]
+ (,, (template.spliced <neighbor>+))))]
["AF" "AFG" 004 "Afghanistan" afghanistan []]
["AX" "ALA" 248 "Ã…land Islands" aland_islands []]
diff --git a/stdlib/source/library/lux/macro.lux b/stdlib/source/library/lux/macro.lux
index 612077261..cc5c46d6d 100644
--- a/stdlib/source/library/lux/macro.lux
+++ b/stdlib/source/library/lux/macro.lux
@@ -121,11 +121,11 @@
(do [! //.monad]
[symbol_names (monad.each ! ..local symbols)
.let [symbol_defs (list#conjoint (list#each (is (-> Text (List Code))
- (.function (_ name) (list (code.symbol ["" name]) (` (..symbol (~ (code.text name)))))))
+ (.function (_ name) (list (code.symbol ["" name]) (` (..symbol (, (code.text name)))))))
symbol_names))]]
- (in (list (` ((~! do) (~! //.monad)
- [(~+ symbol_defs)]
- (~ body))))))
+ (in (list (` ((,! do) (,! //.monad)
+ [(,* symbol_defs)]
+ (, body))))))
_
(//.failure (..wrong_syntax_error (.symbol ..with_symbols))))))
diff --git a/stdlib/source/library/lux/macro/context.lux b/stdlib/source/library/lux/macro/context.lux
index e1a127bf9..464d0cfea 100644
--- a/stdlib/source/library/lux/macro/context.lux
+++ b/stdlib/source/library/lux/macro/context.lux
@@ -62,7 +62,7 @@
(.def .public peek
(syntax (_ [g!it (at ?.monad each code.symbol ?code.global)])
- (in (list (` ((~! ..peek') (~ g!it) (.symbol (~ g!it))))))))
+ (in (list (` ((,! ..peek') (, g!it) (.symbol (, g!it))))))))
(exception .public no_example)
@@ -82,7 +82,7 @@
(.def .public search
(syntax (_ [g!context (at ?.monad each code.symbol ?code.global)
g!? ?code.any])
- (in (list (` ((~! ..search') (~ g!context) (~ g!?) (.symbol (~ g!context))))))))
+ (in (list (` ((,! ..search') (, g!context) (, g!?) (.symbol (, g!context))))))))
(.def (alter on_definition [@ context])
(-> (-> Definition Definition) Symbol (Meta Any))
@@ -114,7 +114,7 @@
(.def .public push
(syntax (_ [g!context (at ?.monad each code.symbol ?code.global)
g!it ?code.any])
- (in (list (` ((~! ..push') (~ g!context) (~ g!it) (.symbol (~ g!context))))))))
+ (in (list (` ((,! ..push') (, g!context) (, g!it) (.symbol (, g!context))))))))
(.def pop'
(-> Symbol (Meta Any))
@@ -140,20 +140,20 @@
[@ meta.current_module_name
.let [g!context (code.symbol [@ $])]]
(//.with_symbols [g!it g!body g!_]
- (in (list (` (.def (~ (code.local $))
- (..Stack (~ context_type))
+ (in (list (` (.def (, (code.local $))
+ (..Stack (, context_type))
(list)))
- (` (.def ((~ g!expression) (~ g!it) (~ g!body))
- (-> (~ context_type) Code (Meta Code))
- ((~! do) (~! meta.monad)
- [(~ g!_) ((~! ..push) (~ g!context) (~ g!it))]
- ((~' in) (` (let [((~' ~') (~ g!body)) ((~' ~) (~ g!body))
- ((~' ~') (~ g!_)) ((~! ..pop) #1 (~ g!context))]
- ((~' ~') (~ g!body))))))))
- (` (.def ((~ g!declaration) (~ g!it) (~ g!body))
- (-> (~ context_type) Code (Meta (List Code)))
- ((~! do) (~! meta.monad)
- [(~ g!_) ((~! ..push) (~ g!context) (~ g!it))]
- ((~' in) (list (~ g!body)
- (` ((~! ..pop) #0 (~ g!context))))))))
+ (` (.def ((, g!expression) (, g!it) (, g!body))
+ (-> (, context_type) Code (Meta Code))
+ ((,! do) (,! meta.monad)
+ [(, g!_) ((,! ..push) (, g!context) (, g!it))]
+ ((,' in) (` (let [((,' ,') (, g!body)) ((,' ,) (, g!body))
+ ((,' ,') (, g!_)) ((,! ..pop) #1 (, g!context))]
+ ((,' ,') (, g!body))))))))
+ (` (.def ((, g!declaration) (, g!it) (, g!body))
+ (-> (, context_type) Code (Meta (List Code)))
+ ((,! do) (,! meta.monad)
+ [(, g!_) ((,! ..push) (, g!context) (, g!it))]
+ ((,' in) (list (, g!body)
+ (` ((,! ..pop) #0 (, g!context))))))))
))))))
diff --git a/stdlib/source/library/lux/macro/local.lux b/stdlib/source/library/lux/macro/local.lux
index 036da756f..9b2ec3156 100644
--- a/stdlib/source/library/lux/macro/local.lux
+++ b/stdlib/source/library/lux/macro/local.lux
@@ -107,7 +107,7 @@
_ (.let [g!pop (is Symbol
["" (code.format g!pop)])]
(..push_one [g!pop (..pop_all (list#each product.left macros) g!pop)]))]
- (in (` ((~ g!pop))))))
+ (in (` ((, g!pop))))))
(def .public (with macros expression? body)
(-> (List [Symbol Macro]) Bit Code (Meta (List Code)))
@@ -115,10 +115,10 @@
[g!pop (..push macros)]
(.if expression?
(//.with_symbols [g!body]
- (in (list (` (.let [(~ g!body) (~ body)]
+ (in (list (` (.let [(, g!body) (, body)]
(exec
- (~ g!pop)
- (~ g!body)))))))
+ (, g!pop)
+ (, g!body)))))))
(in (list body
g!pop)))))
diff --git a/stdlib/source/library/lux/macro/pattern.lux b/stdlib/source/library/lux/macro/pattern.lux
index 65b469e2d..affa8273a 100644
--- a/stdlib/source/library/lux/macro/pattern.lux
+++ b/stdlib/source/library/lux/macro/pattern.lux
@@ -3,15 +3,15 @@
[lux (.except or let with_template |> `)]])
(def partial_list
- (`` ("lux in-module" (~~ (static .prelude)) .partial_list)))
+ (`` ("lux in-module" (,, (static .prelude)) .partial_list)))
(def locally
(macro (_ tokens lux)
(.let [[prelude _] (symbol ._)]
(case tokens
(pattern (list [@ {.#Symbol ["" name]}]))
- {.#Right [lux (list (.` ("lux in-module" (~ [@ {.#Text prelude}])
- (~ [@ {.#Symbol [prelude name]}]))))]}
+ {.#Right [lux (list (.` ("lux in-module" (, [@ {.#Text prelude}])
+ (, [@ {.#Symbol [prelude name]}]))))]}
_
{.#Left ""}))))
@@ -133,17 +133,17 @@
expected ..expected_type
g!temp (..generated_symbol "temp")]
(in (list g!temp
- (.` ({{.#Some (~ g!temp)}
- (~ g!temp)
+ (.` ({{.#Some (, g!temp)}
+ (, g!temp)
{.#None}
- (.case (~ g!temp)
- (~+ next_branches))}
- ("lux type check" {.#Apply (~ (type_code expected)) Maybe}
- (.case (~ g!temp)
- (~+ (multi_level_case$ g!temp [mlc body]))
+ (.case (, g!temp)
+ (,* next_branches))}
+ ("lux type check" {.#Apply (, (type_code expected)) Maybe}
+ (.case (, g!temp)
+ (,* (multi_level_case$ g!temp [mlc body]))
- (~+ (if initial_bind?
+ (,* (if initial_bind?
(list)
(list g!temp (.` {.#None})))))))))))
@@ -156,7 +156,7 @@
(pattern (partial_list [_meta {.#Form (list [_ {.#Symbol ["" name]}] pattern)}] body branches))
(.let [g!whole (local$ name)]
(meta#in (partial_list g!whole
- (.` (case (~ g!whole) (~ pattern) (~ body)))
+ (.` (case (, g!whole) (, pattern) (, body)))
branches)))
_
@@ -168,8 +168,8 @@
(pattern (partial_list [_meta {.#Form (list [_ {.#Symbol ["" name]}] [_ {.#Tuple steps}])}] body branches))
(.let [g!name (local$ name)]
(meta#in (partial_list g!name
- (.` (.let [(~ g!name) (.|> (~ g!name) (~+ steps))]
- (~ body)))
+ (.` (.let [(, g!name) (.|> (, g!name) (,* steps))]
+ (, body)))
branches)))
_
@@ -177,7 +177,7 @@
(def (name$ [module name])
(-> Symbol Code)
- (.` [(~ (text$ module)) (~ (text$ name))]))
+ (.` [(, (text$ module)) (, (text$ name))]))
(def (untemplated_partial_list last inits)
(-> Code (List Code) Code)
@@ -186,23 +186,23 @@
last
{.#Item [init inits']}
- (.` {.#Item (~ init) (~ (untemplated_partial_list last inits'))})))
+ (.` {.#Item (, init) (, (untemplated_partial_list last inits'))})))
(.with_template [<tag> <name>]
[(def (<name> g!meta untemplated_pattern elems)
(-> Code (-> Code (Meta Code))
(-> (List Code) (Meta Code)))
(case (list#reversed elems)
- {.#Item [_ {.#Form {.#Item [[_ {.#Symbol ["" "~+"]}] {.#Item [spliced {.#End}]}]}}]
+ {.#Item [_ {.#Form {.#Item [[_ {.#Symbol ["" ",*"]}] {.#Item [spliced {.#End}]}]}}]
inits}
(do meta#monad
[=inits (monad#each meta#monad untemplated_pattern (list#reversed inits))]
- (in (.` [(~ g!meta) {<tag> (~ (untemplated_partial_list spliced =inits))}])))
+ (in (.` [(, g!meta) {<tag> (, (untemplated_partial_list spliced =inits))}])))
_
(do meta#monad
[=elems (monad#each meta#monad untemplated_pattern elems)]
- (in (.` [(~ g!meta) {<tag> (~ (untemplated_list =elems))}])))))]
+ (in (.` [(, g!meta) {<tag> (, (untemplated_list =elems))}])))))]
[.#Form untemplated_form]
[.#Variant untemplated_variant]
@@ -216,7 +216,7 @@
(case pattern
(..with_template [<tag> <gen>]
[[_ {<tag> value}]
- (in (.` [(~ g!meta) {<tag> (~ (<gen> value))}]))])
+ (in (.` [(, g!meta) {<tag> (, (<gen> value))}]))])
([.#Bit bit$]
[.#Nat nat$]
[.#Int int$]
@@ -225,11 +225,11 @@
[.#Text text$]
[.#Symbol name$])
- [_ {.#Form {.#Item [[_ {.#Symbol ["" "~"]}] {.#Item [unquoted {.#End}]}]}}]
+ [_ {.#Form {.#Item [[_ {.#Symbol ["" ","]}] {.#Item [unquoted {.#End}]}]}}]
(in unquoted)
- [_ {.#Form {.#Item [[_ {.#Symbol ["" "~+"]}] {.#Item [spliced {.#End}]}]}}]
- (failure "Cannot use (~+) inside of `code` unless it is the last element in a form or a tuple.")
+ [_ {.#Form {.#Item [[_ {.#Symbol ["" ",*"]}] {.#Item [spliced {.#End}]}]}}]
+ (failure "Cannot use (,*) inside of `code` unless it is the last element in a form or a tuple.")
(..with_template [<tag> <untemplated>]
[[_ {<tag> elems}]
diff --git a/stdlib/source/library/lux/macro/syntax.lux b/stdlib/source/library/lux/macro/syntax.lux
index 8e9d32686..5321db403 100644
--- a/stdlib/source/library/lux/macro/syntax.lux
+++ b/stdlib/source/library/lux/macro/syntax.lux
@@ -57,8 +57,8 @@
(is (-> [Code Code] (Meta [Code Code]))
(function (_ [var parser])
(with_expansions [<default> (in [var
- (` ((~! ..self_documenting) (' (~ var))
- (~ parser)))])]
+ (` ((,! ..self_documenting) (' (, var))
+ (, parser)))])]
(case var
[_ {.#Symbol ["" _]}]
<default>
@@ -80,20 +80,20 @@
(//.symbol "g!state"))
this_module meta.current_module_name
.let [g!name (code.symbol ["" name])]]
- (in (list (` (.macro ((~ g!name) (~ g!tokens) (~ g!state))
- (.case ((~! </>.result)
- (is ((~! </>.Parser) (Meta (List Code)))
- ((~! do) (~! <>.monad)
- [(~+ (..un_paired vars+parsers))]
- (.at (~! <>.monad) (~' in)
+ (in (list (` (.macro ((, g!name) (, g!tokens) (, g!state))
+ (.case ((,! </>.result)
+ (is ((,! </>.Parser) (Meta (List Code)))
+ ((,! do) (,! <>.monad)
+ [(,* (..un_paired vars+parsers))]
+ (.at (,! <>.monad) (,' in)
(is (Meta (List Code))
- (~ body)))))
- (~ g!tokens))
- {try.#Success (~ g!body)}
- ((~ g!body) (~ g!state))
+ (, body)))))
+ (, g!tokens))
+ {try.#Success (, g!body)}
+ ((, g!body) (, g!state))
- {try.#Failure (~ g!error)}
- {try.#Failure ((~! text.interposed) (~! text.new_line) (list "Invalid syntax:" (~ g!error)))})))))))
+ {try.#Failure (, g!error)}
+ {try.#Failure ((,! text.interposed) (,! text.new_line) (list "Invalid syntax:" (, g!error)))})))))))
{try.#Failure error}
(meta.failure (//.wrong_syntax_error (symbol ..syntax))))))
diff --git a/stdlib/source/library/lux/macro/syntax/check.lux b/stdlib/source/library/lux/macro/syntax/check.lux
index 69621e1e2..21a8aff54 100644
--- a/stdlib/source/library/lux/macro/syntax/check.lux
+++ b/stdlib/source/library/lux/macro/syntax/check.lux
@@ -29,9 +29,9 @@
(def .public (format (open "_[0]"))
(-> Check Code)
- (` ((~ (code.text ..extension))
- (~ _#type)
- (~ _#value))))
+ (` ((, (code.text ..extension))
+ (, _#type)
+ (, _#value))))
(def .public parser
(Parser Check)
diff --git a/stdlib/source/library/lux/macro/syntax/declaration.lux b/stdlib/source/library/lux/macro/syntax/declaration.lux
index a60ce50ad..1f4a9cccd 100644
--- a/stdlib/source/library/lux/macro/syntax/declaration.lux
+++ b/stdlib/source/library/lux/macro/syntax/declaration.lux
@@ -41,4 +41,4 @@
g!name
arguments
- (` ((~ g!name) (~+ (list#each code.local arguments)))))))
+ (` ((, g!name) (,* (list#each code.local arguments)))))))
diff --git a/stdlib/source/library/lux/macro/syntax/definition.lux b/stdlib/source/library/lux/macro/syntax/definition.lux
index 9c8551195..b9627f0a2 100644
--- a/stdlib/source/library/lux/macro/syntax/definition.lux
+++ b/stdlib/source/library/lux/macro/syntax/definition.lux
@@ -46,21 +46,21 @@
(def dummy
Code
- (` [.#module (~ (code.text (the .#module location.dummy)))
- .#line (~ (code.nat (the .#line location.dummy)))
- .#column (~ (code.nat (the .#column location.dummy)))]))
+ (` [.#module (, (code.text (the .#module location.dummy)))
+ .#line (, (code.nat (the .#line location.dummy)))
+ .#column (, (code.nat (the .#column location.dummy)))]))
(def .public (format (open "_[0]"))
(-> Definition Code)
- (` ((~ (code.text ..extension))
- (~ (code.local _#name))
- (~ (case _#value
+ (` ((, (code.text ..extension))
+ (, (code.local _#name))
+ (, (case _#value
{.#Left check}
(//check.format check)
{.#Right value}
value))
- (~ (code.bit _#export?)))))
+ (, (code.bit _#export?)))))
(def .public (parser compiler)
(-> Lux (Parser Definition))
diff --git a/stdlib/source/library/lux/macro/template.lux b/stdlib/source/library/lux/macro/template.lux
index cc82b10f3..7b71d005e 100644
--- a/stdlib/source/library/lux/macro/template.lux
+++ b/stdlib/source/library/lux/macro/template.lux
@@ -43,11 +43,11 @@
[g!locals (|> locals
(list#each //.symbol)
(monad.all !))]
- (in (list (` (.with_expansions [(~+ (|> (list.zipped_2 locals g!locals)
+ (in (list (` (.with_expansions [(,* (|> (list.zipped_2 locals g!locals)
(list#each (function (_ [name symbol])
(list (code.local name) symbol)))
list#conjoint))]
- (~ body))))))))
+ (, body))))))))
(def (symbol_side module_side? parser)
(-> Bit (Parser Symbol) (Parser Text))
@@ -177,8 +177,9 @@
locals))]
(if expression?
(//.with_symbols [g!body]
- (in (list (` (.let [(~ g!body) (~ body)]
- (exec (~ g!pop)
- (~ g!body)))))))
+ (in (list (` (.let [(, g!body) (, body)]
+ (exec
+ (, g!pop)
+ (, g!body)))))))
(in (list body
g!pop))))))
diff --git a/stdlib/source/library/lux/math.lux b/stdlib/source/library/lux/math.lux
index d2c69aede..49a572887 100644
--- a/stdlib/source/library/lux/math.lux
+++ b/stdlib/source/library/lux/math.lux
@@ -90,7 +90,7 @@
(`` (cond (check.subsumes? .I64 :it:)
(phase.except ..no_arithmetic_for [:it:])
- (~~ (with_template [<type> <0> <+>]
+ (,, (with_template [<type> <0> <+>]
[(check.subsumes? <type> :it:)
<0>]
@@ -103,7 +103,7 @@
(`` (cond (check.subsumes? .I64 :it:)
(phase.except ..no_arithmetic_for [:it:])
- (~~ (with_template [<type> <0> <+>]
+ (,, (with_template [<type> <0> <+>]
[(check.subsumes? <type> :it:)
(..composite phase archive (` <+>) last prevs)]
@@ -113,7 +113,7 @@
(phase.except ..no_arithmetic_for [:it:])))))))
(def .public <name>
(syntax (_ [operands (<>.some <code>.any)])
- (in (list (` (<extension> (~+ operands)))))))))]
+ (in (list (` (<extension> (,* operands)))))))))]
[+ [[.Nat (in (analysis.nat 0)) "lux i64 +"]
[.Int (in (analysis.int +0)) "lux i64 +"]
@@ -156,7 +156,7 @@
(`` (cond (check.subsumes? .I64 :it:)
(phase.except ..no_arithmetic_for [:it:])
- (~~ (with_template [<type> <+>]
+ (,, (with_template [<type> <+>]
[(check.subsumes? <type> :it:)
(..composite phase archive (` <+>) right (list left))]
@@ -167,7 +167,7 @@
(def .public <name>
(syntax (_ [left <code>.any
right <code>.any])
- (in (list (` (<extension> (~ left) (~ right)))))))))]
+ (in (list (` (<extension> (, left) (, right)))))))))]
[= [[.Nat "lux i64 ="]
[.Int "lux i64 ="]
@@ -212,7 +212,7 @@
(`` (cond (check.subsumes? .I64 :it:)
(phase.except ..no_arithmetic_for [:it:])
- (~~ (with_template [<type> <+>]
+ (,, (with_template [<type> <+>]
[(check.subsumes? <type> :it:)
(..composite phase archive (` <+>) right (list left))]
@@ -223,7 +223,7 @@
(def .public <name>
(syntax (_ [left <code>.any
right <code>.any])
- (in (list (` (<extension> (~ left) (~ right)))))))))]
+ (in (list (` (<extension> (, left) (, right)))))))))]
[% [[.Nat nat.%]
[.Int "lux i64 %"]
diff --git a/stdlib/source/library/lux/math/infix.lux b/stdlib/source/library/lux/math/infix.lux
index ee319a0e7..5c4603e99 100644
--- a/stdlib/source/library/lux/math/infix.lux
+++ b/stdlib/source/library/lux/math/infix.lux
@@ -66,10 +66,10 @@
(code.form parts)
{#Unary op subject}
- (` ((~ op) (~ (prefix subject))))
+ (` ((, op) (, (prefix subject))))
{#Binary left op right}
- (` ((~ op) (~ (prefix right)) (~ (prefix left))))))
+ (` ((, op) (, (prefix right)) (, (prefix left))))))
(def .public infix
(syntax (_ [expr ..expression])
diff --git a/stdlib/source/library/lux/math/modulus.lux b/stdlib/source/library/lux/math/modulus.lux
index 46eb4e45e..57e313bcf 100644
--- a/stdlib/source/library/lux/math/modulus.lux
+++ b/stdlib/source/library/lux/math/modulus.lux
@@ -50,4 +50,4 @@
(meta.lifted
(do try.monad
[_ (..modulus divisor)]
- (in (list (` ((~! try.trusted) (..modulus (~ (code.int divisor)))))))))))
+ (in (list (` ((,! try.trusted) (..modulus (, (code.int divisor)))))))))))
diff --git a/stdlib/source/library/lux/math/number/complex.lux b/stdlib/source/library/lux/math/number/complex.lux
index 5e8161de3..65e28513d 100644
--- a/stdlib/source/library/lux/math/number/complex.lux
+++ b/stdlib/source/library/lux/math/number/complex.lux
@@ -27,8 +27,8 @@
(def .public complex
(syntax (_ [real <code>.any
?imaginary (<>.maybe <code>.any)])
- (in (list (` [..#real (~ real)
- ..#imaginary (~ (maybe.else (' +0.0) ?imaginary))])))))
+ (in (list (` [..#real (, real)
+ ..#imaginary (, (maybe.else (' +0.0) ?imaginary))])))))
(def .public i
Complex
diff --git a/stdlib/source/library/lux/math/number/ratio.lux b/stdlib/source/library/lux/math/number/ratio.lux
index d9c927d35..5c11f118c 100644
--- a/stdlib/source/library/lux/math/number/ratio.lux
+++ b/stdlib/source/library/lux/math/number/ratio.lux
@@ -43,8 +43,8 @@
(def .public ratio
(syntax (_ [numerator <code>.any
?denominator (<>.maybe <code>.any)])
- (in (list (` ((~! ..normal) [..#numerator (~ numerator)
- ..#denominator (~ (maybe.else (' 1) ?denominator))]))))))
+ (in (list (` ((,! ..normal) [..#numerator (, numerator)
+ ..#denominator (, (maybe.else (' 1) ?denominator))]))))))
(def .public (= parameter subject)
(-> Ratio Ratio Bit)
diff --git a/stdlib/source/library/lux/meta.lux b/stdlib/source/library/lux/meta.lux
index 10f0056d7..63375b626 100644
--- a/stdlib/source/library/lux/meta.lux
+++ b/stdlib/source/library/lux/meta.lux
@@ -144,7 +144,7 @@
(def (macro_type? type)
(-> Type Bit)
(`` (case type
- {.#Named [(~~ (static .prelude)) "Macro"] {.#Primitive "#Macro" {.#End}}}
+ {.#Named [(,, (static .prelude)) "Macro"] {.#Primitive "#Macro" {.#End}}}
true
_
@@ -434,7 +434,7 @@
(type_definition de_aliased)
{.#Definition [exported? def_type def_value]}
- (let [type_code (`` ("lux in-module" (~~ (static .prelude)) .type_code))]
+ (let [type_code (`` ("lux in-module" (,, (static .prelude)) .type_code))]
(if (or (same? .Type def_type)
(at code.equivalence =
(type_code .Type)
diff --git a/stdlib/source/library/lux/meta/location.lux b/stdlib/source/library/lux/meta/location.lux
index 061140a94..a9e62dd5f 100644
--- a/stdlib/source/library/lux/meta/location.lux
+++ b/stdlib/source/library/lux/meta/location.lux
@@ -25,12 +25,12 @@
(let [location (the .#location compiler)]
{.#Right [compiler
(list (` (.is .Location
- [.#module (~ [..dummy {.#Text (the .#module location)}])
- .#line (~ [..dummy {.#Nat (the .#line location)}])
- .#column (~ [..dummy {.#Nat (the .#column location)}])])))]})
+ [.#module (, [..dummy {.#Text (the .#module location)}])
+ .#line (, [..dummy {.#Nat (the .#line location)}])
+ .#column (, [..dummy {.#Nat (the .#column location)}])])))]})
_
- {.#Left (`` (("lux in-module" (~~ (static .prelude)) wrong_syntax_error) (symbol ..here)))})))
+ {.#Left (`` (("lux in-module" (,, (static .prelude)) wrong_syntax_error) (symbol ..here)))})))
(def .public (format it)
(-> Location Text)
@@ -38,9 +38,9 @@
[file line column] it]
(all "lux text concat"
"@"
- (`` (("lux in-module" (~~ (static .prelude)) .text#encoded) file)) separator
- (`` (("lux in-module" (~~ (static .prelude)) .nat#encoded) line)) separator
- (`` (("lux in-module" (~~ (static .prelude)) .nat#encoded) column)))))
+ (`` (("lux in-module" (,, (static .prelude)) .text#encoded) file)) separator
+ (`` (("lux in-module" (,, (static .prelude)) .nat#encoded) line)) separator
+ (`` (("lux in-module" (,, (static .prelude)) .nat#encoded) column)))))
(def \n
("lux i64 char" +10))
diff --git a/stdlib/source/library/lux/meta/type.lux b/stdlib/source/library/lux/meta/type.lux
index b2c4173a8..af6ee1351 100644
--- a/stdlib/source/library/lux/meta/type.lux
+++ b/stdlib/source/library/lux/meta/type.lux
@@ -250,18 +250,18 @@
(-> Type Code)
(case type
{.#Primitive name params}
- (` {.#Primitive (~ (code.text name))
- (.list (~+ (list#each code params)))})
+ (` {.#Primitive (, (code.text name))
+ (.list (,* (list#each code params)))})
(^.with_template [<tag>]
[{<tag> idx}
- (` {<tag> (~ (code.nat idx))})])
+ (` {<tag> (, (code.nat idx))})])
([.#Var] [.#Ex] [.#Parameter])
(^.with_template [<tag>]
[{<tag> left right}
- (` {<tag> (~ (code left))
- (~ (code right))})])
+ (` {<tag> (, (code left))
+ (, (code right))})])
([.#Sum] [.#Product] [.#Function] [.#Apply])
{.#Named name sub_type}
@@ -269,8 +269,8 @@
(^.with_template [<tag>]
[{<tag> env body}
- (` {<tag> (.list (~+ (list#each code env)))
- (~ (code body))})])
+ (` {<tag> (.list (,* (list#each code env)))
+ (, (code body))})])
([.#UnivQ] [.#ExQ])
))
@@ -387,7 +387,7 @@
(in (list g!_secret_marker_)))))
(def secret_marker
- (`` (symbol (~~ (new_secret_marker)))))
+ (`` (symbol (,, (new_secret_marker)))))
(def .public log!
(syntax (_ [input (<>.or (<>.and <code>.symbol
@@ -413,8 +413,8 @@
{.#Right valueC}
(macro.with_symbols [g!value]
- (in (list (` (.let [(~ g!value) (~ valueC)]
- (..log! (~ valueC) (~ (code.symbol ..secret_marker)) (~ g!value))))))))))
+ (in (list (` (.let [(, g!value) (, valueC)]
+ (..log! (, valueC) (, (code.symbol ..secret_marker)) (, g!value))))))))))
(def type_parameters
(Parser (List Text))
@@ -426,15 +426,15 @@
output <code>.any
value (<>.maybe <code>.any)])
(macro.with_symbols [g!_]
- (.let [casterC (` (is (All ((~ g!_) (~+ (list#each code.local type_vars)))
- (-> (~ input) (~ output)))
+ (.let [casterC (` (is (All ((, g!_) (,* (list#each code.local type_vars)))
+ (-> (, input) (, output)))
(|>> as_expected)))]
(case value
{.#None}
(in (list casterC))
{.#Some value}
- (in (list (` ((~ casterC) (~ value))))))))))
+ (in (list (` ((, casterC) (, value))))))))))
(type Typed
(Record
@@ -457,22 +457,22 @@
exemplar (..typed lux)
computation (..typed lux)])
(macro.with_symbols [g!_]
- (.let [typeC (` (All ((~ g!_) (~+ (list#each code.local type_vars)))
- (-> (~ (the #type exemplar))
- (~ (the #type computation)))))
- shareC (` (is (~ typeC)
- (.function ((~ g!_) (~ g!_))
- (~ (the #expression computation)))))]
- (in (list (` ((~ shareC) (~ (the #expression exemplar))))))))))
+ (.let [typeC (` (All ((, g!_) (,* (list#each code.local type_vars)))
+ (-> (, (the #type exemplar))
+ (, (the #type computation)))))
+ shareC (` (is (, typeC)
+ (.function ((, g!_) (, g!_))
+ (, (the #expression computation)))))]
+ (in (list (` ((, shareC) (, (the #expression exemplar))))))))))
(def .public by_example
(syntax (_ lux [type_vars ..type_parameters
exemplar (..typed lux)
extraction <code>.any])
- (in (list (` (.type_of ((~! ..sharing) [(~+ (list#each code.local type_vars))]
- (is (~ (the #type exemplar))
- (~ (the #expression exemplar)))
- (is (~ extraction)
+ (in (list (` (.type_of ((,! ..sharing) [(,* (list#each code.local type_vars))]
+ (is (, (the #type exemplar))
+ (, (the #expression exemplar)))
+ (is (, extraction)
... The value of this expression will never be relevant, so it doesn't matter what it is.
(.as .Nothing [])))))))))
@@ -508,8 +508,8 @@
(def .public let
(syntax (_ [bindings (<code>.tuple (<>.some (<>.and <code>.any <code>.any)))
bodyT <code>.any])
- (in (list (` (..with_expansions [(~+ (|> bindings
+ (in (list (` (..with_expansions [(,* (|> bindings
(list#each (.function (_ [localT valueT])
- (list localT (` (.these (~ valueT))))))
+ (list localT (` (.these (, valueT))))))
list#conjoint))]
- (~ bodyT)))))))
+ (, bodyT)))))))
diff --git a/stdlib/source/library/lux/meta/type/dynamic.lux b/stdlib/source/library/lux/meta/type/dynamic.lux
index 90c0b3837..eccb312e2 100644
--- a/stdlib/source/library/lux/meta/type/dynamic.lux
+++ b/stdlib/source/library/lux/meta/type/dynamic.lux
@@ -36,19 +36,19 @@
(def .public dynamic
(syntax (_ [value <code>.any])
(with_symbols [g!value]
- (in (list (` (.let [(~ g!value) (~ value)]
- ((~! ..abstraction) [(.type_of (~ g!value)) (~ g!value)]))))))))
+ (in (list (` (.let [(, g!value) (, value)]
+ ((,! ..abstraction) [(.type_of (, g!value)) (, g!value)]))))))))
(def .public static
(syntax (_ [type <code>.any
value <code>.any])
(with_symbols [g!type g!value]
- (in (list (` (.let [[(~ g!type) (~ g!value)] ((~! ..representation) (~ value))]
- (.is ((~! try.Try) (~ type))
- (.if (.at (~! //.equivalence) (~' =)
- (.type_literal (~ type)) (~ g!type))
- {try.#Success (.as (~ type) (~ g!value))}
- ((~! exception.except) ..wrong_type [(.type_literal (~ type)) (~ g!type)]))))))))))
+ (in (list (` (.let [[(, g!type) (, g!value)] ((,! ..representation) (, value))]
+ (.is ((,! try.Try) (, type))
+ (.if (.at (,! //.equivalence) (,' =)
+ (.type_literal (, type)) (, g!type))
+ {try.#Success (.as (, type) (, g!value))}
+ ((,! exception.except) ..wrong_type [(.type_literal (, type)) (, g!type)]))))))))))
(def .public (format value)
(-> Dynamic (Try Text))
diff --git a/stdlib/source/library/lux/meta/type/implicit.lux b/stdlib/source/library/lux/meta/type/implicit.lux
index bdea9933d..3d92d214c 100644
--- a/stdlib/source/library/lux/meta/type/implicit.lux
+++ b/stdlib/source/library/lux/meta/type/implicit.lux
@@ -333,7 +333,7 @@
(code.symbol constructor)
_
- (` ((~ (code.symbol constructor)) (~+ (list#each instance$ dependencies))))))
+ (` ((, (code.symbol constructor)) (,* (list#each instance$ dependencies))))))
(def .public a/an
(syntax (_ [member <code>.symbol
@@ -351,9 +351,9 @@
(///.failure (format "No implementation could be found for member: " (%.symbol member)))
{.#Item chosen {.#End}}
- (in (list (` (.at (~ (instance$ chosen))
- (~ (code.local (product.right member)))
- (~+ (list#each code.symbol args))))))
+ (in (list (` (.at (, (instance$ chosen))
+ (, (code.local (product.right member)))
+ (,* (list#each code.symbol args))))))
_
(///.failure (format "Too many implementations available: "
@@ -367,8 +367,8 @@
[labels (|> (macro.symbol "g!parameter")
(list.repeated (list.size args))
(monad.all !))]
- (in (list (` (let [(~+ (|> args (list.zipped_2 labels) (list#each ..pair_list) list#conjoint))]
- (..a/an (~ (code.symbol member)) (~+ labels)))))))
+ (in (list (` (let [(,* (|> args (list.zipped_2 labels) (list#each ..pair_list) list#conjoint))]
+ (..a/an (, (code.symbol member)) (,* labels)))))))
)))
(def .public a ..a/an)
@@ -385,11 +385,11 @@
body <code>.any])
(do ///.monad
[g!implicit+ (implicit_bindings (list.size implementations))]
- (in (list (` (let [(~+ (|> (list.zipped_2 g!implicit+ implementations)
+ (in (list (` (let [(,* (|> (list.zipped_2 g!implicit+ implementations)
(list#each (function (_ [g!implicit implementation])
(list g!implicit implementation)))
list#conjoint))]
- (~ body))))))))
+ (, body))))))))
(def .public implicitly
(syntax (_ [implementations (<>.many <code>.any)])
@@ -397,5 +397,5 @@
[g!implicit+ (implicit_bindings (list.size implementations))]
(in (|> (list.zipped_2 g!implicit+ implementations)
(list#each (function (_ [g!implicit implementation])
- (` (def .private (~ g!implicit)
- (~ implementation))))))))))
+ (` (def .private (, g!implicit)
+ (, implementation))))))))))
diff --git a/stdlib/source/library/lux/meta/type/poly.lux b/stdlib/source/library/lux/meta/type/poly.lux
index da8fc8a07..912a22a9b 100644
--- a/stdlib/source/library/lux/meta/type/poly.lux
+++ b/stdlib/source/library/lux/meta/type/poly.lux
@@ -30,37 +30,37 @@
body <code>.any])
(with_symbols [g!_ g!type g!output]
(let [g!name (code.symbol ["" name])]
- (in (.list (` ((~! syntax) ((~ g!_) [(~ g!type) (~! <code>.any)])
- ((~! do) (~! ///.monad)
- [(~ g!type) ((~! ///.eval) .Type (~ g!type))]
+ (in (.list (` ((,! syntax) ((, g!_) [(, g!type) (,! <code>.any)])
+ ((,! do) (,! ///.monad)
+ [(, g!type) ((,! ///.eval) .Type (, g!type))]
(case (is (.Either .Text .Code)
- ((~! <//>.result) ((~! <>.rec)
- (function ((~ g!_) (~ g!name))
- (~ body)))
- (.as .Type (~ g!type))))
- {.#Right (~ g!output)}
- ((~' in) (.list (~ g!output)))
+ ((,! <//>.result) ((,! <>.rec)
+ (function ((, g!_) (, g!name))
+ (, body)))
+ (.as .Type (, g!type))))
+ {.#Right (, g!output)}
+ ((,' in) (.list (, g!output)))
- {.#Left (~ g!output)}
- ((~! ///.failure) (~ g!output))))))))))))
+ {.#Left (, g!output)}
+ ((,! ///.failure) (, g!output))))))))))))
(def .public (code env type)
(-> Env Type Code)
(case type
{.#Primitive name params}
- (` {.#Primitive (~ (code.text name))
- (.list (~+ (list#each (code env) params)))})
+ (` {.#Primitive (, (code.text name))
+ (.list (,* (list#each (code env) params)))})
(^.with_template [<tag>]
[{<tag> idx}
- (` {<tag> (~ (code.nat idx))})])
+ (` {<tag> (, (code.nat idx))})])
([.#Var] [.#Ex])
{.#Parameter idx}
(let [idx (<//>.argument env idx)]
(if (n.= 0 idx)
(|> (dictionary.value idx env) maybe.trusted product.left (code env))
- (` (.$ (~ (code.nat (-- idx)))))))
+ (` (.$ (, (code.nat (-- idx)))))))
{.#Apply {.#Primitive "" {.#End}}
{.#Parameter idx}}
@@ -70,13 +70,13 @@
(^.with_template [<tag>]
[{<tag> left right}
- (` {<tag> (~ (code env left))
- (~ (code env right))})])
+ (` {<tag> (, (code env left))
+ (, (code env right))})])
([.#Function] [.#Apply])
(^.with_template [<macro> <tag> <flattener>]
[{<tag> left right}
- (` (<macro> (~+ (list#each (code env) (<flattener> type)))))])
+ (` (<macro> (,* (list#each (code env) (<flattener> type)))))])
([.Union .#Sum //.flat_variant]
[.Tuple .#Product //.flat_tuple])
@@ -85,6 +85,6 @@
(^.with_template [<tag>]
[{<tag> scope body}
- (` {<tag> (.list (~+ (list#each (code env) scope)))
- (~ (code env body))})])
+ (` {<tag> (.list (,* (list#each (code env) scope)))
+ (, (code env body))})])
([.#UnivQ] [.#ExQ])))
diff --git a/stdlib/source/library/lux/meta/type/primitive.lux b/stdlib/source/library/lux/meta/type/primitive.lux
index e58f13f56..339612998 100644
--- a/stdlib/source/library/lux/meta/type/primitive.lux
+++ b/stdlib/source/library/lux/meta/type/primitive.lux
@@ -53,8 +53,8 @@
{.#None}
..current)]
- (in (list (` ((~! //.as) [(~+ type_vars)] (~ <from>) (~ <to>)
- (~ value))))))))]
+ (in (list (` ((,! //.as) [(,* type_vars)] (, <from>) (, <to>)
+ (, value))))))))]
[abstraction representation abstraction]
[representation abstraction representation]
@@ -83,15 +83,15 @@
[current_module meta.current_module_name
g!Representation (macro.symbol "Representation")
.let [type_varsC (list#each code.local type_vars)
- abstraction_declaration (` ((~ (code.local name)) (~+ type_varsC)))
- representation_declaration (` ((~ g!Representation) (~+ type_varsC)))]]
+ abstraction_declaration (` ((, (code.local name)) (,* type_varsC)))
+ representation_declaration (` ((, g!Representation) (,* type_varsC)))]]
(..declaration [name type_varsC abstraction_declaration representation_declaration]
- (` (.these (type (~ export_policy) (~ abstraction_declaration)
- (Primitive (~ (code.text (symbol#encoded [current_module name])))
- [(~+ type_varsC)]))
- (type (~ representation_declaration)
- (~ representation_type))
- (~+ primitives)))))))
+ (` (.these (type (, export_policy) (, abstraction_declaration)
+ (Primitive (, (code.text (symbol#encoded [current_module name])))
+ [(,* type_varsC)]))
+ (type (, representation_declaration)
+ (, representation_type))
+ (,* primitives)))))))
(def selection
(Parser [(List Code) Code])
@@ -100,6 +100,6 @@
(def .public transmutation
(syntax (_ [[specific value] ..selection])
- (in (list (` (.|> (~ value)
- (..representation (~+ specific))
- (..abstraction (~+ specific))))))))
+ (in (list (` (.|> (, value)
+ (..representation (,* specific))
+ (..abstraction (,* specific))))))))
diff --git a/stdlib/source/library/lux/meta/type/quotient.lux b/stdlib/source/library/lux/meta/type/quotient.lux
index 6f9c48586..e6553fb40 100644
--- a/stdlib/source/library/lux/meta/type/quotient.lux
+++ b/stdlib/source/library/lux/meta/type/quotient.lux
@@ -47,20 +47,20 @@
(syntax (_ [class <code>.any])
... TODO: Switch to the cleaner approach ASAP.
(with_symbols [g!t g!c g!% g!_ g!:quotient:]
- (in (list (` (let [ ... (~ g!_) (.is (.Ex ((~ g!_) (~ g!t) (~ g!c) (~ g!%))
- ... (..Class (~ g!t) (~ g!c) (~ g!%)))
- ... (~ class))
+ (in (list (` (let [ ... (, g!_) (.is (.Ex ((, g!_) (, g!t) (, g!c) (, g!%))
+ ... (..Class (, g!t) (, g!c) (, g!%)))
+ ... (, class))
]
- (.case (.type_of (~ class))
- {.#Apply (~ g!%) {.#Apply (~ g!c) {.#Apply (~ g!t) (~ g!:quotient:)}}}
- (.type_literal (..Quotient (~ g!t) (~ g!c) (~ g!%)))
+ (.case (.type_of (, class))
+ {.#Apply (, g!%) {.#Apply (, g!c) {.#Apply (, g!t) (, g!:quotient:)}}}
+ (.type_literal (..Quotient (, g!t) (, g!c) (, g!%)))
- (~ g!_)
+ (, g!_)
(.undefined))))
- ... (` ((~! //.by_example) [(~ g!t) (~ g!c) (~ g!%)]
- ... (is (..Class (~ g!t) (~ g!c) (~ g!%))
- ... (~ class))
- ... (..Quotient (~ g!t) (~ g!c) (~ g!%))))
+ ... (` ((,! //.by_example) [(, g!t) (, g!c) (, g!%)]
+ ... (is (..Class (, g!t) (, g!c) (, g!%))
+ ... (, class))
+ ... (..Quotient (, g!t) (, g!c) (, g!%))))
)))))
(def .public (equivalence super)
diff --git a/stdlib/source/library/lux/meta/type/refinement.lux b/stdlib/source/library/lux/meta/type/refinement.lux
index 45c6d01e6..e5c18decf 100644
--- a/stdlib/source/library/lux/meta/type/refinement.lux
+++ b/stdlib/source/library/lux/meta/type/refinement.lux
@@ -89,18 +89,18 @@
(syntax (_ [refiner <code>.any])
... TODO: Switch to the cleaner approach ASAP.
(macro.with_symbols [g!t g!% g!_ g!:refiner:]
- (in (list (` (let [ ... (~ g!_) (.is (.Ex ((~ g!_) (~ g!t) (~ g!%))
- ... (..Refined (~ g!t) (~ g!%)))
- ... (~ refiner))
+ (in (list (` (let [ ... (, g!_) (.is (.Ex ((, g!_) (, g!t) (, g!%))
+ ... (..Refined (, g!t) (, g!%)))
+ ... (, refiner))
]
- (.case (.type_of (~ refiner))
- {.#Apply (~ g!%) {.#Apply (~ g!t) (~ g!:refiner:)}}
- (.type_literal (..Refined (~ g!t) (~ g!%)))
+ (.case (.type_of (, refiner))
+ {.#Apply (, g!%) {.#Apply (, g!t) (, g!:refiner:)}}
+ (.type_literal (..Refined (, g!t) (, g!%)))
- (~ g!_)
+ (, g!_)
(.undefined))))
- ... (` ((~! //.by_example) [(~ g!t) (~ g!%)]
- ... (is (..Refiner (~ g!t) (~ g!%))
- ... (~ refiner))
- ... (..Refined (~ g!t) (~ g!%))))
+ ... (` ((,! //.by_example) [(, g!t) (, g!%)]
+ ... (is (..Refiner (, g!t) (, g!%))
+ ... (, refiner))
+ ... (..Refined (, g!t) (, g!%))))
)))))
diff --git a/stdlib/source/library/lux/meta/type/resource.lux b/stdlib/source/library/lux/meta/type/resource.lux
index 44e9cf7a7..f1e099e72 100644
--- a/stdlib/source/library/lux/meta/type/resource.lux
+++ b/stdlib/source/library/lux/meta/type/resource.lux
@@ -132,7 +132,7 @@
(macro.with_symbols [g!_ g!context g!!]
(case swaps
{.#End}
- (in (list (` (~! no_op))))
+ (in (list (` (,! no_op))))
{.#Item head tail}
(do [! meta.monad]
@@ -147,16 +147,16 @@
swaps)
maybe.trusted
sequence.list)
- g!inputsT+ (list#each (|>> (~) (..Key ..Commutative) (`)) g!inputs)
- g!outputsT+ (list#each (|>> (~) (..Key ..Commutative) (`)) g!outputs)]]
- (in (list (` (is (All ((~ g!_) (~ g!!) (~+ g!inputs) (~ g!context))
- (-> ((~! monad.Monad) (~ g!!))
- (Procedure (~ g!!)
- [(~+ g!inputsT+) (~ g!context)]
- [(~+ g!outputsT+) (~ g!context)]
+ g!inputsT+ (list#each (|>> (,) (..Key ..Commutative) (`)) g!inputs)
+ g!outputsT+ (list#each (|>> (,) (..Key ..Commutative) (`)) g!outputs)]]
+ (in (list (` (is (All ((, g!_) (, 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)])
- (at (~ g!!) (~' in) [[(~+ g!outputs) (~ g!context)] []])))))))))))
+ (function ((, g!_) (, g!!) [(,* g!inputs) (, g!context)])
+ (at (, g!!) (,' in) [[(,* g!outputs) (, g!context)] []])))))))))))
(def amount
(Parser Nat)
@@ -174,15 +174,15 @@
[g!keys (|> (macro.symbol "keys")
(list.repeated amount)
(monad.all !))]
- (in (list (` (is (All ((~ g!_) (~ g!!) (~+ g!keys) (~ g!context))
- (-> ((~! monad.Monad) (~ g!!))
- (Procedure (~ g!!)
- [<from> (~ g!context)]
- [<to> (~ g!context)]
+ (in (list (` (is (All ((, g!_) (, g!!) (,* g!keys) (, g!context))
+ (-> ((,! monad.Monad) (, g!!))
+ (Procedure (, g!!)
+ [<from> (, g!context)]
+ [<to> (, g!context)]
.Any)))
- (function ((~ g!_) (~ g!!) [<from> (~ g!context)])
- (at (~ g!!) (~' in) [[<to> (~ g!context)] []]))))))))))]
+ (function ((, g!_) (, g!!) [<from> (, g!context)])
+ (at (, g!!) (,' in) [[<to> (, g!context)] []]))))))))))]
- [group (~+ g!keys) [(~+ g!keys)]]
- [un_group [(~+ g!keys)] (~+ g!keys)]
+ [group (,* g!keys) [(,* g!keys)]]
+ [un_group [(,* g!keys)] (,* g!keys)]
)
diff --git a/stdlib/source/library/lux/meta/type/unit.lux b/stdlib/source/library/lux/meta/type/unit.lux
index a3fca0079..e0b0af638 100644
--- a/stdlib/source/library/lux/meta/type/unit.lux
+++ b/stdlib/source/library/lux/meta/type/unit.lux
@@ -85,17 +85,17 @@
(def .public type
(syntax (_ [it <code>.any])
(macro.with_symbols [g!a]
- (in (list (` ((~! //.by_example) [(~ g!a)]
- (is (..Unit (~ g!a))
- (~ it))
- (~ g!a))))))))
+ (in (list (` ((,! //.by_example) [(, g!a)]
+ (is (..Unit (, g!a))
+ (, it))
+ (, g!a))))))))
(with_template [<unit> <type>]
[(def .public <unit>
(..unit []))
(.type .public <type>
- (~ (..type <unit>)))]
+ (, (..type <unit>)))]
[gram Gram]
[meter Meter]
diff --git a/stdlib/source/library/lux/meta/type/unit/scale.lux b/stdlib/source/library/lux/meta/type/unit/scale.lux
index f8ea57031..f1bbdb08f 100644
--- a/stdlib/source/library/lux/meta/type/unit/scale.lux
+++ b/stdlib/source/library/lux/meta/type/unit/scale.lux
@@ -52,10 +52,10 @@
(def .public type
(syntax (_ [it <code>.any])
(macro.with_symbols [g!a]
- (in (list (` ((~! ///.by_example) [(~ g!a)]
- (is (..Scale (~ g!a))
- (~ it))
- (~ g!a))))))))
+ (in (list (` ((,! ///.by_example) [(, g!a)]
+ (is (..Scale (, g!a))
+ (, it))
+ (, g!a))))))))
(with_template [<order_of_magnitude> <up> <up_type> <down> <down_type>]
[(def .public <up>
@@ -63,14 +63,14 @@
ratio.#denominator 1]))
(.type .public <up_type>
- (~ (..type <up>)))
+ (, (..type <up>)))
(def .public <down>
(scale [ratio.#numerator 1
ratio.#denominator <order_of_magnitude>]))
(.type .public <down_type>
- (~ (..type <down>)))]
+ (, (..type <down>)))]
[ 1,000 kilo Kilo milli Milli]
[ 1,000,000 mega Mega micro Micro]
diff --git a/stdlib/source/library/lux/program.lux b/stdlib/source/library/lux/program.lux
index c02d60c69..442038fdf 100644
--- a/stdlib/source/library/lux/program.lux
+++ b/stdlib/source/library/lux/program.lux
@@ -35,26 +35,26 @@
@.js body
@.python body
... else
- (` ((~! do) (~! io.monad)
- [(~ g!output) (~ body)
- (~ g!_) (~! thread.run!)]
- ((~' in) (~ g!output)))))]
+ (` ((,! do) (,! io.monad)
+ [(, g!output) (, body)
+ (, g!_) (,! thread.run!)]
+ ((,' in) (, g!output)))))]
(in (list (` ("lux def program"
- (~ (case args
+ (, (case args
{#Raw args}
- (` (.function ((~ g!program) (~ (code.symbol ["" args])))
- (~ initialization+event_loop)))
+ (` (.function ((, g!program) (, (code.symbol ["" args])))
+ (, initialization+event_loop)))
{#Parsed args}
- (` (.function ((~ g!program) (~ g!args))
- (case ((~! </>.result) (.is (~! (</>.Parser (io.IO .Any)))
- ((~! do) (~! <>.monad)
- [(~+ args)
- (~ g!_) (~! </>.end)]
- ((~' in) (~ initialization+event_loop))))
- (~ g!args))
- {.#Right (~ g!output)}
- (~ g!output)
+ (` (.function ((, g!program) (, g!args))
+ (case ((,! </>.result) (.is (,! (</>.Parser (io.IO .Any)))
+ ((,! do) (,! <>.monad)
+ [(,* args)
+ (, g!_) (,! </>.end)]
+ ((,' in) (, initialization+event_loop))))
+ (, g!args))
+ {.#Right (, g!output)}
+ (, g!output)
- {.#Left (~ g!message)}
- (.panic! (~ g!message)))))))))))))))
+ {.#Left (, g!message)}
+ (.panic! (, g!message)))))))))))))))
diff --git a/stdlib/source/library/lux/static.lux b/stdlib/source/library/lux/static.lux
index 5f4560e52..375664915 100644
--- a/stdlib/source/library/lux/static.lux
+++ b/stdlib/source/library/lux/static.lux
@@ -44,7 +44,7 @@
expression <code>.any])
(do meta.monad
[pair (meta.eval (.type_literal <type>)
- (` [(~ format) (~ expression)]))
+ (` [(, format) (, expression)]))
.let [[format expression] (as <type> pair)]]
(in (list (format expression)))))))
@@ -56,7 +56,7 @@
expression <code>.any])
(do meta.monad
[pair (meta.eval (.type_literal <type>)
- (` [(~ format) (~ expression)]))
+ (` [(, format) (, expression)]))
.let [[format expression] (as <type> pair)]]
(in (list#each format expression))))))
@@ -88,7 +88,7 @@
random <code>.any])
(do meta.monad
[pair (meta.eval (type_literal <type>)
- (` [(~ format) (~ random)]))
+ (` [(, format) (, random)]))
.let [[format random] (as <type> pair)]
seed meta.seed
.let [[_ result] (random.result (random.pcg_32 [..pcg_32_magic_inc seed])
@@ -103,7 +103,7 @@
random <code>.any])
(do meta.monad
[pair (meta.eval (type_literal <type>)
- (` [(~ format) (~ random)]))
+ (` [(, format) (, random)]))
.let [[format random] (as <type> pair)]
seed meta.seed
.let [[_ result] (random.result (random.pcg_32 [..pcg_32_magic_inc seed])
@@ -124,9 +124,9 @@
(syntax (_ [test,then/* (<>.some (<>.and <code>.any <code>.any))
else <code>.any])
(in (list (list#mix (function (_ [test then] else)
- (` (..if (~ test)
- (~ then)
- (~ else))))
+ (` (..if (, test)
+ (, then)
+ (, else))))
else
(list.reversed test,then/*))))))
diff --git a/stdlib/source/library/lux/target/common_lisp.lux b/stdlib/source/library/lux/target/common_lisp.lux
index 06fca5f8c..aeb290691 100644
--- a/stdlib/source/library/lux/target/common_lisp.lux
+++ b/stdlib/source/library/lux/target/common_lisp.lux
@@ -120,7 +120,7 @@
(def safe
(-> Text Text)
- (`` (|>> (~~ (with_template [<find> <replace>]
+ (`` (|>> (,, (with_template [<find> <replace>]
[(text.replaced <find> <replace>)]
["\" "\\"]
@@ -202,16 +202,16 @@
body)))
(with_template [<call> <input_var>+ <input_type>+ <function>+]
- [(`` (def .public (<call> [(~~ (template.spliced <input_var>+))] function)
- (-> [(~~ (template.spliced <input_type>+))] (Expression Any) (Computation Any))
- (..call/* function (list (~~ (template.spliced <input_var>+))))))
+ [(`` (def .public (<call> [(,, (template.spliced <input_var>+))] function)
+ (-> [(,, (template.spliced <input_type>+))] (Expression Any) (Computation Any))
+ (..call/* function (list (,, (template.spliced <input_var>+))))))
(`` (with_template [<lux_name> <host_name>]
[(def .public (<lux_name> args)
- (-> [(~~ (template.spliced <input_type>+))] (Computation Any))
+ (-> [(,, (template.spliced <input_type>+))] (Computation Any))
(<call> args (..var <host_name>)))]
- (~~ (template.spliced <function>+))))]
+ (,, (template.spliced <function>+))))]
[call/0 [] []
[[get_universal_time/0 "get-universal-time"]
@@ -266,10 +266,10 @@
(with_template [<call> <input_type>+ <function>+]
[(`` (with_template [<lux_name> <host_name>]
[(def .public (<lux_name> args)
- (-> [(~~ (template.spliced <input_type>+))] (Access Any))
+ (-> [(,, (template.spliced <input_type>+))] (Access Any))
(transmutation (<call> args (..var <host_name>))))]
- (~~ (template.spliced <function>+))))]
+ (,, (template.spliced <function>+))))]
[call/1 [(Expression Any)]
[[car/1 "car"]
diff --git a/stdlib/source/library/lux/target/js.lux b/stdlib/source/library/lux/target/js.lux
index 0c275562d..29816e610 100644
--- a/stdlib/source/library/lux/target/js.lux
+++ b/stdlib/source/library/lux/target/js.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except Location Code Label or and function if undefined for comment not int try ++ -- the type_of at)
+ [lux (.except Location Code Label or and function if undefined for comment not int try ++ -- the type_of at ,)
[control
["[0]" pipe]]
[data
@@ -44,7 +44,7 @@
(with_template [<type> <super>+]
[(with_expansions [<brand> (template.symbol [<type> "'"])]
(primitive (<brand> brand) Any)
- (`` (type .public <type> (|> Any <brand> (~~ (template.spliced <super>+))))))]
+ (`` (type .public <type> (|> Any <brand> (,, (template.spliced <super>+))))))]
[Expression [Code]]
[Computation [Expression' Code]]
@@ -55,7 +55,7 @@
(with_template [<type> <super>+]
[(with_expansions [<brand> (template.symbol [<type> "'"])]
(primitive <brand> Any)
- (`` (type .public <type> (|> <brand> (~~ (template.spliced <super>+))))))]
+ (`` (type .public <type> (|> <brand> (,, (template.spliced <super>+))))))]
[Var [Location' Computation' Expression' Code]]
[Access [Location' Computation' Expression' Code]]
@@ -95,7 +95,7 @@
(def safe
(-> Text Text)
- (`` (|>> (~~ (with_template [<replace> <find>]
+ (`` (|>> (,, (with_template [<replace> <find>]
[(text.replaced <find> <replace>)]
["\\" "\"]
@@ -427,14 +427,14 @@
(with_template [<apply> <arg>+ <type>+ <function>+]
[(`` (def .public (<apply> function)
- (-> Expression (~~ (template.spliced <type>+)) Computation)
- (.function (_ (~~ (template.spliced <arg>+)))
- (..apply function (list (~~ (template.spliced <arg>+)))))))
+ (-> Expression (,, (template.spliced <type>+)) Computation)
+ (.function (_ (,, (template.spliced <arg>+)))
+ (..apply function (list (,, (template.spliced <arg>+)))))))
(`` (with_template [<definition> <function>]
[(def .public <definition> (<apply> (..var <function>)))]
- (~~ (template.spliced <function>+))))]
+ (,, (template.spliced <function>+))))]
[apply_1 [_0] [Expression]
[[not_a_number? "isNaN"]]]
diff --git a/stdlib/source/library/lux/target/jvm/bytecode.lux b/stdlib/source/library/lux/target/jvm/bytecode.lux
index 267705aa7..ca0c92f65 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode.lux
@@ -696,7 +696,7 @@
(-> Nat (Bytecode Any))
(with_expansions [<specials>' (template.spliced <specials>)]
(`` (case local
- (~~ (with_template [<case> <instruction> <registry>]
+ (,, (with_template [<case> <instruction> <registry>]
[<case> (..bytecode $0 <size> <registry> <instruction> [])]
<specials>'))
@@ -736,7 +736,7 @@
(-> Nat (Bytecode Any))
(with_expansions [<specials>' (template.spliced <specials>)]
(`` (case local
- (~~ (with_template [<case> <instruction> <registry>]
+ (,, (with_template [<case> <instruction> <registry>]
[<case> (..bytecode <size> $0 <registry> <instruction> [])]
<specials>'))
diff --git a/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux b/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux
index 3b613b206..f9e9d4b07 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux
@@ -487,7 +487,7 @@
(let [[estimator <arity>'] <arity>]
[estimator
(function (_ [<input_names>])
- (`` (<arity>' (hex <code>) (~~ (template.spliced <arity_inputs>)))))])))]
+ (`` (<arity>' (hex <code>) (,, (template.spliced <arity_inputs>)))))])))]
<definitions>'
))]
diff --git a/stdlib/source/library/lux/target/jvm/class.lux b/stdlib/source/library/lux/target/jvm/class.lux
index d018f832f..bd9fdd41b 100644
--- a/stdlib/source/library/lux/target/jvm/class.lux
+++ b/stdlib/source/library/lux/target/jvm/class.lux
@@ -130,7 +130,7 @@
(def .public (format class)
(Format Class)
(`` (all binaryF#composite
- (~~ (with_template [<format> <slot>]
+ (,, (with_template [<format> <slot>]
[(<format> (the <slot> class))]
[//magic.format #magic]
@@ -140,7 +140,7 @@
[//modifier.format #modifier]
[//index.format #this]
[//index.format #super]))
- (~~ (with_template [<format> <slot>]
+ (,, (with_template [<format> <slot>]
[((binaryF.sequence_16 <format>) (the <slot> class))]
[//index.format #interfaces]
diff --git a/stdlib/source/library/lux/target/jvm/constant.lux b/stdlib/source/library/lux/target/jvm/constant.lux
index ae57d805f..fbd207bdc 100644
--- a/stdlib/source/library/lux/target/jvm/constant.lux
+++ b/stdlib/source/library/lux/target/jvm/constant.lux
@@ -117,8 +117,8 @@
[(def <format_name>
(Format <type>)
(`` (|>> representation
- (~~ (template.spliced <write>))
- (~~ (template.spliced <format>)))))]
+ (,, (template.spliced <write>))
+ (,, (template.spliced <format>)))))]
[integer_format Integer [] [binaryF.bits_32]]
[float_format Float [java/lang/Float::floatToRawIntBits ffi.of_int .i64] [i32.i32 binaryF.bits_32]]
diff --git a/stdlib/source/library/lux/target/jvm/field.lux b/stdlib/source/library/lux/target/jvm/field.lux
index 44cbaee15..e0561b457 100644
--- a/stdlib/source/library/lux/target/jvm/field.lux
+++ b/stdlib/source/library/lux/target/jvm/field.lux
@@ -52,7 +52,7 @@
(def .public (format field)
(Format Field)
(`` (all binaryF#composite
- (~~ (with_template [<format> <slot>]
+ (,, (with_template [<format> <slot>]
[(<format> (the <slot> field))]
[modifier.format #modifier]
diff --git a/stdlib/source/library/lux/target/jvm/method.lux b/stdlib/source/library/lux/target/jvm/method.lux
index 7fe3c2d7b..3db1be9bc 100644
--- a/stdlib/source/library/lux/target/jvm/method.lux
+++ b/stdlib/source/library/lux/target/jvm/method.lux
@@ -101,7 +101,7 @@
(def .public (format field)
(Format Method)
(`` (all \\format#composite
- (~~ (with_template [<format> <slot>]
+ (,, (with_template [<format> <slot>]
[(<format> (the <slot> field))]
[//modifier.format #modifier]
diff --git a/stdlib/source/library/lux/target/jvm/modifier.lux b/stdlib/source/library/lux/target/jvm/modifier.lux
index b12b167cc..b76d05904 100644
--- a/stdlib/source/library/lux/target/jvm/modifier.lux
+++ b/stdlib/source/library/lux/target/jvm/modifier.lux
@@ -85,9 +85,9 @@
(syntax (_ [ofT <code>.any
options (<>.many <code>.any)])
(with_symbols [g!modifier g!code]
- (in (list (` (with_template [(~ g!code) (~ g!modifier)]
- [(def (~' .public) (~ g!modifier)
- (..Modifier (~ ofT))
- ((~! ..modifier) ((~! number.hex) (~ g!code))))]
+ (in (list (` (with_template [(, g!code) (, g!modifier)]
+ [(def (,' .public) (, g!modifier)
+ (..Modifier (, ofT))
+ ((,! ..modifier) ((,! number.hex) (, g!code))))]
- (~+ options))))))))
+ (,* options))))))))
diff --git a/stdlib/source/library/lux/target/jvm/reflection.lux b/stdlib/source/library/lux/target/jvm/reflection.lux
index 7a5bdebc0..cf38c5efa 100644
--- a/stdlib/source/library/lux/target/jvm/reflection.lux
+++ b/stdlib/source/library/lux/target/jvm/reflection.lux
@@ -134,7 +134,7 @@
(let [class_name (|> class
(as (java/lang/Class java/lang/Object))
java/lang/Class::getName)]
- (`` (if (or (~~ (with_template [<reflection>]
+ (`` (if (or (,, (with_template [<reflection>]
[(text#= (/reflection.reflection <reflection>)
class_name)]
@@ -225,7 +225,7 @@
(let [class_name (|> reflection
(as (java/lang/Class java/lang/Object))
java/lang/Class::getName)]
- (`` (cond (~~ (with_template [<reflection> <type>]
+ (`` (cond (,, (with_template [<reflection> <type>]
[(text#= (/reflection.reflection <reflection>)
class_name)
{try.#Success <type>}]
diff --git a/stdlib/source/library/lux/target/jvm/type.lux b/stdlib/source/library/lux/target/jvm/type.lux
index 9b90e6c28..f9944b0eb 100644
--- a/stdlib/source/library/lux/target/jvm/type.lux
+++ b/stdlib/source/library/lux/target/jvm/type.lux
@@ -167,7 +167,7 @@
(def .public (primitive? type)
(-> (Type Value) (Either (Type Object)
(Type Primitive)))
- (if (`` (or (~~ (with_template [<type>]
+ (if (`` (or (,, (with_template [<type>]
[(at ..equivalence = (is (Type Value) <type>) type)]
[..boolean]
@@ -184,7 +184,7 @@
(def .public (void? type)
(-> (Type Return) (Either (Type Value)
(Type Void)))
- (if (`` (or (~~ (with_template [<type>]
+ (if (`` (or (,, (with_template [<type>]
[(at ..equivalence = (is (Type Return) <type>) type)]
[..void]))))
diff --git a/stdlib/source/library/lux/target/jvm/type/category.lux b/stdlib/source/library/lux/target/jvm/type/category.lux
index bbef2f241..ad293150e 100644
--- a/stdlib/source/library/lux/target/jvm/type/category.lux
+++ b/stdlib/source/library/lux/target/jvm/type/category.lux
@@ -26,7 +26,7 @@
[(with_expansions [<raw> (template.symbol [<child> "'"])]
(primitive <raw> Any)
(type .public <child>
- (`` (<| Return' Value' (~~ (template.spliced <parents>)) <raw>))))]
+ (`` (<| Return' Value' (,, (template.spliced <parents>)) <raw>))))]
[[] Primitive]
[[Object' Parameter'] Var]
diff --git a/stdlib/source/library/lux/target/jvm/type/lux.lux b/stdlib/source/library/lux/target/jvm/type/lux.lux
index 724092721..10160204c 100644
--- a/stdlib/source/library/lux/target/jvm/type/lux.lux
+++ b/stdlib/source/library/lux/target/jvm/type/lux.lux
@@ -176,7 +176,7 @@
(|>> (<>#each (check#each (function (_ elementT)
(case elementT
{.#Primitive name {.#End}}
- (if (`` (or (~~ (with_template [<reflection>]
+ (if (`` (or (,, (with_template [<reflection>]
[(text#= (//reflection.reflection <reflection>) name)]
[//reflection.boolean]
diff --git a/stdlib/source/library/lux/target/jvm/type/reflection.lux b/stdlib/source/library/lux/target/jvm/type/reflection.lux
index de151b35d..4ea86a811 100644
--- a/stdlib/source/library/lux/target/jvm/type/reflection.lux
+++ b/stdlib/source/library/lux/target/jvm/type/reflection.lux
@@ -63,7 +63,7 @@
elementR (`` (cond (text.starts_with? //descriptor.array_prefix element')
element'
- (~~ (with_template [<primitive> <descriptor>]
+ (,, (with_template [<primitive> <descriptor>]
[(at ..equivalence = <primitive> element)
(//descriptor.descriptor <descriptor>)]
diff --git a/stdlib/source/library/lux/target/lua.lux b/stdlib/source/library/lux/target/lua.lux
index 440c3f4ce..b0432cbdd 100644
--- a/stdlib/source/library/lux/target/lua.lux
+++ b/stdlib/source/library/lux/target/lua.lux
@@ -66,7 +66,7 @@
(with_template [<type> <super>+]
[(with_expansions [<brand> (template.symbol [<type> "'"])]
(primitive (<brand> brand) Any)
- (`` (type .public <type> (|> Any <brand> (~~ (template.spliced <super>+))))))]
+ (`` (type .public <type> (|> Any <brand> (,, (template.spliced <super>+))))))]
[Expression [Code]]
[Computation [Expression' Code]]
@@ -77,7 +77,7 @@
(with_template [<type> <super>+]
[(with_expansions [<brand> (template.symbol [<type> "'"])]
(primitive <brand> Any)
- (`` (type .public <type> (|> <brand> (~~ (template.spliced <super>+))))))]
+ (`` (type .public <type> (|> <brand> (,, (template.spliced <super>+))))))]
[Literal [Computation' Expression' Code]]
[Var [Location' Computation' Expression' Code]]
@@ -123,7 +123,7 @@
(def safe
(-> Text Text)
- (`` (|>> (~~ (with_template [<find> <replace>]
+ (`` (|>> (,, (with_template [<find> <replace>]
[(text.replaced <find> <replace>)]
["\" "\\"]
@@ -390,7 +390,7 @@
<types> (arity_types <arity>)
<definitions> (template.spliced <function>+)]
(with_template [<function>]
- [(`` (def .public ((~~ (template.symbol [<function> "/" <arity>])) <inputs>)
+ [(`` (def .public ((,, (template.symbol [<function> "/" <arity>])) <inputs>)
(-> <types> Computation)
(..apply (.list <inputs>) (..var <function>))))]
diff --git a/stdlib/source/library/lux/target/php.lux b/stdlib/source/library/lux/target/php.lux
index 747a55abf..ef08c945d 100644
--- a/stdlib/source/library/lux/target/php.lux
+++ b/stdlib/source/library/lux/target/php.lux
@@ -74,7 +74,7 @@
(with_template [<type> <super>+]
[(with_expansions [<brand> (template.symbol [<type> "'"])]
(primitive (<brand> brand) Any)
- (`` (type .public <type> (|> Any <brand> (~~ (template.spliced <super>+))))))]
+ (`` (type .public <type> (|> Any <brand> (,, (template.spliced <super>+))))))]
[Expression [Code]]
[Computation [Expression' Code]]
@@ -85,7 +85,7 @@
(with_template [<type> <super>+]
[(with_expansions [<brand> (template.symbol [<type> "'"])]
(primitive .public <brand> Any)
- (`` (type .public <type> (|> <brand> (~~ (template.spliced <super>+))))))]
+ (`` (type .public <type> (|> <brand> (,, (template.spliced <super>+))))))]
[Literal [Computation' Expression' Code]]
[Var [Location' Computation' Expression' Code]]
@@ -164,7 +164,7 @@
(def safe
(-> Text Text)
- (`` (|>> (~~ (with_template [<find> <replace>]
+ (`` (|>> (,, (with_template [<find> <replace>]
[(text.replaced <find> <replace>)]
["\" "\\"]
@@ -254,7 +254,7 @@
(..apply (.list <inputs>) function))
(with_template [<function>]
- [(`` (def .public (~~ (template.symbol [<function> "/" <arity>]))
+ [(`` (def .public (,, (template.symbol [<function> "/" <arity>]))
(<apply> (..constant <function>))))]
<definitions>))]
diff --git a/stdlib/source/library/lux/target/python.lux b/stdlib/source/library/lux/target/python.lux
index a297ad529..e1197964b 100644
--- a/stdlib/source/library/lux/target/python.lux
+++ b/stdlib/source/library/lux/target/python.lux
@@ -147,7 +147,7 @@
(.def .public float
(-> Frac Literal)
- (`` (|>> (pipe.cond (~~ (with_template [<test> <python>]
+ (`` (|>> (pipe.cond (,, (with_template [<test> <python>]
[[<test>]
[(pipe.new (format "float(" text.double_quote <python> text.double_quote ")") [])]]
@@ -162,7 +162,7 @@
(.def safe
(-> Text Text)
- (`` (|>> (~~ (with_template [<find> <replace>]
+ (`` (|>> (,, (with_template [<find> <replace>]
[(text.replaced <find> <replace>)]
["\" "\\"]
@@ -467,8 +467,8 @@
[(with_expansions [<inputs> (arity_inputs <arity>)
<definitions> (template.spliced <function>+)]
(with_template [<function>]
- [(`` (.def .public ((~~ (template.symbol [<function> "/" <arity>])) <inputs>)
- (-> (~~ (arity_types <arity>)) (Computation Any))
+ [(`` (.def .public ((,, (template.symbol [<function> "/" <arity>])) <inputs>)
+ (-> (,, (arity_types <arity>)) (Computation Any))
(..apply (.list <inputs>) (..var <function>))))]
<definitions>))]
diff --git a/stdlib/source/library/lux/target/r.lux b/stdlib/source/library/lux/target/r.lux
index 574dcb4bf..3ddfac43d 100644
--- a/stdlib/source/library/lux/target/r.lux
+++ b/stdlib/source/library/lux/target/r.lux
@@ -28,7 +28,7 @@
(with_template [<type> <super>+]
[(with_expansions [<kind> (template.symbol [<type> "'"])]
(primitive .public (<kind> kind) Any)
- (`` (type .public <type> (|> Any <kind> (~~ (template.spliced <super>+))))))]
+ (`` (type .public <type> (|> Any <kind> (,, (template.spliced <super>+))))))]
[Expression [Code]]
)
@@ -36,7 +36,7 @@
(with_template [<type> <super>+]
[(with_expansions [<kind> (template.symbol [<type> "'"])]
(primitive .public (<kind> kind) Any)
- (`` (type .public (<type> <brand>) (|> <brand> <kind> (~~ (template.spliced <super>+))))))]
+ (`` (type .public (<type> <brand>) (|> <brand> <kind> (,, (template.spliced <super>+))))))]
[Var [Expression' Code]]
)
@@ -139,7 +139,7 @@
(def safe
(-> Text Text)
- (`` (|>> (~~ (with_template [<find> <replace>]
+ (`` (|>> (,, (with_template [<find> <replace>]
[(text.replaced <find> <replace>)]
["\" "\\"]
@@ -231,7 +231,7 @@
(..apply (.list <inputs>) function))
(with_template [<function>]
- [(`` (def .public (~~ (template.symbol [<function> "/" <arity>]))
+ [(`` (def .public (,, (template.symbol [<function> "/" <arity>]))
(-> [<types>] Expression)
(<apply> (..var <function>))))]
diff --git a/stdlib/source/library/lux/target/ruby.lux b/stdlib/source/library/lux/target/ruby.lux
index aa92ae9b3..dd99e29f7 100644
--- a/stdlib/source/library/lux/target/ruby.lux
+++ b/stdlib/source/library/lux/target/ruby.lux
@@ -60,7 +60,7 @@
(with_template [<type> <super>+]
[(with_expansions [<brand> (template.symbol [<type> "'"])]
(primitive (<brand> brand) Any)
- (`` (type .public <type> (|> Any <brand> (~~ (template.spliced <super>+))))))]
+ (`` (type .public <type> (|> Any <brand> (,, (template.spliced <super>+))))))]
[Expression [Code]]
[Computation [Expression' Code]]
@@ -73,7 +73,7 @@
(with_template [<type> <super>+]
[(with_expansions [<brand> (template.symbol [<type> "'"])]
(primitive <brand> Any)
- (`` (type .public <type> (|> <brand> (~~ (template.spliced <super>+))))))]
+ (`` (type .public <type> (|> <brand> (,, (template.spliced <super>+))))))]
[Literal [Computation' Expression' Code]]
[Access [Location' Computation' Expression' Code]]
@@ -160,7 +160,7 @@
(def safe
(-> Text Text)
- (`` (|>> (~~ (with_template [<find> <replace>]
+ (`` (|>> (,, (with_template [<find> <replace>]
[(text.replaced <find> <replace>)]
["\" "\\"]
@@ -448,7 +448,7 @@
(representation on))))
(with_template [<name>]
- [(`` (def .public ((~~ (template.symbol [<name> "/*"])) attributes)
+ [(`` (def .public ((,, (template.symbol [<name> "/*"])) attributes)
(-> (List Text) Statement)
(..statement
(..apply (list#each ..string attributes) {.#None} (..manual <name>)))))]
@@ -499,7 +499,7 @@
<types> (arity_types <arity>)
<definitions> (template.spliced <function>+)]
(with_template [<function>]
- [(`` (def .public ((~~ (template.symbol [<function> "/" <arity>])) <inputs>)
+ [(`` (def .public ((,, (template.symbol [<function> "/" <arity>])) <inputs>)
(-> <types> Computation)
(..apply (.list <inputs>) {.#None} (..manual <function>))))]
diff --git a/stdlib/source/library/lux/target/scheme.lux b/stdlib/source/library/lux/target/scheme.lux
index 4173b4241..6918a872c 100644
--- a/stdlib/source/library/lux/target/scheme.lux
+++ b/stdlib/source/library/lux/target/scheme.lux
@@ -49,14 +49,14 @@
(with_template [<type> <brand> <super>+]
[(primitive .public (<brand> brand) Any)
- (`` (type .public <type> (|> Any <brand> (~~ (template.spliced <super>+)))))]
+ (`` (type .public <type> (|> Any <brand> (,, (template.spliced <super>+)))))]
[Expression Expression' [Code]]
)
(with_template [<type> <brand> <super>+]
[(primitive .public <brand> Any)
- (`` (type .public <type> (|> <brand> (~~ (template.spliced <super>+)))))]
+ (`` (type .public <type> (|> <brand> (,, (template.spliced <super>+)))))]
[Var Var' [Expression' Code]]
[Computation Computation' [Expression' Code]]
@@ -138,7 +138,7 @@
(def safe
(-> Text Text)
- (`` (|>> (~~ (with_template [<find> <replace>]
+ (`` (|>> (,, (with_template [<find> <replace>]
[(text.replaced <find> <replace>)]
["\" "\\"]
@@ -201,14 +201,14 @@
(with_template [<apply> <arg>+ <type>+ <function>+]
[(`` (def .public (<apply> procedure)
- (-> Expression (~~ (template.spliced <type>+)) Computation)
- (function (_ (~~ (template.spliced <arg>+)))
- (..apply (list (~~ (template.spliced <arg>+))) procedure))))
+ (-> Expression (,, (template.spliced <type>+)) Computation)
+ (function (_ (,, (template.spliced <arg>+)))
+ (..apply (list (,, (template.spliced <arg>+))) procedure))))
(`` (with_template [<definition> <function>]
[(def .public <definition> (<apply> (..var <function>)))]
- (~~ (template.spliced <function>+))))]
+ (,, (template.spliced <function>+))))]
[apply/1 [_0] [Expression]
[[exact/1 "exact"]
diff --git a/stdlib/source/library/lux/test.lux b/stdlib/source/library/lux/test.lux
index 69db97f42..19f0d287b 100644
--- a/stdlib/source/library/lux/test.lux
+++ b/stdlib/source/library/lux/test.lux
@@ -338,12 +338,12 @@
(syntax (_ [coverage (<code>.tuple (<>.many <code>.any))
condition <code>.any])
(let [coverage (list#each (function (_ definition)
- (` ((~! ..reference) (~ definition))))
+ (` ((,! ..reference) (, definition))))
coverage)]
- (in (list (` ((~! <function>)
+ (in (list (` ((,! <function>)
(is (.List .Symbol)
- (.list (~+ coverage)))
- (~ condition))))))))]
+ (.list (,* coverage)))
+ (, condition))))))))]
[coverage' ..|coverage'|]
[coverage ..|coverage|]
@@ -353,12 +353,12 @@
(syntax (_ [coverage (<code>.tuple (<>.many <code>.any))
test <code>.any])
(let [coverage (list#each (function (_ definition)
- (` ((~! ..reference) (~ definition))))
+ (` ((,! ..reference) (, definition))))
coverage)]
- (in (list (` ((~! ..|for|)
+ (in (list (` ((,! ..|for|)
(is (.List .Symbol)
- (.list (~+ coverage)))
- (~ test))))))))
+ (.list (,* coverage)))
+ (, test))))))))
(def (covering' module coverage test)
(-> Text Text Test Test)
@@ -383,10 +383,10 @@
aggregate))
{.#End})
..encoded_coverage)]]
- (in (list (` ((~! ..covering')
- (~ (code.text module))
- (~ (code.text coverage))
- (~ test))))))))
+ (in (list (` ((,! ..covering')
+ (, (code.text module))
+ (, (code.text coverage))
+ (, test))))))))
(exception .public (error_during_execution [error Text])
(exception.report
diff --git a/stdlib/source/library/lux/time/instant.lux b/stdlib/source/library/lux/time/instant.lux
index 2b58b5bf2..dfc84617e 100644
--- a/stdlib/source/library/lux/time/instant.lux
+++ b/stdlib/source/library/lux/time/instant.lux
@@ -74,7 +74,7 @@
(Enum Instant)
(implementation
(def order ..order)
- (~~ (with_template [<name>]
+ (,, (with_template [<name>]
[(def <name>
(|>> representation (at i.enum <name>) abstraction))]
diff --git a/stdlib/source/library/lux/time/year.lux b/stdlib/source/library/lux/time/year.lux
index 02062e6aa..a7bdb0dcf 100644
--- a/stdlib/source/library/lux/time/year.lux
+++ b/stdlib/source/library/lux/time/year.lux
@@ -96,7 +96,7 @@
(-- year)
(++ year))]
(`` (|> +0
- (~~ (with_template [<polarity> <years>]
+ (,, (with_template [<polarity> <years>]
[(<polarity> (i./ (.int <years>) limit))]
[i.+ ..leap]
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 2d149643e..13d0ba6ed 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux
@@ -178,13 +178,13 @@
(syntax (_ [content <code>.any])
(in (list (` (.<| {..#Reference}
<tag>
- (~ content)))))))]
+ (, content)))))))]
[variable {reference.#Variable}]
[constant {reference.#Constant}]
- [local ((~! reference.local))]
- [foreign ((~! reference.foreign))]
+ [local ((,! reference.local))]
+ [foreign ((,! reference.foreign))]
)
(with_template [<name> <tag>]
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/analysis/inference.lux b/stdlib/source/library/lux/tool/compiler/language/lux/analysis/inference.lux
index e13058163..bbffab2a0 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/analysis/inference.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/analysis/inference.lux
@@ -224,8 +224,8 @@
list.reversed))
(with_template [<name> <types> <inputs> <exception> <when> <then>]
- [(`` (def .public (<name> (~~ (template.spliced <inputs>)) complex)
- (-> (~~ (template.spliced <types>)) Type (Operation Type))
+ [(`` (def .public (<name> (,, (template.spliced <inputs>)) complex)
+ (-> (,, (template.spliced <types>)) Type (Operation Type))
(loop (again [depth 0
it complex])
(case it
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux b/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux
index b8067a964..bd46c3d8c 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux
@@ -251,9 +251,9 @@
(phase.except ..no_buffer_for_saving_code [artifact_id]))))
(with_template [<type> <mandatory?> <inputs> <input_types> <name> <artifact>]
- [(`` (def .public (<name> it (~~ (template.spliced <inputs>)) dependencies)
+ [(`` (def .public (<name> it (,, (template.spliced <inputs>)) dependencies)
(All (_ anchor expression declaration)
- (-> <type> (~~ (template.spliced <input_types>)) (Set unit.ID) (Operation anchor expression declaration artifact.ID)))
+ (-> <type> (,, (template.spliced <input_types>)) (Set unit.ID) (Operation anchor expression declaration artifact.ID)))
(function (_ (^.let stateE [bundle state]))
(let [[id registry'] (<artifact> it <mandatory?> dependencies (the #registry state))]
{try.#Success [[bundle (has #registry registry' state)]
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux
index adabb8621..5882c78f4 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux
@@ -111,25 +111,25 @@
[.#Int /simple.int]
[.#Rev /simple.rev])
- (^.` [(~+ elems)])
+ (^.` [(,* elems)])
(/complex.record analysis archive elems)
- (^.` {(~ [_ {.#Symbol tag}]) (~+ values)})
+ (^.` {(, [_ {.#Symbol tag}]) (,* values)})
(..variant_analysis analysis archive tag values)
- (^.` ({(~+ branches)} (~ input)))
+ (^.` ({(,* branches)} (, input)))
(..case_analysis analysis archive input branches code)
- (^.` ([(~ [_ {.#Symbol ["" function_name]}]) (~ [_ {.#Symbol ["" arg_name]}])] (~ body)))
+ (^.` ([(, [_ {.#Symbol ["" function_name]}]) (, [_ {.#Symbol ["" arg_name]}])] (, body)))
(/function.function analysis function_name arg_name archive body)
- (^.` ((~ [_ {.#Text extension_name}]) (~+ extension_args)))
+ (^.` ((, [_ {.#Text extension_name}]) (,* extension_args)))
(//extension.apply archive analysis [extension_name extension_args])
- (^.` ((~ functionC) (~+ argsC+)))
+ (^.` ((, functionC) (,* argsC+)))
(..apply_analysis expander analysis archive functionC argsC+)
- (^.` {(~ [_ {.#Nat lefts}]) (~ [_ {.#Bit right?}]) (~+ values)})
+ (^.` {(, [_ {.#Nat lefts}]) (, [_ {.#Bit right?}]) (,* values)})
(..sum_analysis analysis archive lefts right? values)
_
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 db181d050..7301f6b8e 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
@@ -301,9 +301,9 @@
(n.= (-- num_cases) idx))
(pattern_analysis {.#None}
(type.variant (list.after (-- num_cases) flat_sum))
- (` [(~+ values)])
+ (` [(,* values)])
next)
- (pattern_analysis {.#None} caseT (` [(~+ values)]) next))
+ (pattern_analysis {.#None} caseT (` [(,* values)]) next))
_ (/type.check (monad.each check.monad check.forget! @ex_var+))]
(in [(/pattern.variant [lefts right? testP])
nextA]))
@@ -331,7 +331,7 @@
[idx group variantT] (///extension.lifted (meta.tag tag))
_ (/type.check (check.check :input: variantT))
.let [[lefts right?] (/complex.choice (list.size group) idx)]]
- (pattern_analysis {.#Some (list.size group)} :input: (` {(~ (code.nat lefts)) (~ (code.bit right?)) (~+ values)}) next)))
+ (pattern_analysis {.#Some (list.size group)} :input: (` {(, (code.nat lefts)) (, (code.bit right?)) (,* values)}) next)))
_
(/.except ..invalid [pattern])
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/complex.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/complex.lux
index 4328de2b2..2ee8cae7d 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/complex.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/complex.lux
@@ -46,7 +46,7 @@
members (List Code)])
(exception.report
"Type" (%.type type)
- "Expression" (%.code (` [(~+ members)]))))]
+ "Expression" (%.code (` [(,* members)]))))]
[invalid_tuple_type]
[cannot_analyse_tuple]
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 42e4d3e3c..54592b36b 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
@@ -539,7 +539,7 @@
(/////analysis.except ..non_parameter objectT)
{.#Primitive name parameters}
- (`` (cond (or (~~ (with_template [<type>]
+ (`` (cond (or (,, (with_template [<type>]
[(text#= (..reflection <type>) name)]
[jvm.boolean]
@@ -597,7 +597,7 @@
(-> .Type (Operation (Type Value)))
(case objectT
{.#Primitive name {.#End}}
- (`` (cond (~~ (with_template [<type>]
+ (`` (cond (,, (with_template [<type>]
[(text#= (..reflection <type>) name)
(phase#in <type>)]
@@ -610,7 +610,7 @@
[jvm.double]
[jvm.char]))
- (~~ (with_template [<type>]
+ (,, (with_template [<type>]
[(text#= (..reflection (jvm.array <type>)) name)
(phase#in (jvm.array <type>))]
@@ -986,7 +986,7 @@
(analyse archive fromC))
source_name (at ! each ..reflection (check_jvm fromT))
can_cast? (is (Operation Bit)
- (`` (cond (~~ (with_template [<primitive> <object>]
+ (`` (cond (,, (with_template [<primitive> <object>]
[(let [=primitive (reflection.reflection <primitive>)]
(or (and (text#= =primitive source_name)
(or (text#= <object> target_name)
@@ -1175,7 +1175,7 @@
(list#each (|>> again (as (Type Parameter))))
(jvm.class name))
{.#None})
- (~~ (with_template [<read> <as> <write>]
+ (,, (with_template [<read> <as> <write>]
[(case (<read> it)
{.#Some :sub:}
(<write> (as (Type <as>) (again :sub:)))
@@ -1258,8 +1258,8 @@
(with_template [<name> <type> <params>]
[(`` (def <name>
- (-> (<type> (~~ (template.spliced <params>))) (List (Type Class)))
- (|>> (~~ (template.symbol [<type> "::getExceptionTypes"]))
+ (-> (<type> (,, (template.spliced <params>))) (List (Type Class)))
+ (|>> (,, (template.symbol [<type> "::getExceptionTypes"]))
(array.list {.#None})
(list#each ..lux_class))))]
@@ -2508,7 +2508,7 @@
(^.with_template [<tag> <type> <constant>]
[[_ {<tag> value}]
(do pool.monad
- [constant (`` (|> value (~~ (template.spliced <constant>))))
+ [constant (`` (|> value (,, (template.spliced <constant>))))
attribute (attribute.constant constant)]
(field.field ..constant::modifier name #1 <type> (sequence.sequence attribute)))])
([.#Bit jvm.boolean [(pipe.case #0 +0 #1 +1) .i64 i32.i32 constant.integer pool.integer]]
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/declaration/jvm.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/declaration/jvm.lux
index 556a622be..9f74950cb 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/declaration/jvm.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/declaration/jvm.lux
@@ -113,7 +113,7 @@
(def visibility'
(<text>.Parser (Modifier field.Field))
(`` (all <>.either
- (~~ (with_template [<label> <modifier>]
+ (,, (with_template [<label> <modifier>]
[(<>.after (<text>.this <label>) (<>#in <modifier>))]
["public" field.public]
@@ -128,7 +128,7 @@
(def inheritance
(Parser (Modifier class.Class))
(`` (all <>.either
- (~~ (with_template [<label> <modifier>]
+ (,, (with_template [<label> <modifier>]
[(<>.after (<code>.this_text <label>) (<>#in <modifier>))]
["final" class.final]
@@ -138,7 +138,7 @@
(def state
(Parser (Modifier field.Field))
(`` (all <>.either
- (~~ (with_template [<label> <modifier>]
+ (,, (with_template [<label> <modifier>]
[(<>.after (<code>.this_text <label>) (<>#in <modifier>))]
["volatile" field.volatile]
@@ -235,7 +235,7 @@
(^.with_template [<tag> <type> <constant>]
[[_ {<tag> value}]
(do pool.monad
- [constant (`` (|> value (~~ (template.spliced <constant>))))
+ [constant (`` (|> value (,, (template.spliced <constant>))))
attribute (attribute.constant constant)]
(field.field ..constant::modifier name #1 <type> (sequence.sequence attribute)))])
([.#Bit type.boolean [(pipe.case #0 +0 #1 +1) .i64 i32.i32 constant.integer pool.integer]]
@@ -431,7 +431,7 @@
(<load> jvm_register)
(value.wrap <type>)
(_.astore lux_register))]]]
- (`` (cond (~~ (with_template [<shift> <load> <type>]
+ (`` (cond (,, (with_template [<shift> <load> <type>]
[(at type.equivalence = <type> argumentT)
(wrap_primitive <shift> <load> <type>)]
@@ -517,7 +517,7 @@
[(all _.composite
(value.unwrap <type>)
<return>)]]
- (`` (cond (~~ (with_template [<return> <type>]
+ (`` (cond (,, (with_template [<return> <type>]
[(at type.equivalence = <type> returnT)
(unwrap_primitive <return> <type>)]
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 73c27d038..13662d1c3 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
@@ -608,7 +608,7 @@
(function (_ extension_name generate archive [from to valueS])
(do //////.monad
[valueG (generate archive valueS)]
- (in (`` (cond (~~ (with_template [<object> <type>]
+ (in (`` (cond (,, (with_template [<object> <type>]
[(and (text#= (..reflection <type>) from)
(text#= <object> to))
(all _.composite
@@ -1181,7 +1181,7 @@
[(all _.composite
(///value.unwrap <type>)
<return>)]]
- (`` (cond (~~ (with_template [<return> <type>]
+ (`` (cond (,, (with_template [<return> <type>]
[(at type.equivalence = <type> returnT)
(unwrap_primitive <return> <type>)]
@@ -1236,7 +1236,7 @@
(<load> jvm_register)
(///value.wrap <type>)
(_.astore lux_register))]]]
- (`` (cond (~~ (with_template [<shift> <load> <type>]
+ (`` (cond (,, (with_template [<shift> <load> <type>]
[(at type.equivalence = <type> argumentT)
(wrap_primitive <shift> <load> <type>)]
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/runtime.lux
index 5667e47db..434d214e0 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/runtime.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/runtime.lux
@@ -92,13 +92,13 @@
body <code>.any])
(do [! meta.monad]
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
- (in (list (` (let [(~+ (|> vars
+ (in (list (` (let [(,* (|> vars
(list.zipped_2 ids)
(list#each (function (_ [id var])
(list (code.local var)
- (` (_.var (~ (code.text (format "v" (%.nat id)))))))))
+ (` (_.var (, (code.text (format "v" (%.nat id)))))))))
list.together))]
- (~ body))))))))
+ (, body))))))))
(def runtime
(syntax (_ [declaration (<>.or <code>.local
@@ -109,18 +109,18 @@
[runtime_id meta.seed]
(macro.with_symbols [g!_]
(let [runtime (code.local (///reference.artifact [..module_id runtime_id]))
- runtime_name (` (_.var (~ (code.text (%.code runtime)))))]
+ runtime_name (` (_.var (, (code.text (%.code runtime)))))]
(case declaration
{.#Left name}
(let [g!name (code.local name)
code_nameC (code.local (format "@" name))]
- (in (list (` (def .public (~ g!name)
+ (in (list (` (def .public (, g!name)
_.Var/1
- (~ runtime_name)))
+ (, runtime_name)))
- (` (def (~ code_nameC)
+ (` (def (, code_nameC)
(_.Expression Any)
- (_.defparameter (~ runtime_name) (~ code)))))))
+ (_.defparameter (, runtime_name) (, code)))))))
{.#Right [name inputs]}
(let [g!name (code.local name)
@@ -129,15 +129,15 @@
inputsC (list#each code.local inputs)
inputs_typesC (list#each (function.constant (` (_.Expression Any)))
inputs)]
- (in (list (` (def .public ((~ g!name) (~+ inputsC))
- (-> (~+ inputs_typesC) (_.Computation Any))
- (_.call/* (~ runtime_name) (list (~+ inputsC)))))
+ (in (list (` (def .public ((, g!name) (,* inputsC))
+ (-> (,* inputs_typesC) (_.Computation Any))
+ (_.call/* (, runtime_name) (list (,* inputsC)))))
- (` (def (~ code_nameC)
+ (` (def (, code_nameC)
(_.Expression Any)
- (..with_vars [(~+ inputsC)]
- (_.defun (~ runtime_name) (_.args (list (~+ inputsC)))
- (~ code))))))))))))))
+ (..with_vars [(,* inputsC)]
+ (_.defun (, runtime_name) (_.args (list (,* inputsC)))
+ (, code))))))))))))))
(runtime
(lux//try op)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/extension.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/extension.lux
index 0f8d68aea..0ccc9cbd3 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/extension.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/extension.lux
@@ -22,7 +22,7 @@
(def Vector
(syntax (_ [size <code>.nat
elemT <code>.any])
- (in (list (` [(~+ (list.repeated size elemT))])))))
+ (in (list (` [(,* (list.repeated size elemT))])))))
(def Arity
(template (_ arity)
@@ -34,24 +34,24 @@
(with_symbols [g!_ g!extension g!name g!phase g!archive g!inputs g!anchor g!expression g!declaration]
(do [! meta.monad]
[g!input+ (monad.all ! (list.repeated arity (macro.symbol "input")))]
- (in (list (` (is (All ((~ g!_) (~ g!anchor) (~ g!expression) (~ g!declaration))
- (-> ((Arity (~ (code.nat arity))) (~ g!expression))
- (generation.Handler (~ g!anchor) (~ g!expression) (~ g!declaration))))
- (function ((~ g!_) (~ g!extension))
- (function ((~ g!_) (~ g!name) (~ g!phase) (~ g!archive) (~ g!inputs))
- (case (~ g!inputs)
- (pattern (list (~+ g!input+)))
+ (in (list (` (is (All ((, g!_) (, g!anchor) (, g!expression) (, g!declaration))
+ (-> ((Arity (, (code.nat arity))) (, g!expression))
+ (generation.Handler (, g!anchor) (, g!expression) (, g!declaration))))
+ (function ((, g!_) (, g!extension))
+ (function ((, g!_) (, g!name) (, g!phase) (, g!archive) (, g!inputs))
+ (case (, g!inputs)
+ (pattern (list (,* g!input+)))
(do ///.monad
- [(~+ (|> g!input+
+ [(,* (|> g!input+
(list#each (function (_ g!input)
- (list g!input (` ((~ g!phase) (~ g!archive) (~ g!input))))))
+ (list g!input (` ((, g!phase) (, g!archive) (, g!input))))))
list.together))]
- ((~' in) ((~ g!extension) [(~+ g!input+)])))
+ ((,' in) ((, g!extension) [(,* g!input+)])))
- (~ g!_)
- (///.except ///extension.incorrect_arity [(~ g!name)
- (~ (code.nat arity))
- (list.size (~ g!inputs))]))
+ (, g!_)
+ (///.except ///extension.incorrect_arity [(, g!name)
+ (, (code.nat arity))
+ (list.size (, g!inputs))]))
))))))))))
(with_template [<arity> <type> <term>]
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux
index cc2e746e4..75762cc34 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux
@@ -86,13 +86,13 @@
body <code>.any])
(do [! meta.monad]
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
- (in (list (` (let [(~+ (|> vars
+ (in (list (` (let [(,* (|> vars
(list.zipped_2 ids)
(list#each (function (_ [id var])
(list (code.local var)
- (` (_.var (~ (code.text (format "v" (%.nat id)))))))))
+ (` (_.var (, (code.text (format "v" (%.nat id)))))))))
list.together))]
- (~ body))))))))
+ (, body))))))))
(def runtime
(syntax (_ [declaration (<>.or <code>.local
@@ -100,35 +100,35 @@
(<>.some <code>.local))))
code <code>.any])
(macro.with_symbols [g!_ runtime]
- (let [runtime_name (` (_.var (~ (code.text (%.code runtime)))))]
+ (let [runtime_name (` (_.var (, (code.text (%.code runtime)))))]
(case declaration
{.#Left name}
(let [g!name (code.local name)]
- (in (list (` (def .public (~ g!name)
+ (in (list (` (def .public (, g!name)
Var
- (~ runtime_name)))
+ (, runtime_name)))
- (` (def (~ (code.local (format "@" name)))
+ (` (def (, (code.local (format "@" name)))
Statement
- (..feature (~ runtime_name)
- (function ((~ g!_) (~ g!name))
- (~ code))))))))
+ (..feature (, runtime_name)
+ (function ((, g!_) (, g!name))
+ (, code))))))))
{.#Right [name inputs]}
(let [g!name (code.local name)
inputsC (list#each code.local inputs)
inputs_typesC (list#each (function.constant (` _.Expression)) inputs)]
- (in (list (` (def .public ((~ g!name) (~+ inputsC))
- (-> (~+ inputs_typesC) Computation)
- (_.apply (~ runtime_name) (list (~+ inputsC)))))
+ (in (list (` (def .public ((, g!name) (,* inputsC))
+ (-> (,* inputs_typesC) Computation)
+ (_.apply (, runtime_name) (list (,* inputsC)))))
- (` (def (~ (code.local (format "@" name)))
+ (` (def (, (code.local (format "@" name)))
Statement
- (..feature (~ runtime_name)
- (function ((~ g!_) (~ g!_))
- (..with_vars [(~+ inputsC)]
- (_.function (~ g!_) (list (~+ inputsC))
- (~ code)))))))))))))))
+ (..feature (, runtime_name)
+ (function ((, g!_) (, g!_))
+ (..with_vars [(,* inputsC)]
+ (_.function (, g!_) (list (,* inputsC))
+ (, code)))))))))))))))
(def length
(-> Expression Computation)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/value.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/value.lux
index 365da0d4d..d44068070 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/value.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/value.lux
@@ -13,7 +13,7 @@
(with_template [<name> <boolean> <byte> <short> <int> <long> <float> <double> <char>]
[(def (<name> type)
(-> (Type Primitive) Text)
- (`` (cond (~~ (with_template [<type> <output>]
+ (`` (cond (,, (with_template [<type> <output>]
[(type#= <type> type) <output>]
[type.boolean <boolean>]
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/runtime.lux
index 1c22af9cc..0d3d0f783 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/runtime.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/runtime.lux
@@ -108,13 +108,13 @@
body <code>.any])
(do [! meta.monad]
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
- (in (list (` (let [(~+ (|> vars
+ (in (list (` (let [(,* (|> vars
(list.zipped_2 ids)
(list#each (function (_ [id var])
(list (code.local var)
- (` (_.var (~ (code.text (format "v" (%.nat id)))))))))
+ (` (_.var (, (code.text (format "v" (%.nat id)))))))))
list.together))]
- (~ body))))))))
+ (, body))))))))
(def module_id
0)
@@ -128,20 +128,20 @@
[runtime_id meta.seed]
(macro.with_symbols [g!_]
(let [runtime (code.local (///reference.artifact [..module_id runtime_id]))
- runtime_name (` (_.var (~ (code.text (%.code runtime)))))]
+ runtime_name (` (_.var (, (code.text (%.code runtime)))))]
(case declaration
{.#Left name}
(macro.with_symbols [g!_]
(let [g!name (code.local name)]
- (in (list (` (def .public (~ g!name)
+ (in (list (` (def .public (, g!name)
Var
- (~ runtime_name)))
+ (, runtime_name)))
- (` (def (~ (code.local (format "@" name)))
+ (` (def (, (code.local (format "@" name)))
Statement
- (..feature (~ runtime_name)
- (function ((~ g!_) (~ g!name))
- (_.set (~ g!name) (~ code))))))))))
+ (..feature (, runtime_name)
+ (function ((, g!_) (, g!name))
+ (_.set (, g!name) (, code))))))))))
{.#Right [name inputs]}
(macro.with_symbols [g!_]
@@ -149,17 +149,17 @@
inputsC (list#each code.local inputs)
inputs_typesC (list#each (function.constant (` _.Expression))
inputs)]
- (in (list (` (def .public ((~ g!name) (~+ inputsC))
- (-> (~+ inputs_typesC) Computation)
- (_.apply (list (~+ inputsC)) (~ runtime_name))))
+ (in (list (` (def .public ((, g!name) (,* inputsC))
+ (-> (,* inputs_typesC) Computation)
+ (_.apply (list (,* inputsC)) (, runtime_name))))
- (` (def (~ (code.local (format "@" name)))
+ (` (def (, (code.local (format "@" name)))
Statement
- (..feature (~ runtime_name)
- (function ((~ g!_) (~ g!_))
- (..with_vars [(~+ inputsC)]
- (_.function (~ g!_) (list (~+ inputsC))
- (~ code)))))))))))))))))
+ (..feature (, runtime_name)
+ (function ((, g!_) (, g!_))
+ (..with_vars [(,* inputsC)]
+ (_.function (, g!_) (list (,* inputsC))
+ (, code)))))))))))))))))
(def (item index table)
(-> Expression Expression Location)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux
index fa45c35b0..2e525be79 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux
@@ -75,13 +75,13 @@
body <code>.any])
(do [! meta.monad]
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
- (in (list (` (let [(~+ (|> vars
+ (in (list (` (let [(,* (|> vars
(list.zipped_2 ids)
(list#each (function (_ [id var])
(list (code.local var)
- (` (_.var (~ (code.text (format "v" (%.nat id)))))))))
+ (` (_.var (, (code.text (format "v" (%.nat id)))))))))
list.together))]
- (~ body))))))))
+ (, body))))))))
(def module_id
0)
@@ -95,20 +95,20 @@
[runtime_id meta.seed]
(macro.with_symbols [g!_]
(let [runtime (code.local (///reference.artifact [..module_id runtime_id]))
- runtime_name (` (_.constant (~ (code.text (%.code runtime)))))]
+ runtime_name (` (_.constant (, (code.text (%.code runtime)))))]
(case declaration
{.#Left name}
(macro.with_symbols [g!_]
(let [g!name (code.local name)]
- (in (list (` (def .public (~ g!name)
+ (in (list (` (def .public (, g!name)
Var
- (~ runtime_name)))
+ (, runtime_name)))
- (` (def (~ (code.local (format "@" name)))
+ (` (def (, (code.local (format "@" name)))
Statement
- (..feature (~ runtime_name)
- (function ((~ g!_) (~ g!name))
- (_.define (~ g!name) (~ code))))))))))
+ (..feature (, runtime_name)
+ (function ((, g!_) (, g!name))
+ (_.define (, g!name) (, code))))))))))
{.#Right [name inputs]}
(macro.with_symbols [g!_]
@@ -116,18 +116,18 @@
inputsC (list#each code.local inputs)
inputs_typesC (list#each (function.constant (` _.Expression))
inputs)]
- (in (list (` (def .public ((~ g!name) (~+ inputsC))
- (-> (~+ inputs_typesC) Computation)
- (_.apply (list (~+ inputsC)) (~ runtime_name))))
+ (in (list (` (def .public ((, g!name) (,* inputsC))
+ (-> (,* inputs_typesC) Computation)
+ (_.apply (list (,* inputsC)) (, runtime_name))))
- (` (def (~ (code.local (format "@" name)))
+ (` (def (, (code.local (format "@" name)))
Statement
- (..feature (~ runtime_name)
- (function ((~ g!_) (~ g!_))
- (..with_vars [(~+ inputsC)]
- (_.define_function (~ g!_)
- (list (~+ (list#each (|>> (~) [false] (`)) inputsC)))
- (~ code)))))))))))))))))
+ (..feature (, runtime_name)
+ (function ((, g!_) (, g!_))
+ (..with_vars [(,* inputsC)]
+ (_.define_function (, g!_)
+ (list (,* (list#each (|>> (,) [false] (`)) inputsC)))
+ (, code)))))))))))))))))
(runtime
(io//log! message)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux
index 93f0477c7..19c967248 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux
@@ -114,13 +114,13 @@
body <code>.any])
(do [! meta.monad]
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
- (in (list (` (let [(~+ (|> vars
+ (in (list (` (let [(,* (|> vars
(list.zipped_2 ids)
(list#each (function (_ [id var])
(list (code.local var)
- (` (_.var (~ (code.text (format "v" (%.nat id)))))))))
+ (` (_.var (, (code.text (format "v" (%.nat id)))))))))
list.together))]
- (~ body))))))))
+ (, body))))))))
(def runtime
(syntax (_ [declaration (<>.or <code>.local
@@ -132,32 +132,32 @@
(macro.with_symbols [g!_]
(let [nameC (code.local name)
code_nameC (code.local (format "@" name))
- runtime_nameC (` (runtime_name (~ (code.text name))))]
- (in (list (` (def .public (~ nameC) SVar (~ runtime_nameC)))
- (` (def (~ code_nameC)
+ runtime_nameC (` (runtime_name (, (code.text name))))]
+ (in (list (` (def .public (, nameC) SVar (, runtime_nameC)))
+ (` (def (, code_nameC)
(Statement Any)
- (..feature (~ runtime_nameC)
- (function ((~ g!_) (~ g!_))
- (_.set (list (~ g!_)) (~ code))))))))))
+ (..feature (, runtime_nameC)
+ (function ((, g!_) (, g!_))
+ (_.set (list (, g!_)) (, code))))))))))
{.#Right [name inputs]}
(macro.with_symbols [g!_]
(let [nameC (code.local name)
code_nameC (code.local (format "@" name))
- runtime_nameC (` (runtime_name (~ (code.text name))))
+ runtime_nameC (` (runtime_name (, (code.text name))))
inputsC (list#each code.local inputs)
inputs_typesC (list#each (function.constant (` (_.Expression Any)))
inputs)]
- (in (list (` (def .public ((~ nameC) (~+ inputsC))
- (-> (~+ inputs_typesC) (Computation Any))
- (_.apply (list (~+ inputsC)) (~ runtime_nameC))))
- (` (def (~ code_nameC)
+ (in (list (` (def .public ((, nameC) (,* inputsC))
+ (-> (,* inputs_typesC) (Computation Any))
+ (_.apply (list (,* inputsC)) (, runtime_nameC))))
+ (` (def (, code_nameC)
(Statement Any)
- (..feature (~ runtime_nameC)
- (function ((~ g!_) (~ g!_))
- (..with_vars [(~+ inputsC)]
- (_.def (~ g!_) (list (~+ inputsC))
- (~ code))))))))))))))
+ (..feature (, runtime_nameC)
+ (function ((, g!_) (, g!_))
+ (..with_vars [(,* inputsC)]
+ (_.def (, g!_) (list (,* inputsC))
+ (, code))))))))))))))
(runtime
(lux::try op)
@@ -292,7 +292,7 @@
(runtime
(i64::64 input)
(with_vars [temp]
- (`` (<| (~~ (with_template [<scenario> <iteration> <cap> <entrance>]
+ (`` (<| (,, (with_template [<scenario> <iteration> <cap> <entrance>]
[(_.if (|> input <scenario>)
(all _.then
(_.set (list temp) (_.% <iteration> input))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/runtime.lux
index b0d02c095..49dfb21af 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/runtime.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/runtime.lux
@@ -81,13 +81,13 @@
body <code>.any])
(do [! meta.monad]
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
- (in (list (` (let [(~+ (|> vars
+ (in (list (` (let [(,* (|> vars
(list.zipped_2 ids)
(list#each (function (_ [id var])
(list (code.local var)
- (` (_.var (~ (code.text (format "v" (%.nat id)))))))))
+ (` (_.var (, (code.text (format "v" (%.nat id)))))))))
list.together))]
- (~ body))))))))
+ (, body))))))))
(def runtime
(syntax (_ [declaration (<>.or <code>.local
@@ -98,33 +98,33 @@
[runtime_id meta.seed]
(macro.with_symbols [g!_]
(let [runtime (code.local (///reference.artifact [..module_id runtime_id]))
- runtime_name (` (_.var (~ (code.text (%.code runtime)))))]
+ runtime_name (` (_.var (, (code.text (%.code runtime)))))]
(case declaration
{.#Left name}
(let [g!name (code.local name)]
- (in (list (` (def .public (~ g!name)
+ (in (list (` (def .public (, g!name)
_.SVar
- (~ runtime_name)))
+ (, runtime_name)))
- (` (def (~ (code.local (format "@" name)))
+ (` (def (, (code.local (format "@" name)))
_.Expression
- (_.set! (~ runtime_name) (~ code)))))))
+ (_.set! (, runtime_name) (, code)))))))
{.#Right [name inputs]}
(let [g!name (code.local name)
inputsC (list#each code.local inputs)
inputs_typesC (list#each (function.constant (` _.Expression))
inputs)]
- (in (list (` (def .public ((~ g!name) (~+ inputsC))
- (-> (~+ inputs_typesC) _.Expression)
- (_.apply (list (~+ inputsC)) (~ runtime_name))))
+ (in (list (` (def .public ((, g!name) (,* inputsC))
+ (-> (,* inputs_typesC) _.Expression)
+ (_.apply (list (,* inputsC)) (, runtime_name))))
- (` (def (~ (code.local (format "@" name)))
+ (` (def (, (code.local (format "@" name)))
_.Expression
- (..with_vars [(~+ inputsC)]
- (_.set! (~ runtime_name)
- (_.function (list (~+ inputsC))
- (~ code)))))))))))))))
+ (..with_vars [(,* inputsC)]
+ (_.set! (, runtime_name)
+ (_.function (list (,* inputsC))
+ (, code)))))))))))))))
(def .public variant_tag_field "luxVT")
(def .public variant_flag_field "luxVF")
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/runtime.lux
index a3d1fe4ab..6684e6a59 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/runtime.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/runtime.lux
@@ -73,13 +73,13 @@
body <code>.any])
(do [! meta.monad]
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
- (in (list (` (let [(~+ (|> vars
+ (in (list (` (let [(,* (|> vars
(list.zipped_2 ids)
(list#each (function (_ [id var])
(list (code.local var)
- (` (_.local (~ (code.text (format "v" (%.nat id)))))))))
+ (` (_.local (, (code.text (format "v" (%.nat id)))))))))
list.together))]
- (~ body))))))))
+ (, body))))))))
(def module_id
0)
@@ -116,41 +116,41 @@
{.#Left name}
(macro.with_symbols [g!_]
(let [runtime (code.local (///reference.artifact [..module_id runtime_id]))
- runtime_name (` (_.constant (~ (code.text (%.code runtime)))))
+ runtime_name (` (_.constant (, (code.text (%.code runtime)))))
g!name (code.local name)]
- (in (list (` (def .public (~ g!name) _.CVar (~ runtime_name)))
- (` (def (~ (code.local (format "@" name)))
+ (in (list (` (def .public (, g!name) _.CVar (, runtime_name)))
+ (` (def (, (code.local (format "@" name)))
Statement
- (~ (list#mix (function (_ [when then] else)
- (` (_.if (~ when)
- (_.set (list (~ runtime_name)) (~ then))
- (~ else))))
- (` (_.set (list (~ runtime_name)) (~ default_implementation)))
+ (, (list#mix (function (_ [when then] else)
+ (` (_.if (, when)
+ (_.set (list (, runtime_name)) (, then))
+ (, else))))
+ (` (_.set (list (, runtime_name)) (, default_implementation)))
conditional_implementations))))))))
{.#Right [name inputs]}
(macro.with_symbols [g!_]
(let [runtime (code.local (///reference.artifact [..module_id runtime_id]))
- runtime_name (` (_.local (~ (code.text (%.code runtime)))))
+ runtime_name (` (_.local (, (code.text (%.code runtime)))))
g!name (code.local name)
inputsC (list#each code.local inputs)
inputs_typesC (list#each (function.constant (` _.Expression))
inputs)]
- (in (list (` (def .public ((~ g!name) (~+ inputsC))
- (-> (~+ inputs_typesC) Computation)
- (_.apply (list (~+ inputsC)) {.#None}
- (~ runtime_name))))
+ (in (list (` (def .public ((, g!name) (,* inputsC))
+ (-> (,* inputs_typesC) Computation)
+ (_.apply (list (,* inputsC)) {.#None}
+ (, runtime_name))))
- (` (def (~ (code.local (format "@" name)))
+ (` (def (, (code.local (format "@" name)))
Statement
- (..with_vars [(~+ inputsC)]
- (~ (list#mix (function (_ [when then] else)
- (` (_.if (~ when)
- (_.function (~ runtime_name) (list (~+ inputsC))
- (~ then))
- (~ else))))
- (` (_.function (~ runtime_name) (list (~+ inputsC))
- (~ default_implementation)))
+ (..with_vars [(,* inputsC)]
+ (, (list#mix (function (_ [when then] else)
+ (` (_.if (, when)
+ (_.function (, runtime_name) (list (,* inputsC))
+ (, then))
+ (, else))))
+ (` (_.function (, runtime_name) (list (,* inputsC))
+ (, default_implementation)))
conditional_implementations))))))))))))))
(def tuple_size
@@ -295,7 +295,7 @@
(i64::i64 input)
[..mruby? (_.return input)]
(with_vars [temp]
- (`` (<| (~~ (with_template [<scenario> <iteration> <cap> <entrance>]
+ (`` (<| (,, (with_template [<scenario> <iteration> <cap> <entrance>]
[(_.if (|> input <scenario>)
(all _.then
(_.set (list temp) (_.% <iteration> input))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/runtime.lux
index 215e6af9a..1bf3f72eb 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/runtime.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/runtime.lux
@@ -63,13 +63,13 @@
body <code>.any])
(do [! meta.monad]
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
- (in (list (` (let [(~+ (|> vars
+ (in (list (` (let [(,* (|> vars
(list.zipped_2 ids)
(list#each (function (_ [id var])
(list (code.local var)
- (` (_.var (~ (code.text (format "v" (%.nat id)))))))))
+ (` (_.var (, (code.text (format "v" (%.nat id)))))))))
list.together))]
- (~ body))))))))
+ (, body))))))))
(def runtime
(syntax (_ [declaration (<>.or <code>.local
@@ -80,32 +80,32 @@
[runtime_id meta.seed]
(macro.with_symbols [g!_]
(let [runtime (code.local (///reference.artifact [..module_id runtime_id]))
- runtime_name (` (_.var (~ (code.text (%.code runtime)))))]
+ runtime_name (` (_.var (, (code.text (%.code runtime)))))]
(case declaration
{.#Left name}
(let [g!name (code.local name)]
- (in (list (` (def .public (~ g!name)
+ (in (list (` (def .public (, g!name)
Var
- (~ runtime_name)))
+ (, runtime_name)))
- (` (def (~ (code.local (format "@" name)))
+ (` (def (, (code.local (format "@" name)))
_.Computation
- (_.define_constant (~ runtime_name) (~ code)))))))
+ (_.define_constant (, runtime_name) (, code)))))))
{.#Right [name inputs]}
(let [g!name (code.local name)
inputsC (list#each code.local inputs)
inputs_typesC (list#each (function.constant (` _.Expression))
inputs)]
- (in (list (` (def .public ((~ g!name) (~+ inputsC))
- (-> (~+ inputs_typesC) _.Computation)
- (_.apply (list (~+ inputsC)) (~ runtime_name))))
+ (in (list (` (def .public ((, g!name) (,* inputsC))
+ (-> (,* inputs_typesC) _.Computation)
+ (_.apply (list (,* inputsC)) (, runtime_name))))
- (` (def (~ (code.local (format "@" name)))
+ (` (def (, (code.local (format "@" name)))
_.Computation
- (..with_vars [(~+ inputsC)]
- (_.define_function (~ runtime_name) [(list (~+ inputsC)) {.#None}]
- (~ code))))))))))))))
+ (..with_vars [(,* inputsC)]
+ (_.define_function (, runtime_name) [(list (,* inputsC)) {.#None}]
+ (, code))))))))))))))
(def last_index
(-> Expression Computation)
@@ -263,7 +263,7 @@
(runtime
(i64//64 input)
(with_vars [temp]
- (`` (<| (~~ (with_template [<scenario> <iteration> <cap> <entrance>]
+ (`` (<| (,, (with_template [<scenario> <iteration> <cap> <entrance>]
[(_.if (|> input <scenario>)
(_.let (list [temp (_.remainder/2 <iteration> input)])
(_.if (|> temp <scenario>)
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 a3872dfa5..cba888c44 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux
@@ -64,7 +64,7 @@
[(for @.python (def <declaration> <type> <body>)
... TODO: No longer skip inlining Lua after Rembulan isn't being used anymore.
@.lua (def <declaration> <type> <body>)
- (`` (def (~~ (..declaration_name <declaration>))
+ (`` (def (,, (..declaration_name <declaration>))
(template <declaration>
[<body>]))))]))
@@ -297,7 +297,7 @@
(with_expansions [<digits> (these "0" "1" "2" "3" "4" "5" "6" "7" "8" "9")
<non_symbol_chars> (with_template [<char>]
- [(~~ (static <char>))]
+ [(,, (static <char>))]
[text.space]
[text.new_line] [text.carriage_return]
@@ -322,7 +322,7 @@
[[<digits> <digit_separator>]
@then
- (~~ (template.spliced @else_options))]
+ (,, (template.spliced @else_options))]
... else
@else))]))
@@ -372,7 +372,7 @@
<failure> (!failure ..frac_parser where offset source_code)
<frac_separator> (static ..frac_separator)
<signs> (with_template [<sign>]
- [(~~ (static <sign>))]
+ [(,, (static <sign>))]
[..positive_sign]
[..negative_sign])]
@@ -463,7 +463,7 @@
(-> Nat Text (Parser Symbol))
(<| (!with_char+ source_code//size source_code offset/0 char/0
(!end_of_file where offset/0 source_code current_module))
- (if (!n/= (char (~~ (static ..symbol_separator))) char/0)
+ (if (!n/= (char (,, (static ..symbol_separator))) char/0)
(<| (let [offset/1 (!++ offset/0)])
(!with_char+ source_code//size source_code offset/1 char/1
(!end_of_file where offset/1 source_code current_module))
@@ -482,7 +482,7 @@
(..symbol_part_parser start where offset source_code)))
(let [[where' offset' source_code'] source'])
(!with_char source_code' offset' char/separator <simple>)
- (if (!n/= (char (~~ (static ..symbol_separator))) char/separator)
+ (if (!n/= (char (,, (static ..symbol_separator))) char/separator)
(<| (let [offset'' (!++ offset')])
(!letE [source'' complex] (..symbol_part_parser offset'' (!forward 1 where') offset'' source_code'))
(if ("lux text =" "" complex)
@@ -530,10 +530,10 @@
(<| (!with_char+ source_code//size source_code offset/0 char/0
(!end_of_file where offset/0 source_code current_module))
(with_expansions [<composites> (with_template [<open> <close> <parser>]
- [[(~~ (static <open>))]
+ [[(,, (static <open>))]
(<parser> <again> <consume_1>)
- [(~~ (static <close>))]
+ [(,, (static <close>))]
(!close <close>)]
[..open_form ..close_form form_parser]
@@ -541,23 +541,23 @@
[..open_tuple ..close_tuple tuple_parser]
)]
(`` ("lux syntax char case!" char/0
- [[(~~ (static text.space))
- (~~ (static text.carriage_return))]
+ [[(,, (static text.space))
+ (,, (static text.carriage_return))]
(again (!horizontal where offset/0 source_code))
... New line
- [(~~ (static text.new_line))]
+ [(,, (static text.new_line))]
(again (!vertical where offset/0 source_code))
<composites>
... Text
- [(~~ (static ..text_delimiter))]
+ [(,, (static ..text_delimiter))]
(text_parser where (!++ offset/0) source_code)
... Coincidentally (= ..symbol_separator ..frac_separator)
- [(~~ (static ..symbol_separator))
- ... (~~ (static ..frac_separator))
+ [(,, (static ..symbol_separator))
+ ... (,, (static ..frac_separator))
]
... It's either a Rev, a symbol, or a comment.
(with_expansions [<rev_parser> (rev_parser source_code//size offset/0 where (!++ offset/1) source_code)
@@ -576,13 +576,13 @@
<rev_parser>
... It's either a symbol, or a comment.
("lux syntax char case!" char/1
- [[(~~ (static ..symbol_separator))]
+ [[(,, (static ..symbol_separator))]
... It's either a symbol, or a comment.
(<| (let [offset/2 (!++ offset/1)])
(!with_char+ source_code//size source_code offset/2 char/2
(!end_of_file where offset/2 source_code current_module))
("lux syntax char case!" char/2
- [[(~~ (static ..symbol_separator))]
+ [[(,, (static ..symbol_separator))]
... It's a comment.
<comment_parser>]
... It's a symbol.
@@ -590,17 +590,17 @@
... It's a symbol.
<short_symbol_parser>))))
- [(~~ (static ..positive_sign))
- (~~ (static ..negative_sign))]
+ [(,, (static ..positive_sign))
+ (,, (static ..negative_sign))]
(!signed_parser source_code//size offset/0 where source_code aliases
(!end_of_file where offset/0 source_code current_module))
- [(~~ (static ..sigil))]
+ [(,, (static ..sigil))]
(<| (let [offset/1 (!++ offset/0)])
(!with_char+ source_code//size source_code offset/1 char/1
(!end_of_file where offset/1 source_code current_module))
("lux syntax char case!" char/1
- [(~~ (with_template [<char> <bit>]
+ [(,, (with_template [<char> <bit>]
[[<char>]
(..bit_syntax <bit> [where offset/0 source_code])]
diff --git a/stdlib/source/library/lux/tool/compiler/reference.lux b/stdlib/source/library/lux/tool/compiler/reference.lux
index 9f4b502c8..c4a64ae2e 100644
--- a/stdlib/source/library/lux/tool/compiler/reference.lux
+++ b/stdlib/source/library/lux/tool/compiler/reference.lux
@@ -81,7 +81,7 @@
(`` (def .public self
(template (self)
- [(..variable (~~ (/variable.self)))])))
+ [(..variable (,, (/variable.self)))])))
(def .public format
(Format Reference)
diff --git a/stdlib/source/library/lux/world/console.lux b/stdlib/source/library/lux/world/console.lux
index ac50d96e0..943c16c23 100644
--- a/stdlib/source/library/lux/world/console.lux
+++ b/stdlib/source/library/lux/world/console.lux
@@ -31,7 +31,7 @@
(def .public (async console)
(-> (Console IO) (Console Async))
(`` (implementation
- (~~ (with_template [<capability>]
+ (,, (with_template [<capability>]
[(def <capability>
(|>> (at console <capability>) async.future))]
@@ -184,7 +184,7 @@
(All (_ s) (-> (Mock s) s (Console IO)))
(let [state (atom.atom init)]
(`` (implementation
- (~~ (with_template [<method> <mock>]
+ (,, (with_template [<method> <mock>]
[(def (<method> _)
(do [! io.monad]
[|state| (atom.read! state)]
diff --git a/stdlib/source/library/lux/world/db/jdbc.lux b/stdlib/source/library/lux/world/db/jdbc.lux
index 1577e7104..71ffeb1db 100644
--- a/stdlib/source/library/lux/world/db/jdbc.lux
+++ b/stdlib/source/library/lux/world/db/jdbc.lux
@@ -107,7 +107,7 @@
(def .public (async db)
(-> (DB IO) (DB Async))
(`` (implementation
- (~~ (with_template [<name> <forge>]
+ (,, (with_template [<name> <forge>]
[(def <name> (<forge> (|>> (!.use (at db <name>)) async.future)))]
[execute can_execute]
diff --git a/stdlib/source/library/lux/world/db/jdbc/input.lux b/stdlib/source/library/lux/world/db/jdbc/input.lux
index 47cc12b51..94a0b399e 100644
--- a/stdlib/source/library/lux/world/db/jdbc/input.lux
+++ b/stdlib/source/library/lux/world/db/jdbc/input.lux
@@ -22,7 +22,7 @@
)
(`` (import java/sql/PreparedStatement
- (~~ (with_template [<name> <type>]
+ (,, (with_template [<name> <type>]
[(<name> [int <type>] "try" void)]
[setBoolean boolean]
diff --git a/stdlib/source/library/lux/world/db/jdbc/output.lux b/stdlib/source/library/lux/world/db/jdbc/output.lux
index 92f52b003..809015e50 100644
--- a/stdlib/source/library/lux/world/db/jdbc/output.lux
+++ b/stdlib/source/library/lux/world/db/jdbc/output.lux
@@ -24,7 +24,7 @@
(import java/sql/Timestamp)
(`` (import java/sql/ResultSet
- (~~ (with_template [<method_name> <return_class>]
+ (,, (with_template [<method_name> <return_class>]
[(<method_name> [int] "try" <return_class>)]
[getBoolean boolean]
diff --git a/stdlib/source/library/lux/world/db/sql.lux b/stdlib/source/library/lux/world/db/sql.lux
index a41ccf85b..834e43081 100644
--- a/stdlib/source/library/lux/world/db/sql.lux
+++ b/stdlib/source/library/lux/world/db/sql.lux
@@ -261,7 +261,7 @@
(with_template [<name> <sql> <variables> <input> <output>]
[(`` (def .public (<name> value query)
- (All (_ (~~ (template.spliced <variables>)))
+ (All (_ (,, (template.spliced <variables>)))
(-> Nat <input> <output>))
(abstraction
(format (representation query)
diff --git a/stdlib/source/library/lux/world/environment.lux b/stdlib/source/library/lux/world/environment.lux
index 2955c5343..dc055f98d 100644
--- a/stdlib/source/library/lux/world/environment.lux
+++ b/stdlib/source/library/lux/world/environment.lux
@@ -22,9 +22,9 @@
["[0]" dictionary (.only Dictionary)]
["[0]" list (.use "[1]#[0]" functor)]]]
["[0]" ffi (.only import)
- (.~~ (.for "JavaScript" (.~~ (.these ["[0]" node_js]))
- "{old}" (.~~ (.these ["node_js" //math]))
- (.~~ (.these))))]
+ (.,, (.for "JavaScript" (.,, (.these ["[0]" node_js]))
+ "{old}" (.,, (.these ["node_js" //math]))
+ (.,, (.these))))]
["[0]" macro (.only)
["[0]" template]]
[math
@@ -72,7 +72,7 @@
(`` (def .public (async environment)
(-> (Environment IO) (Environment Async))
(implementation
- (~~ (with_template [<method>]
+ (,, (with_template [<method>]
[(def <method>
(at environment <method>))]
@@ -80,7 +80,7 @@
[directory]
))
- (~~ (with_template [<method>]
+ (,, (with_template [<method>]
[(def <method>
(|>> (at environment <method>) async.future))]
diff --git a/stdlib/source/library/lux/world/file.lux b/stdlib/source/library/lux/world/file.lux
index 9db2c4547..3b768f0a1 100644
--- a/stdlib/source/library/lux/world/file.lux
+++ b/stdlib/source/library/lux/world/file.lux
@@ -25,9 +25,9 @@
["[0]" list (.use "[1]#[0]" functor)]
["[0]" dictionary (.only Dictionary)]]]
["[0]" ffi (.only)
- (.~~ (.for "JavaScript" (.~~ (.these ["[0]" node_js]))
- "{old}" (.~~ (.these ["node_js" //control/thread]))
- (.~~ (.these))))]
+ (.,, (.for "JavaScript" (.,, (.these ["[0]" node_js]))
+ "{old}" (.,, (.these ["node_js" //control/thread]))
+ (.,, (.these))))]
[macro
["[0]" template]]
[math
@@ -46,7 +46,7 @@
(is Text
separator)
- (~~ (with_template [<name> <output>]
+ (,, (with_template [<name> <output>]
[(is (-> Path (! <output>))
<name>)]
@@ -54,7 +54,7 @@
[directory? Bit]
))
- (~~ (with_template [<name> <output>]
+ (,, (with_template [<name> <output>]
[(is (-> Path (! (Try <output>)))
<name>)]
@@ -69,7 +69,7 @@
[delete Any]
))
- (~~ (with_template [<name> <input>]
+ (,, (with_template [<name> <input>]
[(is (-> Path <input> (! (Try Any)))
<name>)]
@@ -112,7 +112,7 @@
(def separator
(at fs separator))
- (~~ (with_template [<name>]
+ (,, (with_template [<name>]
[(def <name>
(|>> (at fs <name>)
async.future))]
@@ -130,7 +130,7 @@
[read]
[delete]))
- (~~ (with_template [<name>]
+ (,, (with_template [<name>]
[(def (<name> path input)
(async.future (at fs <name> path input)))]
@@ -163,7 +163,7 @@
(`` (ffi.import java/io/File
"[1]::[0]"
(new [java/lang/String])
- (~~ (with_template [<name>]
+ (,, (with_template [<name>]
[(<name> [] "io" "try" boolean)]
[createNewFile] [mkdir]
@@ -206,7 +206,7 @@
(def separator
(ffi.of_string (java/io/File::separator)))
- (~~ (with_template [<name> <method>]
+ (,, (with_template [<name> <method>]
[(def <name>
(|>> ffi.as_string
java/io/File::new
@@ -222,7 +222,7 @@
java/io/File::new
java/io/File::mkdir))
- (~~ (with_template [<name> <method>]
+ (,, (with_template [<name> <method>]
[(def (<name> path)
(do [! (try.with io.monad)]
[?children (java/io/File::listFiles (java/io/File::new (ffi.as_string path)))]
@@ -281,7 +281,7 @@
java/io/File::new
(java/io/File::setLastModified (|> time_stamp instant.relative duration.millis ffi.as_long))))
- (~~ (with_template [<flag> <name>]
+ (,, (with_template [<flag> <name>]
[(def (<name> path data)
(do (try.with io.monad)
[stream (java/io/FileOutputStream::new (java/io/File::new (ffi.as_string path)) (ffi.as_boolean <flag>))
@@ -388,7 +388,7 @@
(def separator
js_separator)
- (~~ (with_template [<name> <method>]
+ (,, (with_template [<name> <method>]
[(def (<name> path)
(do async.monad
[?stats (with_async write! (Try Stats)
@@ -420,7 +420,7 @@
(with_async write! (Try Any)
(Fs::mkdir path (..any_callback write!) node_fs)))))
- (~~ (with_template [<name> <method>]
+ (,, (with_template [<name> <method>]
[(def (<name> path)
(do [! (try.with async.monad)]
[subs (with_async write! (Try (Array ffi.String))
@@ -494,7 +494,7 @@
(Fs::utimes path when when (..any_callback write!)
node_fs))))
- (~~ (with_template [<name> <method>]
+ (,, (with_template [<name> <method>]
[(def (<name> path data)
(with_async write! (Try Any)
(<method> path (Buffer::from data) (..any_callback write!)
@@ -554,7 +554,7 @@
(def separator
..python_separator)
- (~~ (with_template [<name> <method>]
+ (,, (with_template [<name> <method>]
[(def <name>
(|>> <method>
(io#each (|>> (try.else false)))))]
@@ -566,7 +566,7 @@
(def make_directory
os::mkdir)
- (~~ (with_template [<name> <method>]
+ (,, (with_template [<name> <method>]
[(def (<name> path)
(let [! (try.with io.monad)]
(|> path
@@ -615,7 +615,7 @@
(let [when (|> time_stamp instant.relative duration.millis (i./ +1,000))]
(os::utime path (..tuple [when when]))))
- (~~ (with_template [<name> <mode>]
+ (,, (with_template [<name> <mode>]
[(def (<name> path data)
(do (try.with io.monad)
[file (..open path <mode>)
@@ -680,7 +680,7 @@
(def separator
..ruby_separator)
- (~~ (with_template [<name> <test>]
+ (,, (with_template [<name> <test>]
[(def <name>
(|>> <test>
(io#each (|>> (try.else false)))))]
@@ -692,7 +692,7 @@
(def make_directory
FileUtils::mkdir)
- (~~ (with_template [<name> <test>]
+ (,, (with_template [<name> <test>]
[(def (<name> path)
(do [! (try.with io.monad)]
[self (Dir::open path)
@@ -719,11 +719,11 @@
[sub_directories RubyFile::directory?]
))
- (~~ (with_template [<name> <pipeline>]
+ (,, (with_template [<name> <pipeline>]
[(def <name>
(let [! (try.with io.monad)]
(|>> RubyFile::stat
- (at ! each (`` (|>> (~~ (template.spliced <pipeline>))))))))]
+ (at ! each (`` (|>> (,, (template.spliced <pipeline>))))))))]
[file_size [Stat::size .nat]]
[last_modified [Stat::mtime
@@ -758,7 +758,7 @@
Time::at)]
(RubyFile::utime moment moment path)))
- (~~ (with_template [<mode> <name>]
+ (,, (with_template [<mode> <name>]
[(def (<name> path data)
(do [! (try.with io.monad)]
[file (RubyFile::open path <mode>)
@@ -821,7 +821,7 @@
... (`` (def (file path)
... (-> Path (File IO))
... (implementation
- ... (~~ (with_template [<name> <mode>]
+ ... (,, (with_template [<name> <mode>]
... [(def (<name> data)
... (do [! (try.with io.monad)]
... [outcome (..file_put_contents [path ("php pack" ..byte_array_format data) <mode>])]
@@ -843,13 +843,13 @@
... (def path
... path)
- ... (~~ (with_template [<name> <ffi> <pipeline>]
+ ... (,, (with_template [<name> <ffi> <pipeline>]
... [(def (<name> _)
... (do [! (try.with io.monad)]
... [value (<ffi> [path])]
... (if (bit#= false (as Bit value))
... (at io.monad in (exception.except ..cannot_find_file [path]))
- ... (in (`` (|> value (~~ (template.spliced <pipeline>))))))))]
+ ... (in (`` (|> value (,, (template.spliced <pipeline>))))))))]
... [size ..filesize [.nat]]
... [last_modified ..filemtime [(i.* +1,000) duration.of_millis instant.absolute]]
@@ -886,7 +886,7 @@
... (def scope
... path)
- ... (~~ (with_template [<name> <test> <constructor> <capability>]
+ ... (,, (with_template [<name> <test> <constructor> <capability>]
... [(def (<name> _)
... (do [! (try.with io.monad)]
... [children (..scandir [path])]
@@ -923,7 +923,7 @@
... (`` (def .public default
... (System IO)
... (implementation
- ... (~~ (with_template [<name> <test> <constructor> <exception>]
+ ... (,, (with_template [<name> <test> <constructor> <exception>]
... [(def (<name> path)
... (do [! (try.with io.monad)]
... [verdict (<test> path)]
@@ -1153,7 +1153,7 @@
(def separator
separator)
- (~~ (with_template [<method> <retrieve>]
+ (,, (with_template [<method> <retrieve>]
[(def (<method> path)
(|> store
stm.read
@@ -1179,7 +1179,7 @@
{try.#Failure error}
(in {try.#Failure error})))))
- (~~ (with_template [<method> <tag>]
+ (,, (with_template [<method> <tag>]
[(def (<method> path)
(stm.commit!
(do stm.monad
diff --git a/stdlib/source/library/lux/world/shell.lux b/stdlib/source/library/lux/world/shell.lux
index f9d7a6fd6..c218f3bf5 100644
--- a/stdlib/source/library/lux/world/shell.lux
+++ b/stdlib/source/library/lux/world/shell.lux
@@ -61,7 +61,7 @@
(def (async_process process)
(-> (Process IO) (Process Async))
(`` (implementation
- (~~ (with_template [<method>]
+ (,, (with_template [<method>]
[(def <method>
(|>> (at process <method>)
async.future))]
@@ -245,7 +245,7 @@
java/io/BufferedReader::new)]]
(in (is (Process IO)
(`` (implementation
- (~~ (with_template [<name> <stream>]
+ (,, (with_template [<name> <stream>]
[(def (<name> _)
(do !
[output (java/io/BufferedReader::readLine <stream>)]
@@ -261,7 +261,7 @@
))
(def (write message)
(java/io/OutputStream::write (at utf8.codec encoded message) jvm_output))
- (~~ (with_template [<name> <method>]
+ (,, (with_template [<name> <method>]
[(def (<name> _)
(|> process <method>))]
@@ -327,7 +327,7 @@
(`` (def (mock_process state mock)
(All (_ s) (-> (Atom s) (Mock s) (Process IO)))
(implementation
- (~~ (with_template [<name> <mock>]
+ (,, (with_template [<name> <mock>]
[(def (<name> _)
(do [! io.monad]
[|state| (atom.read! state)]