From 55c7cd0e5b82d29634aa136f7c97f5daf1ed49a5 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 3 Dec 2024 15:48:35 -0400 Subject: [PATCH] [Part 2] w.r.t labels, exchanging the (`#`) prefix for Lisp's (`:`). --- .../source/program/aedifex/command/build.lux | 28 +- .../aedifex/command/deploy/release.lux | 8 +- .../program/aedifex/dependency/resolution.lux | 4 +- aedifex/source/program/aedifex/hash.lux | 24 +- lux-c++/source/program.lux | 34 +- lux-cl/source/program.lux | 98 +-- lux-js/source/program.lux | 134 ++-- lux-jvm/source/program.lux | 20 +- lux-lua/source/program.lux | 118 ++-- lux-php/source/program.lux | 178 ++--- lux-python/source/program.lux | 104 +-- lux-r/source/program.lux | 134 ++-- lux-ruby/source/program.lux | 232 +++---- .../lux/control/security/policy.lux | 6 +- stdlib/source/documentation/lux/ffi.js.lux | 6 +- stdlib/source/documentation/lux/ffi.jvm.lux | 40 +- stdlib/source/documentation/lux/ffi.py.lux | 4 +- stdlib/source/documentation/lux/ffi.rb.lux | 4 +- stdlib/source/library/lux.lux | 10 +- .../lux/phase/extension/analysis/js.lux | 28 +- .../lux/phase/extension/analysis/jvm.lux | 244 +++---- .../lux/phase/extension/analysis/lua.lux | 36 +- .../lux/phase/extension/analysis/lux.lux | 38 +- .../lux/phase/extension/analysis/php.lux | 28 +- .../lux/phase/extension/analysis/python.lux | 28 +- .../lux/phase/extension/analysis/ruby.lux | 20 +- .../lux/phase/extension/declaration/jvm.lux | 14 +- .../lux/phase/extension/declaration/lux.lux | 4 +- .../extension/translation/c++/common.lux | 8 +- .../translation/common_lisp/common.lux | 4 +- .../phase/extension/translation/js/common.lux | 48 +- .../phase/extension/translation/js/host.lux | 36 +- .../extension/translation/jvm/common.lux | 170 ++--- .../phase/extension/translation/jvm/host.lux | 350 +++++----- .../phase/extension/translation/lua/host.lux | 42 +- .../extension/translation/php/common.lux | 4 +- .../phase/extension/translation/php/host.lux | 46 +- .../extension/translation/python/common.lux | 52 +- .../extension/translation/python/host.lux | 36 +- .../phase/extension/translation/r/common.lux | 4 +- .../extension/translation/ruby/common.lux | 24 +- .../phase/extension/translation/ruby/host.lux | 26 +- .../language/lux/phase/synthesis/when.lux | 14 +- .../lux/phase/translation/c++/runtime.lux | 50 +- .../lux/phase/translation/js/runtime.lux | 294 ++++---- .../lux/phase/translation/js/when.lux | 12 +- .../lux/phase/translation/jvm/function.lux | 2 +- .../translation/jvm/function/method/of.lux | 6 +- .../lux/phase/translation/jvm/host.lux | 24 +- .../lux/phase/translation/jvm/primitive.lux | 4 +- .../lux/phase/translation/jvm/program.lux | 12 +- .../lux/phase/translation/jvm/runtime.lux | 242 +++---- .../lux/phase/translation/lua/runtime.lux | 36 +- .../phase/translation/python/primitive.lux | 5 +- .../lux/phase/translation/python/runtime.lux | 146 ++-- .../lux/phase/translation/python/when.lux | 28 +- .../lux/phase/translation/r/runtime.lux | 366 +++++----- .../language/lux/phase/translation/r/when.lux | 12 +- .../lux/phase/translation/ruby/runtime.lux | 216 +++--- .../lux/compiler/language/lux/syntax.lux | 22 +- .../lux/compiler/meta/packager/jvm.lux | 108 +-- .../source/library/lux/concurrency/atom.lux | 8 +- .../source/library/lux/concurrency/thread.lux | 36 +- .../source/library/lux/data/text/buffer.lux | 42 +- .../library/lux/data/text/encoding/utf8.lux | 42 +- stdlib/source/library/lux/debug.lux | 42 +- stdlib/source/library/lux/ffi.lux | 4 +- .../lux/math/arithmetic/fixed_point.lux | 42 +- .../library/lux/target/jvm/bytecode.lux | 10 +- .../library/lux/target/jvm/constant/float.lux | 4 +- .../source/library/lux/target/jvm/loader.lux | 42 +- .../library/lux/target/jvm/reflection.lux | 106 +-- stdlib/source/library/lux/target/r.lux | 2 +- stdlib/source/library/lux/time/date.lux | 14 +- stdlib/source/library/lux/time/solar.lux | 90 +-- stdlib/source/library/lux/world/console.lux | 44 +- .../source/library/lux/world/environment.lux | 106 +-- stdlib/source/library/lux/world/file.lux | 288 ++++---- .../source/library/lux/world/file/watch.lux | 66 +- .../library/lux/world/net/http/client.lux | 52 +- stdlib/source/library/lux/world/shell.lux | 72 +- .../translation/jvm/function/abstract.lux | 14 +- .../jvm/function/method/implementation.lux | 8 +- .../translation/jvm/function/method/reset.lux | 8 +- stdlib/source/test/lux/debug.lux | 44 +- stdlib/source/test/lux/ffi.js.lux | 26 +- stdlib/source/test/lux/ffi.jvm.lux | 116 ++-- stdlib/source/test/lux/ffi.py.lux | 10 +- stdlib/source/test/lux/ffi.rb.lux | 6 +- stdlib/source/test/lux/ffi/export.jvm.lux | 38 +- .../test/lux/math/arithmetic/modular.lux | 34 +- .../test/lux/math/number/64/decimal.lux | 6 +- stdlib/source/test/lux/target/jvm.lux | 632 +++++++++--------- stdlib/source/test/lux/target/python.lux | 4 +- stdlib/source/test/lux/type.lux | 6 +- stdlib/source/test/lux/type/unit/scale.lux | 8 +- stdlib/source/test/lux/world/file/watch.lux | 4 +- stdlib/source/unsafe/lux/data/binary.lux | 24 +- 98 files changed, 3084 insertions(+), 3091 deletions(-) diff --git a/aedifex/source/program/aedifex/command/build.lux b/aedifex/source/program/aedifex/command/build.lux index c8a5c30001..8e3288a7e0 100644 --- a/aedifex/source/program/aedifex/command/build.lux +++ b/aedifex/source/program/aedifex/command/build.lux @@ -256,12 +256,12 @@ [log_error! fail]]) (ffi.the java/lang/System - "[1]::[0]" + "[1]:[0]" ("static" getProperty [java/lang/String] "io" "try" java/lang/String)) (the windows? Bit - (|> (java/lang/System::getProperty [(ffi.as_string "os.name")]) + (|> (java/lang/System:getProperty [(ffi.as_string "os.name")]) io.value (try:each (|>> ffi.of_string)) (try.else "") @@ -296,39 +296,39 @@ runtime))) (ffi.the java/io/InputStream - "[1]::[0]") + "[1]:[0]") (ffi.the java/io/FileInputStream - "[1]::[0]" + "[1]:[0]" (new [java/lang/String])) (ffi.the java/util/jar/Attributes$Name - "[1]::[0]" + "[1]:[0]" ("static" MAIN_CLASS java/util/jar/Attributes$Name)) (ffi.the java/util/jar/Attributes - "[1]::[0]" + "[1]:[0]" (getValue [java/util/jar/Attributes$Name] java/lang/String)) (ffi.the java/util/jar/Manifest - "[1]::[0]" + "[1]:[0]" (getMainAttributes [] java/util/jar/Attributes)) (ffi.the java/util/jar/JarInputStream - "[1]::[0]" + "[1]:[0]" (new [java/io/InputStream]) (getManifest [] java/util/jar/Manifest)) (the jvm_main (-> Path Text) - (let [main_class (io.value (java/util/jar/Attributes$Name::MAIN_CLASS))] + (let [main_class (io.value (java/util/jar/Attributes$Name:MAIN_CLASS))] (|>> ffi.as_string - [] java/io/FileInputStream::new - [] java/util/jar/JarInputStream::new - (java/util/jar/JarInputStream::getManifest []) - (java/util/jar/Manifest::getMainAttributes []) - (java/util/jar/Attributes::getValue [main_class]) + [] java/io/FileInputStream:new + [] java/util/jar/JarInputStream:new + (java/util/jar/JarInputStream:getManifest []) + (java/util/jar/Manifest:getMainAttributes []) + (java/util/jar/Attributes:getValue [main_class]) ffi.of_string))) (the .public (do! console environment fs shell resolution) diff --git a/aedifex/source/program/aedifex/command/deploy/release.lux b/aedifex/source/program/aedifex/command/deploy/release.lux index c6fffdc33f..02123a7167 100644 --- a/aedifex/source/program/aedifex/command/deploy/release.lux +++ b/aedifex/source/program/aedifex/command/deploy/release.lux @@ -67,18 +67,18 @@ ["[1]/[0]" extension (.only Extension)]]]]]) (ffi.the java/lang/String - "[1]::[0]" + "[1]:[0]" (toLowerCase [] java/lang/String)) (ffi.the java/lang/System - "[1]::[0]" + "[1]:[0]" ("static" getProperty [java/lang/String] "io" "try" java/lang/String)) (the windows? (IO (Try Bit)) (by (try.with io.monad) each - (|>> (java/lang/String::toLowerCase []) ffi.of_string (text.starts_with? "windows")) - (java/lang/System::getProperty [(ffi.as_string "os.name")]))) + (|>> (java/lang/String:toLowerCase []) ffi.of_string (text.starts_with? "windows")) + (java/lang/System:getProperty [(ffi.as_string "os.name")]))) (the dummy_jar Binary diff --git a/aedifex/source/program/aedifex/dependency/resolution.lux b/aedifex/source/program/aedifex/dependency/resolution.lux index 261056be08..d848f00c2a 100644 --- a/aedifex/source/program/aedifex/dependency/resolution.lux +++ b/aedifex/source/program/aedifex/dependency/resolution.lux @@ -74,7 +74,7 @@ [md5_does_not_match]]) (ffi.the java/lang/String - "[1]::[0]" + "[1]:[0]" (trim [] java/lang/String)) (the (verified_hash library repository version_template artifact extension hash format exception) @@ -88,7 +88,7 @@ (when ?actual {try.:Success actual} (pure (monad.let [! try.monad] - [output (by ! each (|>> ffi.as_string (java/lang/String::trim []) ffi.of_string) + [output (by ! each (|>> ffi.as_string (java/lang/String:trim []) ffi.of_string) (by utf8.binary of actual)) actual (|> output (text.all_split_by " ") diff --git a/aedifex/source/program/aedifex/hash.lux b/aedifex/source/program/aedifex/hash.lux index e08447acd4..be1da9f579 100644 --- a/aedifex/source/program/aedifex/hash.lux +++ b/aedifex/source/program/aedifex/hash.lux @@ -30,10 +30,10 @@ ... https://en.wikipedia.org/wiki/SHA-1#SHA-1_pseudocode ... https://en.wikipedia.org/wiki/MD5#Algorithm (ffi.the java/lang/String - "[1]::[0]") + "[1]:[0]") (ffi.the java/security/MessageDigest - "[1]::[0]" + "[1]:[0]" ("static" getInstance [java/lang/String] java/security/MessageDigest) (digest [[byte]] [byte])) @@ -50,8 +50,8 @@ (template.with [ ] [(the .public ( value) (-> Binary (Hash )) - (|> (java/security/MessageDigest::getInstance [(ffi.as_string )]) - (java/security/MessageDigest::digest [value]) + (|> (java/security/MessageDigest:getInstance [(ffi.as_string )]) + (java/security/MessageDigest:digest [value]) nominal.of))] [[sha1 ..SHA1 "SHA1"] @@ -72,8 +72,8 @@ Natural )] - [[20 sha1::size] - [16 md5::size]]) + [[20 sha1:size] + [16 md5:size]]) (the hex_per_byte 2) @@ -96,8 +96,8 @@ ["Expected size" (%.natural )] ["Actual size" (%.natural (binary.size data))])))] - [[not_a_sha1 ..sha1::size] - [not_a_md5 ..md5::size]]) + [[not_a_sha1 ..sha1:size] + [not_a_md5 ..md5:size]]) (template.with [ ] [(the .public ( data) @@ -106,8 +106,8 @@ {try.:Success (nominal.of data)} (exception.except [data])))] - [[as_sha1 SHA1 ..sha1::size ..not_a_sha1] - [as_md5 MD5 ..md5::size ..not_a_md5]]) + [[as_sha1 SHA1 ..sha1:size ..not_a_sha1] + [as_md5 MD5 ..md5:size ..not_a_md5]]) (the hash_size (-> Text Natural) @@ -159,8 +159,8 @@ (the as (|>> nominal.as ..as_text)) (the of (..of_text ))))] - [[sha1_format SHA1 ..sha1::size ..as_sha1] - [md5_format MD5 ..md5::size ..as_md5]]) + [[sha1_format SHA1 ..sha1:size ..as_sha1] + [md5_format MD5 ..md5:size ..as_md5]]) (the .public equivalence (for_any (_ h) diff --git a/lux-c++/source/program.lux b/lux-c++/source/program.lux index c80bfca571..15b4a9f114 100644 --- a/lux-c++/source/program.lux +++ b/lux-c++/source/program.lux @@ -78,7 +78,7 @@ Any) (ffi.the cppyy - "[1]::[0]" + "[1]:[0]" ("static" cppdef [Text] "io" "try" Bit) ("static" cppexec [Text] "io" "try" Bit) ("static" gbl Globals)) @@ -125,11 +125,11 @@ [lux_i64 Integer] [lux_text Text] - [variant::lefts Natural] - [variant::right? Bit] - [variant::choice Value] + [variant:lefts Natural] + [variant:right? Bit] + [variant:choice Value] - [tuple::arity Natural]] + [tuple:arity Natural]] ) (the (lux_variant lefts right? choice) @@ -143,23 +143,23 @@ (array.has! 2 choice) [] ..tuple)) -(the (tuple::member @ member it) +(the (tuple:member @ member it) (-> Runtime Natural Any Value) (let [on (as (-> Natural Any Value) - (getattr [@ /runtime.tuple::member]))] + (getattr [@ /runtime.tuple:member]))] (on member it))) (the (lux_tuple @ lux_value input) (-> Runtime (-> Runtime Any Value) Any Any) - (let [arity (tuple::arity @ input)] + (let [arity (tuple:arity @ input)] (loop (next [member 0 output (array.empty arity)]) (if (n.< arity member) (next (++ member) - (array.has! member (lux_value @ (tuple::member @ member input)) + (array.has! member (lux_value @ (tuple:member @ member input)) output)) output)))) @@ -179,9 +179,9 @@ (..str [(lux_text @ it)]) /runtime.variant_tag - (lux_variant (variant::lefts @ it) - (variant::right? @ it) - (lux_value @ (variant::choice @ it))) + (lux_variant (variant:lefts @ it) + (variant:right? @ it) + (lux_value @ (variant:choice @ it))) /runtime.tuple_tag (lux_tuple @ lux_value it) @@ -208,11 +208,11 @@ (.log!# (..nested (_.code definition))) (io.value (monad.let (try.with io.monad) - [_ (cppyy::cppdef (_.code definition)) - .let [globals (io.value (cppyy::gbl)) + [_ (cppyy:cppdef (_.code definition)) + .let [globals (io.value (cppyy:gbl)) it (lux_value (..runtime globals) (getattr [globals global]))] - _ (cppyy::cppexec (_.code (_.; (_.:= (_.local global) /runtime.unit))))] + _ (cppyy:cppexec (_.code (_.; (_.:= (_.local global) /runtime.unit))))] (pure it))))))) execute! (is (-> /runtime.Declaration (Try Any)) @@ -220,7 +220,7 @@ (exec (.log!# "[execute!]") (.log!# (..nested (_.code input))) - (io.value (cppyy::cppdef (_.code input))))))] + (io.value (cppyy:cppdef (_.code input))))))] (is (Host /runtime.Value /runtime.Declaration) (implementation (the evaluate evaluate!) @@ -234,7 +234,7 @@ (_.constant @global /runtime.value_type) input)] _ (execute! definition) - .let [globals (io.value (cppyy::gbl)) + .let [globals (io.value (cppyy:gbl)) value (lux_value (..runtime globals) (getattr [globals global]))]] (pure [global value definition])))) diff --git a/lux-cl/source/program.lux b/lux-cl/source/program.lux index d4788a89a8..c91b5d06ae 100644 --- a/lux-cl/source/program.lux +++ b/lux-cl/source/program.lux @@ -68,33 +68,33 @@ ["[1][0]" static]]]) (ffi.the java/lang/String - "[1]::[0]") + "[1]:[0]") (ffi.the (java/lang/Class a) - "[1]::[0]" + "[1]:[0]" ("static" forName [java/lang/String] "try" (java/lang/Class java/lang/Object))) (ffi.the java/lang/Object - "[1]::[0]" + "[1]:[0]" (toString [] java/lang/String) (getClass [] (java/lang/Class java/lang/Object))) (ffi.the java/lang/Long - "[1]::[0]" + "[1]:[0]" (intValue [] java/lang/Integer)) (ffi.the java/lang/Integer - "[1]::[0]" + "[1]:[0]" (longValue [] long)) (ffi.the java/lang/Number - "[1]::[0]" + "[1]:[0]" (intValue [] java/lang/Integer) (longValue [] long) (doubleValue [] double)) (ffi.the org/armedbear/lisp/LispObject - "[1]::[0]" + "[1]:[0]" (length [] int) (NTH [int] org/armedbear/lisp/LispObject) (SVREF [int] org/armedbear/lisp/LispObject) @@ -104,64 +104,64 @@ ... The org/armedbear/lisp/Interpreter must be imported before the ... other ones, because there is an order dependency in their static initialization. (ffi.the org/armedbear/lisp/Interpreter - "[1]::[0]" + "[1]:[0]" ("static" getInstance [] org/armedbear/lisp/Interpreter) ("static" createInstance [] "?" org/armedbear/lisp/Interpreter) (eval [java/lang/String] "try" org/armedbear/lisp/LispObject)) (ffi.the org/armedbear/lisp/Symbol - "[1]::[0]" + "[1]:[0]" ("static" T org/armedbear/lisp/Symbol)) (ffi.the org/armedbear/lisp/DoubleFloat - "[1]::[0]" + "[1]:[0]" (new [double]) (doubleValue [] double)) (ffi.the org/armedbear/lisp/SimpleString - "[1]::[0]" + "[1]:[0]" (new [java/lang/String]) (getStringValue [] java/lang/String)) (ffi.the org/armedbear/lisp/LispInteger - "[1]::[0]") + "[1]:[0]") (ffi.the org/armedbear/lisp/Bignum - "[1]::[0]" + "[1]:[0]" (longValue [] long) ("static" getInstance [long] org/armedbear/lisp/LispInteger)) (ffi.the org/armedbear/lisp/Fixnum - "[1]::[0]" + "[1]:[0]" (longValue [] long) ("static" getInstance [int] org/armedbear/lisp/Fixnum)) (ffi.the org/armedbear/lisp/Nil - "[1]::[0]" + "[1]:[0]" ("static" NIL org/armedbear/lisp/Symbol)) (ffi.the org/armedbear/lisp/SimpleVector - "[1]::[0]") + "[1]:[0]") (ffi.the org/armedbear/lisp/Cons - "[1]::[0]") + "[1]:[0]") (ffi.the org/armedbear/lisp/Closure - "[1]::[0]") + "[1]:[0]") (ffi.interface LuxADT (getValue [] java/lang/Object)) (ffi.the program/LuxADT - "[1]::[0]" + "[1]:[0]" (getValue [] java/lang/Object)) (template.with [] [(exception.the ( object) (Exception java/lang/Object) (exception.report - (list ["Class" (java/lang/Object::toString (java/lang/Object::getClass object))] - ["Object" (java/lang/Object::toString object)])))] + (list ["Class" (java/lang/Object:toString (java/lang/Object:getClass object))] + ["Object" (java/lang/Object:toString object)])))] [[unknown_kind_of_object] [cannot_apply_a_non_function]] @@ -171,8 +171,8 @@ (-> Bit org/armedbear/lisp/LispObject) (|>> (pipe.when - 0b (org/armedbear/lisp/Nil::NIL) - 1b (org/armedbear/lisp/Symbol::T)))) + 0b (org/armedbear/lisp/Nil:NIL) + 1b (org/armedbear/lisp/Symbol:T)))) (the (host_value value) (-> Any @@ -189,10 +189,10 @@ [[[java/lang/Object] [host_value]] [java/lang/Boolean [..host_bit]] - [java/lang/Integer [java/lang/Integer::longValue org/armedbear/lisp/Fixnum::getInstance]] - [java/lang/Long [org/armedbear/lisp/Bignum::getInstance]] - [java/lang/Double [org/armedbear/lisp/DoubleFloat::new]] - [java/lang/String [org/armedbear/lisp/SimpleString::new]]] + [java/lang/Integer [java/lang/Integer:longValue org/armedbear/lisp/Fixnum:getInstance]] + [java/lang/Long [org/armedbear/lisp/Bignum:getInstance]] + [java/lang/Double [org/armedbear/lisp/DoubleFloat:new]] + [java/lang/String [org/armedbear/lisp/SimpleString:new]]] )) ... else (as org/armedbear/lisp/LispObject sub_value))))))] @@ -210,19 +210,19 @@ (as (Array java/lang/Object)) array.size (as java/lang/Long) - java/lang/Number::intValue)) + java/lang/Number:intValue)) (,, (template.with [] [(org/armedbear/lisp/LispObject [] ( self [idx int]) org/armedbear/lisp/LispObject - (when (array.read! (|> idx java/lang/Integer::longValue (as Natural)) + (when (array.read! (|> idx java/lang/Integer:longValue (as Natural)) (as (Array java/lang/Object) value)) {.:Some sub} (to_sub sub) {.:None} - (org/armedbear/lisp/Nil::NIL)))] + (org/armedbear/lisp/Nil:NIL)))] [[NTH] [SVREF] @@ -238,10 +238,10 @@ (-> (Reader org/armedbear/lisp/LispObject) (Reader org/armedbear/lisp/Cons)) (monad.let try.monad - [tag (read (org/armedbear/lisp/LispObject::NTH +0 host_object)) - value (read (org/armedbear/lisp/LispObject::NTH +2 host_object))] - (wrap [(java/lang/Long::intValue (as java/lang/Long tag)) - (when (ffi.is org/armedbear/lisp/Nil (org/armedbear/lisp/LispObject::NTH +1 host_object)) + [tag (read (org/armedbear/lisp/LispObject:NTH +0 host_object)) + value (read (org/armedbear/lisp/LispObject:NTH +2 host_object))] + (wrap [(java/lang/Long:intValue (as java/lang/Long tag)) + (when (ffi.is org/armedbear/lisp/Nil (org/armedbear/lisp/LispObject:NTH +1 host_object)) {.:Some _} (is Any (ffi.null)) @@ -252,12 +252,12 @@ (the (read_tuple read host_object) (-> (Reader org/armedbear/lisp/LispObject) (Reader org/armedbear/lisp/SimpleVector)) - (let [size (.natural (org/armedbear/lisp/LispObject::length host_object))] + (let [size (.natural (org/armedbear/lisp/LispObject:length host_object))] (loop (again [idx 0 output (as (Array Any) (array.new size))]) (if (n.< size idx) ... TODO: Start using "SVREF" instead of "elt" ASAP - (when (read (org/armedbear/lisp/LispObject::elt (.integer idx) host_object)) + (when (read (org/armedbear/lisp/LispObject:elt (.integer idx) host_object)) {try.:Failure error} {try.:Failure error} @@ -274,19 +274,19 @@ {.:None})] - [[org/armedbear/lisp/Bignum [org/armedbear/lisp/Bignum::longValue {try.:Success}]] - [org/armedbear/lisp/Fixnum [org/armedbear/lisp/Fixnum::longValue {try.:Success}]] - [org/armedbear/lisp/DoubleFloat [org/armedbear/lisp/DoubleFloat::doubleValue {try.:Success}]] - [org/armedbear/lisp/SimpleString [org/armedbear/lisp/SimpleString::getStringValue {try.:Success}]] + [[org/armedbear/lisp/Bignum [org/armedbear/lisp/Bignum:longValue {try.:Success}]] + [org/armedbear/lisp/Fixnum [org/armedbear/lisp/Fixnum:longValue {try.:Success}]] + [org/armedbear/lisp/DoubleFloat [org/armedbear/lisp/DoubleFloat:doubleValue {try.:Success}]] + [org/armedbear/lisp/SimpleString [org/armedbear/lisp/SimpleString:getStringValue {try.:Success}]] [org/armedbear/lisp/Cons [(read_variant read)]] [org/armedbear/lisp/SimpleVector [(read_tuple read)]] [org/armedbear/lisp/Nil [(pipe.new {try.:Success false} [])]] [org/armedbear/lisp/Closure [{try.:Success}]] - [program/LuxADT [program/LuxADT::getValue {try.:Success}]]] + [program/LuxADT [program/LuxADT:getValue {try.:Success}]]] )) (when (ffi.is org/armedbear/lisp/Symbol host_object) {.:Some host_object} - (if (identical? (org/armedbear/lisp/Symbol::T) host_object) + (if (identical? (org/armedbear/lisp/Symbol:T) host_object) {try.:Success true} (exception.throw ..unknown_kind_of_object (as java/lang/Object host_object))) @@ -305,7 +305,7 @@ (-> (Stack Code) Lux org/armedbear/lisp/Closure (Try (Try [Lux (Stack Code)]))) (monad.let try.monad - [raw_output (org/armedbear/lisp/LispObject::execute (..host_value inputs) (..host_value lux) macro)] + [raw_output (org/armedbear/lisp/LispObject:execute (..host_value inputs) (..host_value lux) macro)] (as (Try (Try [Lux (Stack Code)])) (..read raw_output)))) @@ -320,12 +320,12 @@ (the host (IO (Host (_.Expression Any) (_.Expression Any))) - (io (let [_ (org/armedbear/lisp/Interpreter::createInstance) - interpreter (org/armedbear/lisp/Interpreter::getInstance) + (io (let [_ (org/armedbear/lisp/Interpreter:createInstance) + interpreter (org/armedbear/lisp/Interpreter:getInstance) value (is (-> (_.Code Any) (Try Any)) (function (_ code) (monad.let try.monad - [host_value (org/armedbear/lisp/Interpreter::eval (_.code code) interpreter)] + [host_value (org/armedbear/lisp/Interpreter:eval (_.code code) interpreter)] (read host_value))))] (is (Host (_.Expression Any) (_.Expression Any)) (structure @@ -333,14 +333,14 @@ (value code)) (the (execute! input) - (org/armedbear/lisp/Interpreter::eval (_.code input) interpreter)) + (org/armedbear/lisp/Interpreter:eval (_.code input) interpreter)) (the (define! context input) (let [global (reference.artifact context) @global (_.var global)] (monad.let try.monad [:let [definition (_.defparameter @global input)] - _ (org/armedbear/lisp/Interpreter::eval (_.code definition) interpreter) + _ (org/armedbear/lisp/Interpreter:eval (_.code definition) interpreter) value (value @global)] (wrap [global value definition])))) @@ -381,7 +381,7 @@ (Program (_.Expression Any) (_.Expression Any)) (let [raw_inputs (_.progn (stack (_.conditional+ (stack "clisp") (_.var "ext:*args*")) (_.conditional+ (stack "sbcl") (_.var "sb-ext:*posix-argv*")) - (_.conditional+ (stack "clozure") (_.call/* (_.var "ccl::command-line-arguments") (stack))) + (_.conditional+ (stack "clozure") (_.call/* (_.var "ccl:command-line-arguments") (stack))) (_.conditional+ (stack "gcl") (_.var "si:*command-args*")) (_.conditional+ (stack "ecl") ..get_ecl_cli_inputs) (_.conditional+ (stack "cmu") (_.var "extensions:*command-line-strings*")) diff --git a/lux-js/source/program.lux b/lux-js/source/program.lux index 794b09c794..2123157d8d 100644 --- a/lux-js/source/program.lux +++ b/lux-js/source/program.lux @@ -83,48 +83,48 @@ (for .jvm (these (ffi.the java/lang/String - "[1]::[0]") + "[1]:[0]") (ffi.the (java/lang/Class a) - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/Object - "[1]::[0]" + "[1]:[0]" (toString [] java/lang/String) (getClass [] (java/lang/Class java/lang/Object))) (ffi.the java/lang/Long - "[1]::[0]" + "[1]:[0]" (intValue [] int)) (ffi.the java/lang/Integer - "[1]::[0]" + "[1]:[0]" (longValue [] long)) (ffi.the java/lang/Number - "[1]::[0]" + "[1]:[0]" (intValue [] int) (longValue [] long) (doubleValue [] double)) (ffi.the java/util/Arrays - "[1]::[0]" + "[1]:[0]" ("static" [t] copyOfRange [[t] int int] [t])) (ffi.the javax/script/ScriptEngine - "[1]::[0]" + "[1]:[0]" (eval [java/lang/String] "try" "?" java/lang/Object)) (ffi.the javax/script/ScriptEngineFactory - "[1]::[0]" + "[1]:[0]" (getScriptEngine [] javax/script/ScriptEngine)) (ffi.the org/openjdk/nashorn/api/scripting/NashornScriptEngineFactory - "[1]::[0]" + "[1]:[0]" (new [])) (ffi.the org/openjdk/nashorn/api/scripting/JSObject - "[1]::[0]" + "[1]:[0]" (isArray [] boolean) (isFunction [] boolean) (getSlot [int] "?" java/lang/Object) @@ -133,16 +133,16 @@ (call ["?" java/lang/Object [java/lang/Object]] "try" java/lang/Object)) (ffi.the org/openjdk/nashorn/api/scripting/AbstractJSObject - "[1]::[0]") + "[1]:[0]") (ffi.the org/openjdk/nashorn/api/scripting/ScriptObjectMirror - "[1]::[0]" + "[1]:[0]" (size [] int) (toString [] java/lang/String) (getOwnKeys [boolean] [java/lang/String])) (ffi.the org/openjdk/nashorn/internal/runtime/Undefined - "[1]::[0]" + "[1]:[0]" ("static" getUndefined [] org/openjdk/nashorn/internal/runtime/Undefined)) (template.with [] @@ -150,7 +150,7 @@ (getValue [] java/lang/Object)) (ffi.the - "[1]::[0]" + "[1]:[0]" (getValue [] java/lang/Object))] [[IntegerValue] @@ -167,7 +167,7 @@ (-> (I64 Any) java/lang/Integer) (|>> .integer ffi.as_long - (java/lang/Long::intValue []))) + (java/lang/Long:intValue []))) (the (js_integer value) (-> Integer org/openjdk/nashorn/api/scripting/JSObject) @@ -200,7 +200,7 @@ (ffi.is java/lang/Object (ffi.as_long value))])))) ))) - (the (::toString js_object) + (the (:toString js_object) (-> Any org/openjdk/nashorn/api/scripting/JSObject) (<| (ffi.is org/openjdk/nashorn/api/scripting/JSObject) (ffi.object [] org/openjdk/nashorn/api/scripting/AbstractJSObject [] @@ -218,7 +218,7 @@ (ffi.is java/lang/Object))) ))) - (the (::slice js_object value) + (the (:slice js_object value) (-> (-> java/lang/Object org/openjdk/nashorn/api/scripting/JSObject) (Array java/lang/Object) org/openjdk/nashorn/api/scripting/JSObject) (<| (ffi.is org/openjdk/nashorn/api/scripting/JSObject) (ffi.object [] org/openjdk/nashorn/api/scripting/AbstractJSObject [] @@ -230,17 +230,17 @@ [] (call self [this java/lang/Object args [java/lang/Object]]) java/lang/Object - (|> (java/util/Arrays::copyOfRange [value - (ffi.as_int (when (array.size args) - 0 - +0 - - else - (|> args - (array.item 0) - try.trusted - (as (-> Any Integer))))) - (ffi.as_int (.integer (array.size value)))]) + (|> (java/util/Arrays:copyOfRange [value + (ffi.as_int (when (array.size args) + 0 + +0 + + else + (|> args + (array.item 0) + try.trusted + (as (-> Any Integer))))) + (ffi.as_int (.integer (array.size value)))]) (as (-> Any java/lang/Object)) js_object (ffi.is java/lang/Object))) @@ -284,7 +284,7 @@ java/lang/Object (when (ffi.of_string member) (^.or "toJSON" "toString") - (|> (::toString value) + (|> (:toString value) (ffi.is java/lang/Object)) "length" @@ -294,7 +294,7 @@ (ffi.is java/lang/Object)) "slice" - (|> (::slice js_object value) + (|> (:slice js_object value) (ffi.is java/lang/Object)) runtime.variant_tag_field @@ -323,7 +323,7 @@ [] (getSlot self [idx int]) java/lang/Object (let [index (|> idx - (java/lang/Integer::longValue []) + (java/lang/Integer:longValue []) (as (-> Any Natural)))] (if (n.< (array.size value) index) (|> value @@ -331,7 +331,7 @@ try.trusted js_object (as (-> Any java/lang/Object))) - (|> (org/openjdk/nashorn/internal/runtime/Undefined::getUndefined []) + (|> (org/openjdk/nashorn/internal/runtime/Undefined:getUndefined []) (as (-> Any java/lang/Object)))))) )))) @@ -340,12 +340,12 @@ (exception.the (unknown_kind_of_host_object [object]) (Exception [java/lang/Object]) (exception.report - (list ["Class" (ffi.of_string (java/lang/Object::toString [] (java/lang/Object::getClass [] object)))] - ["Object" (ffi.of_string (java/lang/Object::toString [] object))] + (list ["Class" (ffi.of_string (java/lang/Object:toString [] (java/lang/Object:getClass [] object)))] + ["Object" (ffi.of_string (java/lang/Object:toString [] object))] ["Keys" (when (ffi.as org/openjdk/nashorn/api/scripting/ScriptObjectMirror object) {.:Some object} (|> object - (org/openjdk/nashorn/api/scripting/ScriptObjectMirror::getOwnKeys [true]) + (org/openjdk/nashorn/api/scripting/ScriptObjectMirror:getOwnKeys [true]) (list.of_array {.:None}) (list.as_text (|>> ffi.of_string %.text))) @@ -355,10 +355,10 @@ (the (i32 half i64) (-> Text org/openjdk/nashorn/api/scripting/ScriptObjectMirror (Maybe Integer)) (|> i64 - (org/openjdk/nashorn/api/scripting/JSObject::getMember [(ffi.as_string half)]) + (org/openjdk/nashorn/api/scripting/JSObject:getMember [(ffi.as_string half)]) (maybe:each (|>> (ffi.as java/lang/Number))) maybe:conjoint - (maybe:each (|>> (java/lang/Number::longValue []) ffi.of_long)))) + (maybe:each (|>> (java/lang/Number:longValue []) ffi.of_long)))) (the (check_integer js_object) (-> org/openjdk/nashorn/api/scripting/ScriptObjectMirror @@ -378,13 +378,13 @@ (-> (-> java/lang/Object (Try Any)) org/openjdk/nashorn/api/scripting/ScriptObjectMirror (Maybe Any)) - (when [(org/openjdk/nashorn/api/scripting/JSObject::getMember [(ffi.as_string runtime.variant_tag_field)] js_object) - (org/openjdk/nashorn/api/scripting/JSObject::getMember [(ffi.as_string runtime.variant_flag_field)] js_object) - (org/openjdk/nashorn/api/scripting/JSObject::getMember [(ffi.as_string runtime.variant_value_field)] js_object)] + (when [(org/openjdk/nashorn/api/scripting/JSObject:getMember [(ffi.as_string runtime.variant_tag_field)] js_object) + (org/openjdk/nashorn/api/scripting/JSObject:getMember [(ffi.as_string runtime.variant_flag_field)] js_object) + (org/openjdk/nashorn/api/scripting/JSObject:getMember [(ffi.as_string runtime.variant_value_field)] js_object)] (^.multi [{.:Some tag} ?flag {.:Some value}] [[(ffi.as java/lang/Number tag) (lux_object value)] [{.:Some tag} {try.:Success value}]]) - {.:Some [(java/lang/Number::intValue [] (as (-> Any java/lang/Number) tag)) + {.:Some [(java/lang/Number:intValue [] (as (-> Any java/lang/Number) tag)) (maybe.else (ffi.null) ?flag) value]} @@ -395,13 +395,13 @@ (-> (-> java/lang/Object (Try Any)) org/openjdk/nashorn/api/scripting/ScriptObjectMirror (Maybe (Array java/lang/Object))) - (if (ffi.of_boolean (org/openjdk/nashorn/api/scripting/JSObject::isArray [] js_object)) - (let [num_keys (.natural (ffi.of_int (org/openjdk/nashorn/api/scripting/ScriptObjectMirror::size [] js_object)))] + (if (ffi.of_boolean (org/openjdk/nashorn/api/scripting/JSObject:isArray [] js_object)) + (let [num_keys (.natural (ffi.of_int (org/openjdk/nashorn/api/scripting/ScriptObjectMirror:size [] js_object)))] (loop (again [idx 0 output (is (Array java/lang/Object) (array.empty num_keys))]) (if (n.< num_keys idx) - (when (org/openjdk/nashorn/api/scripting/JSObject::getMember [(ffi.as_string (%.natural idx))] js_object) + (when (org/openjdk/nashorn/api/scripting/JSObject:getMember [(ffi.as_string (%.natural idx))] js_object) {.:Some member} (when (ffi.as org/openjdk/nashorn/internal/runtime/Undefined member) {.:Some _} @@ -447,9 +447,9 @@ {.:None})] - [[java/lang/Number (java/lang/Number::doubleValue [])] - [StructureValue (StructureValue::getValue [])] - [IntegerValue (IntegerValue::getValue [])]] + [[java/lang/Number (java/lang/Number:doubleValue [])] + [StructureValue (StructureValue:getValue [])] + [IntegerValue (IntegerValue:getValue [])]] )) (when (ffi.as org/openjdk/nashorn/api/scripting/ScriptObjectMirror js_object) {.:Some js_object} @@ -468,7 +468,7 @@ {try.:Success value} {.:None} - (if (ffi.of_boolean (org/openjdk/nashorn/api/scripting/JSObject::isFunction [] js_object)) + (if (ffi.of_boolean (org/openjdk/nashorn/api/scripting/JSObject:isFunction [] js_object)) {try.:Success js_object} ... (exception.except ..unknown_kind_of_host_object [(as (-> Any java/lang/Object) js_object)]) {try.:Success js_object} @@ -485,7 +485,7 @@ [function (|> function (as (-> Any java/lang/Object)) (ffi.as org/openjdk/nashorn/api/scripting/JSObject))] - (if (ffi.of_boolean (org/openjdk/nashorn/api/scripting/JSObject::isFunction [] function)) + (if (ffi.of_boolean (org/openjdk/nashorn/api/scripting/JSObject:isFunction [] function)) {.:Some function} {.:None}))) ) @@ -502,16 +502,16 @@ js_structure (as (-> Any java/lang/Object))))] (<| (as (-> Any (Try (Try [Lux (List Code)])))) - (org/openjdk/nashorn/api/scripting/JSObject::call [{.:None} - (ffi.array java/lang/Object - [(to_js inputs) - (to_js lux)])] - macro)))) + (org/openjdk/nashorn/api/scripting/JSObject:call [{.:None} + (ffi.array java/lang/Object + [(to_js inputs) + (to_js lux)])] + macro)))) (exception.the (cannot_apply_a_non_function object) (Exception java/lang/Object) (exception.report - (list ["Object" (ffi.of_string (java/lang/Object::toString [] object))]))) + (list ["Object" (ffi.of_string (java/lang/Object:toString [] object))]))) (the (expander macro inputs lux) Expander @@ -541,7 +541,7 @@ (these (the (evaluate! interpreter input) (-> javax/script/ScriptEngine _.Expression (Try Any)) (monad.let try.monad - [?output (javax/script/ScriptEngine::eval [(ffi.as_string (_.code input))] interpreter)] + [?output (javax/script/ScriptEngine:eval [(ffi.as_string (_.code input))] interpreter)] (when ?output {.:Some output} (..lux_object output) @@ -552,7 +552,7 @@ (the (execute! interpreter input) (-> javax/script/ScriptEngine _.Statement (Try Any)) (monad.let try.monad - [?output (javax/script/ScriptEngine::eval [(ffi.as_string (_.code input))] interpreter)] + [?output (javax/script/ScriptEngine:eval [(ffi.as_string (_.code input))] interpreter)] (pure []))) (the (define! interpreter context custom input) @@ -568,8 +568,8 @@ (the host (IO (Host _.Expression _.Statement)) - (io (let [interpreter (|> (org/openjdk/nashorn/api/scripting/NashornScriptEngineFactory::new []) - (javax/script/ScriptEngineFactory::getScriptEngine []))] + (io (let [interpreter (|> (org/openjdk/nashorn/api/scripting/NashornScriptEngineFactory:new []) + (javax/script/ScriptEngineFactory:getScriptEngine []))] (is (Host _.Expression _.Statement) (implementation (the (evaluate [_ input]) (..evaluate! interpreter input)) @@ -714,13 +714,13 @@ (..ensure_function handler)) .let [to_js (is (-> Any java/lang/Object) (|>> (as (-> Any (Array java/lang/Object))) js_structure (as (-> Any java/lang/Object))))] - output (org/openjdk/nashorn/api/scripting/JSObject::call [{.:None} - (ffi.array java/lang/Object - [(as (-> Any java/lang/Object) ..phase_wrapper) - (to_js archive) - (to_js parameters) - (to_js state)])] - handler)] + output (org/openjdk/nashorn/api/scripting/JSObject:call [{.:None} + (ffi.array java/lang/Object + [(as (-> Any java/lang/Object) ..phase_wrapper) + (to_js archive) + (to_js parameters) + (to_js state)])] + handler)] (lux_object (as (-> Any java/lang/Object) output))))) .js diff --git a/lux-jvm/source/program.lux b/lux-jvm/source/program.lux index aae85dea39..41404fec54 100644 --- a/lux-jvm/source/program.lux +++ b/lux-jvm/source/program.lux @@ -56,18 +56,18 @@ ["[0]" environment]]]]) (ffi.the java/lang/reflect/Method - "[1]::[0]" + "[1]:[0]" (invoke [java/lang/Object [java/lang/Object]] "try" java/lang/Object)) (ffi.the java/lang/ClassLoader - "[1]::[0]") + "[1]:[0]") (ffi.the (java/lang/Class c) - "[1]::[0]" + "[1]:[0]" (getMethod [java/lang/String [(java/lang/Class [? < java/lang/Object])]] "try" java/lang/reflect/Method)) (ffi.the java/lang/Object - "[1]::[0]" + "[1]:[0]" (getClass [] (java/lang/Class java/lang/Object))) (the _object_class @@ -89,10 +89,10 @@ (monad.let try.monad [of_method (|> macro (as (-> Macro java/lang/Object)) - (java/lang/Object::getClass []) - (java/lang/Class::getMethod [(ffi.as_string "apply") _of2_args]))] + (java/lang/Object:getClass []) + (java/lang/Class:getMethod [(ffi.as_string "apply") _of2_args]))] (as (-> (Try java/lang/Object) (Try (Try [analysis.State (List @type.Code)]))) - (java/lang/reflect/Method::invoke + (java/lang/reflect/Method:invoke [(as (-> Macro java/lang/Object) macro) (ffi.array java/lang/Object [(as (-> (List Code) java/lang/Object) inputs) @@ -133,9 +133,9 @@ (monad.let try.monad [method (|> handler (as (-> Any java/lang/Object)) - (java/lang/Object::getClass []) - (java/lang/Class::getMethod [(ffi.as_string "apply") _of4_args]))] - (java/lang/reflect/Method::invoke + (java/lang/Object:getClass []) + (java/lang/Class:getMethod [(ffi.as_string "apply") _of4_args]))] + (java/lang/reflect/Method:invoke [(as (-> Any java/lang/Object) handler) (ffi.array java/lang/Object [(as (-> Any java/lang/Object) (phase_wrapper phase)) diff --git a/lux-lua/source/program.lux b/lux-lua/source/program.lux index d11e90cc34..f2e0b24343 100644 --- a/lux-lua/source/program.lux +++ b/lux-lua/source/program.lux @@ -74,92 +74,92 @@ ["/" compositor]]) (for .jvm (these (ffi.the java/lang/String - "[1]::[0]") + "[1]:[0]") (ffi.the (java/lang/Class a) - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/Object - "[1]::[0]" + "[1]:[0]" (toString [] java/lang/String) (getClass [] (java/lang/Class java/lang/Object))) (ffi.the java/lang/Integer - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/Long - "[1]::[0]" + "[1]:[0]" (intValue [] int)) (ffi.the net/sandius/rembulan/StateContext - "[1]::[0]") + "[1]:[0]") (ffi.the net/sandius/rembulan/impl/StateContexts - "[1]::[0]" + "[1]:[0]" ("static" newDefaultInstance [] net/sandius/rembulan/StateContext)) (ffi.the net/sandius/rembulan/env/RuntimeEnvironment - "[1]::[0]") + "[1]:[0]") (ffi.the net/sandius/rembulan/env/RuntimeEnvironments - "[1]::[0]" + "[1]:[0]" ("static" system [] net/sandius/rembulan/env/RuntimeEnvironment)) (ffi.the net/sandius/rembulan/Table - "[1]::[0]" + "[1]:[0]" (rawget "as" get_idx [long] "?" java/lang/Object) (rawget "as" get_key [java/lang/Object] "?" java/lang/Object) (rawlen [] long)) (ffi.the net/sandius/rembulan/ByteString - "[1]::[0]" + "[1]:[0]" (decode [] java/lang/String)) (ffi.the net/sandius/rembulan/impl/DefaultTable - "[1]::[0]") + "[1]:[0]") (ffi.the net/sandius/rembulan/lib/StandardLibrary - "[1]::[0]" + "[1]:[0]" ("static" in [net/sandius/rembulan/env/RuntimeEnvironment] net/sandius/rembulan/lib/StandardLibrary) (installInto [net/sandius/rembulan/StateContext] net/sandius/rembulan/Table)) (ffi.the net/sandius/rembulan/Variable - "[1]::[0]" + "[1]:[0]" (new [java/lang/Object])) (ffi.the net/sandius/rembulan/runtime/ReturnBuffer - "[1]::[0]" + "[1]:[0]" (setTo [java/lang/Object] void)) (ffi.the net/sandius/rembulan/runtime/ExecutionContext - "[1]::[0]" + "[1]:[0]" (getReturnBuffer [] net/sandius/rembulan/runtime/ReturnBuffer)) (ffi.the net/sandius/rembulan/runtime/ResolvedControlThrowable - "[1]::[0]") + "[1]:[0]") (ffi.the net/sandius/rembulan/runtime/LuaFunction - "[1]::[0]") + "[1]:[0]") (ffi.the net/sandius/rembulan/load/ChunkLoader - "[1]::[0]" + "[1]:[0]" (loadTextChunk [net/sandius/rembulan/Variable java/lang/String java/lang/String] "try" net/sandius/rembulan/runtime/LuaFunction)) (ffi.the net/sandius/rembulan/compiler/CompilerChunkLoader - "[1]::[0]" + "[1]:[0]" ("static" of [java/lang/String] net/sandius/rembulan/compiler/CompilerChunkLoader)) (ffi.the net/sandius/rembulan/runtime/SchedulingContext - "[1]::[0]") + "[1]:[0]") (ffi.the net/sandius/rembulan/runtime/SchedulingContextFactory - "[1]::[0]") + "[1]:[0]") (ffi.the net/sandius/rembulan/exec/DirectCallExecutor - "[1]::[0]" + "[1]:[0]" ("static" newExecutor [] net/sandius/rembulan/exec/DirectCallExecutor) (schedulingContextFactory [] net/sandius/rembulan/runtime/SchedulingContextFactory) (call [net/sandius/rembulan/StateContext java/lang/Object [java/lang/Object]] "try" [java/lang/Object])) @@ -167,14 +167,14 @@ (exception.the (unknown_kind_of_object object) (Exception java/lang/Object) (exception.report - (list ["Class" (ffi.of_string (java/lang/Object::toString [] (java/lang/Object::getClass [] object)))] - ["Object" (ffi.of_string (java/lang/Object::toString [] object))]))) + (list ["Class" (ffi.of_string (java/lang/Object:toString [] (java/lang/Object:getClass [] object)))] + ["Object" (ffi.of_string (java/lang/Object:toString [] object))]))) (ffi.interface LuxValue (getValue [] java/lang/Object)) (ffi.the LuxValue - "[1]::[0]" + "[1]:[0]" (getValue [] java/lang/Object)) (every Translator @@ -183,16 +183,16 @@ (the (read_variant read host_object) (-> Translator net/sandius/rembulan/impl/DefaultTable (Try Any)) - (when [(net/sandius/rembulan/Table::get_key [(as (-> Text java/lang/Object) runtime.variant_tag_field)] host_object) - (net/sandius/rembulan/Table::get_key [(as (-> Text java/lang/Object) runtime.variant_flag_field)] host_object) - (net/sandius/rembulan/Table::get_key [(as (-> Text java/lang/Object) runtime.variant_value_field)] host_object)] + (when [(net/sandius/rembulan/Table:get_key [(as (-> Text java/lang/Object) runtime.variant_tag_field)] host_object) + (net/sandius/rembulan/Table:get_key [(as (-> Text java/lang/Object) runtime.variant_flag_field)] host_object) + (net/sandius/rembulan/Table:get_key [(as (-> Text java/lang/Object) runtime.variant_value_field)] host_object)] (^.multi [{.:Some tag} ?flag {.:Some value}] [(read value) {try.:Success value}]) {try.:Success [(is Any (|> tag (as (-> Any Integer)) ffi.as_long - (java/lang/Long::intValue []) + (java/lang/Long:intValue []) (is java/lang/Integer))) (is Any (when ?flag {.:Some _} (is Any "") @@ -204,13 +204,13 @@ (the (read_tuple read host_object) (-> Translator net/sandius/rembulan/impl/DefaultTable (Try Any)) - (let [init_num_keys (.natural (ffi.of_long (net/sandius/rembulan/Table::rawlen [] host_object)))] + (let [init_num_keys (.natural (ffi.of_long (net/sandius/rembulan/Table:rawlen [] host_object)))] (loop (again [num_keys init_num_keys idx 0 output (is (Array java/lang/Object) (array.empty init_num_keys))]) (if (n.< num_keys idx) - (when (net/sandius/rembulan/Table::get_idx [(ffi.as_long (.integer (++ idx)))] host_object) + (when (net/sandius/rembulan/Table:get_idx [(ffi.as_long (.integer (++ idx)))] host_object) {.:None} (again num_keys (++ idx) output) @@ -236,12 +236,12 @@ _)] - [[LuxValue (<| {try.:Success} (LuxValue::getValue []))] + [[LuxValue (<| {try.:Success} (LuxValue:getValue []))] [java/lang/Boolean {try.:Success}] [java/lang/Long {try.:Success}] [java/lang/Double {try.:Success}] [java/lang/String {try.:Success}] - [net/sandius/rembulan/ByteString (<| {try.:Success} (net/sandius/rembulan/ByteString::decode []))] + [net/sandius/rembulan/ByteString (<| {try.:Success} (net/sandius/rembulan/ByteString:decode []))] [net/sandius/rembulan/runtime/LuaFunction {try.:Success}]] )) (when (ffi.as net/sandius/rembulan/impl/DefaultTable host_object) @@ -260,8 +260,8 @@ (the (return ec value) (-> net/sandius/rembulan/runtime/ExecutionContext Any Any) (|> ec - (net/sandius/rembulan/runtime/ExecutionContext::getReturnBuffer []) - (net/sandius/rembulan/runtime/ReturnBuffer::setTo [(as (-> Any java/lang/Object) value)]))) + (net/sandius/rembulan/runtime/ExecutionContext:getReturnBuffer []) + (net/sandius/rembulan/runtime/ReturnBuffer:setTo [(as (-> Any java/lang/Object) value)]))) (the (function/* arity) (-> Natural Code) @@ -369,7 +369,7 @@ ))))) (ffi.the library/lux/Function - "[1]::[0]") + "[1]:[0]") (the (lux_structure to_host value) (-> (-> Any java/lang/Object) (Array java/lang/Object) LuxValue) @@ -397,7 +397,7 @@ java/lang/Object (when (ffi.as net/sandius/rembulan/ByteString field) {.:Some field} - (when (ffi.of_string (net/sandius/rembulan/ByteString::decode [] field)) + (when (ffi.of_string (net/sandius/rembulan/ByteString:decode [] field)) runtime.variant_tag_field (when (array.item 0 value) {try.:Success it} @@ -449,7 +449,7 @@ (exception.the (cannot_apply_a_non_function object) (Exception java/lang/Object) (exception.report - (list ["Non-function" (ffi.of_string (java/lang/Object::toString [] object))]))) + (list ["Non-function" (ffi.of_string (java/lang/Object:toString [] object))]))) (the ensure_function (-> Any (Maybe net/sandius/rembulan/runtime/LuaFunction)) @@ -467,7 +467,7 @@ [.let [inputs (ffi.array java/lang/Object [(as (-> Any java/lang/Object) (lux_structure to_host (as (-> Any (Array java/lang/Object)) inputs))) (as (-> Any java/lang/Object) (lux_structure to_host (as (-> Any (Array java/lang/Object)) lux)))])] - output (net/sandius/rembulan/exec/DirectCallExecutor::call [state_context (as (-> Any java/lang/Object) macro) inputs] executor)] + output (net/sandius/rembulan/exec/DirectCallExecutor:call [state_context (as (-> Any java/lang/Object) macro) inputs] executor)] (|> output (array.item 0) try.trusted @@ -686,20 +686,20 @@ (the host (IO [Baggage (Host _.Expression _.Statement)]) - (io (let [runtime_env (net/sandius/rembulan/env/RuntimeEnvironments::system []) - std_lib (net/sandius/rembulan/lib/StandardLibrary::in [runtime_env]) - state_context (net/sandius/rembulan/impl/StateContexts::newDefaultInstance []) - table (net/sandius/rembulan/lib/StandardLibrary::installInto [state_context] std_lib) - variable (net/sandius/rembulan/Variable::new [table]) - loader (net/sandius/rembulan/compiler/CompilerChunkLoader::of [(ffi.as_string "_lux_definition")]) - executor (net/sandius/rembulan/exec/DirectCallExecutor::newExecutor []) - scheduling_context (net/sandius/rembulan/exec/DirectCallExecutor::schedulingContextFactory [] executor) + (io (let [runtime_env (net/sandius/rembulan/env/RuntimeEnvironments:system []) + std_lib (net/sandius/rembulan/lib/StandardLibrary:in [runtime_env]) + state_context (net/sandius/rembulan/impl/StateContexts:newDefaultInstance []) + table (net/sandius/rembulan/lib/StandardLibrary:installInto [state_context] std_lib) + variable (net/sandius/rembulan/Variable:new [table]) + loader (net/sandius/rembulan/compiler/CompilerChunkLoader:of [(ffi.as_string "_lux_definition")]) + executor (net/sandius/rembulan/exec/DirectCallExecutor:newExecutor []) + scheduling_context (net/sandius/rembulan/exec/DirectCallExecutor:schedulingContextFactory [] executor) value (is (-> _.Statement (Try Any)) (function (_ code) (monad.let try.monad - [lua_function (net/sandius/rembulan/load/ChunkLoader::loadTextChunk [variable (ffi.as_string "lux compilation") (ffi.as_string (_.code code))] loader) - output (net/sandius/rembulan/exec/DirectCallExecutor::call [state_context (as (-> Any java/lang/Object) lua_function) (array.empty 0)] - executor)] + [lua_function (net/sandius/rembulan/load/ChunkLoader:loadTextChunk [variable (ffi.as_string "lux compilation") (ffi.as_string (_.code code))] loader) + output (net/sandius/rembulan/exec/DirectCallExecutor:call [state_context (as (-> Any java/lang/Object) lua_function) (array.empty 0)] + executor)] (when (array.item 0 output) {try.:Failure _} (pure []) @@ -814,14 +814,14 @@ (monad.let try.monad [handler (try.of_maybe "Not an extension handler." (..ensure_function handler)) - output (net/sandius/rembulan/exec/DirectCallExecutor::call [state_context - (as (-> Any java/lang/Object) handler) - (ffi.array java/lang/Object - [(as (-> Any java/lang/Object) (phase_wrapper ..to_host phase)) - (..to_host archive) - (..to_host parameters) - (..to_host state)])] - executor)] + output (net/sandius/rembulan/exec/DirectCallExecutor:call [state_context + (as (-> Any java/lang/Object) handler) + (ffi.array java/lang/Object + [(as (-> Any java/lang/Object) (phase_wrapper ..to_host phase)) + (..to_host archive) + (..to_host parameters) + (..to_host state)])] + executor)] (|> output (array.item 0) try.trusted diff --git a/lux-php/source/program.lux b/lux-php/source/program.lux index 032e4e9baf..e8e1a04329 100644 --- a/lux-php/source/program.lux +++ b/lux-php/source/program.lux @@ -69,105 +69,105 @@ ["[1][0]" static]]]) (ffi.the java/lang/String - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/reflect/Field - "[1]::[0]" + "[1]:[0]" (get [java/lang/Object] java/lang/Object)) (ffi.the java/lang/reflect/AccessibleObject - "[1]::[0]" + "[1]:[0]" (setAccessible [boolean] void)) (ffi.the (java/lang/Class a) - "[1]::[0]" + "[1]:[0]" (getDeclaredField [java/lang/String] java/lang/reflect/Field)) (ffi.the java/lang/Object - "[1]::[0]" + "[1]:[0]" (toString [] java/lang/String) (getClass [] (java/lang/Class java/lang/Object))) (ffi.the java/lang/Integer - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/Long - "[1]::[0]" + "[1]:[0]" (intValue [] java/lang/Integer)) (ffi.the php/runtime/Memory - "[1]::[0]" + "[1]:[0]" (valueOfIndex "as" generic_valueOfIndex [php/runtime/env/TraceInfo php/runtime/Memory] php/runtime/Memory) (valueOfIndex "as" long_valueOfIndex [php/runtime/env/TraceInfo long] php/runtime/Memory) (valueOfIndex "as" string_valueOfIndex [php/runtime/env/TraceInfo java/lang/String] php/runtime/Memory)) (ffi.the php/runtime/Memory$Type - "[1]::[0]" + "[1]:[0]" ("enum" ARRAY)) (ffi.the php/runtime/memory/NullMemory - "[1]::[0]" + "[1]:[0]" ("static" INSTANCE php/runtime/memory/NullMemory)) (ffi.the php/runtime/memory/FalseMemory - "[1]::[0]" + "[1]:[0]" ("static" INSTANCE php/runtime/memory/FalseMemory)) (ffi.the php/runtime/memory/TrueMemory - "[1]::[0]" + "[1]:[0]" ("static" INSTANCE php/runtime/memory/TrueMemory)) (ffi.the php/runtime/memory/LongMemory - "[1]::[0]" + "[1]:[0]" (new [long]) (toLong [] long) ("static" valueOf "manual" [int] php/runtime/Memory)) (ffi.the php/runtime/memory/DoubleMemory - "[1]::[0]" + "[1]:[0]" (new [double]) (toDouble [] double)) (ffi.the php/runtime/memory/StringMemory - "[1]::[0]" + "[1]:[0]" (new [java/lang/String]) (toString [] java/lang/String)) (ffi.the php/runtime/memory/ReferenceMemory - "[1]::[0]" + "[1]:[0]" (getValue [] php/runtime/Memory)) (ffi.the php/runtime/memory/ArrayMemory - "[1]::[0]" + "[1]:[0]" (new [[java/lang/Object]]) (size [] int) (isMap [] boolean) (get [php/runtime/Memory] "?" php/runtime/Memory)) (ffi.the php/runtime/lang/IObject - "[1]::[0]") + "[1]:[0]") (ffi.the php/runtime/memory/ObjectMemory - "[1]::[0]" + "[1]:[0]" (value php/runtime/lang/IObject)) (ffi.the php/runtime/env/Environment - "[1]::[0]") + "[1]:[0]") (ffi.the php/runtime/env/TraceInfo - "[1]::[0]" + "[1]:[0]" (new [java/lang/String int int])) (ffi.the php/runtime/reflection/FunctionEntity - "[1]::[0]") + "[1]:[0]") (ffi.the php/runtime/invoke/InvokeHelper - "[1]::[0]" + "[1]:[0]" ("static" callAny [php/runtime/Memory [php/runtime/Memory] php/runtime/env/Environment php/runtime/env/TraceInfo] "try" php/runtime/Memory)) (ffi.the php/runtime/lang/Closure - "[1]::[0]" + "[1]:[0]" (call [php/runtime/env/Environment [php/runtime/Memory]] "try" php/runtime/Memory)) (template.with [] @@ -175,7 +175,7 @@ (getValue [] java/lang/Object)) (`` (ffi.the (,, (template.name ["program/" ])) - "[1]::[0]" + "[1]:[0]" (getValue [] java/lang/Object)))] [[StructureValue]] @@ -187,33 +187,33 @@ (exception.the (unknown_kind_of_object object) (Exception java/lang/Object) (exception.report - (list ["Class" (java/lang/Object::toString (java/lang/Object::getClass object))] - ["Object" (java/lang/Object::toString object)]))) + (list ["Class" (java/lang/Object:toString (java/lang/Object:getClass object))] + ["Object" (java/lang/Object:toString object)]))) (the (value_wrapper lux_structure value) (-> (-> (Array java/lang/Object) php/runtime/Memory) java/lang/Object php/runtime/Memory) (<| (if (ffi.null? value) - (php/runtime/memory/NullMemory::INSTANCE)) + (php/runtime/memory/NullMemory:INSTANCE)) (when (ffi.as java/lang/Boolean value) {.:Some value} (if (as Bit value) - (php/runtime/memory/TrueMemory::INSTANCE) - (php/runtime/memory/FalseMemory::INSTANCE)) + (php/runtime/memory/TrueMemory:INSTANCE) + (php/runtime/memory/FalseMemory:INSTANCE)) {.:None}) (when (ffi.as java/lang/Long value) {.:Some value} - (php/runtime/memory/LongMemory::new value) + (php/runtime/memory/LongMemory:new value) {.:None}) (when (ffi.as java/lang/Double value) {.:Some value} - (php/runtime/memory/DoubleMemory::new value) + (php/runtime/memory/DoubleMemory:new value) {.:None}) (when (ffi.as java/lang/String value) {.:Some value} - (php/runtime/memory/StringMemory::new value) + (php/runtime/memory/StringMemory:new value) {.:None}) (when (ffi.as [java/lang/Object] value) @@ -230,13 +230,13 @@ )) (the unit - (php/runtime/memory/StringMemory::new "")) + (php/runtime/memory/StringMemory:new "")) (the (lux_structure value) (-> (Array java/lang/Object) php/runtime/Memory) (`` (ffi.object [] php/runtime/Memory [program/StructureValue] - [php/runtime/Memory$Type php/runtime/Memory$Type::ARRAY] + [php/runtime/Memory$Type php/runtime/Memory$Type:ARRAY] ... Methods (program/StructureValue [] (getValue self []) java/lang/Object @@ -259,14 +259,14 @@ {.:None})] [[php/runtime/memory/ReferenceMemory - php/runtime/Memory::generic_valueOfIndex - php/runtime/memory/ReferenceMemory::getValue] + php/runtime/Memory:generic_valueOfIndex + php/runtime/memory/ReferenceMemory:getValue] [php/runtime/memory/LongMemory - php/runtime/Memory::long_valueOfIndex - php/runtime/memory/LongMemory::toLong] + php/runtime/Memory:long_valueOfIndex + php/runtime/memory/LongMemory:toLong] [php/runtime/memory/StringMemory - php/runtime/Memory::string_valueOfIndex - php/runtime/memory/StringMemory::toString]] + php/runtime/Memory:string_valueOfIndex + php/runtime/memory/StringMemory:toString]] )) (undefined)))) @@ -289,12 +289,12 @@ (array.read! 0) maybe.trusted (as java/lang/Integer) - php/runtime/memory/LongMemory::valueOf) + php/runtime/memory/LongMemory:valueOf) runtime.variant_flag_field (when (array.read! 1 value) {.:None} - (php/runtime/memory/NullMemory::INSTANCE) + (php/runtime/memory/NullMemory:INSTANCE) {.:Some value} ..unit) @@ -306,7 +306,7 @@ (..value_wrapper lux_structure)) runtime.tuple_size_field - (php/runtime/memory/LongMemory::new (array.size value)) + (php/runtime/memory/LongMemory:new (array.size value)) _ (undefined))) @@ -315,17 +315,17 @@ (the (read_tuple read host_object) (-> Reader php/runtime/memory/ArrayMemory (Try Any)) (let [size (|> host_object - php/runtime/memory/ArrayMemory::size + php/runtime/memory/ArrayMemory:size (as Natural) --)] (loop (again [idx 0 output (as (Array Any) (array.new size))]) (if (n.< size idx) (let [value (|> host_object - (php/runtime/memory/ArrayMemory::get (php/runtime/memory/LongMemory::new (.integer idx))) + (php/runtime/memory/ArrayMemory:get (php/runtime/memory/LongMemory:new (.integer idx))) maybe.trusted (as php/runtime/memory/ReferenceMemory) - php/runtime/memory/ReferenceMemory::getValue)] + php/runtime/memory/ReferenceMemory:getValue)] (when (ffi.as php/runtime/memory/NullMemory value) {.:Some _} (again (++ idx) output) @@ -340,32 +340,32 @@ {try.:Success output})))) (the variant_tag_field - (php/runtime/memory/StringMemory::new runtime.variant_tag_field)) + (php/runtime/memory/StringMemory:new runtime.variant_tag_field)) (the variant_value_field - (php/runtime/memory/StringMemory::new runtime.variant_value_field)) + (php/runtime/memory/StringMemory:new runtime.variant_value_field)) (the variant_flag_field - (php/runtime/memory/StringMemory::new runtime.variant_flag_field)) + (php/runtime/memory/StringMemory:new runtime.variant_flag_field)) (the (read_variant read host_object) (-> Reader php/runtime/memory/ArrayMemory (Try Any)) (when [(|> host_object - (php/runtime/memory/ArrayMemory::get ..variant_tag_field) + (php/runtime/memory/ArrayMemory:get ..variant_tag_field) maybe.trusted read) (|> host_object - (php/runtime/memory/ArrayMemory::get ..variant_value_field) + (php/runtime/memory/ArrayMemory:get ..variant_value_field) maybe.trusted read)] [{try.:Success tag} {try.:Success value}] - {try.:Success [(java/lang/Long::intValue (as java/lang/Long tag)) + {try.:Success [(java/lang/Long:intValue (as java/lang/Long tag)) (is Any (when (|> host_object - (php/runtime/memory/ArrayMemory::get ..variant_flag_field) + (php/runtime/memory/ArrayMemory:get ..variant_flag_field) maybe.trusted (as php/runtime/memory/ReferenceMemory) - php/runtime/memory/ReferenceMemory::getValue + php/runtime/memory/ReferenceMemory:getValue (ffi.as php/runtime/memory/NullMemory)) {.:Some _} (ffi.null) @@ -380,7 +380,7 @@ (exception.the .public nulll_has_no_lux_representation) (the tuple_size_field - (php/runtime/memory/StringMemory::new runtime.tuple_size_field)) + (php/runtime/memory/StringMemory:new runtime.tuple_size_field)) (the (read host_object) Reader @@ -401,17 +401,17 @@ {.:None})] - [[program/StructureValue [program/StructureValue::getValue {try.:Success}]] - [php/runtime/memory/LongMemory [php/runtime/memory/LongMemory::toLong {try.:Success}]] - [php/runtime/memory/DoubleMemory [php/runtime/memory/DoubleMemory::toDouble {try.:Success}]] - [php/runtime/memory/StringMemory [php/runtime/memory/StringMemory::toString {try.:Success}]] - [php/runtime/memory/ReferenceMemory [php/runtime/memory/ReferenceMemory::getValue read]] + [[program/StructureValue [program/StructureValue:getValue {try.:Success}]] + [php/runtime/memory/LongMemory [php/runtime/memory/LongMemory:toLong {try.:Success}]] + [php/runtime/memory/DoubleMemory [php/runtime/memory/DoubleMemory:toDouble {try.:Success}]] + [php/runtime/memory/StringMemory [php/runtime/memory/StringMemory:toString {try.:Success}]] + [php/runtime/memory/ReferenceMemory [php/runtime/memory/ReferenceMemory:getValue read]] [php/runtime/memory/ObjectMemory [{try.:Success}]]] )) (when (ffi.as php/runtime/memory/ArrayMemory host_object) {.:Some value} (if (|> value - (php/runtime/memory/ArrayMemory::get ..tuple_size_field) + (php/runtime/memory/ArrayMemory:get ..tuple_size_field) (pipe.when {.:Some _} false {.:None} true)) (read_variant read value) (read_tuple read value)) @@ -423,15 +423,15 @@ (exception.the (cannot_apply_a_non_function object) (Exception java/lang/Object) (exception.report - (list ["Class" (java/lang/Object::toString (java/lang/Object::getClass object))] - ["Non-function" (java/lang/Object::toString object)]))) + (list ["Class" (java/lang/Object:toString (java/lang/Object:getClass object))] + ["Non-function" (java/lang/Object:toString object)]))) (ffi.the javax/script/ScriptEngine - "[1]::[0]" + "[1]:[0]" (eval [java/lang/String] "try" Object)) (ffi.the org/develnext/jphp/scripting/JPHPScriptEngine - "[1]::[0]" + "[1]:[0]" (new [])) (the (ensure_macro macro) @@ -442,15 +442,15 @@ (ffi.as php/runtime/memory/ObjectMemory))) (the interpreter - (org/develnext/jphp/scripting/JPHPScriptEngine::new)) + (org/develnext/jphp/scripting/JPHPScriptEngine:new)) (the default_environment php/runtime/env/Environment (|> ..interpreter - java/lang/Object::getClass - (java/lang/Class::getDeclaredField "environment") - (pipe.exec [(java/lang/reflect/AccessibleObject::setAccessible true)]) - (java/lang/reflect/Field::get ..interpreter) + java/lang/Object:getClass + (java/lang/Class:getDeclaredField "environment") + (pipe.exec [(java/lang/reflect/AccessibleObject:setAccessible true)]) + (java/lang/reflect/Field:get ..interpreter) (as php/runtime/env/Environment))) (the (call_macro inputs lux macro) @@ -458,13 +458,13 @@ (Try (Try [Lux (Stack Code)]))) (<| as_expected (monad.let try.monad - [output (php/runtime/lang/Closure::call ..default_environment - (|> (ffi.array php/runtime/Memory 3) - (ffi.write! 0 macro) - (ffi.write! 1 (lux_structure (as (Array java/lang/Object) inputs))) - (ffi.write! 2 (lux_structure (as (Array java/lang/Object) lux)))) - (as php/runtime/lang/Closure - (php/runtime/memory/ObjectMemory::value macro)))] + [output (php/runtime/lang/Closure:call ..default_environment + (|> (ffi.array php/runtime/Memory 3) + (ffi.write! 0 macro) + (ffi.write! 1 (lux_structure (as (Array java/lang/Object) inputs))) + (ffi.write! 2 (lux_structure (as (Array java/lang/Object) lux)))) + (as php/runtime/lang/Closure + (php/runtime/memory/ObjectMemory:value macro)))] (..read (as java/lang/Object output))))) (the (expander macro inputs lux) @@ -481,7 +481,7 @@ (io (let [value (is (-> (_.Code Any) (Try Any)) (function (_ code) (monad.let try.monad - [output (javax/script/ScriptEngine::eval (text " Any php/runtime/Memory) (|>> (as (Array java/lang/Object)) lux_structure (as php/runtime/Memory)))] - output (php/runtime/lang/Closure::call ..default_environment - (|> (ffi.array php/runtime/Memory 6) - (ffi.write! 0 handler) - (ffi.write! 1 (php/runtime/memory/StringMemory::new name)) - (ffi.write! 2 (to_php phase)) - (ffi.write! 3 (to_php archive)) - (ffi.write! 4 (to_php parameters)) - (ffi.write! 5 (to_php state))) - (as php/runtime/lang/Closure - (php/runtime/memory/ObjectMemory::value handler)))] + output (php/runtime/lang/Closure:call ..default_environment + (|> (ffi.array php/runtime/Memory 6) + (ffi.write! 0 handler) + (ffi.write! 1 (php/runtime/memory/StringMemory:new name)) + (ffi.write! 2 (to_php phase)) + (ffi.write! 3 (to_php archive)) + (ffi.write! 4 (to_php parameters)) + (ffi.write! 5 (to_php state))) + (as php/runtime/lang/Closure + (php/runtime/memory/ObjectMemory:value handler)))] (..read output)))) .php diff --git a/lux-python/source/program.lux b/lux-python/source/program.lux index 883b57d896..f467113e7f 100644 --- a/lux-python/source/program.lux +++ b/lux-python/source/program.lux @@ -77,49 +77,49 @@ ["/" compositor]]) (for .jvm (these (ffi.the java/lang/String - "[1]::[0]") + "[1]:[0]") (ffi.the (java/lang/Class a) - "[1]::[0]" + "[1]:[0]" ("static" forName [java/lang/String] (java/lang/Class java/lang/Object)) (getName [] java/lang/String)) (ffi.the java/lang/Object - "[1]::[0]" + "[1]:[0]" (new []) (toString [] java/lang/String) (getClass [] (java/lang/Class java/lang/Object))) (ffi.the org/python/core/PyNone - "[1]::[0]") + "[1]:[0]") (ffi.the org/python/core/PyInteger - "[1]::[0]") + "[1]:[0]") (ffi.the org/python/core/PyTuple - "[1]::[0]") + "[1]:[0]") (ffi.the org/python/core/PyList - "[1]::[0]") + "[1]:[0]") (ffi.the org/python/core/PyBoolean - "[1]::[0]" + "[1]:[0]" (new [boolean])) (ffi.the org/python/core/PyLong - "[1]::[0]" + "[1]:[0]" (new [long])) (ffi.the org/python/core/PyFloat - "[1]::[0]" + "[1]:[0]" (new [double])) (ffi.the org/python/core/PyString - "[1]::[0]" + "[1]:[0]" (new [java/lang/String])) (ffi.the org/python/core/PyObject - "[1]::[0]" + "[1]:[0]" (asInt [] java/lang/Integer) (asLong [] long) (asDouble [] double) @@ -130,19 +130,19 @@ (__len__ [] int)) (ffi.the org/python/core/PyFunction - "[1]::[0]" + "[1]:[0]" (__call__ [[org/python/core/PyObject]] "try" org/python/core/PyObject)) (ffi.the org/python/core/ThreadState - "[1]::[0]") + "[1]:[0]") (ffi.the org/python/core/PyArray - "[1]::[0]" + "[1]:[0]" (new [(java/lang/Class [? < java/lang/Object]) java/lang/Object]) (getArray [] java/lang/Object)) (ffi.the org/python/util/PythonInterpreter - "[1]::[0]" + "[1]:[0]" (new []) (exec [java/lang/String] "try" void) (eval [java/lang/String] "try" PyObject)) @@ -153,14 +153,14 @@ (the (read_tuple read host_object) (-> Translator Translator) (let [size (|> host_object - (org/python/core/PyObject::__len__ []) + (org/python/core/PyObject:__len__ []) ffi.of_int .natural)] (loop (again [idx 0 output (is (Array Any) (array.empty size))]) (if (n.< size idx) - (when (org/python/core/PyObject::__getitem__ [(ffi.as_int (.integer idx))] host_object) + (when (org/python/core/PyObject:__getitem__ [(ffi.as_int (.integer idx))] host_object) {try.:Success value} (when (read value) {try.:Success lux_value} @@ -176,13 +176,13 @@ (exception.the (unknown_kind_of_object object) (Exception java/lang/Object) (exception.report - (list ["Object" (ffi.of_string (java/lang/Object::toString [] object))]))) + (list ["Object" (ffi.of_string (java/lang/Object:toString [] object))]))) (the (read_variant read host_object) (-> Translator Translator) - (when [(org/python/core/PyObject::__getitem__ [(ffi.as_int +0)] host_object) - (org/python/core/PyObject::__getitem__ [(ffi.as_int +1)] host_object) - (org/python/core/PyObject::__getitem__ [(ffi.as_int +2)] host_object)] + (when [(org/python/core/PyObject:__getitem__ [(ffi.as_int +0)] host_object) + (org/python/core/PyObject:__getitem__ [(ffi.as_int +1)] host_object) + (org/python/core/PyObject:__getitem__ [(ffi.as_int +2)] host_object)] (^.or [{try.:Failure try} _ _] [_ {try.:Failure try} _] [_ _ {try.:Failure try}]) @@ -211,7 +211,7 @@ (value [] java/lang/Object)) (ffi.the LuxValue - "[1]::[0]" + "[1]:[0]" (value [] java/lang/Object)) (the (read host_object) @@ -223,19 +223,19 @@ _)] - [[LuxValue [(LuxValue::value [])]] + [[LuxValue [(LuxValue:value [])]] [org/python/core/PyNone [(pipe.new [] [])]] - [org/python/core/PyBoolean [(org/python/core/PyObject::__nonzero__ [])]] - ... [org/python/core/PyInteger [(ffi.is org/python/core/PyObject) org/python/core/PyObject::asInt]] + [org/python/core/PyBoolean [(org/python/core/PyObject:__nonzero__ [])]] + ... [org/python/core/PyInteger [(ffi.is org/python/core/PyObject) org/python/core/PyObject:asInt]] [org/python/core/PyInteger [(ffi.is org/python/core/PyObject) (.jvm_member_invoke_virtual# [] "org.python.core.PyObject" "asInt" []) .jvm_object_cast# (is (Nominal "java.lang.Integer"))]] - [org/python/core/PyLong [(org/python/core/PyObject::asLong [])]] - [org/python/core/PyFloat [(org/python/core/PyObject::asDouble [])]] - [org/python/core/PyString [(org/python/core/PyObject::asString [])]] + [org/python/core/PyLong [(org/python/core/PyObject:asLong [])]] + [org/python/core/PyFloat [(org/python/core/PyObject:asDouble [])]] + [org/python/core/PyString [(org/python/core/PyObject:asString [])]] [org/python/core/PyFunction []] - [org/python/core/PyArray [(org/python/core/PyArray::getArray [])]] + [org/python/core/PyArray [(org/python/core/PyArray:getArray [])]] [[java/lang/Object] [(|>)]]] )) (,, (template.with [ ] @@ -309,10 +309,10 @@ (the object_class (java/lang/Class java/lang/Object) - (java/lang/Object::getClass [] (java/lang/Object::new []))) + (java/lang/Object:getClass [] (java/lang/Object:new []))) (ffi.the library/lux/Function - "[1]::[0]") + "[1]:[0]") (the (to_host|array to_host it) (-> (-> Any org/python/core/PyObject) Any org/python/core/PyObject) @@ -359,10 +359,10 @@ {.:None})] - [[java/lang/Boolean org/python/core/PyBoolean::new] - [java/lang/Long org/python/core/PyLong::new] - [java/lang/Double org/python/core/PyFloat::new] - [java/lang/String org/python/core/PyString::new] + [[java/lang/Boolean org/python/core/PyBoolean:new] + [java/lang/Long org/python/core/PyLong:new] + [java/lang/Double org/python/core/PyFloat:new] + [java/lang/String org/python/core/PyString:new] [library/lux/Function (pseudo_function to_host)] [[java/lang/Object] (to_host|array to_host)]] )) @@ -379,16 +379,16 @@ (exception.the (cannot_apply_a_non_function object) (Exception java/lang/Object) (exception.report - (list ["Object" (ffi.of_string (java/lang/Object::toString [] object))] - ["Class" (ffi.of_string (java/lang/Class::getName [] (java/lang/Object::getClass [] object)))]))) + (list ["Object" (ffi.of_string (java/lang/Object:toString [] object))] + ["Class" (ffi.of_string (java/lang/Class:getName [] (java/lang/Object:getClass [] object)))]))) (the (call_macro inputs lux macro) (-> (List Code) Lux org/python/core/PyFunction (Try (Try [Lux (List Code)]))) (|> macro - (org/python/core/PyFunction::__call__ [(ffi.array org/python/core/PyObject - [(..to_host inputs) - (..to_host lux)])]) + (org/python/core/PyFunction:__call__ [(ffi.array org/python/core/PyObject + [(..to_host inputs) + (..to_host lux)])]) (try:each ..read) try:conjoint as_expected)) @@ -418,15 +418,15 @@ (for .jvm (the host (IO (Host _.Expression _.Statement)) - (io (let [interpreter (org/python/util/PythonInterpreter::new []) + (io (let [interpreter (org/python/util/PythonInterpreter:new []) evaluate! (is (-> [(Maybe unit.ID) _.Expression] (Try Any)) (function (evaluate! [_ input]) (monad.let try.monad - [output (org/python/util/PythonInterpreter::eval [(ffi.as_string (_.code input))] interpreter)] + [output (org/python/util/PythonInterpreter:eval [(ffi.as_string (_.code input))] interpreter)] (..read output)))) execute! (is (-> _.Statement (Try Any)) (function (execute! input) - (when (org/python/util/PythonInterpreter::exec [(ffi.as_string (_.code input))] interpreter) + (when (org/python/util/PythonInterpreter:exec [(ffi.as_string (_.code input))] interpreter) {try.:Failure error} (if (text.contains? "maximum recursion depth exceeded" error) (execute! input) @@ -522,13 +522,13 @@ (monad.let try.monad [handler (try.of_maybe "Not an extension handler." (..python_function! handler)) - output (org/python/core/PyFunction::__call__ [(ffi.array org/python/core/PyObject - [(as (-> Any org/python/core/PyObject) - (phase_wrapper phase)) - (..to_host archive) - (..to_host parameters) - (..to_host state)])] - handler)] + output (org/python/core/PyFunction:__call__ [(ffi.array org/python/core/PyObject + [(as (-> Any org/python/core/PyObject) + (phase_wrapper phase)) + (..to_host archive) + (..to_host parameters) + (..to_host state)])] + handler)] (..read output))))) .python @@ -556,7 +556,7 @@ ... The first entry in the list will be the program.py file itself ... so, it must be removed so only the program's arguments are left. (_.slice_from (_.int +1)) - runtime.lux::program_args) + runtime.lux:program_args) _.none) program))))) diff --git a/lux-r/source/program.lux b/lux-r/source/program.lux index 753168df5a..a997f1c1af 100644 --- a/lux-r/source/program.lux +++ b/lux-r/source/program.lux @@ -73,105 +73,105 @@ ["[1][0]" static]]]) (ffi.the java/lang/String - "[1]::[0]") + "[1]:[0]") (ffi.the (java/lang/Class a) - "[1]::[0]" + "[1]:[0]" ("static" forName [java/lang/String] "try" (java/lang/Class java/lang/Object))) (ffi.the java/lang/Object - "[1]::[0]" + "[1]:[0]" (toString [] java/lang/String) (getClass [] (java/lang/Class java/lang/Object))) (ffi.the java/lang/Long - "[1]::[0]" + "[1]:[0]" (intValue [] java/lang/Integer)) (ffi.the java/lang/Integer - "[1]::[0]" + "[1]:[0]" (longValue [] long)) (ffi.the java/lang/Number - "[1]::[0]" + "[1]:[0]" (intValue [] java/lang/Integer) (longValue [] long) (doubleValue [] double)) (ffi.the org/renjin/sexp/SEXP - "[1]::[0]" + "[1]:[0]" (asInt [] int)) (ffi.the org/renjin/sexp/AttributeMap - "[1]::[0]" + "[1]:[0]" ("static" EMPTY org/renjin/sexp/AttributeMap)) (ffi.the org/renjin/sexp/AbstractSEXP - "[1]::[0]") + "[1]:[0]") (ffi.the org/renjin/sexp/IntArrayVector - "[1]::[0]") + "[1]:[0]") (ffi.the org/renjin/sexp/Logical - "[1]::[0]" + "[1]:[0]" (toBooleanStrict [] boolean)) (ffi.the org/renjin/sexp/LogicalVector - "[1]::[0]" + "[1]:[0]" (asLogical [] org/renjin/sexp/Logical)) (ffi.the org/renjin/sexp/LogicalArrayVector) (ffi.the org/renjin/sexp/StringVector - "[1]::[0]" + "[1]:[0]" (asString [] java/lang/String)) (ffi.the org/renjin/sexp/StringArrayVector - "[1]::[0]") + "[1]:[0]") (ffi.the org/renjin/sexp/Null - "[1]::[0]") + "[1]:[0]") (ffi.the org/renjin/sexp/ListVector - "[1]::[0]" + "[1]:[0]" (get "as" get_index [int] org/renjin/sexp/SEXP) (get "as" get_field [java/lang/String] org/renjin/sexp/SEXP) (length [] int)) (ffi.the org/renjin/sexp/PairList - "[1]::[0]") + "[1]:[0]") (ffi.the org/renjin/sexp/PairList$Builder - "[1]::[0]" + "[1]:[0]" (new []) (add [org/renjin/sexp/SEXP] org/renjin/sexp/PairList$Builder) (build [] org/renjin/sexp/PairList)) (ffi.the org/renjin/eval/Context - "[1]::[0]") + "[1]:[0]") (ffi.the org/renjin/sexp/Environment - "[1]::[0]") + "[1]:[0]") (ffi.the org/renjin/sexp/FunctionCall - "[1]::[0]" + "[1]:[0]" (new [org/renjin/sexp/SEXP org/renjin/sexp/PairList]) (eval [org/renjin/eval/Context org/renjin/sexp/Environment] "try" org/renjin/sexp/SEXP)) (ffi.the org/renjin/sexp/Closure - "[1]::[0]" + "[1]:[0]" (getEnclosingEnvironment [] org/renjin/sexp/Environment)) (ffi.the javax/script/ScriptEngine - "[1]::[0]" + "[1]:[0]" (eval [java/lang/String] "try" java/lang/Object)) (ffi.the org/renjin/script/RenjinScriptEngine - "[1]::[0]" + "[1]:[0]" (getRuntimeContext [] org/renjin/eval/Context)) (ffi.the org/renjin/script/RenjinScriptEngineFactory - "[1]::[0]" + "[1]:[0]" (new []) (getScriptEngine [] org/renjin/script/RenjinScriptEngine)) @@ -179,8 +179,8 @@ [(exception.the ( object) (Exception java/lang/Object) (exception.report - (list ["Class" (java/lang/Object::toString (java/lang/Object::getClass object))] - ["Object" (java/lang/Object::toString object)])))] + (list ["Class" (java/lang/Object:toString (java/lang/Object:getClass object))] + ["Object" (java/lang/Object:toString object)])))] [[unknown_kind_of_object] [cannot_apply_a_non_function]] @@ -190,8 +190,8 @@ ... (-> Bit ... org/armedbear/lisp/LispObject) ... (|>> (pipe.when -... 0b (org/armedbear/lisp/Nil::NIL) -... 1b (org/armedbear/lisp/Symbol::T)))) +... 0b (org/armedbear/lisp/Nil:NIL) +... 1b (org/armedbear/lisp/Symbol:T)))) (syntax.the (%%code [term ?list.any]) (pure (list (code.text (code.as_text term))))) @@ -209,10 +209,10 @@ ... [[[java/lang/Object] [host_value]] ... [java/lang/Boolean [..host_bit]] - ... [java/lang/Integer [java/lang/Integer::longValue org/armedbear/lisp/Fixnum::getInstance]] - ... [java/lang/Long [org/armedbear/lisp/Bignum::getInstance]] - ... [java/lang/Double [org/armedbear/lisp/DoubleFloat::new]] - ... [java/lang/String [org/armedbear/lisp/SimpleString::new]]] + ... [java/lang/Integer [java/lang/Integer:longValue org/armedbear/lisp/Fixnum:getInstance]] + ... [java/lang/Long [org/armedbear/lisp/Bignum:getInstance]] + ... [java/lang/Double [org/armedbear/lisp/DoubleFloat:new]] + ... [java/lang/String [org/armedbear/lisp/SimpleString:new]]] ... )) ... ... else ... (as org/armedbear/lisp/LispObject sub_value)))))) @@ -248,7 +248,7 @@ ... (org/renjin/sexp/AbstractSEXP ... [] (getAttributes self []) ... org/renjin/sexp/AttributeMap - ... (org/renjin/sexp/AttributeMap::EMPTY)) + ... (org/renjin/sexp/AttributeMap:EMPTY)) ... (org/renjin/sexp/AbstractSEXP ... [] (getTypeName self []) @@ -366,16 +366,16 @@ (-> (Reader java/lang/Object) (Reader org/renjin/sexp/ListVector)) (monad.let try.monad [tag (|> host_object - (org/renjin/sexp/ListVector::get_field runtime.variant_tag_field) + (org/renjin/sexp/ListVector:get_field runtime.variant_tag_field) (as java/lang/Object) read) value (|> host_object - (org/renjin/sexp/ListVector::get_field runtime.variant_value_field) + (org/renjin/sexp/ListVector:get_field runtime.variant_value_field) (as java/lang/Object) read)] - (wrap [(|> tag (as java/lang/Long) java/lang/Long::intValue) + (wrap [(|> tag (as java/lang/Long) java/lang/Long:intValue) (when (|> host_object - (org/renjin/sexp/ListVector::get_field runtime.variant_flag_field) + (org/renjin/sexp/ListVector:get_field runtime.variant_flag_field) (ffi.as org/renjin/sexp/Null)) {.:Some _} (is Any (ffi.null)) @@ -387,25 +387,25 @@ (the (read_i64 host_object) (Reader org/renjin/sexp/ListVector) (when [(|> host_object - (org/renjin/sexp/ListVector::get_field runtime.i64_high_field) + (org/renjin/sexp/ListVector:get_field runtime.i64_high_field) (ffi.as org/renjin/sexp/IntArrayVector)) (|> host_object - (org/renjin/sexp/ListVector::get_field runtime.i64_low_field) + (org/renjin/sexp/ListVector:get_field runtime.i64_low_field) (ffi.as org/renjin/sexp/IntArrayVector))] [{.:Some high} {.:Some low}] - {try.:Success (runtime.lux_i64 (org/renjin/sexp/SEXP::asInt high) - (org/renjin/sexp/SEXP::asInt low))} + {try.:Success (runtime.lux_i64 (org/renjin/sexp/SEXP:asInt high) + (org/renjin/sexp/SEXP:asInt low))} _ {try.:Failure ""})) (the (read_tuple read host_object) (-> (Reader java/lang/Object) (Reader org/renjin/sexp/ListVector)) - (let [size (.natural (org/renjin/sexp/ListVector::length host_object))] + (let [size (.natural (org/renjin/sexp/ListVector:length host_object))] (loop (again [idx 0 output (as (Array Any) (array.new size))]) (if (n.< size idx) - (when (|> host_object (org/renjin/sexp/ListVector::get_index (.integer idx)) (as java/lang/Object) read) + (when (|> host_object (org/renjin/sexp/ListVector:get_index (.integer idx)) (as java/lang/Object) read) {try.:Failure error} {try.:Failure error} @@ -416,9 +416,9 @@ (the (field_class field host_object) (-> Text org/renjin/sexp/ListVector Text) (|> host_object - (org/renjin/sexp/ListVector::get_field field) - java/lang/Object::getClass - java/lang/Object::toString + (org/renjin/sexp/ListVector:get_field field) + java/lang/Object:getClass + java/lang/Object:toString (as Text))) (the (read host_object) @@ -447,14 +447,14 @@ {.:None})] - [[org/renjin/sexp/StringArrayVector [org/renjin/sexp/StringVector::asString {try.:Success}]] - [org/renjin/sexp/IntArrayVector [org/renjin/sexp/SEXP::asInt {try.:Success}]] - [org/renjin/sexp/LogicalArrayVector [org/renjin/sexp/LogicalVector::asLogical - org/renjin/sexp/Logical::toBooleanStrict + [[org/renjin/sexp/StringArrayVector [org/renjin/sexp/StringVector:asString {try.:Success}]] + [org/renjin/sexp/IntArrayVector [org/renjin/sexp/SEXP:asInt {try.:Success}]] + [org/renjin/sexp/LogicalArrayVector [org/renjin/sexp/LogicalVector:asLogical + org/renjin/sexp/Logical:toBooleanStrict {try.:Success}]] [org/renjin/sexp/Closure [{try.:Success}]] - ... [org/armedbear/lisp/DoubleFloat [org/armedbear/lisp/DoubleFloat::doubleValue {try.:Success}]] - ... [program/LuxADT [program/LuxADT::getValue {try.:Success}]] + ... [org/armedbear/lisp/DoubleFloat [org/armedbear/lisp/DoubleFloat:doubleValue {try.:Success}]] + ... [program/LuxADT [program/LuxADT:getValue {try.:Success}]] ])) ... else (exception.throw ..unknown_kind_of_object [host_object]) @@ -469,10 +469,10 @@ (-> org/renjin/script/RenjinScriptEngine (Stack Code) Lux org/renjin/sexp/Closure (Try (Try [Lux (Stack Code)]))) (let [_ (debug.log! "@call_macro 0") r_inputs (is org/renjin/sexp/PairList - (when (ffi.try (|> (org/renjin/sexp/PairList$Builder::new) - (org/renjin/sexp/PairList$Builder::add (..host_value inputs)) - (org/renjin/sexp/PairList$Builder::add (..host_value lux)) - org/renjin/sexp/PairList$Builder::build + (when (ffi.try (|> (org/renjin/sexp/PairList$Builder:new) + (org/renjin/sexp/PairList$Builder:add (..host_value inputs)) + (org/renjin/sexp/PairList$Builder:add (..host_value lux)) + org/renjin/sexp/PairList$Builder:build (as org/renjin/sexp/PairList))) {try.:Success r_inputs} r_inputs @@ -482,14 +482,14 @@ (debug.log! error) (halt! error)))) _ (debug.log! "@call_macro 1") - r_macro (org/renjin/sexp/FunctionCall::new macro r_inputs) + r_macro (org/renjin/sexp/FunctionCall:new macro r_inputs) _ (debug.log! "@call_macro 2") - r_environment (org/renjin/sexp/Closure::getEnclosingEnvironment macro) + r_environment (org/renjin/sexp/Closure:getEnclosingEnvironment macro) _ (debug.log! "@call_macro 3") - r_context (org/renjin/script/RenjinScriptEngine::getRuntimeContext interpreter) + r_context (org/renjin/script/RenjinScriptEngine:getRuntimeContext interpreter) _ (debug.log! "@call_macro 4")] (monad.let try.monad - [raw_output (org/renjin/sexp/FunctionCall::eval r_context r_environment r_macro) + [raw_output (org/renjin/sexp/FunctionCall:eval r_context r_environment r_macro) :let [_ (debug.log! "@call_macro 5")]] (as (Try (Try [Lux (Stack Code)])) (..read (as java/lang/Object raw_output)))))) @@ -506,12 +506,12 @@ (the host (IO [org/renjin/script/RenjinScriptEngine (Host _.Expression _.Expression)]) - (io (let [interpreter (|> (org/renjin/script/RenjinScriptEngineFactory::new) - org/renjin/script/RenjinScriptEngineFactory::getScriptEngine) + (io (let [interpreter (|> (org/renjin/script/RenjinScriptEngineFactory:new) + org/renjin/script/RenjinScriptEngineFactory:getScriptEngine) value (is (-> (_.Code Any) (Try Any)) (function (_ code) (monad.let try.monad - [host_value (javax/script/ScriptEngine::eval (_.code code) interpreter)] + [host_value (javax/script/ScriptEngine:eval (_.code code) interpreter)] (read host_value))))] [(as org/renjin/script/RenjinScriptEngine interpreter) (is (Host _.Expression _.Expression) @@ -524,7 +524,7 @@ (exec (debug.log! "@execute!") ... (debug.log! (_.code input)) - (javax/script/ScriptEngine::eval (_.code input) interpreter))) + (javax/script/ScriptEngine:eval (_.code input) interpreter))) (the (define! context input) (let [global (reference.artifact context) @@ -534,7 +534,7 @@ :let [_ (debug.log! "@define! 0") ... _ (debug.log! (_.code definition)) ] - _ (javax/script/ScriptEngine::eval (_.code definition) interpreter) + _ (javax/script/ScriptEngine:eval (_.code definition) interpreter) :let [_ (debug.log! "@define! 1")] value (value $global) :let [_ (debug.log! "@define! 2")]] @@ -569,7 +569,7 @@ (the (program context program) (Program _.Expression _.Expression) - (_.of/2 program [(runtime.lux::program_args (_.commandArgs/0 [])) _.null])) + (_.of/2 program [(runtime.lux:program_args (_.commandArgs/0 [])) _.null])) (for .jvm (the extender diff --git a/lux-ruby/source/program.lux b/lux-ruby/source/program.lux index 07d778a9cc..88f6c025c3 100644 --- a/lux-ruby/source/program.lux +++ b/lux-ruby/source/program.lux @@ -74,161 +74,161 @@ ["/" compositor]]) (ffi.the java/lang/String - "[1]::[0]") + "[1]:[0]") (ffi.the (java/lang/Class a) - "[1]::[0]" + "[1]:[0]" (getSuperclass [] (java/lang/Class ?)) (isInstance [java/lang/Object] boolean)) (ffi.the java/lang/Object - "[1]::[0]" + "[1]:[0]" (toString [] java/lang/String) (getClass [] (java/lang/Class java/lang/Object))) (ffi.the java/lang/Integer - "[1]::[0]" + "[1]:[0]" (longValue [] long)) (ffi.the java/lang/Long - "[1]::[0]" + "[1]:[0]" (intValue [] int)) (ffi.the org/jruby/RubyString - "[1]::[0]" + "[1]:[0]" ("static" newInternalFromJavaExternal [org/jruby/Ruby java/lang/String] org/jruby/RubyString) (asJavaString [] java/lang/String)) (ffi.the org/jruby/RubySymbol - "[1]::[0]" + "[1]:[0]" (asJavaString [] java/lang/String)) (ffi.the org/jruby/runtime/builtin/IRubyObject - "[1]::[0]") + "[1]:[0]") (ffi.the org/jruby/Ruby - "[1]::[0]" + "[1]:[0]" (getCurrentContext [] org/jruby/runtime/ThreadContext) (getNil [] org/jruby/runtime/builtin/IRubyObject)) (ffi.the org/jruby/RubyClass - "[1]::[0]") + "[1]:[0]") (ffi.the (org/jruby/RubyArray it) - "[1]::[0]" + "[1]:[0]" (new [org/jruby/Ruby int]) (getLength [] int) (get [int] "?" java/lang/Object) (add [java/lang/Object] boolean)) (ffi.the org/jruby/RubyHash - "[1]::[0]" + "[1]:[0]" (get [java/lang/Object] "?" java/lang/Object)) (ffi.the org/jruby/runtime/ThreadContext - "[1]::[0]") + "[1]:[0]") (ffi.the org/jruby/RubyRange - "[1]::[0]" + "[1]:[0]" (first [org/jruby/runtime/ThreadContext] org/jruby/runtime/builtin/IRubyObject) (size [org/jruby/runtime/ThreadContext] org/jruby/runtime/builtin/IRubyObject)) (ffi.the org/jruby/runtime/JavaSites$CheckedSites - "[1]::[0]") + "[1]:[0]") (ffi.the org/jruby/runtime/builtin/Variable - "[1]::[0]") + "[1]:[0]") (ffi.the org/jruby/runtime/builtin/InstanceVariables - "[1]::[0]") + "[1]:[0]") (ffi.the org/jruby/runtime/builtin/InternalVariables - "[1]::[0]") + "[1]:[0]") (ffi.the org/jruby/embed/internal/LocalContextProvider - "[1]::[0]" + "[1]:[0]" (getRuntime [] org/jruby/Ruby)) (ffi.the org/jruby/embed/ScriptingContainer - "[1]::[0]" + "[1]:[0]" (new []) (runScriptlet [java/lang/String] "try" "?" java/lang/Object) (getProvider [] org/jruby/embed/internal/LocalContextProvider)) ... TODO; Figure out a way to not need "interpreter" to be a global variable. (the interpreter - (org/jruby/embed/ScriptingContainer::new [])) + (org/jruby/embed/ScriptingContainer:new [])) (the !ruby_runtime (template.macro (!ruby_runtime) [(|> ..interpreter - (org/jruby/embed/ScriptingContainer::getProvider []) - (org/jruby/embed/internal/LocalContextProvider::getRuntime []))])) + (org/jruby/embed/ScriptingContainer:getProvider []) + (org/jruby/embed/internal/LocalContextProvider:getRuntime []))])) (the !ruby_thread_context (template.macro (!ruby_thread_context) [(|> (!ruby_runtime) - (org/jruby/Ruby::getCurrentContext []))])) + (org/jruby/Ruby:getCurrentContext []))])) (the initial_ruby_runtime (!ruby_runtime)) (ffi.the org/jruby/java/proxies/JavaProxy - "[1]::[0]" + "[1]:[0]" (new [org/jruby/Ruby org/jruby/RubyClass java/lang/Object]) (getObject [] java/lang/Object)) (ffi.the org/jruby/internal/runtime/methods/DynamicMethod - "[1]::[0]") + "[1]:[0]") (ffi.the org/jruby/runtime/callsite/CacheEntry - "[1]::[0]" + "[1]:[0]" (new [org/jruby/internal/runtime/methods/DynamicMethod int])) (ffi.the org/jruby/RubyFixnum - "[1]::[0]" + "[1]:[0]" (new [org/jruby/Ruby long]) (getLongValue [] long)) (ffi.the org/jruby/RubyFloat - "[1]::[0]" + "[1]:[0]" (new [org/jruby/Ruby double])) (ffi.the org/jruby/RubyBoolean - "[1]::[0]" + "[1]:[0]" ("static" newBoolean [org/jruby/Ruby boolean] org/jruby/RubyBoolean)) (ffi.the org/jruby/RubyNil - "[1]::[0]" + "[1]:[0]" (new [org/jruby/Ruby])) (ffi.the org/jruby/runtime/Block$Type - "[1]::[0]" + "[1]:[0]" ("enum" PROC)) (ffi.the org/jruby/runtime/Signature - "[1]::[0]" + "[1]:[0]" ("read_only" "static" THREE_ARGUMENTS org/jruby/runtime/Signature)) (ffi.the org/jruby/parser/StaticScope - "[1]::[0]") + "[1]:[0]") (ffi.the org/jruby/parser/StaticScopeFactory - "[1]::[0]" + "[1]:[0]" (new [org/jruby/Ruby]) (getDummyScope [] org/jruby/parser/StaticScope)) (ffi.the org/jruby/runtime/BlockBody - "[1]::[0]") + "[1]:[0]") (ffi.the org/jruby/runtime/Block - "[1]::[0]" + "[1]:[0]" ("read_only" "static" NULL_BLOCK org/jruby/runtime/Block) ("read_only" type org/jruby/runtime/Block$Type) (getBody [] org/jruby/runtime/BlockBody)) (ffi.the org/jruby/RubyProc - "[1]::[0]" + "[1]:[0]" ("static" newProc [org/jruby/Ruby org/jruby/runtime/Block org/jruby/runtime/Block$Type] org/jruby/RubyProc) (call [org/jruby/runtime/ThreadContext [org/jruby/runtime/builtin/IRubyObject]] "try" org/jruby/runtime/builtin/IRubyObject)) @@ -238,12 +238,12 @@ (the (read_tuple read host_object) (-> Translator (org/jruby/RubyArray org/jruby/runtime/builtin/IRubyObject) (Try Any)) - (let [size (.natural (ffi.of_int (org/jruby/RubyArray::getLength [] host_object)))] + (let [size (.natural (ffi.of_int (org/jruby/RubyArray:getLength [] host_object)))] (loop (again [idx 0 output (is (Array Any) (array.empty size))]) (if (n.< size idx) - (when (org/jruby/RubyArray::get [(ffi.as_int (.integer idx))] host_object) + (when (org/jruby/RubyArray:get [(ffi.as_int (.integer idx))] host_object) {.:None} (again (++ idx) output) @@ -259,20 +259,20 @@ (exception.the (unknown_kind_of_object object) (Exception java/lang/Object) (exception.report - (list ["Class" (ffi.of_string (java/lang/Object::toString [] (java/lang/Object::getClass [] object)))] - ["Object" (ffi.of_string (java/lang/Object::toString [] object))]))) + (list ["Class" (ffi.of_string (java/lang/Object:toString [] (java/lang/Object:getClass [] object)))] + ["Object" (ffi.of_string (java/lang/Object:toString [] object))]))) (the (read_variant read host_object) (-> Translator org/jruby/RubyHash (Try Any)) - (when [(org/jruby/RubyHash::get [(ffi.as_string runtime.variant_tag_field)] host_object) - (org/jruby/RubyHash::get [(ffi.as_string runtime.variant_flag_field)] host_object) - (org/jruby/RubyHash::get [(ffi.as_string runtime.variant_value_field)] host_object)] + (when [(org/jruby/RubyHash:get [(ffi.as_string runtime.variant_tag_field)] host_object) + (org/jruby/RubyHash:get [(ffi.as_string runtime.variant_flag_field)] host_object) + (org/jruby/RubyHash:get [(ffi.as_string runtime.variant_value_field)] host_object)] [{.:Some tag} ?flag {.:Some value}] (monad.let try.monad [value (read value)] (pure [(is Any (|> tag (as (-> Any java/lang/Long)) - (java/lang/Long::intValue []) + (java/lang/Long:intValue []) (is java/lang/Integer))) (is Any (when ?flag @@ -303,15 +303,15 @@ [java/lang/Long [{try.:Success}]] [java/lang/Double [{try.:Success}]] [java/lang/String [{try.:Success}]] - [org/jruby/RubyFixnum [(org/jruby/RubyFixnum::getLongValue []) {try.:Success}]] - [org/jruby/RubyString [(org/jruby/RubyString::asJavaString []) {try.:Success}]] + [org/jruby/RubyFixnum [(org/jruby/RubyFixnum:getLongValue []) {try.:Success}]] + [org/jruby/RubyString [(org/jruby/RubyString:asJavaString []) {try.:Success}]] [[java/lang/Object] [{try.:Success}]] [org/jruby/RubyArray [(as (-> Any (org/jruby/RubyArray org/jruby/runtime/builtin/IRubyObject))) (read_tuple read)]] [org/jruby/RubyHash [(read_variant read)]] [org/jruby/RubySymbol [{try.:Success}]] [org/jruby/RubyProc [{try.:Success}]] - [org/jruby/java/proxies/JavaProxy [(org/jruby/java/proxies/JavaProxy::getObject []) {try.:Success}]]] + [org/jruby/java/proxies/JavaProxy [(org/jruby/java/proxies/JavaProxy:getObject []) {try.:Success}]]] )) ... (exception.except ..unknown_kind_of_object [host_object]) {try.:Success host_object} @@ -319,12 +319,12 @@ (the ruby_nil org/jruby/runtime/builtin/IRubyObject - (org/jruby/Ruby::getNil [] ..initial_ruby_runtime)) + (org/jruby/Ruby:getNil [] ..initial_ruby_runtime)) (the lux_unit org/jruby/runtime/builtin/IRubyObject (<| (ffi.is org/jruby/runtime/builtin/IRubyObject) - (org/jruby/RubyString::newInternalFromJavaExternal [..initial_ruby_runtime (ffi.as_string "")]))) + (org/jruby/RubyString:newInternalFromJavaExternal [..initial_ruby_runtime (ffi.as_string "")]))) (the (wrapped_lux_value useful_object_class lux_structure) (-> (-> (-> java/lang/Object org/jruby/runtime/builtin/IRubyObject) @@ -342,17 +342,17 @@ {.:None})] [[[java/lang/Object] (<| lux_structure (as (-> Any java/lang/Object)))] - [java/lang/Boolean (<| org/jruby/RubyBoolean::newBoolean [..initial_ruby_runtime])] - [java/lang/Long (<| org/jruby/RubyFixnum::new [..initial_ruby_runtime])] - [java/lang/Double (<| org/jruby/RubyFloat::new [..initial_ruby_runtime])] - [java/lang/String (<| org/jruby/RubyString::newInternalFromJavaExternal [..initial_ruby_runtime])] + [java/lang/Boolean (<| org/jruby/RubyBoolean:newBoolean [..initial_ruby_runtime])] + [java/lang/Long (<| org/jruby/RubyFixnum:new [..initial_ruby_runtime])] + [java/lang/Double (<| org/jruby/RubyFloat:new [..initial_ruby_runtime])] + [java/lang/String (<| org/jruby/RubyString:newInternalFromJavaExternal [..initial_ruby_runtime])] [org/jruby/runtime/builtin/IRubyObject (<|)]] )) ... (as (-> Any org/jruby/runtime/builtin/IRubyObject) value) (<| (ffi.is org/jruby/runtime/builtin/IRubyObject) - (org/jruby/java/proxies/JavaProxy::new [..initial_ruby_runtime - (useful_object_class again value) - (ffi.is java/lang/Object value)])))))) + (org/jruby/java/proxies/JavaProxy:new [..initial_ruby_runtime + (useful_object_class again value) + (ffi.is java/lang/Object value)])))))) (exception.the (invalid_variant_access field) (Exception Text) @@ -363,15 +363,15 @@ (Exception java/lang/Object) (exception.report (list ["Class" (|> index - (java/lang/Object::getClass []) - (java/lang/Object::toString []) + (java/lang/Object:getClass []) + (java/lang/Object:toString []) ffi.of_string)] ["Index" (|> index - (java/lang/Object::toString []) + (java/lang/Object:toString []) ffi.of_string)]))) (ffi.the java/util/Arrays - "[1]::[0]" + "[1]:[0]" ("static" [t] copyOfRange [[t] int int] [t])) (exception.the (invalid_arity arity) @@ -379,7 +379,7 @@ (exception.report (list ["Arity" (%.natural arity)]))) -(the (::call useful_object_class lux_structure value) +(the (:call useful_object_class lux_structure value) (-> (-> (-> java/lang/Object org/jruby/runtime/builtin/IRubyObject) (-> java/lang/Object org/jruby/RubyClass)) (-> java/lang/Object org/jruby/runtime/builtin/IRubyObject) @@ -446,7 +446,7 @@ (exception.except ..invalid_arity [arity]))] (pure (wrapped_lux_value (as_expected useful_object_class) lux_structure output))))))))) -(the (::access useful_object_class lux_structure value) +(the (:access useful_object_class lux_structure value) (-> (-> (-> java/lang/Object org/jruby/runtime/builtin/IRubyObject) (-> java/lang/Object org/jruby/RubyClass)) (-> java/lang/Object org/jruby/runtime/builtin/IRubyObject) @@ -471,7 +471,7 @@ (let [member (ffi.read! 0 args)] (<| (when (ffi.as org/jruby/RubyFixnum member) {.:Some member} - (when (array.item (.natural (ffi.of_long (org/jruby/RubyFixnum::getLongValue [] member))) + (when (array.item (.natural (ffi.of_long (org/jruby/RubyFixnum:getLongValue [] member))) value) {try.:Success value} (wrapped_lux_value (as_expected useful_object_class) lux_structure value) @@ -482,15 +482,15 @@ {.:None}) (when (ffi.as org/jruby/RubyString member) {.:Some member} - (when (ffi.of_string (org/jruby/RubyString::asJavaString [] member)) + (when (ffi.of_string (org/jruby/RubyString:asJavaString [] member)) runtime.variant_tag_field (|> value (array.item 0) try.trusted (as (-> Any java/lang/Integer)) - (java/lang/Integer::longValue []) + (java/lang/Integer:longValue []) [..initial_ruby_runtime] - org/jruby/RubyFixnum::new + org/jruby/RubyFixnum:new (ffi.is org/jruby/runtime/builtin/IRubyObject)) runtime.variant_flag_field @@ -515,12 +515,12 @@ {.:None}) (when (ffi.as org/jruby/RubyRange member) {.:Some member} - (when [(|> member (org/jruby/RubyRange::first [thread_context]) (ffi.as org/jruby/RubyFixnum)) - (|> member (org/jruby/RubyRange::size [thread_context]) (ffi.as org/jruby/RubyFixnum))] + (when [(|> member (org/jruby/RubyRange:first [thread_context]) (ffi.as org/jruby/RubyFixnum)) + (|> member (org/jruby/RubyRange:size [thread_context]) (ffi.as org/jruby/RubyFixnum))] [{.:Some first} {.:Some size}] - (let [first (ffi.of_long (org/jruby/RubyFixnum::getLongValue [] first)) - size (ffi.of_long (org/jruby/RubyFixnum::getLongValue [] size))] - (|> (java/util/Arrays::copyOfRange [value (ffi.as_int first) (ffi.as_int (i.+ first size))]) + (let [first (ffi.of_long (org/jruby/RubyFixnum:getLongValue [] first)) + size (ffi.of_long (org/jruby/RubyFixnum:getLongValue [] size))] + (|> (java/util/Arrays:copyOfRange [value (ffi.as_int first) (ffi.as_int (i.+ first size))]) (as (for_any (_ it) (-> (Array it) java/lang/Object))) lux_structure)) @@ -531,7 +531,7 @@ {.:None}) (halt! (exception.error ..invalid_index [(ffi.is java/lang/Object member)])))))))) -(the (::= value) +(the (:= value) (-> java/lang/Object org/jruby/internal/runtime/methods/DynamicMethod) (<| (ffi.is org/jruby/internal/runtime/methods/DynamicMethod) (ffi.object [] org/jruby/internal/runtime/methods/DynamicMethod [] @@ -551,7 +551,7 @@ block org/jruby/runtime/Block]) org/jruby/runtime/builtin/IRubyObject (<| (ffi.is org/jruby/runtime/builtin/IRubyObject) - org/jruby/RubyBoolean::newBoolean + org/jruby/RubyBoolean:newBoolean [..initial_ruby_runtime] ffi.as_boolean (when (|> args @@ -564,7 +564,7 @@ {try.:Failure error} false)))))) -(the (::length value) +(the (:length value) (-> (Array java/lang/Object) org/jruby/internal/runtime/methods/DynamicMethod) (<| (ffi.is org/jruby/internal/runtime/methods/DynamicMethod) (ffi.object [] org/jruby/internal/runtime/methods/DynamicMethod [] @@ -588,10 +588,10 @@ .integer ffi.as_long [..initial_ruby_runtime] - org/jruby/RubyFixnum::new + org/jruby/RubyFixnum:new (ffi.is org/jruby/runtime/builtin/IRubyObject)))))) -(the (::to_s value) +(the (:to_s value) (-> java/lang/Object org/jruby/internal/runtime/methods/DynamicMethod) (<| (ffi.is org/jruby/internal/runtime/methods/DynamicMethod) (ffi.object [] org/jruby/internal/runtime/methods/DynamicMethod [] @@ -614,7 +614,7 @@ debug.inspection ffi.as_string [..initial_ruby_runtime] - org/jruby/RubyString::newInternalFromJavaExternal + org/jruby/RubyString:newInternalFromJavaExternal (ffi.is org/jruby/runtime/builtin/IRubyObject)))))) (exception.the (invalid_operation method) @@ -622,7 +622,7 @@ (exception.report (list ["Method" (%.text method)]))) -(the (::respond_to? value) +(the (:respond_to? value) (-> java/lang/Object org/jruby/internal/runtime/methods/DynamicMethod) (<| (ffi.is org/jruby/internal/runtime/methods/DynamicMethod) (ffi.object [] org/jruby/internal/runtime/methods/DynamicMethod [] @@ -646,7 +646,7 @@ (ffi.as org/jruby/RubySymbol)) {.:Some method} (|> (when (|> method - (org/jruby/RubySymbol::asJavaString []) + (org/jruby/RubySymbol:asJavaString []) ffi.of_string) (^.or "==" "equal?" "to_s" "inspect" @@ -659,13 +659,13 @@ false) ffi.as_boolean [..initial_ruby_runtime] - org/jruby/RubyBoolean::newBoolean + org/jruby/RubyBoolean:newBoolean (ffi.is org/jruby/runtime/builtin/IRubyObject)) {.:None} (halt! (exception.error ..invalid_operation ["respond_to?"]))))))) -(the (::to_a as_ruby value) +(the (:to_a as_ruby value) (-> (-> java/lang/Object org/jruby/runtime/builtin/IRubyObject) (-> (Array java/lang/Object) org/jruby/internal/runtime/methods/DynamicMethod)) (<| (ffi.is org/jruby/internal/runtime/methods/DynamicMethod) @@ -689,9 +689,9 @@ org/jruby/runtime/builtin/IRubyObject) (array!.mix (function (_ address item it) (exec - (org/jruby/RubyArray::add [(as_ruby item)] it) + (org/jruby/RubyArray:add [(as_ruby item)] it) it)) - (org/jruby/RubyArray::new [..initial_ruby_runtime (ffi.as_int (.integer (array.size value)))]) + (org/jruby/RubyArray:new [..initial_ruby_runtime (ffi.as_int (.integer (array.size value)))]) value)))))) (exception.the (unknown_method method) @@ -711,25 +711,25 @@ org/jruby/runtime/callsite/CacheEntry (when (ffi.of_string method) "call" - (org/jruby/runtime/callsite/CacheEntry::new [(::call useful_object_class lux_structure value) (ffi.as_int +0)]) + (org/jruby/runtime/callsite/CacheEntry:new [(:call useful_object_class lux_structure value) (ffi.as_int +0)]) "[]" - (org/jruby/runtime/callsite/CacheEntry::new [(::access useful_object_class lux_structure (as_expected value)) (ffi.as_int +1)]) + (org/jruby/runtime/callsite/CacheEntry:new [(:access useful_object_class lux_structure (as_expected value)) (ffi.as_int +1)]) (^.or "==" "equal?") - (org/jruby/runtime/callsite/CacheEntry::new [(::= value) (ffi.as_int +2)]) + (org/jruby/runtime/callsite/CacheEntry:new [(:= value) (ffi.as_int +2)]) (^.or "count" "length" "size") - (org/jruby/runtime/callsite/CacheEntry::new [(::length (as_expected value)) (ffi.as_int +3)]) + (org/jruby/runtime/callsite/CacheEntry:new [(:length (as_expected value)) (ffi.as_int +3)]) (^.or "to_s" "inspect") - (org/jruby/runtime/callsite/CacheEntry::new [(::to_s value) (ffi.as_int +4)]) + (org/jruby/runtime/callsite/CacheEntry:new [(:to_s value) (ffi.as_int +4)]) "respond_to?" - (org/jruby/runtime/callsite/CacheEntry::new [(::respond_to? value) (ffi.as_int +5)]) + (org/jruby/runtime/callsite/CacheEntry:new [(:respond_to? value) (ffi.as_int +5)]) "to_a" - (org/jruby/runtime/callsite/CacheEntry::new [(::to_a lux_structure (as_expected value)) (ffi.as_int +6)]) + (org/jruby/runtime/callsite/CacheEntry:new [(:to_a lux_structure (as_expected value)) (ffi.as_int +6)]) method (halt! (exception.error ..unknown_method [method]))))))) @@ -737,14 +737,14 @@ (the (lux_structure value) (-> java/lang/Object org/jruby/runtime/builtin/IRubyObject) (<| (ffi.is org/jruby/runtime/builtin/IRubyObject) - (org/jruby/java/proxies/JavaProxy::new [..initial_ruby_runtime - (useful_object_class lux_structure value) - value]))) + (org/jruby/java/proxies/JavaProxy:new [..initial_ruby_runtime + (useful_object_class lux_structure value) + value]))) (exception.the (cannot_apply_a_non_function object) (Exception java/lang/Object) (exception.report - (list ["Non-function" (ffi.of_string (java/lang/Object::toString [] object))]))) + (list ["Non-function" (ffi.of_string (java/lang/Object:toString [] object))]))) (the macro! (-> Any (Maybe org/jruby/RubyProc)) @@ -761,11 +761,11 @@ (Try (Try [Lux (List Code)]))) (as_expected (monad.let try.monad - [expansion (org/jruby/RubyProc::call [(!ruby_thread_context) - (ffi.array org/jruby/runtime/builtin/IRubyObject - [(..to_host inputs) - (..to_host lux)])] - macro)] + [expansion (org/jruby/RubyProc:call [(!ruby_thread_context) + (ffi.array org/jruby/runtime/builtin/IRubyObject + [(..to_host inputs) + (..to_host lux)])] + macro)] (..read (ffi.is java/lang/Object expansion))))) (the (expander macro inputs lux) @@ -790,7 +790,7 @@ (io (let [value (is (-> (_.Code Any) (Try Any)) (function (_ code) (monad.let try.monad - [output (org/jruby/embed/ScriptingContainer::runScriptlet [(ffi.as_string (_.code code))] ..interpreter)] + [output (org/jruby/embed/ScriptingContainer:runScriptlet [(ffi.as_string (_.code code))] ..interpreter)] (..read (maybe.else (as (-> Any java/lang/Object) []) output)))))] (is (Host _.Expression _.Statement) @@ -831,17 +831,17 @@ (the proc_type org/jruby/runtime/Block$Type - (|> (org/jruby/runtime/Block::NULL_BLOCK) - org/jruby/runtime/Block::type)) + (|> (org/jruby/runtime/Block:NULL_BLOCK) + org/jruby/runtime/Block:type)) (the phase_block_signature org/jruby/runtime/Signature - (org/jruby/runtime/Signature::THREE_ARGUMENTS)) + (org/jruby/runtime/Signature:THREE_ARGUMENTS)) (the dummy_static_scope org/jruby/parser/StaticScope - (|> (org/jruby/parser/StaticScopeFactory::new [(!ruby_runtime)]) - (org/jruby/parser/StaticScopeFactory::getDummyScope []))) + (|> (org/jruby/parser/StaticScopeFactory:new [(!ruby_runtime)]) + (org/jruby/parser/StaticScopeFactory:getDummyScope []))) (the phase_block_body org/jruby/runtime/BlockBody @@ -903,7 +903,7 @@ (list.of_array {.:None}) (list.each' ! (|>> (ffi.is java/lang/Object) ..read)))]) (when inputs - ... It seems that org/jruby/runtime/Block::call can misbehave when getting called with a Lux state value. + ... It seems that org/jruby/runtime/Block:call can misbehave when getting called with a Lux state value. (list info source provenance current_module modules scopes type_context expected seed eval) (when partial_application (stack partial/0 partial/1) @@ -966,7 +966,7 @@ _ (exception.except ..invaid_phase_application [(view.of list.stack partial_application) inputs])))))] - (org/jruby/RubyProc::newProc [(!ruby_runtime) block ..proc_type]))) + (org/jruby/RubyProc:newProc [(!ruby_runtime) block ..proc_type]))) (the phase_wrapper phase.Wrapper @@ -986,13 +986,13 @@ (monad.let try.monad [handler (try.of_maybe "Not an extension handler." (..macro! handler)) - output (org/jruby/RubyProc::call [(!ruby_thread_context) - (ffi.array org/jruby/runtime/builtin/IRubyObject - [(as (-> Any org/jruby/runtime/builtin/IRubyObject) (phase_wrapper phase)) - (..to_host archive) - (..to_host parameters) - (..to_host state)])] - handler)] + output (org/jruby/RubyProc:call [(!ruby_thread_context) + (ffi.array org/jruby/runtime/builtin/IRubyObject + [(as (-> Any org/jruby/runtime/builtin/IRubyObject) (phase_wrapper phase)) + (..to_host archive) + (..to_host parameters) + (..to_host state)])] + handler)] (..read (ffi.is java/lang/Object output)))))) .ruby diff --git a/stdlib/source/documentation/lux/control/security/policy.lux b/stdlib/source/documentation/lux/control/security/policy.lux index 7d5ef05501..e1475be1b0 100644 --- a/stdlib/source/documentation/lux/control/security/policy.lux +++ b/stdlib/source/documentation/lux/control/security/policy.lux @@ -62,12 +62,12 @@ (-> Any (Policy %))) (with_policy (is (Context Privacy Policy) - (function (_ (open "%::.")) + (function (_ (open "%:.")) (implementation (the (password value) - (%::can_upgrade value)) + (%:can_upgrade value)) (the (unsafe password) - (%::can_downgrade password))))))))) + (%:can_downgrade password))))))))) ($.example (' (with_policy context)))) ($.definition /.Privacy diff --git a/stdlib/source/documentation/lux/ffi.js.lux b/stdlib/source/documentation/lux/ffi.js.lux index 3b52f83d12..0ab05159ba 100644 --- a/stdlib/source/documentation/lux/ffi.js.lux +++ b/stdlib/source/documentation/lux/ffi.js.lux @@ -35,13 +35,13 @@ ($.definition /.the "Easily import types, methods, functions and constants." ($.example (' (/.the Uint8Array - "[1]::[0]"))) + "[1]:[0]"))) ($.example (' (/.the TextEncoder - "[1]::[0]" + "[1]:[0]" (new [/.String]) (encode [/.String] Uint8Array)))) ($.example (' (/.the TextDecoder - "[1]::[0]" + "[1]:[0]" (new [/.String]) (decode [/.String] String))))) diff --git a/stdlib/source/documentation/lux/ffi.jvm.lux b/stdlib/source/documentation/lux/ffi.jvm.lux index 42f018c9e8..7b98f13fd1 100644 --- a/stdlib/source/documentation/lux/ffi.jvm.lux +++ b/stdlib/source/documentation/lux/ffi.jvm.lux @@ -106,9 +106,9 @@ ... Methods ("public" [] (new [value A]) [] (exec - (:= ::foo true) - (:= ::bar value) - (:= ::baz "") + (:= :foo true) + (:= :bar value) + (:= :baz "") [])) ("public" (virtual) java/lang/Object "") @@ -121,10 +121,10 @@ ($.comment "An optional super-class can be specified before the tuple. If not specified, java.lang.Object will be assumed.") ($.comment "Fields and methods defined in the class can be used with special syntax.") ($.comment "For example:") - ($.comment "::resolved, for accessing the 'resolved' field.") - ($.comment "(:= ::resolved true) for modifying it.") - ($.comment "(::new! []) for calling the class's constructor.") - ($.comment "(::resolve! container [value]) for calling the 'resolve' method.")) + ($.comment ":resolved, for accessing the 'resolved' field.") + ($.comment "(:= :resolved true) for modifying it.") + ($.comment "(:new! []) for calling the class's constructor.") + ($.comment "(:resolve! container [value]) for calling the 'resolve' method.")) ($.definition /.interface "Allows defining JVM interfaces." @@ -188,15 +188,15 @@ ($.definition /.to "Call a variety of methods on an object. Then, return the object." ($.example (' (to object - (ClassName::method1 arg0 arg1 arg2) - (ClassName::method2 arg3 arg4 arg5))))) + (ClassName:method1 arg0 arg1 arg2) + (ClassName:method2 arg3 arg4 arg5))))) ($.definition /.the "Allows importing JVM classes, and using them as types." ($.comment "Their methods, fields and enum options can also be imported.") ($.example (' (/.the java/lang/Object - "[1]::[0]" + "[1]:[0]" (new []) (equals [java/lang/Object] boolean) (wait [int] "io" "try" void)))) @@ -207,42 +207,42 @@ ($.comment "'io' means the computation has side effects, and will be wrapped by the IO type.") ($.comment "These options must show up in the following order ['io' 'try' '?'] (although, each option can be used independently).") ($.example (' (/.the java/lang/String - "[1]::[0]" + "[1]:[0]" (new [[byte]]) ("static" valueOf [char] java/lang/String) ("static" valueOf "as" int_valueOf [int] java/lang/String)))) ($.example (' (/.the (java/util/List e) - "[1]::[0]" + "[1]:[0]" (size [] int) (get [int] e)))) ($.example (' (/.the (java/util/ArrayList a) - "[1]::[0]" + "[1]:[0]" ([T] toArray [[T]] [T])))) ($.comment "The class-type that is generated is of the fully-qualified name.") ($.comment "This avoids a clash between the java.util.List type, and Lux's own List type.") ($.comment "All enum options to be imported must be specified.") ($.example (' (/.the java/lang/Character$UnicodeScript - "[1]::[0]" + "[1]:[0]" ("enum" ARABIC CYRILLIC LATIN)))) ($.comment "It should also be noted, the only types that may show up in method arguments or return values may be Java classes, arrays, primitives, void or type-vars.") ($.comment "Lux types, such as Maybe cannot be named (otherwise, they'd be confused for Java classes).") ($.example (' (/.the (lux/concurrency/future/JvmFuture A) - "[1]::[0]" + "[1]:[0]" (resolve [A] boolean) (poll [] A) (wasResolved [] boolean) (waitOn [lux/Function] void) ("static" [A] make [A] (lux/concurrency/future/JvmFuture A))))) - ($.comment "Also, the names of the imported members will look like Class::member") - ($.example (' (java/lang/Object::new []))) - ($.example (' (java/lang/Object::equals [other_object] my_object))) - ($.example (' (java/util/List::size [] my_list))) - ($.example (' java/lang/Character$UnicodeScript::LATIN))) + ($.comment "Also, the names of the imported members will look like Class:member") + ($.example (' (java/lang/Object:new []))) + ($.example (' (java/lang/Object:equals [other_object] my_object))) + ($.example (' (java/util/List:size [] my_list))) + ($.example (' java/lang/Character$UnicodeScript:LATIN))) ($.definition /.array "Create an array of the given type, with the given size." diff --git a/stdlib/source/documentation/lux/ffi.py.lux b/stdlib/source/documentation/lux/ffi.py.lux index 18bbd98e0d..007001f9c1 100644 --- a/stdlib/source/documentation/lux/ffi.py.lux +++ b/stdlib/source/documentation/lux/ffi.py.lux @@ -28,7 +28,7 @@ ($.definition /.the "Easily import types, methods, functions and constants." ($.example (' (/.the os - "[1]::[0]" + "[1]:[0]" ("static" F_OK Integer) ("static" R_OK Integer) ("static" W_OK Integer) @@ -41,7 +41,7 @@ ("static" rename [String String] "io" "try" "?" Any) ("static" listdir [String] "io" "try" (Array String))))) ($.example (' (/.the os/path - "[1]::[0]" + "[1]:[0]" ("static" isfile [String] "io" "try" Boolean) ("static" isdir [String] "io" "try" Boolean) ("static" sep String) diff --git a/stdlib/source/documentation/lux/ffi.rb.lux b/stdlib/source/documentation/lux/ffi.rb.lux index 97df5497ae..b23a8bb689 100644 --- a/stdlib/source/documentation/lux/ffi.rb.lux +++ b/stdlib/source/documentation/lux/ffi.rb.lux @@ -23,11 +23,11 @@ ($.definition /.the "Easily import types, methods, functions and constants." ($.example (' (/.the Stat - "[1]::[0]" + "[1]:[0]" (executable? [] Bit) (size Integer)))) ($.example (' (/.the File "as" RubyFile - "[1]::[0]" + "[1]:[0]" ("static" SEPARATOR ..String) ("static" open [Path ..String] "io" "try" RubyFile) ("static" stat [Path] "io" "try" Stat) diff --git a/stdlib/source/library/lux.lux b/stdlib/source/library/lux.lux index 485740a1c0..36c7bd0550 100644 --- a/stdlib/source/library/lux.lux +++ b/stdlib/source/library/lux.lux @@ -3108,7 +3108,7 @@ "1b" "0b")) -(the' .private (digit::injection digit) +(the' .private (digit:injection digit) (-> Natural Text) (.when# digit @@ -3116,7 +3116,7 @@ [1] "1" [2] "2" [3] "3" [4] "4" [5] "5" [6] "6" [7] "7" [8] "8" [9] "9" - _ (.error# "@digit::injection Undefined behavior."))) + _ (.error# "@digit:injection Undefined behavior."))) (the' .private (natural:as value) (-> Natural @@ -3128,7 +3128,7 @@ (if (.i64_=# 0 input) output (again (natural:/ 10 input) - (text (|> input (natural:% 10) digit::injection) + (text (|> input (natural:% 10) digit:injection) output)))))] (loop value "")))) @@ -3151,10 +3151,10 @@ (if (.i64_=# +0 input) (text sign output) (again (.int_/# +10 input) - (text (|> input (.int_%# +10) (.as# (-> Integer Natural)) digit::injection) + (text (|> input (.int_%# +10) (.as# (-> Integer Natural)) digit:injection) output))))) (|> value (.int_/# +10) integer:abs) - (|> value (.int_%# +10) integer:abs (.as# (-> Integer Natural)) digit::injection))))) + (|> value (.int_%# +10) integer:abs (.as# (-> Integer Natural)) digit:injection))))) (the' .private (named_macro' modules current_module module name) (-> ($ Property_List Module) Text Text Text diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/js.lux b/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/js.lux index c70c5feb34..6621d85b55 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/js.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/js.lux @@ -31,7 +31,7 @@ ["[0]" analysis (.only Operation Phase Handler Bundle) ["[1]/[0]" type]]]]]) -(the object::new +(the object:new (-> Text Handler) (custom [(all <>.and ?list.any (.tuple (<>.some ?list.any))) @@ -46,7 +46,7 @@ (pure [@ {analysis.:Extension (/.translation extension) (list:composite (list constructorA) inputsA)}])))])) -(the object::get +(the object:get (-> Text Handler) (custom [(all <>.and .text ?list.any) @@ -60,7 +60,7 @@ (list (analysis.text @ fieldC) objectA)}])))])) -(the object::do +(the object:do (-> Text Handler) (custom [(all <>.and .text ?list.any (.tuple (<>.some ?list.any))) @@ -79,9 +79,9 @@ (the with_object_extensions (-> Bundle Bundle) - (|>> (/.with "js_object_new#" object::new) - (/.with "js_object_get#" object::get) - (/.with "js_object_do#" object::do) + (|>> (/.with "js_object_new#" object:new) + (/.with "js_object_get#" object:get) + (/.with "js_object_do#" object:do) (/.with "js_object_null#" (/.nullary Any)) (/.with "js_object_null?#" (/.unary Any Bit)) @@ -90,7 +90,7 @@ (/.with "js_object_undefined?#" (/.unary Any Bit)) )) -(the js::constant +(the js:constant (-> Text Handler) (custom [.text @@ -101,7 +101,7 @@ (pure [@ {analysis.:Extension (/.translation extension) (list (analysis.text @ name))}])))])) -(the js::of +(the js:of (-> Text Handler) (custom [(all <>.and ?list.any (.tuple (<>.some ?list.any))) @@ -116,7 +116,7 @@ (pure [@ {analysis.:Extension (/.translation extension) (list:composite (list abstractionA) inputsA)}])))])) -(the js::type_of +(the js:type_of (-> Text Handler) (custom [?list.any @@ -129,7 +129,7 @@ (pure [@ {analysis.:Extension (/.translation extension) (list objectA)}])))])) -(the js::function +(the js:function (-> Text Handler) (custom [(all <>.and .natural ?list.any) @@ -150,8 +150,8 @@ (|> extension.empty with_object_extensions - (/.with "js_constant#" js::constant) - (/.with "js_of#" js::of) - (/.with "js_type_of#" js::type_of) - (/.with "js_function#" js::function) + (/.with "js_constant#" js:constant) + (/.with "js_of#" js:of) + (/.with "js_type_of#" js:type_of) + (/.with "js_function#" js:function) )) diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/jvm.lux b/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/jvm.lux index c721edd130..4c12e469ea 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/jvm.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/jvm.lux @@ -104,22 +104,22 @@ ["[1]/[0]" jvm]]]]]]]) (ffi.the java/lang/ClassLoader - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/Object - "[1]::[0]" + "[1]:[0]" (equals [java/lang/Object] boolean)) (ffi.the java/lang/reflect/Type - "[1]::[0]") + "[1]:[0]") (ffi.the (java/lang/reflect/TypeVariable d) - "[1]::[0]" + "[1]:[0]" (getName [] java/lang/String) (getBounds [] [java/lang/reflect/Type])) (ffi.the java/lang/reflect/Modifier - "[1]::[0]" + "[1]:[0]" ("static" isStatic [int] boolean) ("static" isFinal [int] boolean) ("static" isInterface [int] boolean) @@ -128,10 +128,10 @@ ("static" isProtected [int] boolean)) (ffi.the java/lang/annotation/Annotation - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/reflect/Method - "[1]::[0]" + "[1]:[0]" (getName [] java/lang/String) (getModifiers [] int) (getDeclaringClass [] (java/lang/Class java/lang/Object)) @@ -146,7 +146,7 @@ (getGenericExceptionTypes [] [java/lang/reflect/Type])) (ffi.the (java/lang/reflect/Constructor c) - "[1]::[0]" + "[1]:[0]" (getModifiers [] int) (getDeclaringClass [] (java/lang/Class c)) (getTypeParameters [] [(java/lang/reflect/TypeVariable (java/lang/reflect/Constructor c))]) @@ -156,7 +156,7 @@ (getDeclaredAnnotations [] [java/lang/annotation/Annotation])) (ffi.the (java/lang/Class c) - "[1]::[0]" + "[1]:[0]" ("static" forName [java/lang/String] "try" (java/lang/Class java/lang/Object)) (getName [] java/lang/String) (getModifiers [] int) @@ -200,7 +200,7 @@ [class (phase.of_try (reflection!.load class_loader name))] (phase.assertion ..deprecated_class [name] (|> class - (java/lang/Class::getDeclaredAnnotations []) + (java/lang/Class:getDeclaredAnnotations []) reflection!.deprecated? not)))) @@ -522,7 +522,7 @@ (pure {@type.:Extension @ [.prelude (extension.synthesis extension_name)] (list arrayA)})))])) -(the array::length::object +(the array:length:object (-> Text Handler) (..custom [?list.any @@ -556,7 +556,7 @@ (pure {@type.:Extension @ [.prelude (extension.synthesis extension_name)] (list lengthA)})))])) -(the array::new::object +(the array:new:object (-> Text Handler) (..custom [?list.any @@ -752,7 +752,7 @@ (pure {@type.:Extension @ [.prelude (extension.synthesis extension_name)] (list idxA arrayA)})))])) -(the array::read::object +(the array:read:object (-> Text Handler) (..custom [(<>.and ?list.any ?list.any) @@ -796,7 +796,7 @@ valueA arrayA)})))]))) -(the array::write::object +(the array:write:object (-> Text Handler) (..custom [(all <>.and ?list.any ?list.any ?list.any) @@ -831,7 +831,7 @@ (with extension/jvm.array_length_float (primitive_array_length_handler jvm.float)) (with extension/jvm.array_length_double (primitive_array_length_handler jvm.double)) (with extension/jvm.array_length_char (primitive_array_length_handler jvm.char)) - (with extension/jvm.array_length_object array::length::object) + (with extension/jvm.array_length_object array:length:object) (with extension/jvm.array_new_boolean (new_primitive_array_handler jvm.boolean)) (with extension/jvm.array_new_byte (new_primitive_array_handler jvm.byte)) @@ -841,7 +841,7 @@ (with extension/jvm.array_new_float (new_primitive_array_handler jvm.float)) (with extension/jvm.array_new_double (new_primitive_array_handler jvm.double)) (with extension/jvm.array_new_char (new_primitive_array_handler jvm.char)) - (with extension/jvm.array_new_object array::new::object) + (with extension/jvm.array_new_object array:new:object) (with extension/jvm.array_read_boolean (read_primitive_array_handler ..boolean jvm.boolean)) (with extension/jvm.array_read_byte (read_primitive_array_handler ..byte jvm.byte)) @@ -851,7 +851,7 @@ (with extension/jvm.array_read_float (read_primitive_array_handler ..float jvm.float)) (with extension/jvm.array_read_double (read_primitive_array_handler ..double jvm.double)) (with extension/jvm.array_read_char (read_primitive_array_handler ..char jvm.char)) - (with extension/jvm.array_read_object array::read::object) + (with extension/jvm.array_read_object array:read:object) (with extension/jvm.array_write_boolean (write_primitive_array_handler ..boolean jvm.boolean)) (with extension/jvm.array_write_byte (write_primitive_array_handler ..byte jvm.byte)) @@ -861,10 +861,10 @@ (with extension/jvm.array_write_float (write_primitive_array_handler ..float jvm.float)) (with extension/jvm.array_write_double (write_primitive_array_handler ..double jvm.double)) (with extension/jvm.array_write_char (write_primitive_array_handler ..char jvm.char)) - (with extension/jvm.array_write_object array::write::object) + (with extension/jvm.array_write_object array:write:object) )) -(the object::null +(the object:null (-> Text Handler) (..custom [(<>:pure []) @@ -878,7 +878,7 @@ (pure {@type.:Extension @ [.prelude (extension.synthesis extension_name)] (list)})))])) -(the object::null? +(the object:null? (-> Text Handler) (..custom [?list.any @@ -892,7 +892,7 @@ (pure {@type.:Extension @ [.prelude (extension.synthesis extension_name)] (list objectA)})))])) -(the object::synchronized +(the object:synchronized (-> Text Handler) (..custom [(<>.and ?list.any ?list.any) @@ -906,7 +906,7 @@ (pure {@type.:Extension @ [.prelude (extension.synthesis extension_name)] (list monitorA exprA)})))])) -(the (object::throw class_loader) +(the (object:throw class_loader) (-> java/lang/ClassLoader (-> Text Handler)) (..custom @@ -926,7 +926,7 @@ (pure {@type.:Extension @ [.prelude (extension.synthesis extension_name)] (list exceptionA)})))])) -(the (object::class class_loader) +(the (object:class class_loader) (-> java/lang/ClassLoader (-> Text Handler)) (..custom @@ -940,7 +940,7 @@ (pure {@type.:Extension @ [.prelude (extension.synthesis extension_name)] (list (analysis.text @ class))})))])) -(the (object::instance? class_loader) +(the (object:instance? class_loader) (-> java/lang/ClassLoader (-> Text Handler)) (..custom @@ -973,23 +973,23 @@ super_class (phase.of_try (reflection!.load class_loader super_name)) superT (reflection_type mapping superJT)] (pure [[super_name superT] - (ffi.of_boolean (java/lang/Class::isAssignableFrom [super_class] to_class))]))) - (when (java/lang/Class::getGenericSuperclass [] from_class) + (ffi.of_boolean (java/lang/Class:isAssignableFrom [super_class] to_class))]))) + (when (java/lang/Class:getGenericSuperclass [] from_class) {.:Some super} (list:composite (list super) - (list.of_array {.:None} (java/lang/Class::getGenericInterfaces [] from_class))) + (list.of_array {.:None} (java/lang/Class:getGenericInterfaces [] from_class))) {.:None} (if (|> from_class - (java/lang/Class::getModifiers []) - [] java/lang/reflect/Modifier::isInterface + (java/lang/Class:getModifiers []) + [] java/lang/reflect/Modifier:isInterface ffi.of_boolean) (list:composite (list (as (-> Any java/lang/reflect/Type) (ffi.class_for java/lang/Object))) - (list.of_array {.:None} (java/lang/Class::getGenericInterfaces [] from_class))) - (list.of_array {.:None} (java/lang/Class::getGenericInterfaces [] from_class))))))) + (list.of_array {.:None} (java/lang/Class:getGenericInterfaces [] from_class))) + (list.of_array {.:None} (java/lang/Class:getGenericInterfaces [] from_class))))))) -(the (object::cast class_loader) +(the (object:cast class_loader) (-> java/lang/ClassLoader (-> Text Handler)) (..custom @@ -1031,7 +1031,7 @@ (not (dictionary.in_domain? ..boxes to_name))) to_class (phase.of_try (reflection!.load class_loader to_name)) from_class (phase.of_try (reflection!.load class_loader from_name))] - (if (ffi.of_boolean (java/lang/Class::isAssignableFrom [from_class] to_class)) + (if (ffi.of_boolean (java/lang/Class:isAssignableFrom [from_class] to_class)) (loop (again [[current_name currentT] [from_name fromT]]) (if (text.= to_name current_name) (pure true) @@ -1067,16 +1067,16 @@ (the (with_object class_loader) (-> java/lang/ClassLoader (Change Bundle)) - (|>> (with extension/jvm.object_null object::null) - (with extension/jvm.object_null? object::null?) - (with extension/jvm.object_synchronized object::synchronized) - (with extension/jvm.object_throw (object::throw class_loader)) - (with extension/jvm.object_class (object::class class_loader)) - (with extension/jvm.object_instance? (object::instance? class_loader)) - (with extension/jvm.object_cast (object::cast class_loader)) + (|>> (with extension/jvm.object_null object:null) + (with extension/jvm.object_null? object:null?) + (with extension/jvm.object_synchronized object:synchronized) + (with extension/jvm.object_throw (object:throw class_loader)) + (with extension/jvm.object_class (object:class class_loader)) + (with extension/jvm.object_instance? (object:instance? class_loader)) + (with extension/jvm.object_cast (object:cast class_loader)) )) -(the (get::static class_loader) +(the (get:static class_loader) (-> java/lang/ClassLoader (-> Text Handler)) (..custom @@ -1098,7 +1098,7 @@ (analysis.text @ field) (analysis.text @ (..signature fieldJT)))))))])) -(the (put::static class_loader) +(the (put:static class_loader) (-> java/lang/ClassLoader (-> Text Handler)) (..custom @@ -1125,7 +1125,7 @@ (analysis.text @ (..signature fieldJT)) valueA)))))])) -(the (get::virtual class_loader) +(the (get:virtual class_loader) (-> java/lang/ClassLoader (-> Text Handler)) (..custom @@ -1152,7 +1152,7 @@ (analysis.text @ (..signature fieldJT)) objectA)))))])) -(the (put::virtual class_loader) +(the (put:virtual class_loader) (-> java/lang/ClassLoader (-> Text Handler)) (..custom @@ -1228,29 +1228,29 @@ (Operation Bit)) (monad.let phase.monad [parameters (|> method - (java/lang/reflect/Method::getGenericParameterTypes []) + (java/lang/reflect/Method:getGenericParameterTypes []) (list.of_array {.:None}) (list.each' try.monad reflection!.type) phase.of_try) - .let [modifiers (java/lang/reflect/Method::getModifiers [] method) + .let [modifiers (java/lang/reflect/Method:getModifiers [] method) correct_class? (|> method - (java/lang/reflect/Method::getDeclaringClass []) - (java/lang/Class::isAssignableFrom [class]) + (java/lang/reflect/Method:getDeclaringClass []) + (java/lang/Class:isAssignableFrom [class]) ffi.of_boolean) correct_method? (|> method - (java/lang/reflect/Method::getName []) + (java/lang/reflect/Method:getName []) ffi.of_string (text.= method_name)) same_static? (when method_style {:Static} - (ffi.of_boolean (java/lang/reflect/Modifier::isStatic [modifiers])) + (ffi.of_boolean (java/lang/reflect/Modifier:isStatic [modifiers])) _ true) same_special? (when method_style {:Special} - (not (or (ffi.of_boolean (java/lang/reflect/Modifier::isInterface [(java/lang/Class::getModifiers [] class)])) - (ffi.of_boolean (java/lang/reflect/Modifier::isAbstract [modifiers])))) + (not (or (ffi.of_boolean (java/lang/reflect/Modifier:isInterface [(java/lang/Class:getModifiers [] class)])) + (ffi.of_boolean (java/lang/reflect/Modifier:isAbstract [modifiers])))) _ true) @@ -1270,13 +1270,13 @@ (Operation Bit)) (monad.let phase.monad [parameters (|> constructor - (java/lang/reflect/Constructor::getGenericParameterTypes []) + (java/lang/reflect/Constructor:getGenericParameterTypes []) (list.of_array {.:None}) (list.each' try.monad reflection!.type) phase.of_try)] (pure (and (ffi.of_boolean (|> constructor - (java/lang/reflect/Constructor::getDeclaringClass []) - (java/lang/Object::equals [class]))) + (java/lang/reflect/Constructor:getDeclaringClass []) + (java/lang/Object:equals [class]))) (n.= (list.size inputsJT) (list.size parameters)) (list.every? (function (_ [expectedJC actualJC]) (jvm.= expectedJC (de_aliased aliasing actualJC))) @@ -1307,13 +1307,13 @@ (the (lux_class it) (-> (java/lang/Class java/lang/Object) (Type Class)) - (jvm.class (list) (ffi.of_string (java/lang/Class::getName [] it)))) + (jvm.class (list) (ffi.of_string (java/lang/Class:getName [] it)))) (template.with [ ] [(`` (the (-> ( (,, (template.spliced ))) (List (Type Class))) - (|>> ((,, (template.name [ "::getExceptionTypes"])) []) + (|>> ((,, (template.name [ ":getExceptionTypes"])) []) (list.of_array {.:None}) (list:each ..lux_class))))] @@ -1324,19 +1324,19 @@ (-> java/lang/reflect/Method (Try (Type Return))) (reflection!.return - (when (java/lang/reflect/Method::getGenericReturnType [] it) + (when (java/lang/reflect/Method:getGenericReturnType [] it) {.:Some it} it {.:None} (|> it - (java/lang/reflect/Method::getReturnType []) + (java/lang/reflect/Method:getReturnType []) (ffi.is java/lang/reflect/Type))))) (the (method_signature method_style method) (-> Method_Style java/lang/reflect/Method (Operation Method_Signature)) - (let [owner (java/lang/reflect/Method::getDeclaringClass [] method) + (let [owner (java/lang/reflect/Method:getDeclaringClass [] method) owner_tvars (is (List Text) (when method_style {:Static} @@ -1344,20 +1344,20 @@ _ (|> owner - (java/lang/Class::getTypeParameters []) + (java/lang/Class:getTypeParameters []) (list.of_array {.:None}) - (list:each (|>> (java/lang/reflect/TypeVariable::getName []) + (list:each (|>> (java/lang/reflect/TypeVariable:getName []) ffi.of_string))))) method_tvars (is (List Text) (|> method - (java/lang/reflect/Method::getTypeParameters []) + (java/lang/reflect/Method:getTypeParameters []) (list.of_array {.:None}) - (list:each (|>> (java/lang/reflect/TypeVariable::getName []) + (list:each (|>> (java/lang/reflect/TypeVariable:getName []) ffi.of_string)))) [owner_tvarsT mapping] (jvm_type_var_mapping owner_tvars method_tvars)] (monad.let [! phase.monad] [inputsT' (|> method - (java/lang/reflect/Method::getGenericParameterTypes []) + (java/lang/reflect/Method:getGenericParameterTypes []) (list.of_array {.:None}) (list.each' ! (|>> reflection!.type phase.of_try))) inputsT (list.each' ! (..reflection_type mapping) inputsT') @@ -1368,7 +1368,7 @@ .let [concrete_exceptions (..concrete_method_exceptions method)] concrete_exceptions (list.each' ! (..reflection_type mapping) concrete_exceptions) generic_exceptions (|> method - (java/lang/reflect/Method::getGenericExceptionTypes []) + (java/lang/reflect/Method:getGenericExceptionTypes []) (list.of_array {.:None}) (list.each' ! (|>> reflection!.type phase.of_try)) (phase:each (list.each' ! (..reflection_type mapping))) @@ -1379,7 +1379,7 @@ inputsT _ - (list:composite (list {.:Nominal (ffi.of_string (java/lang/Class::getName [] owner)) + (list:composite (list {.:Nominal (ffi.of_string (java/lang/Class:getName [] owner)) (list:each (|>> [.co_variant]) owner_tvarsT)}) inputsT))) @@ -1388,7 +1388,7 @@ :inputs inputsT' :output outputT' :deprecated? (|> method - (java/lang/reflect/Method::getDeclaredAnnotations []) + (java/lang/reflect/Method:getDeclaredAnnotations []) reflection!.deprecated?) :throws (if (list.empty? generic_exceptions) concrete_exceptions @@ -1397,35 +1397,35 @@ (the (constructor_signature constructor) (-> (java/lang/reflect/Constructor java/lang/Object) (Operation Method_Signature)) - (let [owner (java/lang/reflect/Constructor::getDeclaringClass [] constructor) + (let [owner (java/lang/reflect/Constructor:getDeclaringClass [] constructor) owner_tvars (is (List Text) (|> owner - (java/lang/Class::getTypeParameters []) + (java/lang/Class:getTypeParameters []) (list.of_array {.:None}) - (list:each (|>> (java/lang/reflect/TypeVariable::getName []) + (list:each (|>> (java/lang/reflect/TypeVariable:getName []) ffi.of_string)))) method_tvars (is (List Text) (|> constructor - (java/lang/reflect/Constructor::getTypeParameters []) + (java/lang/reflect/Constructor:getTypeParameters []) (list.of_array {.:None}) - (list:each (|>> (java/lang/reflect/TypeVariable::getName []) + (list:each (|>> (java/lang/reflect/TypeVariable:getName []) ffi.of_string)))) [owner_tvarsT mapping] (jvm_type_var_mapping owner_tvars method_tvars)] (monad.let [! phase.monad] [inputsT' (|> constructor - (java/lang/reflect/Constructor::getGenericParameterTypes []) + (java/lang/reflect/Constructor:getGenericParameterTypes []) (list.of_array {.:None}) (list.each' ! (|>> reflection!.type phase.of_try))) inputsT (list.each' ! (reflection_type mapping) inputsT') .let [concrete_exceptions (..concrete_constructor_exceptions constructor)] concrete_exceptions (list.each' ! (..reflection_type mapping) concrete_exceptions) generic_exceptions (|> constructor - (java/lang/reflect/Constructor::getGenericExceptionTypes []) + (java/lang/reflect/Constructor:getGenericExceptionTypes []) (list.of_array {.:None}) (list.each' ! (|>> reflection!.type phase.of_try)) (phase:each (list.each' ! (reflection_type mapping))) phase:conjoint) - .let [objectT {.:Nominal (ffi.of_string (java/lang/Class::getName [] owner)) + .let [objectT {.:Nominal (ffi.of_string (java/lang/Class:getName [] owner)) (list:each (|>> [.co_variant]) owner_tvarsT)} constructorT (<| (type.univ_q (dictionary.size mapping)) @@ -1435,7 +1435,7 @@ :inputs inputsT' :output jvm.void :deprecated? (|> constructor - (java/lang/reflect/Constructor::getDeclaredAnnotations []) + (java/lang/reflect/Constructor:getDeclaredAnnotations []) reflection!.deprecated?) :throws (if (list.empty? generic_exceptions) concrete_exceptions @@ -1466,13 +1466,13 @@ (List (Type Var))) (|>> ( []) (list.of_array {.:None}) - (list:each (|>> (java/lang/reflect/TypeVariable::getName []) + (list:each (|>> (java/lang/reflect/TypeVariable:getName []) ffi.of_string jvm.var))))] - [[class_type_variables (java/lang/Class java/lang/Object) java/lang/Class::getTypeParameters] - [constructor_type_variables (java/lang/reflect/Constructor java/lang/Object) java/lang/reflect/Constructor::getTypeParameters] - [method_type_variables java/lang/reflect/Method java/lang/reflect/Method::getTypeParameters]]) + [[class_type_variables (java/lang/Class java/lang/Object) java/lang/Class:getTypeParameters] + [constructor_type_variables (java/lang/reflect/Constructor java/lang/Object) java/lang/reflect/Constructor:getTypeParameters] + [method_type_variables java/lang/reflect/Method java/lang/reflect/Method:getTypeParameters]]) (the (aliasing expected actual) (-> (List (Type Var)) (List (Type Var)) @@ -1484,9 +1484,9 @@ (the (family_tree' it) (-> (java/lang/Class java/lang/Object) (List (java/lang/Class java/lang/Object))) - (let [interfaces (|> (java/lang/Class::getInterfaces [] it) + (let [interfaces (|> (java/lang/Class:getInterfaces [] it) (list.of_array {.:None})) - supers (when (java/lang/Class::getSuperclass [] it) + supers (when (java/lang/Class:getSuperclass [] it) {.:Some class} (list:composite (list class) interfaces) @@ -1503,7 +1503,7 @@ (|>> ..family_tree' ... De-duplication (list:mix (function (_ class all) - (dictionary.has (ffi.of_string (java/lang/Class::getName [] class)) class all)) + (dictionary.has (ffi.of_string (java/lang/Class:getName [] class)) class all)) (dictionary.empty text.hash)) dictionary.values)) @@ -1512,7 +1512,7 @@ (List java/lang/reflect/Method)) (|> it ..family_tree - (list:each (|>> (java/lang/Class::getDeclaredMethods []) + (list:each (|>> (java/lang/Class:getDeclaredMethods []) (list.of_array {.:None}))) list:conjoint)) @@ -1524,9 +1524,9 @@ .let [expected_class_tvars (class_type_variables class)] candidates (|> (if allow_inheritance? (all_declared_methods class) - (|> (java/lang/Class::getDeclaredMethods [] class) + (|> (java/lang/Class:getDeclaredMethods [] class) (list.of_array {.:None}))) - (list.only (|>> (java/lang/reflect/Method::getName []) + (list.only (|>> (java/lang/reflect/Method:getName []) ffi.of_string (text.= method_name))) (list.each' ! (is (-> java/lang/reflect/Method (Operation Evaluation)) @@ -1562,7 +1562,7 @@ [class (phase.of_try (reflection!.load class_loader class_name)) .let [expected_class_tvars (class_type_variables class)] candidates (|> class - (java/lang/Class::getConstructors []) + (java/lang/Class:getConstructors []) (list.of_array {.:None}) (list.each' ! (function (_ constructor) (monad.let ! @@ -1610,7 +1610,7 @@ (the type_vars (.tuple (<>.some ..var))) -(the (invoke::static class_loader) +(the (invoke:static class_loader) (-> java/lang/ClassLoader (-> Text Handler)) (..custom @@ -1632,7 +1632,7 @@ (analysis.text @ (..signature outputJT))) (decorate_inputs @ argsT (view.of list.stack argsA)))})))])) -(the (invoke::virtual class_loader) +(the (invoke:virtual class_loader) (-> java/lang/ClassLoader (-> Text Handler)) (..custom @@ -1661,7 +1661,7 @@ objectA) (decorate_inputs @ argsT (view.of list.stack argsA)))})))])) -(the (invoke::special class_loader) +(the (invoke:special class_loader) (-> java/lang/ClassLoader (-> Text Handler)) (..custom @@ -1690,7 +1690,7 @@ objectA) (decorate_inputs @ argsT (view.of list.stack argsA)))})))])) -(the (invoke::interface class_loader) +(the (invoke:interface class_loader) (-> java/lang/ClassLoader (-> Text Handler)) (..custom @@ -1702,8 +1702,8 @@ class (phase.of_try (reflection!.load class_loader class_name)) _ (phase.assertion non_interface class_name (|> class - (java/lang/Class::getModifiers []) - [] java/lang/reflect/Modifier::isInterface + (java/lang/Class:getModifiers []) + [] java/lang/reflect/Modifier:isInterface ffi.of_boolean)) method_candidate (..method_candidate true class_loader class_tvars class_name method_tvars method {:Interface} argsT) .let [method_type (its :method method_candidate)] @@ -1725,7 +1725,7 @@ objectA) (decorate_inputs @ argsT (view.of list.stack argsA)))})))])) -(the (invoke::constructor class_loader) +(the (invoke:constructor class_loader) (-> java/lang/ClassLoader (-> Text Handler)) (..custom @@ -1747,17 +1747,17 @@ (the (with_member class_loader) (-> java/lang/ClassLoader (Change Bundle)) - (|>> (with extension/jvm.member_get_static (get::static class_loader)) - (with extension/jvm.member_get_virtual (get::virtual class_loader)) + (|>> (with extension/jvm.member_get_static (get:static class_loader)) + (with extension/jvm.member_get_virtual (get:virtual class_loader)) - (with extension/jvm.member_put_static (put::static class_loader)) - (with extension/jvm.member_put_virtual (put::virtual class_loader)) + (with extension/jvm.member_put_static (put:static class_loader)) + (with extension/jvm.member_put_virtual (put:virtual class_loader)) - (with extension/jvm.member_invoke_static (invoke::static class_loader)) - (with extension/jvm.member_invoke_virtual (invoke::virtual class_loader)) - (with extension/jvm.member_invoke_special (invoke::special class_loader)) - (with extension/jvm.member_invoke_interface (invoke::interface class_loader)) - (with extension/jvm.member_invoke_constructor (invoke::constructor class_loader)) + (with extension/jvm.member_invoke_static (invoke:static class_loader)) + (with extension/jvm.member_invoke_virtual (invoke:virtual class_loader)) + (with extension/jvm.member_invoke_special (invoke:special class_loader)) + (with extension/jvm.member_invoke_interface (invoke:interface class_loader)) + (with extension/jvm.member_invoke_constructor (invoke:constructor class_loader)) )) (.every .public (Annotation_Parameter a) @@ -1819,40 +1819,40 @@ (Try (List [(Type Class) Text (Type Method)]))) (|> class - (list.only (|>> (java/lang/reflect/Method::getModifiers []) - (predicate.or (|>> [] java/lang/reflect/Modifier::isPublic ffi.of_boolean) - (|>> [] java/lang/reflect/Modifier::isProtected ffi.of_boolean)))) + (list.only (|>> (java/lang/reflect/Method:getModifiers []) + (predicate.or (|>> [] java/lang/reflect/Modifier:isPublic ffi.of_boolean) + (|>> [] java/lang/reflect/Modifier:isProtected ffi.of_boolean)))) (list.each' try.monad (function (_ method) (monad.let [! try.monad] [.let [type_variables (|> method - (java/lang/reflect/Method::getTypeParameters []) + (java/lang/reflect/Method:getTypeParameters []) (list.of_array {.:None}) - (list:each (|>> (java/lang/reflect/TypeVariable::getName []) + (list:each (|>> (java/lang/reflect/TypeVariable:getName []) ffi.of_string jvm.var)))] inputs (|> method - (java/lang/reflect/Method::getGenericParameterTypes []) + (java/lang/reflect/Method:getGenericParameterTypes []) (list.of_array {.:None}) (list.each' ! reflection!.type)) return (..return_type method) .let [concrete_exceptions (..concrete_method_exceptions method)] generic_exceptions (|> method - (java/lang/reflect/Method::getGenericExceptionTypes []) + (java/lang/reflect/Method:getGenericExceptionTypes []) (list.of_array {.:None}) (list.each' ! reflection!.class))] (pure [type - (ffi.of_string (java/lang/reflect/Method::getName [] method)) + (ffi.of_string (java/lang/reflect/Method:getName [] method)) (jvm.method [type_variables inputs return (if (list.empty? generic_exceptions) concrete_exceptions generic_exceptions)])]))))))] - [[abstract_methods (list.only (|>> (java/lang/reflect/Method::getModifiers []) - [] java/lang/reflect/Modifier::isAbstract + [[abstract_methods (list.only (|>> (java/lang/reflect/Method:getModifiers []) + [] java/lang/reflect/Modifier:isAbstract ffi.of_boolean)) (<| (list.of_array {.:None}) - (java/lang/Class::getDeclaredMethods []))] + (java/lang/Class:getDeclaredMethods []))] [methods (<|) ..all_declared_methods]]) @@ -1881,7 +1881,7 @@ (List [(Type Class) Text (Type Method)])]) (let [%method (is (text.Injection [(Type Class) Text (Type Method)]) (function (_ [super name type]) - (text (..signature super) " :: " (%.text name) " " (..signature type))))] + (text (..signature super) " : " (%.text name) " " (..signature type))))] (exception.report (list ["Expected methods" (exception.listing %method expected)] ["Actual methods" (exception.listing %method actual)]))))] @@ -2547,9 +2547,9 @@ [.let [[actual_parameters name] (projection.read_class class)] jvm_class (phase.of_try (reflection!.load class_loader name)) .let [expected_parameters (|> jvm_class - (java/lang/Class::getTypeParameters []) + (java/lang/Class:getTypeParameters []) (list.of_array {.:None}) - (list:each (|>> (java/lang/reflect/TypeVariable::getName []) + (list:each (|>> (java/lang/reflect/TypeVariable:getName []) ffi.of_string)))] _ (phase.assertion ..class_parameter_mismatch [name class expected_parameters actual_parameters] (n.= (list.size expected_parameters) @@ -2646,7 +2646,7 @@ methods (list))))) -(the constant::modifier +(the constant:modifier (Modifier field.Field) (all modifier:composite field.public @@ -2666,7 +2666,7 @@ (monad.let pool.monad [constant (`` (|> value (,, (template.spliced )))) attribute (attribute.constant constant)] - (field.field ..constant::modifier name true (sequence.sequence attribute)))] + (field.field ..constant:modifier name true (sequence.sequence attribute)))] [[@type.:Bit jvm.boolean [(|.when 0b +0 1b +1) i/32.of pool.integer]] ... [@type.:Integer jvm.byte [.i64 i/32.of pool.integer]] @@ -2835,7 +2835,7 @@ (list:each (..mock_method super) methods) inheritance)) -(the (class::anonymous class_loader host) +(the (class:anonymous class_loader host) (-> java/lang/ClassLoader runtime.Host (-> Text Handler)) (..custom @@ -2896,7 +2896,7 @@ (the (with_class class_loader host) (-> java/lang/ClassLoader runtime.Host (Change Bundle)) - (with extension/jvm.class_anonymous (class::anonymous class_loader host))) + (with extension/jvm.class_anonymous (class:anonymous class_loader host))) (the .public (bundle class_loader host) (-> java/lang/ClassLoader runtime.Host diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/lua.lux b/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/lua.lux index 852331ac7f..930f96dd43 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/lua.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/lua.lux @@ -44,7 +44,7 @@ (for .lua ffi.Function Any)) -(the object::get +(the object:get (-> Text Handler) (custom [(all <>.and .text ?list.any) @@ -58,7 +58,7 @@ (list (analysis.text @ fieldC) objectA)}])))])) -(the object::do +(the object:do (-> Text Handler) (custom [(all <>.and .text ?list.any (.tuple (<>.some ?list.any))) @@ -77,8 +77,8 @@ (the with_object_extensions (-> Bundle Bundle) - (|>> (/.with "lua_object_get#" object::get) - (/.with "lua_object_do#" object::do) + (|>> (/.with "lua_object_get#" object:get) + (/.with "lua_object_do#" object:do) (/.with "lua_object_nil#" (/.nullary ..Nil)) (/.with "lua_object_nil?#" (/.unary Any Bit)) )) @@ -97,16 +97,16 @@ (pure [@ {analysis.:Extension (/.translation extension) (list inputA)}])))]))] - [[utf8::encode Text (.Array (I64 Any))] - [utf8::decode (.Array (I64 Any)) Text]]) + [[utf8:encode Text (.Array (I64 Any))] + [utf8:decode (.Array (I64 Any)) Text]]) (the with_utf8_extensions (-> Bundle Bundle) - (|>> (/.with "lua_utf8_injection#" utf8::encode) - (/.with "lua_utf8_projection#" utf8::decode) + (|>> (/.with "lua_utf8_injection#" utf8:encode) + (/.with "lua_utf8_projection#" utf8:decode) )) -(the lua::constant +(the lua:constant (-> Text Handler) (custom [.text @@ -117,7 +117,7 @@ (pure [@ {analysis.:Extension (/.translation extension) (list (analysis.text @ name))}])))])) -(the lua::of +(the lua:of (-> Text Handler) (custom [(all <>.and ?list.any (.tuple (<>.some ?list.any))) @@ -132,7 +132,7 @@ (pure [@ {analysis.:Extension (/.translation extension) (list:composite (list abstractionA) inputsA)}])))])) -(the lua::power +(the lua:power (-> Text Handler) (custom [(all <>.and ?list.any ?list.any) @@ -147,7 +147,7 @@ (pure [@ {analysis.:Extension (/.translation extension) (list powerA baseA)}])))])) -(the lua::import +(the lua:import (-> Text Handler) (custom [.text @@ -158,7 +158,7 @@ (pure [@ {analysis.:Extension (/.translation extension) (list (analysis.text @ name))}])))])) -(the lua::function +(the lua:function (-> Text Handler) (custom [(all <>.and .natural ?list.any) @@ -179,10 +179,10 @@ with_object_extensions with_utf8_extensions - (/.with "lua_constant#" lua::constant) - (/.with "lua_of#" lua::of) - (/.with "lua_power#" lua::power) - (/.with "lua_import#" lua::import) - (/.with "lua_function#" lua::function) + (/.with "lua_constant#" lua:constant) + (/.with "lua_of#" lua:of) + (/.with "lua_power#" lua:power) + (/.with "lua_import#" lua:import) + (/.with "lua_function#" lua:function) (/.with "lua_script_universe#" (/.nullary .Bit)) )) diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/lux.lux b/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/lux.lux index b0d3dbbf21..104169c50d 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/lux.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/lux.lux @@ -159,7 +159,7 @@ 1 (pure (|> raw (text.character 0) maybe.trusted)) _ (?.failure (exception.error ..character_text_must_be_size_1 [raw]))))) - (the lux::syntax_char_case! + (the lux:syntax_char_case! Handler (..custom [(all ?.and @@ -191,7 +191,7 @@ {@type.:Extension @ (..synthesis extension_name)}))))]))) ... .is?# represents reference/pointer equality. -(the (lux::is? extension_name) +(the (lux:is? extension_name) Handler (.function (_ analysis archive args) (<| typeA.with_var (.function (_ [@var :var:])) @@ -199,7 +199,7 @@ analysis archive args)))) ... .try# provides a unified way to interact with the host platform's runtime error-handling facilities. -(the lux::try +(the lux:try Handler (..custom [?list.any @@ -276,12 +276,12 @@ (loop (de_aliased [validated_access? false def_name def_name]) (monad.let [! phase.monad] - [(^.let def_name [::module ::name]) (phase.normal def_name) + [(^.let def_name [:module :name]) (phase.normal def_name) [exported? constant] (phase.definition def_name) current phase.name_of_current_module .let [expected (..expected_module current quoted_module)] - imported! (phase.imported_by? ::module expected)] - (if (let [in_the_same_module? (text.= expected ::module) + imported! (phase.imported_by? :module expected)] + (if (let [in_the_same_module? (text.= expected :module) can_access_export? (and exported? imported!)] (or validated_access? in_the_same_module? @@ -381,9 +381,9 @@ (the with_basic (Change Bundle) - (|>> (with extension/lux.is? lux::is?) - (with extension/lux.try lux::try) - (with extension/lux.when_char lux::syntax_char_case!) + (|>> (with extension/lux.is? lux:is?) + (with extension/lux.try lux:try) + (with extension/lux.when_char lux:syntax_char_case!) (with extension/lux.local ..local) (with extension/lux.global ..global) (with extension/lux.universe ..universe) @@ -446,7 +446,7 @@ (with extension/lux.text_clip (trinary @type.Natural @type.Natural @type.Text @type.Text)) )) -(the lux::list +(the lux:list Handler (..custom [(?.some ?list.any) @@ -466,7 +466,7 @@ (pure (|> elements {@type.:Extension @ (..synthesis extension_name)}))))))])) -(the lux::list_size +(the lux:list_size Handler (..custom [?list.any @@ -481,7 +481,7 @@ (by ! each (|>> list {@type.:Extension @ (..synthesis extension_name)}))))))])) -(the lux::list_item +(the lux:list_item Handler (..custom [(?.and ?list.any ?list.any) @@ -499,7 +499,7 @@ (by ! each (|>> (list address) {@type.:Extension @ (..synthesis extension_name)}))))))])) -(the lux::list_composite +(the lux:list_composite Handler (..custom [(?.and ?list.any ?list.any) @@ -518,10 +518,10 @@ (the with_list (Change Bundle) - (|>> (with extension/lux.list ..lux::list) - (with extension/lux.list_size ..lux::list_size) - (with extension/lux.list_item ..lux::list_item) - (with extension/lux.list_composite ..lux::list_composite) + (|>> (with extension/lux.list ..lux:list) + (with extension/lux.list_size ..lux:list_size) + (with extension/lux.list_item ..lux:list_item) + (with extension/lux.list_composite ..lux:list_composite) )) (exception.the .public (type_is_not_known [name]) @@ -533,7 +533,7 @@ (list.in_order text.<) (exception.listing %.text))]))) -(the type::name +(the type:name Handler (..custom [?code.text @@ -567,7 +567,7 @@ (the with_type (Change Bundle) - (|>> (with extension/lux.type_name ..type::name) + (|>> (with extension/lux.type_name ..type:name) (with extension/lux.type ..type) )) diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/php.lux b/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/php.lux index 9ed2f564fb..476ddae6d9 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/php.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/php.lux @@ -44,7 +44,7 @@ (for .php ffi.Function Any)) -(the object::new +(the object:new Handler (custom [(all <>.and .text (<>.some ?list.any)) @@ -54,7 +54,7 @@ _ (analysis/type.infer .Any)] (pure {analysis.:Extension extension (stack.partial (analysis.text constructor) inputsA)})))])) -(the object::get +(the object:get Handler (custom [(all <>.and .text ?list.any) @@ -66,7 +66,7 @@ (pure {analysis.:Extension extension (stack (analysis.text fieldC) objectA)})))])) -(the object::do +(the object:do Handler (custom [(all <>.and .text ?list.any (<>.some ?list.any)) @@ -80,18 +80,18 @@ objectA inputsA)})))])) -(the bundle::object +(the bundle:object Bundle (<| (bundle.prefix "object") (|> bundle.empty - (bundle.install "new" object::new) - (bundle.install "get" object::get) - (bundle.install "do" object::do) + (bundle.install "new" object:new) + (bundle.install "get" object:get) + (bundle.install "do" object:do) (bundle.install "null" (/.nullary ..Null)) (bundle.install "null?" (/.unary Any Bit)) ))) -(the php::constant +(the php:constant Handler (custom [.text @@ -100,7 +100,7 @@ [_ (analysis/type.infer Any)] (pure {analysis.:Extension extension (stack (analysis.text name))})))])) -(the php::of +(the php:of Handler (custom [(all <>.and ?list.any (<>.some ?list.any)) @@ -112,7 +112,7 @@ _ (analysis/type.infer Any)] (pure {analysis.:Extension extension (stack.partial abstractionA inputsA)})))])) -(the php::pack +(the php:pack Handler (custom [(all <>.and ?list.any ?list.any) @@ -129,10 +129,10 @@ Bundle (<| (bundle.prefix "php") (|> bundle.empty - (dictionary.composite bundle::object) + (dictionary.composite bundle:object) - (bundle.install "constant" php::constant) - (bundle.install "of" php::of) - (bundle.install "pack" php::pack) + (bundle.install "constant" php:constant) + (bundle.install "of" php:of) + (bundle.install "pack" php:pack) (bundle.install "script universe" (/.nullary .Bit)) ))) diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/python.lux b/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/python.lux index b4c48e672f..515650f048 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/python.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/python.lux @@ -44,7 +44,7 @@ (for .python ffi.Dict Any)) -(the object::get +(the object:get (-> Text Handler) (custom [(all <>.and .text ?list.any) @@ -58,7 +58,7 @@ (list (analysis.text @ fieldC) objectA)}])))])) -(the object::do +(the object:do (-> Text Handler) (custom [(all <>.and .text ?list.any (.tuple (<>.some ?list.any))) @@ -77,13 +77,13 @@ (the with_object_extensions (-> Bundle Bundle) - (|>> (/.with "python_object_get#" object::get) - (/.with "python_object_do#" object::do) + (|>> (/.with "python_object_get#" object:get) + (/.with "python_object_do#" object:do) (/.with "python_object_none#" (/.nullary ..None)) (/.with "python_object_none?#" (/.unary Any Bit)) )) -(the python::constant +(the python:constant (-> Text Handler) (custom [.text @@ -94,7 +94,7 @@ (pure [@ {analysis.:Extension (/.translation extension) (list (analysis.text @ name))}])))])) -(the python::import +(the python:import (-> Text Handler) (custom [.text @@ -105,7 +105,7 @@ (pure [@ {analysis.:Extension (/.translation extension) (list (analysis.text @ name))}])))])) -(the python::of +(the python:of (-> Text Handler) (custom [(all <>.and ?list.any (.tuple (<>.some ?list.any))) @@ -120,7 +120,7 @@ (pure [@ {analysis.:Extension (/.translation extension) (list:composite (list abstractionA) inputsA)}])))])) -(the python::function +(the python:function (-> Text Handler) (custom [(all <>.and .natural ?list.any) @@ -135,7 +135,7 @@ (list (analysis.natural @ arity) abstractionA)}])))])) -(the python::exec +(the python:exec (-> Text Handler) (custom [(all <>.and ?list.any ?list.any) @@ -155,9 +155,9 @@ (|> ///.empty with_object_extensions - (/.with "python_constant#" python::constant) - (/.with "python_import#" python::import) - (/.with "python_of#" python::of) - (/.with "python_function#" python::function) - (/.with "python_exec#" python::exec) + (/.with "python_constant#" python:constant) + (/.with "python_import#" python:import) + (/.with "python_of#" python:of) + (/.with "python_function#" python:function) + (/.with "python_exec#" python:exec) )) diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/ruby.lux b/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/ruby.lux index 40a62bb0de..0a5c3eac5b 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/ruby.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/extension/analysis/ruby.lux @@ -41,7 +41,7 @@ (for .ruby ffi.Function Any)) -(the object::get +(the object:get (-> Text Handler) (custom [(all <>.and .text ?list.any) @@ -55,7 +55,7 @@ (list (analysis.text @ fieldC) objectA)}])))])) -(the object::do +(the object:do (-> Text Handler) (custom [(all <>.and .text ?list.any (.tuple (<>.some ?list.any))) @@ -74,13 +74,13 @@ (the with_object_extensions (-> Bundle Bundle) - (|>> (/.with "ruby_object_get#" object::get) - (/.with "ruby_object_do#" object::do) + (|>> (/.with "ruby_object_get#" object:get) + (/.with "ruby_object_do#" object:do) (/.with "ruby_object_nil#" (/.nullary ..Nil)) (/.with "ruby_object_nil?#" (/.unary Any Bit)) )) -(the ruby::constant +(the ruby:constant (-> Text Handler) (custom [.text @@ -91,7 +91,7 @@ (pure [@ {analysis.:Extension (/.translation extension) (list (analysis.text @ name))}])))])) -(the ruby::of +(the ruby:of (-> Text Handler) (custom [(all <>.and ?list.any (.tuple (<>.some ?list.any))) @@ -106,7 +106,7 @@ (pure [@ {analysis.:Extension (/.translation extension) (list:composite (list abstractionA) inputsA)}])))])) -(the ruby::import +(the ruby:import (-> Text Handler) (custom [.text @@ -122,8 +122,8 @@ (|> extension.empty with_object_extensions - (/.with "ruby_constant#" ruby::constant) - (/.with "ruby_of#" ruby::of) - (/.with "ruby_import#" ruby::import) + (/.with "ruby_constant#" ruby:constant) + (/.with "ruby_of#" ruby:of) + (/.with "ruby_import#" ruby:import) (/.with "ruby_script_universe#" (/.nullary .Bit)) )) diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/extension/declaration/jvm.lux b/stdlib/source/library/lux/compiler/language/lux/phase/extension/declaration/jvm.lux index a84b864f84..9ec6f12e30 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/extension/declaration/jvm.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/extension/declaration/jvm.lux @@ -233,7 +233,7 @@ (Type Class) (type.class (list) "java.lang.Object")) -(the constant::modifier +(the constant:modifier (Modifier field.Field) (all modifier:composite field.public @@ -252,7 +252,7 @@ (monad.let pool.monad [constant (`` (|> value (,, (template.spliced )))) attribute (attribute.constant constant)] - (field.field ..constant::modifier name true (sequence.sequence attribute)))] + (field.field ..constant:modifier name true (sequence.sequence attribute)))] [[@type.:Bit type.boolean [(pipe.when 0b +0 1b +1) i/32.of pool.integer]] ... [@type.:Integer type.byte [.i64 i/32.of pool.integer]] @@ -886,7 +886,7 @@ _ (translation.save! artifact_id {.:Some name} artifact)] (pure [])))) -(the jvm::class +(the jvm:class (Handler Anchor (Bytecode Any) Definition) (/.custom [(all <>.and @@ -966,7 +966,7 @@ (list) {.:None}))) -(the jvm::class::interface +(the jvm:class:interface (Handler Anchor (Bytecode Any) Definition) (/.custom [(all <>.and @@ -1001,12 +1001,12 @@ (pure declaration.no_requirements))))])) (ffi.the java/lang/ClassLoader - "[1]::[0]") + "[1]:[0]") (the .public (bundle class_loader extender) (-> java/lang/ClassLoader Extender (Bundle Anchor (Bytecode Any) Definition)) (|> extension.empty - (dictionary.has extension/jvm.class jvm::class) - (dictionary.has extension/jvm.class_interface ..jvm::class::interface) + (dictionary.has extension/jvm.class jvm:class) + (dictionary.has extension/jvm.class_interface ..jvm:class:interface) )) diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/extension/declaration/lux.lux b/stdlib/source/library/lux/compiler/language/lux/phase/extension/declaration/lux.lux index 1c25c6219f..a63958e776 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/extension/declaration/lux.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/extension/declaration/lux.lux @@ -188,7 +188,7 @@ _ (module.override_definition [.prelude "is#"] [true {@type.:Definition [..type_of_analysis {.:None} (analysisE.is#_extension eval "is#")]}])] (module.override_definition [.prelude "as#"] [true {@type.:Definition [..type_of_analysis {.:None} (analysisE.as#_extension eval "as#")]}]))))) -(the lux::def +(the lux:def Handler (..custom [(all <>.and .local ?list.any ?list.any) @@ -252,5 +252,5 @@ (the .public bundle Bundle (|> ///.empty - (dictionary.has "def#" lux::def) + (dictionary.has "def#" lux:def) (dictionary.has "module#" def_module))) diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/c++/common.lux b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/c++/common.lux index 9d6ba57e17..d5b293e8db 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/c++/common.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/c++/common.lux @@ -50,7 +50,7 @@ {try.:Failure error} (phase.failure error)))) -(the i64::char +(the i64:char (Unary _.Expression) (|>> (runtime.host_value type.i64) _.at @@ -62,10 +62,10 @@ (the with_integer_extensions (-> Bundle Bundle) - (|>> (dictionary.has "int_char#|translation" (unary i64::char)) + (|>> (dictionary.has "int_char#|translation" (unary i64:char)) )) -(the text::composite +(the text:composite (Variadic _.Expression) (|>> (|.when (stack) @@ -84,7 +84,7 @@ (the with_text_extensions (-> Bundle Bundle) - (|>> (dictionary.has "text_composite#|translation" (variadic ..text::composite)) + (|>> (dictionary.has "text_composite#|translation" (variadic ..text:composite)) )) (the .public bundle diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/common_lisp/common.lux b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/common_lisp/common.lux index dff2c9a402..3cd30f0d90 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/common_lisp/common.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/common_lisp/common.lux @@ -44,7 +44,7 @@ (|>> stack _.of (|> (_.constant function))))) ... ... TODO: Get rid of this ASAP -... (the lux::syntax_char_case! +... (the lux:syntax_char_case! ... (..custom [(all <>.and ... .any ... .any @@ -72,7 +72,7 @@ (the lux_procs Bundle (|> /.empty - ... (/.install "syntax char case!" lux::syntax_char_case!) + ... (/.install "syntax char case!" lux:syntax_char_case!) (/.install "is" (binary _.eq/2)) ... (/.install "try" (unary //runtime.lux//try)) )) diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/js/common.lux b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/js/common.lux index be1fb8fd57..ca3c496254 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/js/common.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/js/common.lux @@ -57,15 +57,15 @@ (template.with [ ] [(the ( [paramG subjectG]) (Binary _.Expression) - ( subjectG (runtime.i64::number paramG)))] + ( subjectG (runtime.i64:number paramG)))] - [[i64::<< runtime.i64::<<] - [i64::>> runtime.i64::>>]]) + [[i64:<< runtime.i64:<<] + [i64:>> runtime.i64:>>]]) ... [[Numbers]] -(the (i64::char it) +(the (i64:char it) (Unary _.Expression) - (_.of (.list (runtime.i64::number it)) + (_.of (.list (runtime.i64:number it)) (_.var "String.fromCharCode"))) ... [[Text]] @@ -176,7 +176,7 @@ ))) ... TODO: Get rid of this ASAP -(the lux::syntax_char_case! +(the lux:syntax_char_case! (..custom [(all <>.and ?list.any ?list.any @@ -210,32 +210,32 @@ ... [Bundles] (the with_basic (-> Bundle Bundle) - (|>> (dictionary.has "when_char#|translation" lux::syntax_char_case!) + (|>> (dictionary.has "when_char#|translation" lux:syntax_char_case!) (dictionary.has "is?#|translation" (binary (product.uncurried _.=))) (dictionary.has "try#|translation" (unary runtime.lux//try)))) (the with_i64 (-> Bundle Bundle) - (|>> (dictionary.has "i64_and#|translation" (binary (product.uncurried runtime.i64::and))) - (dictionary.has "i64_or#|translation" (binary (product.uncurried runtime.i64::or))) - (dictionary.has "i64_xor#|translation" (binary (product.uncurried runtime.i64::xor))) - (dictionary.has "i64_left#|translation" (binary i64::<<)) - (dictionary.has "i64_right#|translation" (binary i64::>>)) - (dictionary.has "i64_=#|translation" (binary (product.uncurried runtime.i64::=))) - (dictionary.has "i64_+#|translation" (binary (product.uncurried runtime.i64::+))) - (dictionary.has "i64_-#|translation" (binary (product.uncurried runtime.i64::-))) + (|>> (dictionary.has "i64_and#|translation" (binary (product.uncurried runtime.i64:and))) + (dictionary.has "i64_or#|translation" (binary (product.uncurried runtime.i64:or))) + (dictionary.has "i64_xor#|translation" (binary (product.uncurried runtime.i64:xor))) + (dictionary.has "i64_left#|translation" (binary i64:<<)) + (dictionary.has "i64_right#|translation" (binary i64:>>)) + (dictionary.has "i64_=#|translation" (binary (product.uncurried runtime.i64:=))) + (dictionary.has "i64_+#|translation" (binary (product.uncurried runtime.i64:+))) + (dictionary.has "i64_-#|translation" (binary (product.uncurried runtime.i64:-))) )) (the with_integer (-> Bundle Bundle) - (|>> (dictionary.has "int_<#|translation" (binary (product.uncurried runtime.i64::<))) + (|>> (dictionary.has "int_<#|translation" (binary (product.uncurried runtime.i64:<))) - (dictionary.has "int_x#|translation" (binary (product.uncurried runtime.i64::x))) - (dictionary.has "int_/#|translation" (binary (product.uncurried runtime.i64::/))) - (dictionary.has "int_%#|translation" (binary (product.uncurried runtime.i64::%))) + (dictionary.has "int_x#|translation" (binary (product.uncurried runtime.i64:x))) + (dictionary.has "int_/#|translation" (binary (product.uncurried runtime.i64:/))) + (dictionary.has "int_%#|translation" (binary (product.uncurried runtime.i64:%))) - (dictionary.has "int_f64#|translation" (unary runtime.i64::number)) - (dictionary.has "int_char#|translation" (unary i64::char)) + (dictionary.has "int_f64#|translation" (unary runtime.i64:number)) + (dictionary.has "int_char#|translation" (unary i64:char)) )) (the with_f64 @@ -249,7 +249,7 @@ (dictionary.has "f64_=#|translation" (binary (product.uncurried _.=))) (dictionary.has "f64_<#|translation" (binary (product.uncurried _.<))) - (dictionary.has "f64_int#|translation" (unary runtime.i64::of_number)) + (dictionary.has "f64_int#|translation" (unary runtime.i64:of_number)) )) (the with_text @@ -259,7 +259,7 @@ (dictionary.has "text_composite#|translation" (variadic text//composite)) (dictionary.has "text_index#|translation" (trinary text//index)) - (dictionary.has "text_size#|translation" (unary (|>> (_.its "length") runtime.i64::of_number))) + (dictionary.has "text_size#|translation" (unary (|>> (_.its "length") runtime.i64:of_number))) (dictionary.has "text_char#|translation" (binary (product.uncurried runtime.text//char))) (dictionary.has "text_clip#|translation" (trinary text//clip)) )) @@ -276,7 +276,7 @@ (the list_size (Unary _.Expression) (|>> (_.its "length") - runtime.i64::of_number)) + runtime.i64:of_number)) (the (list_item [address it]) (Binary _.Expression) diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/js/host.lux b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/js/host.lux index 35e36db837..ee16318d72 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/js/host.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/js/host.lux @@ -33,7 +33,7 @@ ["[0]" synthesis ["?[1]" \\projection]]]]]) -(the object::new +(the object:new (custom [(all <>.and ?list.any (<>.some ?list.any)) (function (_ phase archive [constructorS inputsS]) @@ -42,7 +42,7 @@ inputsG (list.each' ! (phase archive) inputsS)] (pure (_.new constructorG inputsG))))])) -(the object::get +(the object:get Handler (custom [(all <>.and ?synthesis.text ?list.any) @@ -51,7 +51,7 @@ [objectG (phase archive objectS)] (pure (_.its fieldS objectG))))])) -(the object::do +(the object:do Handler (custom [(all <>.and ?synthesis.text ?list.any (<>.some ?list.any)) @@ -65,30 +65,30 @@ [(the (Nullary Expression) (function.constant )) (the (Unary Expression) (_.= ))] - [[object::null object::null? _.null] - [object::undefined object::undefined? _.undefined]] + [[object:null object:null? _.null] + [object:undefined object:undefined? _.undefined]] ) (the with_object (-> Bundle Bundle) - (|>> (dictionary.has "js_object_new#|translation" object::new) - (dictionary.has "js_object_get#|translation" object::get) - (dictionary.has "js_object_do#|translation" object::do) + (|>> (dictionary.has "js_object_new#|translation" object:new) + (dictionary.has "js_object_get#|translation" object:get) + (dictionary.has "js_object_do#|translation" object:do) - (dictionary.has "js_object_null#|translation" (nullary object::null)) - (dictionary.has "js_object_null?#|translation" (unary object::null?)) + (dictionary.has "js_object_null#|translation" (nullary object:null)) + (dictionary.has "js_object_null?#|translation" (unary object:null?)) - (dictionary.has "js_object_undefined#|translation" (nullary object::undefined)) - (dictionary.has "js_object_undefined?#|translation" (unary object::undefined?)) + (dictionary.has "js_object_undefined#|translation" (nullary object:undefined)) + (dictionary.has "js_object_undefined?#|translation" (unary object:undefined?)) )) -(the js::constant +(the js:constant (custom [?synthesis.text (function (_ phase archive name) (by phase.monad pure (_.var name)))])) -(the js::of +(the js:of (custom [(all <>.and ?list.any (<>.some ?list.any)) (function (_ phase archive [abstractionS inputsS]) @@ -97,7 +97,7 @@ inputsG (list.each' ! (phase archive) inputsS)] (pure (_.of inputsG abstractionG))))])) -(the js::function +(the js:function (custom [(all <>.and ?synthesis.i64 ?list.any) (function (_ phase archive [arity abstractionS]) @@ -122,8 +122,8 @@ (|> extension.empty with_object - (dictionary.has "js_constant#|translation" js::constant) - (dictionary.has "js_of#|translation" js::of) + (dictionary.has "js_constant#|translation" js:constant) + (dictionary.has "js_of#|translation" js:of) (dictionary.has "js_type_of#|translation" (unary _.type_of)) - (dictionary.has "js_function#|translation" js::function) + (dictionary.has "js_function#|translation" js:function) )) diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/jvm/common.lux b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/jvm/common.lux index 187423efd7..15a5030f6c 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/jvm/common.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/jvm/common.lux @@ -110,7 +110,7 @@ ))) ... TODO: Get rid of this ASAP -(the lux::syntax_char_case! +(the lux:syntax_char_case! (..custom [(all <>.and ?list.any ?list.any @@ -154,14 +154,14 @@ (_.set_label @end)) )))))])) -(the (lux::is [referenceG sampleG]) +(the (lux:is [referenceG sampleG]) (Binary (Bytecode Any)) (all _.composite referenceG sampleG (..predicate _.if_acmpeq))) -(the (lux::try riskyG) +(the (lux:try riskyG) (Unary (Bytecode Any)) (all _.composite riskyG @@ -170,9 +170,9 @@ (the with_basic (Change Bundle) - (|>> (with extension/lux.when_char ..lux::syntax_char_case!) - (with extension/lux.is? (binary ..lux::is)) - (with extension/lux.try (unary ..lux::try)))) + (|>> (with extension/lux.when_char ..lux:syntax_char_case!) + (with extension/lux.is? (binary ..lux:is)) + (with extension/lux.try (unary ..lux:try)))) (template.with [ ] [(the ( [maskG inputG]) @@ -182,9 +182,9 @@ maskG (///value.primitive type.long) (///value.boxed type.long)))] - [[i64::and _.land] - [i64::or _.lor] - [i64::xor _.lxor]]) + [[i64:and _.land] + [i64:or _.lor] + [i64:xor _.lxor]]) (template.with [ ] [(the ( [shiftG inputG]) @@ -194,8 +194,8 @@ shiftG ..jvm_int (///value.boxed type.long)))] - [[i64::<< _.lshl] - [i64::>> _.lushr]]) + [[i64:<< _.lshl] + [i64:>> _.lushr]]) (template.with [ ] [(the ( [paramG subjectG]) @@ -205,17 +205,17 @@ paramG (///value.primitive ) (///value.boxed )))] - [[i64::+ type.long _.ladd] - [i64::- type.long _.lsub] - [i64::x type.long _.lmul] - [i64::/ type.long _.ldiv] - [i64::% type.long _.lrem] + [[i64:+ type.long _.ladd] + [i64:- type.long _.lsub] + [i64:x type.long _.lmul] + [i64:/ type.long _.ldiv] + [i64:% type.long _.lrem] - [f64::+ type.double _.dadd] - [f64::- type.double _.dsub] - [f64::x type.double _.dmul] - [f64::/ type.double _.ddiv] - [f64::% type.double _.drem]]) + [f64:+ type.double _.dadd] + [f64:- type.double _.dsub] + [f64:x type.double _.dmul] + [f64:/ type.double _.ddiv] + [f64:% type.double _.drem]]) (template.with [ ] [(template.with [ ] @@ -231,10 +231,10 @@ [[ _.iconst_0] [ _.iconst_m1]])] - [[i64::= i64::< type.long _.lcmp] - [f64::= f64::< type.double _.dcmpg]]) + [[i64:= i64:< type.long _.lcmp] + [f64:= f64:< type.double _.dcmpg]]) -(the (::toString class from) +(the (:toString class from) (-> (Type Class) (Type Primitive) (Bytecode Any)) (_.invokestatic class "toString" (type.method [(list) (list from) ..$String (list)]))) @@ -247,20 +247,20 @@ ))] - [[i64::f64 + [[i64:f64 (///value.primitive type.long) (all _.composite _.l2d (///value.boxed type.double))] - [i64::char + [i64:char (///value.primitive type.long) (all _.composite _.l2i _.i2c - (..::toString ..$Character type.char))] + (..:toString ..$Character type.char))] - [f64::i64 + [f64:i64 (///value.primitive type.double) (all _.composite _.d2l @@ -268,46 +268,46 @@ (the with_i64 (Change Bundle) - (|>> (with extension/lux.i64_and (binary ..i64::and)) - (with extension/lux.i64_or (binary ..i64::or)) - (with extension/lux.i64_xor (binary ..i64::xor)) - (with extension/lux.i64_left (binary ..i64::<<)) - (with extension/lux.i64_right (binary ..i64::>>)) + (|>> (with extension/lux.i64_and (binary ..i64:and)) + (with extension/lux.i64_or (binary ..i64:or)) + (with extension/lux.i64_xor (binary ..i64:xor)) + (with extension/lux.i64_left (binary ..i64:<<)) + (with extension/lux.i64_right (binary ..i64:>>)) - (with extension/lux.i64_= (binary ..i64::=)) - (with extension/lux.i64_+ (binary ..i64::+)) - (with extension/lux.i64_- (binary ..i64::-)))) + (with extension/lux.i64_= (binary ..i64:=)) + (with extension/lux.i64_+ (binary ..i64:+)) + (with extension/lux.i64_- (binary ..i64:-)))) (the with_integer (Change Bundle) - (|>> (with extension/lux.int_< (binary ..i64::<)) - (with extension/lux.int_x (binary ..i64::x)) - (with extension/lux.int_/ (binary ..i64::/)) - (with extension/lux.int_% (binary ..i64::%)) + (|>> (with extension/lux.int_< (binary ..i64:<)) + (with extension/lux.int_x (binary ..i64:x)) + (with extension/lux.int_/ (binary ..i64:/)) + (with extension/lux.int_% (binary ..i64:%)) - (with extension/lux.int_f64 (unary ..i64::f64)) - (with extension/lux.int_char (unary ..i64::char)))) + (with extension/lux.int_f64 (unary ..i64:f64)) + (with extension/lux.int_char (unary ..i64:char)))) (the with_decimal (Change Bundle) - (|>> (with extension/lux.f64_+ (binary ..f64::+)) - (with extension/lux.f64_- (binary ..f64::-)) - (with extension/lux.f64_x (binary ..f64::x)) - (with extension/lux.f64_/ (binary ..f64::/)) - (with extension/lux.f64_% (binary ..f64::%)) - (with extension/lux.f64_= (binary ..f64::=)) - (with extension/lux.f64_< (binary ..f64::<)) - (with extension/lux.f64_int (unary ..f64::i64)))) - -(the $String::length + (|>> (with extension/lux.f64_+ (binary ..f64:+)) + (with extension/lux.f64_- (binary ..f64:-)) + (with extension/lux.f64_x (binary ..f64:x)) + (with extension/lux.f64_/ (binary ..f64:/)) + (with extension/lux.f64_% (binary ..f64:%)) + (with extension/lux.f64_= (binary ..f64:=)) + (with extension/lux.f64_< (binary ..f64:<)) + (with extension/lux.f64_int (unary ..f64:i64)))) + +(the $String:length (_.invokevirtual ..$String "length" (type.method [(list) (list) type.int (list)]))) -(the (text::size inputG) +(the (text:size inputG) (Unary (Bytecode Any)) (all _.composite inputG (_.checkcast $String) - $String::length + $String:length ..lux_i64)) (the no_op @@ -322,17 +322,17 @@ paramG ))] - [[text::= ..no_op ..no_op + [[text:= ..no_op ..no_op (_.invokevirtual ..$Object "equals" (type.method [(list) (list ..$Object) type.boolean (list)])) (///value.boxed type.boolean)] - [text::< (_.checkcast $String) (_.checkcast $String) + [text:< (_.checkcast $String) (_.checkcast $String) (_.invokevirtual ..$String "compareTo" (type.method [(list) (list ..$String) type.int (list)])) (..predicate _.iflt)] - [text::char (_.checkcast $String) ..jvm_int + [text:char (_.checkcast $String) ..jvm_int (_.invokevirtual ..$String "charAt" (type.method [(list) (list type.int) type.char (list)])) ..lux_natural]]) -(the text::composite +(the text:composite (Variadic (Bytecode Any)) (let [$StringBuilder (type.class (list) "java.lang.StringBuilder") add_part! (is (-> (Bytecode Any) @@ -345,7 +345,7 @@ update_size! (is (Bytecode Any) (all _.composite _.dup - $String::length + $String:length _.dup2_x1 _.pop2 _.iadd @@ -392,7 +392,7 @@ (_.invokevirtual $StringBuilder "toString" (type.method [(list) (list) ..$String (list)]))) )))) -(the (text::clip [offset! length! subject!]) +(the (text:clip [offset! length! subject!]) (Trinary (Bytecode Any)) (all _.composite subject! (_.checkcast $String) @@ -403,7 +403,7 @@ (_.invokevirtual ..$String "substring" (type.method [(list) (list type.int type.int) ..$String (list)])))) (the index_method (type.method [(list) (list ..$String type.int) type.int (list)])) -(the (text::index [startG partG textG]) +(the (text:index [startG partG textG]) (Trinary (Bytecode Any)) (monad.let _.monad [@not_found _.new_label @@ -426,16 +426,16 @@ (the with_text (Change Bundle) - (|>> (with extension/lux.text_= (binary ..text::=)) - (with extension/lux.text_< (binary ..text::<)) - (with extension/lux.text_composite (variadic ..text::composite)) - (with extension/lux.text_index (trinary ..text::index)) - (with extension/lux.text_size (unary ..text::size)) - (with extension/lux.text_char (binary ..text::char)) - (with extension/lux.text_clip (trinary ..text::clip)))) + (|>> (with extension/lux.text_= (binary ..text:=)) + (with extension/lux.text_< (binary ..text:<)) + (with extension/lux.text_composite (variadic ..text:composite)) + (with extension/lux.text_index (trinary ..text:index)) + (with extension/lux.text_size (unary ..text:size)) + (with extension/lux.text_char (binary ..text:char)) + (with extension/lux.text_clip (trinary ..text:clip)))) (the string_method (type.method [(list) (list ..$String) type.void (list)])) -(the (io::log messageG) +(the (io:log messageG) (Unary (Bytecode Any)) (all _.composite (_.getstatic ..$System "out" ..$PrintStream) @@ -444,7 +444,7 @@ (_.invokevirtual ..$PrintStream "println" ..string_method) ///runtime.unit)) -(the (io::error messageG) +(the (io:error messageG) (Unary (Bytecode Any)) (all _.composite (_.new ..$Error) @@ -456,10 +456,10 @@ (the with_io (Change Bundle) - (|>> (with extension/lux.log! (unary ..io::log)) - (with extension/lux.error (unary ..io::error)))) + (|>> (with extension/lux.log! (unary ..io:log)) + (with extension/lux.error (unary ..io:error)))) -(the (lux::list elements) +(the (lux:list elements) (Variadic (Bytecode Any)) (all _.composite (_.int (/32.of (.integer (list.size elements)))) @@ -474,7 +474,7 @@ _.aastore))) (list.complete _.monad)))) -(the (lux::list_size it) +(the (lux:list_size it) (Unary (Bytecode Any)) (all _.composite it @@ -482,14 +482,14 @@ _.arraylength ..lux_natural)) -(the (lux::list_item [address it]) +(the (lux:list_item [address it]) (Binary (Bytecode Any)) (all _.composite it (_.checkcast ///type.list) address ..jvm_int _.aaload)) -(the system::arraycopy +(the system:arraycopy (Bytecode Any) (_.invokestatic ..$System "arraycopy" (type.method [(list) @@ -499,7 +499,7 @@ type.void (list)]))) -(the (lux::list_composite [prefix suffix]) +(the (lux:list_composite [prefix suffix]) (Binary (Bytecode Any)) (let [swap2 (all _.composite @@ -555,7 +555,7 @@ ... {(# P) P+S} P (# P) P+S _.swap beginning _.dup_x2 _.swap ... {(# P) P+S} P 0 P+S 0 (# P) - system::arraycopy + system:arraycopy ... {(# P) P+S} ) @@ -568,7 +568,7 @@ ... {P+S} S (# S) (# P) P+S beginning _.swap swap2 _.swap ... {P+S} S 0 P+S (# P) (# S) - system::arraycopy + system:arraycopy ... {P+S} )] (all _.composite @@ -588,10 +588,10 @@ (the with_list (Change Bundle) - (|>> (with extension/lux.list (variadic ..lux::list)) - (with extension/lux.list_size (unary ..lux::list_size)) - (with extension/lux.list_item (binary ..lux::list_item)) - (with extension/lux.list_composite (binary ..lux::list_composite)) + (|>> (with extension/lux.list (variadic ..lux:list)) + (with extension/lux.list_size (unary ..lux:list_size)) + (with extension/lux.list_item (binary ..lux:list_item)) + (with extension/lux.list_composite (binary ..lux:list_composite)) )) (the (array it) @@ -602,10 +602,10 @@ (_.anewarray ///type.value))) (the array_size - ..lux::list_size) + ..lux:list_size) (the array_its - ..lux::list_item) + ..lux:list_item) (the (array_has [address value it]) (Trinary (Bytecode Any)) diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/jvm/host.lux b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/jvm/host.lux index 1953b4169b..2fc4eeafad 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/jvm/host.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/jvm/host.lux @@ -111,69 +111,69 @@ inputG )))] - [[_.d2f conversion::double_to_float] - [_.d2i conversion::double_to_int] - [_.d2l conversion::double_to_long] + [[_.d2f conversion:double_to_float] + [_.d2i conversion:double_to_int] + [_.d2l conversion:double_to_long] - [_.f2d conversion::float_to_double] - [_.f2i conversion::float_to_int] - [_.f2l conversion::float_to_long] + [_.f2d conversion:float_to_double] + [_.f2i conversion:float_to_int] + [_.f2l conversion:float_to_long] - [_.i2b conversion::int_to_byte] - [_.i2c conversion::int_to_char] - [_.i2d conversion::int_to_double] - [_.i2f conversion::int_to_float] - [_.i2l conversion::int_to_long] - [_.i2s conversion::int_to_short] + [_.i2b conversion:int_to_byte] + [_.i2c conversion:int_to_char] + [_.i2d conversion:int_to_double] + [_.i2f conversion:int_to_float] + [_.i2l conversion:int_to_long] + [_.i2s conversion:int_to_short] - [_.l2d conversion::long_to_double] - [_.l2f conversion::long_to_float] - [_.l2i conversion::long_to_int] - [..l2s conversion::long_to_short] - [..l2b conversion::long_to_byte] - [..l2c conversion::long_to_char] + [_.l2d conversion:long_to_double] + [_.l2f conversion:long_to_float] + [_.l2i conversion:long_to_int] + [..l2s conversion:long_to_short] + [..l2b conversion:long_to_byte] + [..l2c conversion:long_to_char] - [_.i2b conversion::char_to_byte] - [_.i2s conversion::char_to_short] - [_.nop conversion::char_to_int] - [_.i2l conversion::char_to_long] + [_.i2b conversion:char_to_byte] + [_.i2s conversion:char_to_short] + [_.nop conversion:char_to_int] + [_.i2l conversion:char_to_long] - [_.i2l conversion::byte_to_long] + [_.i2l conversion:byte_to_long] - [_.i2l conversion::short_to_long]]) + [_.i2l conversion:short_to_long]]) (the with_conversion (Change Bundle) - (|>> (common.with extension/jvm.conversion_double_to_float (unary conversion::double_to_float)) - (common.with extension/jvm.conversion_double_to_int (unary conversion::double_to_int)) - (common.with extension/jvm.conversion_double_to_long (unary conversion::double_to_long)) + (|>> (common.with extension/jvm.conversion_double_to_float (unary conversion:double_to_float)) + (common.with extension/jvm.conversion_double_to_int (unary conversion:double_to_int)) + (common.with extension/jvm.conversion_double_to_long (unary conversion:double_to_long)) - (common.with extension/jvm.conversion_float_to_double (unary conversion::float_to_double)) - (common.with extension/jvm.conversion_float_to_int (unary conversion::float_to_int)) - (common.with extension/jvm.conversion_float_to_long (unary conversion::float_to_long)) + (common.with extension/jvm.conversion_float_to_double (unary conversion:float_to_double)) + (common.with extension/jvm.conversion_float_to_int (unary conversion:float_to_int)) + (common.with extension/jvm.conversion_float_to_long (unary conversion:float_to_long)) - (common.with extension/jvm.conversion_int_to_byte (unary conversion::int_to_byte)) - (common.with extension/jvm.conversion_int_to_char (unary conversion::int_to_char)) - (common.with extension/jvm.conversion_int_to_double (unary conversion::int_to_double)) - (common.with extension/jvm.conversion_int_to_float (unary conversion::int_to_float)) - (common.with extension/jvm.conversion_int_to_long (unary conversion::int_to_long)) - (common.with extension/jvm.conversion_int_to_short (unary conversion::int_to_short)) + (common.with extension/jvm.conversion_int_to_byte (unary conversion:int_to_byte)) + (common.with extension/jvm.conversion_int_to_char (unary conversion:int_to_char)) + (common.with extension/jvm.conversion_int_to_double (unary conversion:int_to_double)) + (common.with extension/jvm.conversion_int_to_float (unary conversion:int_to_float)) + (common.with extension/jvm.conversion_int_to_long (unary conversion:int_to_long)) + (common.with extension/jvm.conversion_int_to_short (unary conversion:int_to_short)) - (common.with extension/jvm.conversion_long_to_double (unary conversion::long_to_double)) - (common.with extension/jvm.conversion_long_to_float (unary conversion::long_to_float)) - (common.with extension/jvm.conversion_long_to_int (unary conversion::long_to_int)) - (common.with extension/jvm.conversion_long_to_short (unary conversion::long_to_short)) - (common.with extension/jvm.conversion_long_to_byte (unary conversion::long_to_byte)) - (common.with extension/jvm.conversion_long_to_char (unary conversion::long_to_char)) + (common.with extension/jvm.conversion_long_to_double (unary conversion:long_to_double)) + (common.with extension/jvm.conversion_long_to_float (unary conversion:long_to_float)) + (common.with extension/jvm.conversion_long_to_int (unary conversion:long_to_int)) + (common.with extension/jvm.conversion_long_to_short (unary conversion:long_to_short)) + (common.with extension/jvm.conversion_long_to_byte (unary conversion:long_to_byte)) + (common.with extension/jvm.conversion_long_to_char (unary conversion:long_to_char)) - (common.with extension/jvm.conversion_char_to_byte (unary conversion::char_to_byte)) - (common.with extension/jvm.conversion_char_to_short (unary conversion::char_to_short)) - (common.with extension/jvm.conversion_char_to_int (unary conversion::char_to_int)) - (common.with extension/jvm.conversion_char_to_long (unary conversion::char_to_long)) + (common.with extension/jvm.conversion_char_to_byte (unary conversion:char_to_byte)) + (common.with extension/jvm.conversion_char_to_short (unary conversion:char_to_short)) + (common.with extension/jvm.conversion_char_to_int (unary conversion:char_to_int)) + (common.with extension/jvm.conversion_char_to_long (unary conversion:char_to_long)) - (common.with extension/jvm.conversion_byte_to_long (unary conversion::byte_to_long)) + (common.with extension/jvm.conversion_byte_to_long (unary conversion:byte_to_long)) - (common.with extension/jvm.conversion_short_to_long (unary conversion::short_to_long)) + (common.with extension/jvm.conversion_short_to_long (unary conversion:short_to_long)) )) (template.with [ ] @@ -184,41 +184,41 @@ parameter! ))] - [[int::+ _.iadd] - [int::- _.isub] - [int::x _.imul] - [int::/ _.idiv] - [int::% _.irem] - [int::and _.iand] - [int::or _.ior] - [int::xor _.ixor] - [int::shl _.ishl] - [int::shr _.ishr] - [int::ushr _.iushr] + [[int:+ _.iadd] + [int:- _.isub] + [int:x _.imul] + [int:/ _.idiv] + [int:% _.irem] + [int:and _.iand] + [int:or _.ior] + [int:xor _.ixor] + [int:shl _.ishl] + [int:shr _.ishr] + [int:ushr _.iushr] - [long::+ _.ladd] - [long::- _.lsub] - [long::x _.lmul] - [long::/ _.ldiv] - [long::% _.lrem] - [long::and _.land] - [long::or _.lor] - [long::xor _.lxor] - [long::shl _.lshl] - [long::shr _.lshr] - [long::ushr _.lushr] - - [float::+ _.fadd] - [float::- _.fsub] - [float::x _.fmul] - [float::/ _.fdiv] - [float::% _.frem] + [long:+ _.ladd] + [long:- _.lsub] + [long:x _.lmul] + [long:/ _.ldiv] + [long:% _.lrem] + [long:and _.land] + [long:or _.lor] + [long:xor _.lxor] + [long:shl _.lshl] + [long:shr _.lshr] + [long:ushr _.lushr] + + [float:+ _.fadd] + [float:- _.fsub] + [float:x _.fmul] + [float:/ _.fdiv] + [float:% _.frem] - [double::+ _.dadd] - [double::- _.dsub] - [double::x _.dmul] - [double::/ _.ddiv] - [double::% _.drem]]) + [double:+ _.dadd] + [double:- _.dsub] + [double:x _.dmul] + [double:/ _.ddiv] + [double:% _.drem]]) (template.with [ ] [(the ( [expected actual]) @@ -228,11 +228,11 @@ expected (common.predicate )))] - [[int::= _.if_icmpeq] - [int::< _.if_icmplt] + [[int:= _.if_icmpeq] + [int:< _.if_icmplt] - [char::= _.if_icmpeq] - [char::< _.if_icmplt]]) + [char:= _.if_icmpeq] + [char:< _.if_icmplt]]) (template.with [ ] [(the ( [expected actual]) @@ -244,75 +244,75 @@ (_.int (i/32.of )) (common.predicate _.if_icmpeq)))] - [[long::= _.lcmp +0] - [long::< _.lcmp -1] + [[long:= _.lcmp +0] + [long:< _.lcmp -1] - [float::= _.fcmpg +0] - [float::< _.fcmpg -1] + [float:= _.fcmpg +0] + [float:< _.fcmpg -1] - [double::= _.dcmpg +0] - [double::< _.dcmpg -1]]) + [double:= _.dcmpg +0] + [double:< _.dcmpg -1]]) (the with_int (Change Bundle) - (|>> (common.with extension/jvm.int_+ (binary int::+)) - (common.with extension/jvm.int_- (binary int::-)) - (common.with extension/jvm.int_x (binary int::x)) - (common.with extension/jvm.int_/ (binary int::/)) - (common.with extension/jvm.int_% (binary int::%)) - (common.with extension/jvm.int_= (binary int::=)) - (common.with extension/jvm.int_< (binary int::<)) - (common.with extension/jvm.int_and (binary int::and)) - (common.with extension/jvm.int_or (binary int::or)) - (common.with extension/jvm.int_xor (binary int::xor)) - (common.with extension/jvm.int_shl (binary int::shl)) - (common.with extension/jvm.int_shr (binary int::shr)) - (common.with extension/jvm.int_ushr (binary int::ushr)) + (|>> (common.with extension/jvm.int_+ (binary int:+)) + (common.with extension/jvm.int_- (binary int:-)) + (common.with extension/jvm.int_x (binary int:x)) + (common.with extension/jvm.int_/ (binary int:/)) + (common.with extension/jvm.int_% (binary int:%)) + (common.with extension/jvm.int_= (binary int:=)) + (common.with extension/jvm.int_< (binary int:<)) + (common.with extension/jvm.int_and (binary int:and)) + (common.with extension/jvm.int_or (binary int:or)) + (common.with extension/jvm.int_xor (binary int:xor)) + (common.with extension/jvm.int_shl (binary int:shl)) + (common.with extension/jvm.int_shr (binary int:shr)) + (common.with extension/jvm.int_ushr (binary int:ushr)) )) (the with_long (Change Bundle) - (|>> (common.with extension/jvm.long_+ (binary long::+)) - (common.with extension/jvm.long_- (binary long::-)) - (common.with extension/jvm.long_x (binary long::x)) - (common.with extension/jvm.long_/ (binary long::/)) - (common.with extension/jvm.long_% (binary long::%)) - (common.with extension/jvm.long_= (binary long::=)) - (common.with extension/jvm.long_< (binary long::<)) - (common.with extension/jvm.long_and (binary long::and)) - (common.with extension/jvm.long_or (binary long::or)) - (common.with extension/jvm.long_xor (binary long::xor)) - (common.with extension/jvm.long_shl (binary long::shl)) - (common.with extension/jvm.long_shr (binary long::shr)) - (common.with extension/jvm.long_ushr (binary long::ushr)) + (|>> (common.with extension/jvm.long_+ (binary long:+)) + (common.with extension/jvm.long_- (binary long:-)) + (common.with extension/jvm.long_x (binary long:x)) + (common.with extension/jvm.long_/ (binary long:/)) + (common.with extension/jvm.long_% (binary long:%)) + (common.with extension/jvm.long_= (binary long:=)) + (common.with extension/jvm.long_< (binary long:<)) + (common.with extension/jvm.long_and (binary long:and)) + (common.with extension/jvm.long_or (binary long:or)) + (common.with extension/jvm.long_xor (binary long:xor)) + (common.with extension/jvm.long_shl (binary long:shl)) + (common.with extension/jvm.long_shr (binary long:shr)) + (common.with extension/jvm.long_ushr (binary long:ushr)) )) (the with_float (Change Bundle) - (|>> (common.with extension/jvm.float_+ (binary float::+)) - (common.with extension/jvm.float_- (binary float::-)) - (common.with extension/jvm.float_x (binary float::x)) - (common.with extension/jvm.float_/ (binary float::/)) - (common.with extension/jvm.float_% (binary float::%)) - (common.with extension/jvm.float_= (binary float::=)) - (common.with extension/jvm.float_< (binary float::<)) + (|>> (common.with extension/jvm.float_+ (binary float:+)) + (common.with extension/jvm.float_- (binary float:-)) + (common.with extension/jvm.float_x (binary float:x)) + (common.with extension/jvm.float_/ (binary float:/)) + (common.with extension/jvm.float_% (binary float:%)) + (common.with extension/jvm.float_= (binary float:=)) + (common.with extension/jvm.float_< (binary float:<)) )) (the with_double (Change Bundle) - (|>> (common.with extension/jvm.double_+ (binary double::+)) - (common.with extension/jvm.double_- (binary double::-)) - (common.with extension/jvm.double_x (binary double::x)) - (common.with extension/jvm.double_/ (binary double::/)) - (common.with extension/jvm.double_% (binary double::%)) - (common.with extension/jvm.double_= (binary double::=)) - (common.with extension/jvm.double_< (binary double::<)) + (|>> (common.with extension/jvm.double_+ (binary double:+)) + (common.with extension/jvm.double_- (binary double:-)) + (common.with extension/jvm.double_x (binary double:x)) + (common.with extension/jvm.double_/ (binary double:/)) + (common.with extension/jvm.double_% (binary double:%)) + (common.with extension/jvm.double_= (binary double:=)) + (common.with extension/jvm.double_< (binary double:<)) )) (the with_char (Change Bundle) - (|>> (common.with extension/jvm.char_= (binary char::=)) - (common.with extension/jvm.char_< (binary char::<)) + (|>> (common.with extension/jvm.char_= (binary char:=)) + (common.with extension/jvm.char_< (binary char:<)) )) (template.with [ ] @@ -372,7 +372,7 @@ (_.checkcast (type.array jvm_primitive)) _.arraylength))))])) -(the array::length::object +(the array:length:object Handler (..custom [(all <>.and ..object_array ?list.any) @@ -396,7 +396,7 @@ lengthG (_.newarray jvm_primitive)))))])) -(the array::new::object +(the array:new:object Handler (..custom [(all <>.and ..object ?list.any) @@ -422,7 +422,7 @@ idxG loadG))))])) -(the array::read::object +(the array:read:object Handler (..custom [(all <>.and ..object_array ?list.any ?list.any) @@ -454,7 +454,7 @@ valueG storeG))))])) -(the array::write::object +(the array:write:object Handler (..custom [(all <>.and ..object_array ?list.any ?list.any ?list.any) @@ -481,7 +481,7 @@ (common.with extension/jvm.array_length_float (primitive_array_length_handler type.float)) (common.with extension/jvm.array_length_double (primitive_array_length_handler type.double)) (common.with extension/jvm.array_length_char (primitive_array_length_handler type.char)) - (common.with extension/jvm.array_length_object array::length::object) + (common.with extension/jvm.array_length_object array:length:object) (common.with extension/jvm.array_new_boolean (new_primitive_array_handler __.t_boolean)) (common.with extension/jvm.array_new_byte (new_primitive_array_handler __.t_byte)) @@ -491,7 +491,7 @@ (common.with extension/jvm.array_new_float (new_primitive_array_handler __.t_float)) (common.with extension/jvm.array_new_double (new_primitive_array_handler __.t_double)) (common.with extension/jvm.array_new_char (new_primitive_array_handler __.t_char)) - (common.with extension/jvm.array_new_object array::new::object) + (common.with extension/jvm.array_new_object array:new:object) (common.with extension/jvm.array_read_boolean (read_primitive_array_handler type.boolean _.baload)) (common.with extension/jvm.array_read_byte (read_primitive_array_handler type.byte _.baload)) @@ -501,7 +501,7 @@ (common.with extension/jvm.array_read_float (read_primitive_array_handler type.float _.faload)) (common.with extension/jvm.array_read_double (read_primitive_array_handler type.double _.daload)) (common.with extension/jvm.array_read_char (read_primitive_array_handler type.char _.caload)) - (common.with extension/jvm.array_read_object array::read::object) + (common.with extension/jvm.array_read_object array:read:object) (common.with extension/jvm.array_write_boolean (write_primitive_array_handler type.boolean _.bastore)) (common.with extension/jvm.array_write_byte (write_primitive_array_handler type.byte _.bastore)) @@ -511,20 +511,20 @@ (common.with extension/jvm.array_write_float (write_primitive_array_handler type.float _.fastore)) (common.with extension/jvm.array_write_double (write_primitive_array_handler type.double _.dastore)) (common.with extension/jvm.array_write_char (write_primitive_array_handler type.char _.castore)) - (common.with extension/jvm.array_write_object array::write::object) + (common.with extension/jvm.array_write_object array:write:object) )) -(the (object::null _) +(the (object:null _) (Nullary (Bytecode Any)) _.aconst_null) -(the (object::null? objectG) +(the (object:null? objectG) (Unary (Bytecode Any)) (all _.composite objectG (common.predicate _.ifnull))) -(the (object::synchronized [monitorG exprG]) +(the (object:synchronized [monitorG exprG]) (Binary (Bytecode Any)) (all _.composite monitorG @@ -537,7 +537,7 @@ (the unitG (_.string synthesis.unit)) -(the (object::throw exceptionG) +(the (object:throw exceptionG) (Unary (Bytecode Any)) (all _.composite exceptionG @@ -548,7 +548,7 @@ (the $Class (type.class (list) "java.lang.Class")) (the $String (type.class (list) "java.lang.String")) -(the object::class +(the object:class Handler (..custom [.text @@ -559,7 +559,7 @@ (_.string class) (_.invokestatic ..$Class "forName" (type.method [(list) (list ..$String) ..$Class (list)]))))))])) -(the object::instance? +(the object:instance? Handler (..custom [(all <>.and .text ?list.any) @@ -571,7 +571,7 @@ (_.instanceof (type.class (list) class)) (///value.boxed type.boolean)))))])) -(the object::cast +(the object:cast Handler (..custom [(all <>.and .text .text ?list.any) @@ -604,23 +604,23 @@ (the with_object (Change Bundle) - (|>> (common.with extension/jvm.object_null (nullary object::null)) - (common.with extension/jvm.object_null? (unary object::null?)) - (common.with extension/jvm.object_synchronized (binary object::synchronized)) - (common.with extension/jvm.object_throw (unary object::throw)) - (common.with extension/jvm.object_class object::class) - (common.with extension/jvm.object_instance? object::instance?) - (common.with extension/jvm.object_cast object::cast) + (|>> (common.with extension/jvm.object_null (nullary object:null)) + (common.with extension/jvm.object_null? (unary object:null?)) + (common.with extension/jvm.object_synchronized (binary object:synchronized)) + (common.with extension/jvm.object_throw (unary object:throw)) + (common.with extension/jvm.object_class object:class) + (common.with extension/jvm.object_instance? object:instance?) + (common.with extension/jvm.object_cast object:cast) )) -(the get::static +(the get:static Handler (..custom [(all <>.and .text .text ..value) (function (_ translate archive [class field :unboxed:]) (by phase.monad pure (_.getstatic (type.class (list) class) field :unboxed:)))])) -(the put::static +(the put:static Handler (..custom [(all <>.and .text .text ..value ?list.any) @@ -638,7 +638,7 @@ (_.putstatic (type.class (list) class) field :unboxed:) ..unitG))))])) -(the get::virtual +(the get:virtual Handler (..custom [(all <>.and .text .text ..value ?list.any) @@ -652,7 +652,7 @@ (_.checkcast :class:) getG))))])) -(the put::virtual +(the put:virtual Handler (..custom [(all <>.and .text .text ..value ?list.any ?list.any) @@ -707,7 +707,7 @@ {.:Left outputT} (_:pure []))) -(the invoke::static +(the invoke:static Handler (..custom [(all <>.and ..class .text ..return (<>.some ..input)) @@ -737,11 +737,11 @@ ( class method (type.method [(list) (list:each product.left inputsTG) outputT (list)])) (prepare_output outputT)))))]))] - [[1b invoke::virtual _.invokevirtual] - [0b invoke::special _.invokespecial] - [1b invoke::interface _.invokeinterface]]) + [[1b invoke:virtual _.invokevirtual] + [0b invoke:special _.invokespecial] + [1b invoke:interface _.invokeinterface]]) -(the invoke::constructor +(the invoke:constructor Handler (..custom [(all <>.and ..class (<>.some ..input)) @@ -756,17 +756,17 @@ (the with_member (Change Bundle) - (|>> (common.with extension/jvm.member_get_static get::static) - (common.with extension/jvm.member_get_virtual get::virtual) + (|>> (common.with extension/jvm.member_get_static get:static) + (common.with extension/jvm.member_get_virtual get:virtual) - (common.with extension/jvm.member_put_static put::static) - (common.with extension/jvm.member_put_virtual put::virtual) + (common.with extension/jvm.member_put_static put:static) + (common.with extension/jvm.member_put_virtual put:virtual) - (common.with extension/jvm.member_invoke_static invoke::static) - (common.with extension/jvm.member_invoke_virtual invoke::virtual) - (common.with extension/jvm.member_invoke_special invoke::special) - (common.with extension/jvm.member_invoke_interface invoke::interface) - (common.with extension/jvm.member_invoke_constructor invoke::constructor) + (common.with extension/jvm.member_invoke_static invoke:static) + (common.with extension/jvm.member_invoke_virtual invoke:virtual) + (common.with extension/jvm.member_invoke_special invoke:special) + (common.with extension/jvm.member_invoke_interface invoke:interface) + (common.with extension/jvm.member_invoke_constructor invoke:constructor) )) (the annotation_parameter @@ -1275,7 +1275,7 @@ bodyG (returnG returnT))}))))) -(the class::anonymous +(the class:anonymous Handler (..custom [(all <>.and @@ -1317,7 +1317,7 @@ (the with_class (Change Bundle) - (common.with extension/jvm.class_anonymous class::anonymous)) + (common.with extension/jvm.class_anonymous class:anonymous)) (the .public bundle Bundle diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/lua/host.lux b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/lua/host.lux index eefee23acd..f9321db158 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/lua/host.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/lua/host.lux @@ -33,7 +33,7 @@ ["[0]" synthesis ["?[1]" \\projection]]]]]) -(the object::get +(the object:get Handler (custom [(all <>.and ?synthesis.text ?list.any) @@ -42,7 +42,7 @@ [objectG (phase archive objectS)] (pure (_.its fieldS objectG))))])) -(the object::do +(the object:do Handler (custom [(all <>.and ?synthesis.text ?list.any (<>.some ?list.any)) @@ -56,21 +56,21 @@ [(the (Nullary Expression) (function.constant )) (the (Unary Expression) (_.= ))] - [[object::nil object::nil? _.nil]] + [[object:nil object:nil? _.nil]] ) (the with_object (-> Bundle Bundle) - (|>> (dictionary.has "lua_object_get#|translation" object::get) - (dictionary.has "lua_object_do#|translation" object::do) - (dictionary.has "lua_object_nil#|translation" (nullary object::nil)) - (dictionary.has "lua_object_nil?#|translation" (unary object::nil?)) + (|>> (dictionary.has "lua_object_get#|translation" object:get) + (dictionary.has "lua_object_do#|translation" object:do) + (dictionary.has "lua_object_nil#|translation" (nullary object:nil)) + (dictionary.has "lua_object_nil?#|translation" (unary object:nil?)) )) (the $input (_.var "input")) -(the utf8::encode +(the utf8:encode (custom [?list.any (function (_ phase archive inputS) @@ -82,7 +82,7 @@ (_.var "string.byte"))) (_.var "table.pack")))))))])) -(the utf8::decode +(the utf8:decode (custom [?list.any (function (_ phase archive inputS) @@ -94,17 +94,17 @@ (the with_utf8 (-> Bundle Bundle) - (|>> (dictionary.has "lua_utf8_injection#|translation" utf8::encode) - (dictionary.has "lua_utf8_projection#|translation" utf8::decode) + (|>> (dictionary.has "lua_utf8_injection#|translation" utf8:encode) + (dictionary.has "lua_utf8_projection#|translation" utf8:decode) )) -(the lua::constant +(the lua:constant (custom [?synthesis.text (function (_ phase archive name) (by phase.monad pure (_.var name)))])) -(the lua::of +(the lua:of (custom [(all <>.and ?list.any (<>.some ?list.any)) (function (_ phase archive [abstractionS inputsS]) @@ -113,7 +113,7 @@ inputsG (list.each' ! (phase archive) inputsS)] (pure (_.of inputsG abstractionG))))])) -(the lua::power +(the lua:power (custom [(all <>.and ?list.any ?list.any) (function (_ phase archive [powerS baseS]) @@ -122,14 +122,14 @@ baseG (phase archive baseS)] (pure (_.^ powerG baseG))))])) -(the lua::import +(the lua:import (custom [?synthesis.text (function (_ phase archive module) (by phase.monad pure (_.require/1 (_.string module))))])) -(the lua::function +(the lua:function (custom [(all <>.and ?synthesis.i64 ?list.any) (function (_ phase archive [arity abstractionS]) @@ -154,9 +154,9 @@ with_object with_utf8 - (dictionary.has "lua_constant#|translation" lua::constant) - (dictionary.has "lua_of#|translation" lua::of) - (dictionary.has "lua_power#|translation" lua::power) - (dictionary.has "lua_import#|translation" lua::import) - (dictionary.has "lua_function#|translation" lua::function) + (dictionary.has "lua_constant#|translation" lua:constant) + (dictionary.has "lua_of#|translation" lua:of) + (dictionary.has "lua_power#|translation" lua:power) + (dictionary.has "lua_import#|translation" lua:import) + (dictionary.has "lua_function#|translation" lua:function) )) diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/php/common.lux b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/php/common.lux index 38069cc58d..9ddba5caf3 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/php/common.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/php/common.lux @@ -46,7 +46,7 @@ (|>> stack _.of (|> (_.constant function))))) ... TODO: Get rid of this ASAP -(the lux::syntax_char_case! +(the lux:syntax_char_case! (..custom [(all <>.and .any .any @@ -93,7 +93,7 @@ (the lux_procs Bundle (|> /.empty - (/.install "syntax char case!" lux::syntax_char_case!) + (/.install "syntax char case!" lux:syntax_char_case!) (/.install "is" (binary (product.uncurried _.===))) (/.install "try" (unary //runtime.lux//try)) )) diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/php/host.lux b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/php/host.lux index 059264a691..3a92f55d1c 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/php/host.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/php/host.lux @@ -35,19 +35,19 @@ ["//[1]" /// ["[1][0]" phase]]]]]]) -(the (array::new size) +(the (array:new size) (Unary Expression) (//runtime.tuple//make size (_.array_fill/3 [(_.int +0) size _.null]))) -(the (array::read [indexG arrayG]) +(the (array:read [indexG arrayG]) (Binary Expression) (_.item indexG arrayG)) -(the (array::write [indexG valueG arrayG]) +(the (array:write [indexG valueG arrayG]) (Trinary Expression) (//runtime.array//write indexG valueG arrayG)) -(the (array::delete [indexG arrayG]) +(the (array:delete [indexG arrayG]) (Binary Expression) (//runtime.array//write indexG _.null arrayG)) @@ -55,14 +55,14 @@ Bundle (<| (/.prefix "array") (|> /.empty - (/.install "new" (unary array::new)) + (/.install "new" (unary array:new)) (/.install "length" (unary //runtime.array//length)) - (/.install "read" (binary array::read)) - (/.install "write" (trinary array::write)) - (/.install "delete" (binary array::delete)) + (/.install "read" (binary array:read)) + (/.install "write" (trinary array:write)) + (/.install "delete" (binary array:delete)) ))) -(the object::new +(the object:new (custom [(all <>.and .text (<>.some .any)) (function (_ extension phase archive [constructor inputsS]) @@ -70,7 +70,7 @@ [inputsG (stack.each' ! (phase archive) inputsS)] (pure (_.new (_.constant constructor) inputsG))))])) -(the object::get +(the object:get Handler (custom [(all <>.and .text .any) @@ -79,7 +79,7 @@ [objectG (phase archive objectS)] (pure (_.its fieldS objectG))))])) -(the object::do +(the object:do Handler (custom [(all <>.and .text .any (<>.some .any)) @@ -93,27 +93,27 @@ [(the (Nullary Expression) (function.constant )) (the (Unary Expression) (_.=== ))] - [[object::null object::null? _.null]] + [[object:null object:null? _.null]] ) (the object Bundle (<| (/.prefix "object") (|> /.empty - (/.install "new" object::new) - (/.install "get" object::get) - (/.install "do" object::do) - (/.install "null" (nullary object::null)) - (/.install "null?" (unary object::null?)) + (/.install "new" object:new) + (/.install "get" object:get) + (/.install "do" object:do) + (/.install "null" (nullary object:null)) + (/.install "null?" (unary object:null?)) ))) -(the php::constant +(the php:constant (custom [.text (function (_ extension phase archive name) (by ////////phase.monad pure (_.constant name)))])) -(the php::of +(the php:of (custom [(all <>.and .any (<>.some .any)) (function (_ extension phase archive [abstractionS inputsS]) @@ -122,7 +122,7 @@ inputsG (stack.each' ! (phase archive) inputsS)] (pure (_.of inputsG abstractionG))))])) -(the php::pack +(the php:pack (custom [(all <>.and .any .any) (function (_ extension phase archive [formatS dataS]) @@ -138,8 +138,8 @@ (dictionary.composite ..array) (dictionary.composite ..object) - (/.install "constant" php::constant) - (/.install "of" php::of) - (/.install "pack" php::pack) + (/.install "constant" php:constant) + (/.install "of" php:of) + (/.install "pack" php:pack) (/.install "script universe" (nullary (function.constant (_.bool reference.universe)))) ))) diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/python/common.lux b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/python/common.lux index c5e0189920..d49712854c 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/python/common.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/python/common.lux @@ -133,7 +133,7 @@ ))) ... TODO: Get rid of this ASAP -(the lux::syntax_char_case! +(the lux:syntax_char_case! (..custom [(all <>.and ?list.any ?list.any @@ -188,22 +188,22 @@ (the with_basic (-> Bundle Bundle) - (|>> (dictionary.has "when_char#|translation" lux::syntax_char_case!) + (|>> (dictionary.has "when_char#|translation" lux:syntax_char_case!) (dictionary.has "is?#|translation" (binary (product.uncurried _.is))) - (dictionary.has "try#|translation" (unary //runtime.lux::try)))) + (dictionary.has "try#|translation" (unary //runtime.lux:try)))) (the (capped operation parameter subject) (-> (-> _.Expression _.Expression _.Expression) (-> _.Expression _.Expression _.Expression)) - (//runtime.i64::64 (operation parameter subject))) + (//runtime.i64:64 (operation parameter subject))) (the with_i64 (-> Bundle Bundle) - (|>> (dictionary.has "i64_and#|translation" (binary (product.uncurried //runtime.i64::and))) - (dictionary.has "i64_or#|translation" (binary (product.uncurried //runtime.i64::or))) - (dictionary.has "i64_xor#|translation" (binary (product.uncurried //runtime.i64::xor))) - (dictionary.has "i64_left#|translation" (binary (product.uncurried //runtime.i64::<<))) - (dictionary.has "i64_right#|translation" (binary (product.uncurried //runtime.i64::>>))) + (|>> (dictionary.has "i64_and#|translation" (binary (product.uncurried //runtime.i64:and))) + (dictionary.has "i64_or#|translation" (binary (product.uncurried //runtime.i64:or))) + (dictionary.has "i64_xor#|translation" (binary (product.uncurried //runtime.i64:xor))) + (dictionary.has "i64_left#|translation" (binary (product.uncurried //runtime.i64:<<))) + (dictionary.has "i64_right#|translation" (binary (product.uncurried //runtime.i64:>>))) (dictionary.has "i64_=#|translation" (binary (product.uncurried _.=))) (dictionary.has "i64_+#|translation" (binary (product.uncurried (..capped _.+)))) @@ -215,10 +215,10 @@ (|>> (dictionary.has "int_<#|translation" (binary (product.uncurried _.<))) (dictionary.has "int_x#|translation" (binary (product.uncurried (..capped _.*)))) (dictionary.has "int_/#|translation" (binary (product.uncurried //runtime.i64:/))) - (dictionary.has "int_%#|translation" (binary (product.uncurried //runtime.i64::remainder))) + (dictionary.has "int_%#|translation" (binary (product.uncurried //runtime.i64:remainder))) (dictionary.has "int_f64#|translation" (unary _.float/1)) - (dictionary.has "int_char#|translation" (unary //runtime.i64::char)) + (dictionary.has "int_char#|translation" (unary //runtime.i64:char)) )) (the with_decimal @@ -226,7 +226,7 @@ (|>> (dictionary.has "f64_+#|translation" (binary (product.uncurried _.+))) (dictionary.has "f64_-#|translation" (binary (product.uncurried _.-))) (dictionary.has "f64_x#|translation" (binary (product.uncurried _.*))) - (dictionary.has "f64_/#|translation" (binary (product.uncurried //runtime.f64::/))) + (dictionary.has "f64_/#|translation" (binary (product.uncurried //runtime.f64:/))) (dictionary.has "f64_%#|translation" (binary (function (_ [parameter subject]) (|> (_.__import__/1 (_.unicode "math")) (_.do "fmod" (.list subject parameter)))))) @@ -234,15 +234,15 @@ (dictionary.has "f64_<#|translation" (binary (product.uncurried _.<))) (dictionary.has "f64_int#|translation" (unary _.int/1)))) -(the (text::clip [paramO extraO subjectO]) +(the (text:clip [paramO extraO subjectO]) (Trinary _.Expression) - (//runtime.text::clip paramO extraO subjectO)) + (//runtime.text:clip paramO extraO subjectO)) -(the (text::index [startO partO textO]) +(the (text:index [startO partO textO]) (Trinary _.Expression) - (//runtime.text::index startO partO textO)) + (//runtime.text:index startO partO textO)) -(the (text::composite it) +(the (text:composite it) (Variadic _.Expression) (when it (.list) @@ -255,24 +255,24 @@ (|> left (_.+ right)) parts - (|> (text::composite (.list)) + (|> (text:composite (.list)) (_.do "join" (.list (_.list parts)))))) (the with_text (-> Bundle Bundle) (|>> (dictionary.has "text_=#|translation" (binary (product.uncurried _.=))) (dictionary.has "text_<#|translation" (binary (product.uncurried _.<))) - (dictionary.has "text_composite#|translation" (variadic ..text::composite)) - (dictionary.has "text_index#|translation" (trinary ..text::index)) + (dictionary.has "text_composite#|translation" (variadic ..text:composite)) + (dictionary.has "text_index#|translation" (trinary ..text:index)) (dictionary.has "text_size#|translation" (unary _.len/1)) - (dictionary.has "text_char#|translation" (binary (product.uncurried //runtime.text::char))) - (dictionary.has "text_clip#|translation" (trinary ..text::clip)) + (dictionary.has "text_char#|translation" (binary (product.uncurried //runtime.text:char))) + (dictionary.has "text_clip#|translation" (trinary ..text:clip)) )) (the with_io (-> Bundle Bundle) - (|>> (dictionary.has "log!#|translation" (unary //runtime.io::log!)) - (dictionary.has "error#|translation" (unary //runtime.io::throw!)) + (|>> (dictionary.has "log!#|translation" (unary //runtime.io:log!)) + (dictionary.has "error#|translation" (unary //runtime.io:throw!)) )) (the list @@ -282,7 +282,7 @@ (the list_size (Unary _.Expression) (|>> _.len/1 - //runtime.i64::64)) + //runtime.i64:64)) (the (list_item [address it]) (Binary _.Expression) @@ -321,7 +321,7 @@ (the (array_has [address value it]) (Trinary _.Expression) - (//runtime.array::write address value it)) + (//runtime.array:write address value it)) (the (array_lacks [address it]) (Binary _.Expression) diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/python/host.lux b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/python/host.lux index 7bd44596c8..267b5c1ba0 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/python/host.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/python/host.lux @@ -33,7 +33,7 @@ ["[0]" synthesis ["?[1]" \\projection]]]]]) -(the object::get +(the object:get Handler (custom [(all <>.and ?synthesis.text ?list.any) @@ -42,7 +42,7 @@ [objectG (phase archive objectS)] (pure (_.its fieldS objectG))))])) -(the object::do +(the object:do Handler (custom [(all <>.and ?synthesis.text ?list.any (<>.some ?list.any)) @@ -56,18 +56,18 @@ [(the (Nullary Expression) (function.constant )) (the (Unary Expression) (_.= ))] - [[object::none object::none? _.none]] + [[object:none object:none? _.none]] ) (the with_object (-> Bundle Bundle) - (|>> (dictionary.has "python_object_get#|translation" object::get) - (dictionary.has "python_object_do#|translation" object::do) - (dictionary.has "python_object_none#|translation" (nullary object::none)) - (dictionary.has "python_object_none?#|translation" (unary object::none?)) + (|>> (dictionary.has "python_object_get#|translation" object:get) + (dictionary.has "python_object_do#|translation" object:do) + (dictionary.has "python_object_none#|translation" (nullary object:none)) + (dictionary.has "python_object_none?#|translation" (unary object:none?)) )) -(the python::constant +(the python:constant (custom [?synthesis.text (function (_ phase archive name) @@ -75,7 +75,7 @@ [] (pure (_.var name))))])) -(the python::import +(the python:import (custom [?synthesis.text (function (_ phase archive module) @@ -87,7 +87,7 @@ (_.list (list (_.string "")))) (_.var "__import__")))))])) -(the python::of +(the python:of (custom [(all <>.and ?list.any (<>.some ?list.any)) (function (_ phase archive [abstractionS inputsS]) @@ -96,7 +96,7 @@ inputsG (list.each' ! (phase archive) inputsS)] (pure (_.of inputsG abstractionG))))])) -(the python::function +(the python:function (custom [(all <>.and ?synthesis.i64 ?list.any) (function (_ phase archive [arity abstractionS]) @@ -113,23 +113,23 @@ 1 (_.of 'inputs abstractionG) _ (_.of (list (_.list 'inputs)) abstractionG))))))])) -(the python::exec +(the python:exec (custom [(all <>.and ?list.any ?list.any) (function (_ phase archive [codeS globalsS]) (monad.let [! phase.monad] [codeG (phase archive codeS) globalsG (phase archive globalsS)] - (pure (//runtime.lux::exec codeG globalsG))))])) + (pure (//runtime.lux:exec codeG globalsG))))])) (the .public bundle Bundle (|> extension.empty with_object - (dictionary.has "python_constant#|translation" python::constant) - (dictionary.has "python_import#|translation" python::import) - (dictionary.has "python_of#|translation" python::of) - (dictionary.has "python_function#|translation" python::function) - (dictionary.has "python_exec#|translation" python::exec) + (dictionary.has "python_constant#|translation" python:constant) + (dictionary.has "python_import#|translation" python:import) + (dictionary.has "python_of#|translation" python:of) + (dictionary.has "python_function#|translation" python:function) + (dictionary.has "python_exec#|translation" python:exec) )) diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/r/common.lux b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/r/common.lux index 1dc1e38fbe..d776eca0bf 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/r/common.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/r/common.lux @@ -43,7 +43,7 @@ ... (|>> stack _.of (|> (_.constant function))))) ... ... ... TODO: Get rid of this ASAP -... ... (the lux::syntax_char_case! +... ... (the lux:syntax_char_case! ... ... (..custom [(all <>.and ... ... .any ... ... .any @@ -71,7 +71,7 @@ ... (the lux_procs ... Bundle ... (|> /.empty -... ... (/.install "syntax char case!" lux::syntax_char_case!) +... ... (/.install "syntax char case!" lux:syntax_char_case!) ... (/.install "is" (binary _.eq/2)) ... ... (/.install "try" (unary //runtime.lux//try)) ... )) diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/ruby/common.lux b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/ruby/common.lux index 38727620c3..c0d41ecf79 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/ruby/common.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/ruby/common.lux @@ -138,7 +138,7 @@ ))) ... TODO: Get rid of this ASAP -(the lux::syntax_char_case! +(the lux:syntax_char_case! (..custom [(all <>.and ?list.any ?list.any @@ -180,34 +180,34 @@ (the with_basic (-> Bundle Bundle) - (|>> (dictionary.has "when_char#|translation" lux::syntax_char_case!) + (|>> (dictionary.has "when_char#|translation" lux:syntax_char_case!) (dictionary.has "is?#|translation" (binary (function (_ [expected actual]) (_.do "equal?" (.list expected) {.:None} actual)))) (dictionary.has "try#|translation" (unary //runtime.lux//try)))) (the with_i64 (-> Bundle Bundle) - (|>> (dictionary.has "i64_and#|translation" (binary (product.uncurried //runtime.i64::and))) - (dictionary.has "i64_or#|translation" (binary (product.uncurried //runtime.i64::or))) - (dictionary.has "i64_xor#|translation" (binary (product.uncurried //runtime.i64::xor))) - (dictionary.has "i64_left#|translation" (binary (product.uncurried //runtime.i64::<<))) - (dictionary.has "i64_right#|translation" (binary (product.uncurried //runtime.i64::>>))) + (|>> (dictionary.has "i64_and#|translation" (binary (product.uncurried //runtime.i64:and))) + (dictionary.has "i64_or#|translation" (binary (product.uncurried //runtime.i64:or))) + (dictionary.has "i64_xor#|translation" (binary (product.uncurried //runtime.i64:xor))) + (dictionary.has "i64_left#|translation" (binary (product.uncurried //runtime.i64:<<))) + (dictionary.has "i64_right#|translation" (binary (product.uncurried //runtime.i64:>>))) (dictionary.has "i64_=#|translation" (binary (product.uncurried _.=))) - (dictionary.has "i64_+#|translation" (binary (product.uncurried //runtime.i64::+))) - (dictionary.has "i64_-#|translation" (binary (product.uncurried //runtime.i64::-))) + (dictionary.has "i64_+#|translation" (binary (product.uncurried //runtime.i64:+))) + (dictionary.has "i64_-#|translation" (binary (product.uncurried //runtime.i64:-))) )) (the with_integer (-> Bundle Bundle) (|>> (dictionary.has "int_<#|translation" (binary (product.uncurried _.<))) - (dictionary.has "int_x#|translation" (binary (product.uncurried //runtime.i64::x))) - (dictionary.has "int_/#|translation" (binary (product.uncurried //runtime.i64::/))) + (dictionary.has "int_x#|translation" (binary (product.uncurried //runtime.i64:x))) + (dictionary.has "int_/#|translation" (binary (product.uncurried //runtime.i64:/))) (dictionary.has "int_%#|translation" (binary (function (_ [parameter subject]) (_.do "remainder" (.list parameter) {.:None} subject)))) (dictionary.has "int_f64#|translation" (unary (_./ (_.float +1.0)))) - (dictionary.has "int_char#|translation" (unary //runtime.i64::char)) + (dictionary.has "int_char#|translation" (unary //runtime.i64:char)) )) (the with_f64 diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/ruby/host.lux b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/ruby/host.lux index c4cb37edd3..c540dbaede 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/ruby/host.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/extension/translation/ruby/host.lux @@ -32,7 +32,7 @@ ["[0]" synthesis ["?[1]" \\projection]]]]]) -(the object::get +(the object:get Handler (custom [(all ?.and ?synthesis.text ?list.any) @@ -41,7 +41,7 @@ [objectG (phase archive objectS)] (pure (_.its fieldS objectG))))])) -(the object::do +(the object:do Handler (custom [(all ?.and @@ -58,24 +58,24 @@ [(the (Nullary Expression) (function.constant )) (the (Unary Expression) (_.= ))] - [[object::nil object::nil? _.nil]] + [[object:nil object:nil? _.nil]] ) (the with_object (-> Bundle Bundle) - (|>> (dictionary.has "ruby_object_get#|translation" object::get) - (dictionary.has "ruby_object_do#|translation" object::do) - (dictionary.has "ruby_object_nil#|translation" (nullary object::nil)) - (dictionary.has "ruby_object_nil?#|translation" (unary object::nil?)) + (|>> (dictionary.has "ruby_object_get#|translation" object:get) + (dictionary.has "ruby_object_do#|translation" object:do) + (dictionary.has "ruby_object_nil#|translation" (nullary object:nil)) + (dictionary.has "ruby_object_nil?#|translation" (unary object:nil?)) )) -(the ruby::constant +(the ruby:constant (custom [?synthesis.text (function (_ phase archive name) (by phase.monad pure (is _.CVar (_.manual name))))])) -(the ruby::of +(the ruby:of (custom [(all ?.and ?list.any @@ -86,7 +86,7 @@ inputsG (list.each' ! (phase archive) inputsS)] (pure (_.of inputsG {.:None} abstractionG))))])) -(the ruby::import +(the ruby:import (custom [?synthesis.text (function (_ phase archive module) @@ -98,7 +98,7 @@ (|> extension.empty with_object - (dictionary.has "ruby_constant#|translation" ruby::constant) - (dictionary.has "ruby_of#|translation" ruby::of) - (dictionary.has "ruby_import#|translation" ruby::import) + (dictionary.has "ruby_constant#|translation" ruby:constant) + (dictionary.has "ruby_of#|translation" ruby:of) + (dictionary.has "ruby_import#|translation" ruby:import) )) diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/synthesis/when.lux b/stdlib/source/library/lux/compiler/language/lux/phase/synthesis/when.lux index a52740981d..0aeb1765fd 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/synthesis/when.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/synthesis/when.lux @@ -94,20 +94,20 @@ thenC) {@type.:Complex_Pattern {@type.:Complex_Tuple tuple}} - (let [tuple::last (-- (list.size tuple))] - (list:mix (function (_ [tuple::lefts tuple::member] nextC) - (.when tuple::member + (let [tuple:last (-- (list.size tuple))] + (list:mix (function (_ [tuple:lefts tuple:member] nextC) + (.when tuple:member {@type.:Simple_Pattern {@type.:Simple_Unit}} nextC _ - (let [right? (n.= tuple::last tuple::lefts) + (let [right? (n.= tuple:last tuple:lefts) end?' (and end? right?)] (<| (phase:each (|>> {/.:Seq {/.:Access {/access.:Member [/member.:lefts (if right? - (-- tuple::lefts) - tuple::lefts) + (-- tuple:lefts) + tuple:lefts) /member.:right? right?]}}})) - (path' tuple::member end?') + (path' tuple:member end?') (pipe.if [(pipe.new (not end?') [])] [(phase:each ..clean_up)] ... else diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/translation/c++/runtime.lux b/stdlib/source/library/lux/compiler/language/lux/phase/translation/c++/runtime.lux index 69d51b67b6..a277b4342d 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/translation/c++/runtime.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/translation/c++/runtime.lux @@ -122,19 +122,19 @@ (..name) (..name) - (..name) - (..name) - (..name) + (..name) + (..name) + (..name) - (..name) - (..name) + (..name) + (..name) - (..name) + (..name) (..name) (..name) (..name) - (..name)] + (..name)] (these (template.with [ ] [(the .public Natural @@ -159,12 +159,12 @@ [lux_i64 ] [lux_text ] - [variant::lefts ] - [variant::right? ] - [variant::choice ] + [variant:lefts ] + [variant:right? ] + [variant:choice ] - [tuple::arity ] - [tuple::member ]] + [tuple:arity ] + [tuple:member ]] ) (the object_type @@ -234,7 +234,7 @@ (clean_up of)) (_.global [(list _.standard) "shared_ptr"] (list object_type)))) - (the (std::data it) + (the (std:data it) (-> _.Expression _.Expression) (_.of (list it) @@ -244,9 +244,9 @@ (-> (List _.Expression) _.Expression _.Expression) (_.of (list (|> arguments list.size .integer _.int) - (std::data (_.structure (type.initializer_list ..value_type) arguments)) + (std:data (_.structure (type.initializer_list ..value_type) arguments)) abstraction) - (_.global [(list ..namespace) ] (list)))) + (_.global [(list ..namespace) ] (list)))) (the .public (host_value of it) (-> _.Type _.Expression @@ -337,7 +337,7 @@ (-> _.Expression _.Expression) (_.of (list it) - (_.global [(list ..namespace) ] (list)))) + (_.global [(list ..namespace) ] (list)))) (the .public (push of top bottom) (-> _.Type _.Expression _.Expression @@ -719,7 +719,7 @@ (list (<| _.destructor (_.delete_array partials)))])) - (let [function::on (_.local ) + (let [function:on (_.local ) current_arity (_.local (..name)) arguments (_.local (..name)) @@ -865,10 +865,10 @@ (_.constant output ..value_type (_.of (list new_partiality new_partials temporary) - function::on)) + function:on)) (_.delete_array new_partials) (_.return output)))))] - (_.function function::on + (_.function function:on (list) (list [current_arity //type.arity] [arguments ..arguments_type] @@ -914,7 +914,7 @@ (let [stack (type.address (..stack of)) it (_.local (..name)) bottom (_.local (..name))] - (_.function (_.local ) + (_.function (_.local ) (list of) (list [it stack]) stack @@ -998,13 +998,13 @@ (_.return (_.its* (host_value ..variant_type it)))))] - [[ //type.i64] - [ //type.bit] - [ ..value_type]] + [[ //type.i64] + [ //type.bit] + [ ..value_type]] )) (let [it (_.local (..name))] - (_.function (_.local ) + (_.function (_.local ) (list) (list [it ..value_type]) //type.i64 @@ -1012,7 +1012,7 @@ (let [item (_.local (..name)) it (_.local (..name))] - (_.function (_.local ) + (_.function (_.local ) (list) (list [item //type.i64] [it ..value_type]) diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/translation/js/runtime.lux b/stdlib/source/library/lux/compiler/language/lux/phase/translation/js/runtime.lux index 0afb6484df..05bc0b0138 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/translation/js/runtime.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/translation/js/runtime.lux @@ -214,31 +214,31 @@ Computation) (_.new ..variant//new (list tag last? value))) -(the (sum//get sum expected::right? expected::lefts) +(the (sum//get sum expected:right? expected:lefts) (let [mismatch! (_.return _.null) - actual::lefts (|> sum (_.its ..variant_tag_field)) - actual::right? (|> sum (_.its ..variant_flag_field)) - actual::value (|> sum (_.its ..variant_value_field)) + actual:lefts (|> sum (_.its ..variant_tag_field)) + actual:right? (|> sum (_.its ..variant_flag_field)) + actual:value (|> sum (_.its ..variant_value_field)) recur! (all _.then - (_.; (_.set expected::lefts (|> expected::lefts - (_.- actual::lefts) - (_.- (_.i32 +1))))) - (_.; (_.set sum actual::value)))] + (_.; (_.set expected:lefts (|> expected:lefts + (_.- actual:lefts) + (_.- (_.i32 +1))))) + (_.; (_.set sum actual:value)))] (<| (_.while (_.boolean true)) - (_.if (_.= expected::lefts actual::lefts) - (_.if (_.= expected::right? actual::right?) - (_.return actual::value) + (_.if (_.= expected:lefts actual:lefts) + (_.if (_.= expected:right? actual:right?) + (_.return actual:value) mismatch!)) - (_.if (_.< expected::lefts actual::lefts) - (_.if (_.= ..unit actual::right?) + (_.if (_.< expected:lefts actual:lefts) + (_.if (_.= ..unit actual:right?) recur! mismatch!)) - (_.if (_.= ..unit expected::right?) - (_.return (..variant (|> actual::lefts - (_.- expected::lefts) + (_.if (_.= ..unit expected:right?) + (_.return (..variant (|> actual:lefts + (_.- expected:lefts) (_.- (_.i32 +1))) - actual::right? - actual::value))) + actual:right? + actual:value))) mismatch!))) (.the left @@ -296,7 +296,7 @@ (.the .public i64_low_field script.i64_low) (.the .public i64_high_field script.i64_high) -(the i64::new +(the i64:new (let [@this (_.var "this")] (with_vars [high low] (_.closure (list high low) @@ -308,7 +308,7 @@ (.the .public (i64 high low) (-> _.Expression _.Expression Computation) - (_.new ..i64::new (list high low))) + (_.new ..i64:new (list high low))) (template.with [ ] [(the ( subject parameter) @@ -317,12 +317,12 @@ ( (_.its ..i64_low_field subject) (_.its ..i64_low_field parameter)))))] - [[i64::xor _.bit_xor] - [i64::or _.bit_or] - [i64::and _.bit_and]] + [[i64:xor _.bit_xor] + [i64:or _.bit_or] + [i64:and _.bit_and]] ) -(the (i64::not value) +(the (i64:not value) (_.return (..i64 (_.bit_not (_.its ..i64_high_field value)) (_.bit_not (_.its ..i64_low_field value))))) @@ -343,7 +343,7 @@ _.Expression) (|>> (_.< (_.i32 +32)))) -(the (i64::<< input shift) +(the (i64:<< input shift) (all _.then (..cap_shift! shift) (_.return (<| (..no_shift! shift input) @@ -356,7 +356,7 @@ (..i64 high (_.i32 +0))))) )) -(the (i64::arithmetic_>> input shift) +(the (i64:arithmetic_>> input shift) (all _.then (..cap_shift! shift) (_.return (<| (..no_shift! shift input) @@ -371,7 +371,7 @@ low (|> input (_.its ..i64_high_field) (_.arithmetic_right_shift (_.- (_.i32 +32) shift)))] (..i64 high low)))))) -(the (i64::>> input shift) +(the (i64:>> input shift) (all _.then (..cap_shift! shift) (_.return (<| (..no_shift! shift input) @@ -388,59 +388,59 @@ (.the runtime//bit _.Statement (all _.then - @i64::and - @i64::or - @i64::xor - @i64::not - @i64::<< - @i64::arithmetic_>> - @i64::>> + @i64:and + @i64:or + @i64:xor + @i64:not + @i64:<< + @i64:arithmetic_>> + @i64:>> )) -(the i64::2^16 +(the i64:2^16 (_.left_shift (_.i32 +16) (_.i32 +1))) -(the i64::2^32 - (_.* i64::2^16 i64::2^16)) +(the i64:2^32 + (_.* i64:2^16 i64:2^16)) -(the i64::2^64 - (_.* i64::2^32 i64::2^32)) +(the i64:2^64 + (_.* i64:2^32 i64:2^32)) -(the i64::2^63 - (|> i64::2^64 (_./ (_.i32 +2)))) +(the i64:2^63 + (|> i64:2^64 (_./ (_.i32 +2)))) -(the (i64::unsigned_low i64) +(the (i64:unsigned_low i64) (_.return (_.? (|> i64 (_.its ..i64_low_field) (_.>= (_.i32 +0))) (|> i64 (_.its ..i64_low_field)) - (|> i64 (_.its ..i64_low_field) (_.+ i64::2^32))))) + (|> i64 (_.its ..i64_low_field) (_.+ i64:2^32))))) -(the (i64::number i64) +(the (i64:number i64) (_.return (|> i64 (_.its ..i64_high_field) - (_.* i64::2^32) - (_.+ (i64::unsigned_low i64))))) + (_.* i64:2^32) + (_.+ (i64:unsigned_low i64))))) -(the i64::zero +(the i64:zero (..i64 (_.i32 +0) (_.i32 +0))) -(the i64::minimum +(the i64:minimum (..i64 (_.i32 (.integer (number.base_16 "80,00,00,00"))) (_.i32 +0))) -(the i64::maximum +(the i64:maximum (..i64 (_.i32 (.integer (number.base_16 "7F,FF,FF,FF"))) (_.i32 (.integer (number.base_16 "FF,FF,FF,FF"))))) -(the i64::one +(the i64:one (..i64 (_.i32 +0) (_.i32 +1))) -(the (i64::= expected actual) +(the (i64:= expected actual) (_.return (_.and (_.= (_.its ..i64_high_field expected) (_.its ..i64_high_field actual)) (_.= (_.its ..i64_low_field expected) (_.its ..i64_low_field actual))))) -(the (i64::+ parameter subject) +(the (i64:+ parameter subject) (let [up_16 (_.left_shift (_.i32 +16)) high_16 (_.logic_right_shift (_.i32 +16)) low_16 (_.bit_and (_.i32 (.integer (number.base_16 "FFFF")))) @@ -484,30 +484,30 @@ (_.bit_or (up_16 x16) x00))) )))) -(the (i64::opposite value) - (_.return (_.? (i64::= i64::minimum value) - i64::minimum - (i64::+ i64::one (i64::not value))))) +(the (i64:opposite value) + (_.return (_.? (i64:= i64:minimum value) + i64:minimum + (i64:+ i64:one (i64:not value))))) -(the i64::-one - (i64::opposite i64::one)) +(the i64:-one + (i64:opposite i64:one)) -(the (i64::of_number value) +(the (i64:of_number value) (_.return (<| (_.? (_.not_a_number? value) - i64::zero) - (_.? (_.<= (_.opposite i64::2^63) value) - i64::minimum) - (_.? (|> value (_.+ (_.i32 +1)) (_.>= i64::2^63)) - i64::maximum) + i64:zero) + (_.? (_.<= (_.opposite i64:2^63) value) + i64:minimum) + (_.? (|> value (_.+ (_.i32 +1)) (_.>= i64:2^63)) + i64:maximum) (_.? (|> value (_.< (_.i32 +0))) - (|> value _.opposite i64::of_number i64::opposite)) - (..i64 (|> value (_./ i64::2^32) _.to_i32) - (|> value (_.% i64::2^32) _.to_i32))))) + (|> value _.opposite i64:of_number i64:opposite)) + (..i64 (|> value (_./ i64:2^32) _.to_i32) + (|> value (_.% i64:2^32) _.to_i32))))) -(the (i64::- parameter subject) - (_.return (i64::+ (i64::opposite parameter) subject))) +(the (i64:- parameter subject) + (_.return (i64:+ (i64:opposite parameter) subject))) -(the (i64::x parameter subject) +(the (i64:x parameter subject) (let [up_16 (_.left_shift (_.i32 +16)) high_16 (_.logic_right_shift (_.i32 +16)) low_16 (_.bit_and (_.i32 (.integer (number.base_16 "FFFF")))) @@ -558,7 +558,7 @@ (_.bit_or (up_16 x16) x00))) )))) -(the (i64::< parameter subject) +(the (i64:< parameter subject) (let [negative? (|>> (_.its ..i64_high_field) (_.< (_.i32 +0)))] (with_vars [-subject? -parameter?] (all _.then @@ -568,67 +568,67 @@ (_.boolean true)) (_.? (_.and (_.not -subject?) -parameter?) (_.boolean false)) - (negative? (i64::- parameter subject)))) + (negative? (i64:- parameter subject)))) )))) -(.the (i64::<= param subject) +(.the (i64:<= param subject) (-> _.Expression _.Expression _.Expression) - (|> (i64::< param subject) - (_.or (i64::= param subject)))) + (|> (i64:< param subject) + (_.or (i64:= param subject)))) (.the negative? - (i64::< i64::zero)) + (i64:< i64:zero)) -(the (i64::/ parameter subject) - (<| (_.if (i64::= i64::zero parameter) +(the (i64:/ parameter subject) + (<| (_.if (i64:= i64:zero parameter) (_.throw (_.string "Cannot divide by zero!"))) - (_.if (i64::= i64::zero subject) - (_.return i64::zero)) - (_.if (i64::= i64::minimum subject) - (<| (_.if (_.or (i64::= i64::one parameter) - (i64::= i64::-one parameter)) - (_.return i64::minimum)) - (_.if (i64::= i64::minimum parameter) - (_.return i64::one)) + (_.if (i64:= i64:zero subject) + (_.return i64:zero)) + (_.if (i64:= i64:minimum subject) + (<| (_.if (_.or (i64:= i64:one parameter) + (i64:= i64:-one parameter)) + (_.return i64:minimum)) + (_.if (i64:= i64:minimum parameter) + (_.return i64:one)) (with_vars [approximation] - (let [subject/2 (..i64::arithmetic_>> subject (_.i32 +1))] + (let [subject/2 (..i64:arithmetic_>> subject (_.i32 +1))] (all _.then - (_.define approximation (i64::<< (i64::/ parameter - subject/2) - (_.i32 +1))) - (_.if (i64::= i64::zero approximation) + (_.define approximation (i64:<< (i64:/ parameter + subject/2) + (_.i32 +1))) + (_.if (i64:= i64:zero approximation) (_.return (_.? (..negative? parameter) - i64::one - i64::-one)) - (let [remainder (i64::- (i64::x approximation - parameter) - subject)] - (_.return (i64::+ (i64::/ parameter - remainder) - approximation))))))))) - (_.if (i64::= i64::minimum parameter) - (_.return i64::zero)) + i64:one + i64:-one)) + (let [remainder (i64:- (i64:x approximation + parameter) + subject)] + (_.return (i64:+ (i64:/ parameter + remainder) + approximation))))))))) + (_.if (i64:= i64:minimum parameter) + (_.return i64:zero)) (_.if (..negative? subject) (_.return (_.? (..negative? parameter) - (i64::/ (i64::opposite parameter) - (i64::opposite subject)) - (i64::opposite (i64::/ parameter - (i64::opposite subject)))))) + (i64:/ (i64:opposite parameter) + (i64:opposite subject)) + (i64:opposite (i64:/ parameter + (i64:opposite subject)))))) (_.if (..negative? parameter) - (_.return (i64::opposite (i64::/ (i64::opposite parameter) subject)))) + (_.return (i64:opposite (i64:/ (i64:opposite parameter) subject)))) (with_vars [result remainder] (all _.then - (_.define result i64::zero) + (_.define result i64:zero) (_.define remainder subject) - (_.while (i64::<= remainder parameter) + (_.while (i64:<= remainder parameter) (with_vars [approximate approximate_result approximate_remainder log2 delta] - (let [approximate_result' (i64::of_number approximate) - approx_remainder (i64::x parameter approximate_result)] + (let [approximate_result' (i64:of_number approximate) + approx_remainder (i64:x parameter approximate_result)] (all _.then (_.define approximate (_.of (list (_.i32 +1) - (_.of (list (_./ (i64::number parameter) - (i64::number remainder))) + (_.of (list (_./ (i64:number parameter) + (i64:number remainder))) (_.var "Math.floor"))) (_.var "Math.max"))) (_.define log2 (_.of (list (_./ (_.var "Math.LN2") @@ -644,60 +644,60 @@ (_.define approximate_result approximate_result') (_.define approximate_remainder approx_remainder) (_.while (_.or (..negative? approximate_remainder) - (i64::< approximate_remainder - remainder)) + (i64:< approximate_remainder + remainder)) (all _.then (_.; (_.set approximate (_.- delta approximate))) (_.; (_.set approximate_result approximate_result')) (_.; (_.set approximate_remainder approx_remainder)))) - (_.; (_.set result (i64::+ (_.? (i64::= i64::zero approximate_result) - i64::one - approximate_result) - result))) - (_.; (_.set remainder (i64::- approximate_remainder remainder))))))) + (_.; (_.set result (i64:+ (_.? (i64:= i64:zero approximate_result) + i64:one + approximate_result) + result))) + (_.; (_.set remainder (i64:- approximate_remainder remainder))))))) (_.return result))))) -(the (i64::% parameter subject) +(the (i64:% parameter subject) (let [flat (|> subject - (i64::/ parameter) - (i64::x parameter))] - (_.return (i64::- flat subject)))) + (i64:/ parameter) + (i64:x parameter))] + (_.return (i64:- flat subject)))) (.the runtime//i64 _.Statement (all _.then ..runtime//bit - @i64::2^16 - @i64::2^32 - @i64::2^64 - @i64::2^63 - @i64::unsigned_low - @i64::new - @i64::zero - @i64::minimum - @i64::maximum - @i64::one - @i64::= - @i64::+ - @i64::opposite - @i64::-one - @i64::number - @i64::of_number - @i64::- - @i64::x - @i64::< - @i64::/ - @i64::% + @i64:2^16 + @i64:2^32 + @i64:2^64 + @i64:2^63 + @i64:unsigned_low + @i64:new + @i64:zero + @i64:minimum + @i64:maximum + @i64:one + @i64:= + @i64:+ + @i64:opposite + @i64:-one + @i64:number + @i64:of_number + @i64:- + @i64:x + @i64:< + @i64:/ + @i64:% )) (the (text//index start part text) (with_vars [idx] (all _.then - (_.define idx (|> text (_.do "indexOf" (list part (i64::number start))))) + (_.define idx (|> text (_.do "indexOf" (list part (i64:number start))))) (_.return (_.? (_.= (_.i32 -1) idx) ..none - (..some (i64::of_number idx))))))) + (..some (i64:of_number idx))))))) (the (text//clip offset length text) (_.return (|> text (_.do "substring" (list (_.its ..i64_low_field offset) @@ -710,7 +710,7 @@ (_.define result (|> text (_.do "charCodeAt" (list (_.its ..i64_low_field idx))))) (_.if (_.not_a_number? result) (_.throw (_.string "[Lux Error] Cannot get char from text.")) - (_.return (i64::of_number result)))))) + (_.return (i64:of_number result)))))) (.the runtime//text _.Statement diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/translation/js/when.lux b/stdlib/source/library/lux/compiler/language/lux/phase/translation/js/when.lux index 0fb0bfb574..5d875f2639 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/translation/js/when.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/translation/js/when.lux @@ -298,8 +298,8 @@ clauses (list.each' ! (function (_ [when then]) (monad.let ! [then! (again then)] - (pure [(//runtime.i64::= (//primitive.i64 when) - 'input) + (pure [(//runtime.i64:= (//primitive.i64 when) + 'input) then!]))) (list:composite (list head) tail))] (pure (all _.then @@ -457,8 +457,8 @@ (pure (all _.then (_.define 'input input) (list:mix (function (_ [when then] else) - (_.if (//runtime.i64::= (,injection when) - 'input) + (_.if (//runtime.i64:= (,injection when) + 'input) then else)) else @@ -477,8 +477,8 @@ (_.closure (list 'input)) _.return (list:mix (function (_ [when then] else) - (_.? (//runtime.i64::= (,injection when) - 'input) + (_.? (//runtime.i64:= (,injection when) + 'input) then else)) else diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/translation/jvm/function.lux b/stdlib/source/library/lux/compiler/language/lux/phase/translation/jvm/function.lux index 6fae1c3f9c..91971339e1 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/translation/jvm/function.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/translation/jvm/function.lux @@ -145,7 +145,7 @@ (all _.composite (_.checkcast /abstract.class) (list.complete _.monad batchG) - (_.invokevirtual /abstract.class //runtime.of::name (//runtime.of::type (list.size batchG))) + (_.invokevirtual /abstract.class //runtime.of:name (//runtime.of:type (list.size batchG))) )))) )))) diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/translation/jvm/function/method/of.lux b/stdlib/source/library/lux/compiler/language/lux/phase/translation/jvm/function/method/of.lux index 25ffeebfa7..caf7babe70 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/translation/jvm/function/method/of.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/translation/jvm/function/method/of.lux @@ -70,7 +70,7 @@ (all _.composite (_.checkcast ///abstract.class) (..inputs offset arity) - (_.invokevirtual ///abstract.class ////runtime.of::name (////runtime.of::type arity)) + (_.invokevirtual ///abstract.class ////runtime.of:name (////runtime.of:type arity)) (if (n.> ///arity.maximum amount) (of (n.+ ///arity.maximum offset) (n.- ///arity.maximum amount)) @@ -85,8 +85,8 @@ (let [num_partials (-- function_arity) over_extent (i.- (.integer of_arity) (.integer function_arity))] - (method.method //.modifier ////runtime.of::name - false (////runtime.of::type of_arity) + (method.method //.modifier ////runtime.of:name + false (////runtime.of:type of_arity) (list) {.:Some (when num_partials 0 (all _.composite diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/translation/jvm/host.lux b/stdlib/source/library/lux/compiler/language/lux/phase/translation/jvm/host.lux index f474f95a94..a647d94d5e 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/translation/jvm/host.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/translation/jvm/host.lux @@ -49,30 +49,30 @@ ["[1][0]" value]]) (ffi.the java/lang/reflect/Field - "[1]::[0]" + "[1]:[0]" (get ["?" java/lang/Object] "try" "?" java/lang/Object)) (ffi.the (java/lang/Class a) - "[1]::[0]" + "[1]:[0]" (getField [java/lang/String] "try" java/lang/reflect/Field)) (ffi.the java/lang/Object - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/ClassLoader - "[1]::[0]") + "[1]:[0]") -(the value::modifier +(the value:modifier (all modifier:composite field.public field.final field.static )) -(the init::type +(the init:type (type.method [(list) (list) type.void (list)])) -(the init::modifier +(the init:modifier (all modifier:composite method.public method.static @@ -100,9 +100,9 @@ (the (class_value class_name class) (-> Text (java/lang/Class java/lang/Object) (Try Any)) - (when (java/lang/Class::getField [(ffi.as_string //value.field)] class) + (when (java/lang/Class:getField [(ffi.as_string //value.field)] class) {try.:Success field} - (when (java/lang/reflect/Field::get [{.:None}] field) + (when (java/lang/reflect/Field:get [{.:None}] field) {try.:Success ?value} (when ?value {.:Some value} @@ -136,9 +136,9 @@ (internal.name bytecode_name) {.:None} (internal.name "java.lang.Object") (list) - (list (field.field ..value::modifier //value.field false :value: (sequence.sequence))) - (list (method.method ..init::modifier "" - false ..init::type + (list (field.field ..value:modifier //value.field false :value: (sequence.sequence))) + (list (method.method ..init:modifier "" + false ..init:type (list) {.:Some (all _.composite diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/translation/jvm/primitive.lux b/stdlib/source/library/lux/compiler/language/lux/phase/translation/jvm/primitive.lux index f616c4387e..41c005cf3a 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/translation/jvm/primitive.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/translation/jvm/primitive.lux @@ -91,13 +91,13 @@ (_.invokestatic $Double "valueOf" (type.method [(list) (list type.double) $Double (list)]))) (ffi.the java/lang/Double - "[1]::[0]" + "[1]:[0]" ("static" doubleToRawLongBits [double] long)) (the double_bits (-> Decimal Integer) - (|>> [] java/lang/Double::doubleToRawLongBits + (|>> [] java/lang/Double:doubleToRawLongBits ffi.of_long)) (the d0_bits diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/translation/jvm/program.lux b/stdlib/source/library/lux/compiler/language/lux/phase/translation/jvm/program.lux index aec0ca2a84..0f093b1d11 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/translation/jvm/program.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/translation/jvm/program.lux @@ -45,10 +45,10 @@ (the ^Args (type.array ^String)) -(the main::type +(the main:type (type.method [(list) (list ..^Args) type.void (list)])) -(the main::modifier +(the main:modifier (Modifier Method) (all modifier:composite method.public @@ -56,7 +56,7 @@ method.strict )) -(the program::modifier +(the program:modifier (Modifier Class) (all modifier:composite class.public @@ -148,8 +148,8 @@ (-> (-> unit.ID Text) (Program (Bytecode Any) Definition)) (let [super_class (|> ..^Object type.reflection reflection.reflection internal.name) - main (method.method ..main::modifier "main" - false ..main::type + main (method.method ..main:modifier "main" + false ..main:type (list) {.:Some (all _.composite program @@ -162,7 +162,7 @@ (<| (\\injection.value class.as_binary) try.trusted (class.class version.v6_0 - ..program::modifier + ..program:modifier (internal.name class) {.:None} super_class diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/translation/jvm/runtime.lux b/stdlib/source/library/lux/compiler/language/lux/phase/translation/jvm/runtime.lux index 09984eb8d9..46f9b55a76 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/translation/jvm/runtime.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/translation/jvm/runtime.lux @@ -151,15 +151,15 @@ (the .public unit (_.string synthesis.unit)) -(the variant::name "variant") -(the variant::type (type.method [(list) (list //type.lefts //type.right? //type.value) //type.variant (list)])) -(the .public variant (..procedure ..variant::name ..variant::type)) +(the variant:name "variant") +(the variant:type (type.method [(list) (list //type.lefts //type.right? //type.value) //type.variant (list)])) +(the .public variant (..procedure ..variant:name ..variant:type)) (the variant_lefts _.iconst_0) (the variant_right? _.iconst_1) (the variant_value _.iconst_2) -(the variant::method +(the variant:method (let [new_variant (all _.composite _.iconst_3 (_.anewarray //type.value)) @@ -168,8 +168,8 @@ (//value.boxed type.int)) $right? _.aload_1 $value _.aload_2] - (method.method ..modifier ..variant::name - .false ..variant::type + (method.method ..modifier ..variant:name + .false ..variant:type (list) {.:Some (all _.composite new_variant ... A[3] @@ -214,35 +214,35 @@ (_.string message) (_.invokespecial ^IllegalStateException "" ..exception_constructor)))) -(the failure::type +(the failure:type (type.method [(list) (list) type.void (list)])) (the (failure name message) (-> Text Text (Resource Method)) (method.method ..modifier name - .false ..failure::type + .false ..failure:type (list) {.:Some (all _.composite (..illegal_state_exception message) _.athrow)})) -(the pm_failure::name "pm_failure") -(the .public pm_failure (..procedure ..pm_failure::name ..failure::type)) +(the pm_failure:name "pm_failure") +(the .public pm_failure (..procedure ..pm_failure:name ..failure:type)) -(the pm_failure::method - (..failure ..pm_failure::name "Invalid expression for pattern-matching.")) +(the pm_failure:method + (..failure ..pm_failure:name "Invalid expression for pattern-matching.")) (the .public head_of_stack _.iconst_0) (the .public tail_of_stack _.iconst_1) -(the stack::name "stack") -(the stack::type (type.method [(list) (list //type.stack //type.value) //type.stack (list)])) -(the .public stack (..procedure ..stack::name ..stack::type)) +(the stack:name "stack") +(the stack:type (type.method [(list) (list //type.stack //type.value) //type.stack (list)])) +(the .public stack (..procedure ..stack:name ..stack:type)) -(the stack::method - (method.method ..modifier ..stack::name - .false ..stack::type +(the stack:method + (method.method ..modifier ..stack:name + .false ..stack:type (list) {.:Some (let [new_stack_frame! (all _.composite @@ -256,13 +256,13 @@ (..set! ..tail_of_stack $tail) _.areturn))})) -(the when::name "when") -(the when::type (type.method [(list) (list //type.variant //type.lefts //type.right?) //type.value (list)])) -(the .public when (..procedure ..when::name ..when::type)) +(the when:name "when") +(the when:type (type.method [(list) (list //type.variant //type.lefts //type.right?) //type.value (list)])) +(the .public when (..procedure ..when:name ..when:type)) -(the when::method - (method.method ..modifier ..when::name - .false ..when::type +(the when:method + (method.method ..modifier ..when:name + .false ..when:type (list) {.:Some (monad.let _.monad @@ -275,11 +275,11 @@ $lefts _.iload_1 $right? _.aload_2 - ::lefts (all _.composite - (..item ..variant_lefts) - (//value.primitive type.int)) - ::right? (..item ..variant_right?) - ::value (..item ..variant_value) + :lefts (all _.composite + (..item ..variant_lefts) + (//value.primitive type.int)) + :right? (..item ..variant_right?) + :value (..item ..variant_value) not_found _.aconst_null @@ -291,12 +291,12 @@ super_nested (all _.composite ... lefts, sumT super_nested_lefts ... super_lefts - $variant ::right? ... super_lefts, super_right - $variant ::value ... super_lefts, super_right, super_value + $variant :right? ... super_lefts, super_right + $variant :value ... super_lefts, super_right, super_value ..variant) update_$variant (all _.composite - $variant ::value + $variant :value (_.checkcast //type.variant) _.astore_0) update_$lefts (all _.composite @@ -313,7 +313,7 @@ (all _.composite $lefts (_.set_label @loop) - $variant ::lefts + $variant :lefts _.dup2 (_.if_icmpeq @lefts_match!) _.dup2 (_.if_icmpgt @maybe_nested) $right? (_.ifnull @mismatch!) ... lefts, sumT @@ -321,41 +321,41 @@ _.areturn (_.set_label @lefts_match!) ... lefts, sumT $right? ... lefts, sumT, wants_right? - $variant ::right? ... lefts, sumT, wants_right?, is_right? + $variant :right? ... lefts, sumT, wants_right?, is_right? (_.if_acmpeq @perfect_match!) ... lefts, sumT (_.set_label @mismatch!) ... lefts, sumT ... _.pop2 not_found _.areturn (_.set_label @maybe_nested) ... lefts, sumT - $variant ::right? ... lefts, sumT, right? + $variant :right? ... lefts, sumT, right? (_.ifnull @mismatch!) ... lefts, sumT (again @loop) (_.set_label @perfect_match!) ... lefts, sumT ... _.pop2 - $variant ::value + $variant :value _.areturn ))})) (the projection_type (type.method [(list) (list //type.tuple //type.lefts) //type.value (list)])) -(the left_of_tuple::name "left") -(the .public left_of_tuple (..procedure ..left_of_tuple::name ..projection_type)) +(the left_of_tuple:name "left") +(the .public left_of_tuple (..procedure ..left_of_tuple:name ..projection_type)) -(the right_of_tuple::name "right") -(the .public right_of_tuple (..procedure ..right_of_tuple::name ..projection_type)) +(the right_of_tuple:name "right") +(the .public right_of_tuple (..procedure ..right_of_tuple:name ..projection_type)) -(the projection::method2 +(the projection:method2 [(Resource Method) (Resource Method)] (let [$tuple _.aload_0 - $tuple::size (all _.composite - $tuple - _.arraylength) + $tuple:size (all _.composite + $tuple + _.arraylength) $lefts _.iload_1 $last_right (all _.composite - $tuple::size + $tuple:size _.iconst_1 _.isub) @@ -372,28 +372,28 @@ update_$tuple (_.goto @loop)))) - left_of_tuple::method - (method.method ..modifier ..left_of_tuple::name + left_of_tuple:method + (method.method ..modifier ..left_of_tuple:name .false ..projection_type (list) {.:Some (monad.let _.monad [@loop _.new_label @recursive _.new_label - .let [::left (all _.composite - $lefts - _.aaload)]] + .let [:left (all _.composite + $lefts + _.aaload)]] (all _.composite (_.set_label @loop) $lefts $last_right (_.if_icmpge @recursive) - $tuple ::left + $tuple :left _.areturn (_.set_label @recursive) ... Recursive (recur @loop)))}) - right_of_tuple::method - (method.method ..modifier ..right_of_tuple::name + right_of_tuple:method + (method.method ..modifier ..right_of_tuple:name .false ..projection_type (list) {.:Some @@ -405,14 +405,14 @@ $lefts _.iconst_1 _.iadd) - $::nested (all _.composite - $tuple - _.swap - _.aaload) + $:nested (all _.composite + $tuple + _.swap + _.aaload) super_nested (all _.composite $tuple $right - $tuple::size + $tuple:size (_.invokestatic (type.class (list) "java.util.Arrays") "copyOfRange" (type.method [(list) (list //type.tuple //type.lefts //type.lefts) //type.tuple (list)])))]] (all _.composite @@ -420,7 +420,7 @@ $last_right $right _.dup2 (_.if_icmpne @not_tail) ... _.pop - $::nested + $:nested _.areturn (_.set_label @not_tail) (_.if_icmpgt @slice) @@ -429,32 +429,32 @@ (_.set_label @slice) super_nested _.areturn))})] - [left_of_tuple::method - right_of_tuple::method])) + [left_of_tuple:method + right_of_tuple:method])) -(the .public of::name "apply") +(the .public of:name "apply") -(the .public (of::type arity) +(the .public (of:type arity) (-> Arity (Type category.Method)) (type.method [(list) (list.repeated arity //type.value) //type.value (list)])) (the .public of - (_.invokevirtual //function.class ..of::name (..of::type 1))) + (_.invokevirtual //function.class ..of:name (..of:type 1))) -(the try::name "try") -(the try::type (type.method [(list) (list //function.class) //type.variant (list)])) -(the .public try (..procedure ..try::name ..try::type)) +(the try:name "try") +(the try:type (type.method [(list) (list //function.class) //type.variant (list)])) +(the .public try (..procedure ..try:name ..try:type)) -(the throw::name "throw") -(the throw::type (type.method [(list) (list (type.class (list) "java.lang.Throwable")) type.void (list)])) -(the .public throw (..procedure ..throw::name ..throw::type)) +(the throw:name "throw") +(the throw:type (type.method [(list) (list (type.class (list) "java.lang.Throwable")) type.void (list)])) +(the .public throw (..procedure ..throw:name ..throw:type)) (the false _.iconst_0) (the true _.iconst_1) -(the try::method - (method.method ..modifier ..try::name - .false ..try::type +(the try:method + (method.method ..modifier ..try:name + .false ..try:type (list) {.:Some (monad.let _.monad @@ -504,9 +504,9 @@ _.areturn ))})) -(the throw::method - (method.method ..modifier ..throw::name - .false ..throw::type +(the throw:method + (method.method ..modifier ..throw:name + .false ..throw:type (list) {.:Some (all _.composite @@ -537,18 +537,18 @@ {.:None} (internal.name (..reflection ^Object)) (list) (list) - (let [[left_of_tuple::method right_of_tuple::method] projection::method2] - (list ..variant::method + (let [[left_of_tuple:method right_of_tuple:method] projection:method2] + (list ..variant:method - ..pm_failure::method + ..pm_failure:method - ..stack::method - ..when::method - left_of_tuple::method - right_of_tuple::method + ..stack:method + ..when:method + left_of_tuple:method + right_of_tuple:method - ..try::method - ..throw::method)) + ..try:method + ..throw:method)) (list)))] (monad.let phase.monad [_ (translation.execute! [class bytecode]) @@ -557,41 +557,41 @@ (the translate_function (Operation Any) - (let [of::method+ (|> (enum.range n.enum - (++ //function/arity.minimum) - //function/arity.maximum) - (list:each (function (_ arity) - (method.method method.public ..of::name - .false (..of::type arity) - (list) - {.:Some - (let [previous_inputs (|> arity - list.domain - (list.each' _.monad _.aload))] - (all _.composite - previous_inputs - (_.invokevirtual //function.class ..of::name (..of::type (-- arity))) - (_.checkcast //function.class) - (_.aload arity) - (_.invokevirtual //function.class ..of::name (..of::type //function/arity.minimum)) - _.areturn))}))) - (list:composite (list (method.method (modifier:composite method.public method.abstract) - ..of::name - .false (..of::type //function/arity.minimum) - (list) - {.:None})))) - ::method (method.method method.public "" - .false //function.init - (list) - {.:Some - (let [$partials _.iload_1] - (all _.composite - ..this - (_.invokespecial ^Object "" (type.method [(list) (list) type.void (list)])) - ..this - $partials - (_.putfield //function.class //function/count.field //function/count.type) - _.return))}) + (let [of:method+ (|> (enum.range n.enum + (++ //function/arity.minimum) + //function/arity.maximum) + (list:each (function (_ arity) + (method.method method.public ..of:name + .false (..of:type arity) + (list) + {.:Some + (let [previous_inputs (|> arity + list.domain + (list.each' _.monad _.aload))] + (all _.composite + previous_inputs + (_.invokevirtual //function.class ..of:name (..of:type (-- arity))) + (_.checkcast //function.class) + (_.aload arity) + (_.invokevirtual //function.class ..of:name (..of:type //function/arity.minimum)) + _.areturn))}))) + (list:composite (list (method.method (modifier:composite method.public method.abstract) + ..of:name + .false (..of:type //function/arity.minimum) + (list) + {.:None})))) + :method (method.method method.public "" + .false //function.init + (list) + {.:Some + (let [$partials _.iload_1] + (all _.composite + ..this + (_.invokespecial ^Object "" (type.method [(list) (list) type.void (list)])) + ..this + $partials + (_.putfield //function.class //function/count.field //function/count.type) + _.return))}) modifier (is (Modifier Class) (all modifier:composite class.public @@ -610,7 +610,7 @@ {.:None} (internal.name (..reflection ^Object)) (list) (list partial_count) - (list:composite (list ::method) of::method+) + (list:composite (list :method) of:method+) (list)))] (monad.let phase.monad [_ (translation.execute! [class bytecode]) diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/translation/lua/runtime.lux b/stdlib/source/library/lux/compiler/language/lux/phase/translation/lua/runtime.lux index 7743a0083d..f07ccb62c3 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/translation/lua/runtime.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/translation/lua/runtime.lux @@ -224,31 +224,31 @@ (_.var "table.move")))) )))))) -(the (sum//get sum expected::right? expected::lefts) +(the (sum//get sum expected:right? expected:lefts) (let [mismatch! (_.return _.nil) - actual::lefts (_.its ..variant_tag_field sum) - actual::right? (_.its ..variant_flag_field sum) - actual::value (_.its ..variant_value_field sum) + actual:lefts (_.its ..variant_tag_field sum) + actual:right? (_.its ..variant_flag_field sum) + actual:value (_.its ..variant_value_field sum) recur! (all _.then - (_.set (list expected::lefts) (|> expected::lefts - (_.- actual::lefts) - (_.- (_.int +1)))) - (_.set (list sum) actual::value))] + (_.set (list expected:lefts) (|> expected:lefts + (_.- actual:lefts) + (_.- (_.int +1)))) + (_.set (list sum) actual:value))] (<| (_.while (_.boolean true)) - (_.if (_.= expected::lefts actual::lefts) - (_.if (_.= expected::right? actual::right?) - (_.return actual::value) + (_.if (_.= expected:lefts actual:lefts) + (_.if (_.= expected:right? actual:right?) + (_.return actual:value) mismatch!)) - (_.if (_.< expected::lefts actual::lefts) - (_.if (_.= ..unit actual::right?) + (_.if (_.< expected:lefts actual:lefts) + (_.if (_.= ..unit actual:right?) recur! mismatch!)) - (_.if (_.= ..unit expected::right?) - (_.return (variant' (|> actual::lefts - (_.- expected::lefts) + (_.if (_.= ..unit expected:right?) + (_.return (variant' (|> actual:lefts + (_.- expected:lefts) (_.- (_.int +1))) - actual::right? - actual::value))) + actual:right? + actual:value))) mismatch!))) (.the runtime//adt diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/translation/python/primitive.lux b/stdlib/source/library/lux/compiler/language/lux/phase/translation/python/primitive.lux index 758540dba0..deff5a729e 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/translation/python/primitive.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/translation/python/primitive.lux @@ -18,7 +18,6 @@ )] [[Bit bit _.bool] - [(I64 Any) i64 (|>> .integer _.int //runtime.i64::64)] + [(I64 Any) i64 (|>> .integer _.int //runtime.i64:64)] [Decimal f64 _.float] - [Text text _.unicode]] - ) + [Text text _.unicode]]) diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/translation/python/runtime.lux b/stdlib/source/library/lux/compiler/language/lux/phase/translation/python/runtime.lux index 8ef979e145..284dae3c69 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/translation/python/runtime.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/translation/python/runtime.lux @@ -184,7 +184,7 @@ (_.def (, '_) (list (,* inputsC)) (, code))))))))))))) -(the (lux::try op) +(the (lux:try op) (with_vars [exception] (_.try (_.return (..right (_.of (list ..unit) op))) (list [(list "Exception") exception @@ -195,7 +195,7 @@ (_.__import__/1 (_.string "traceback")))) (_.string ""))))])))) -(the (lux::program_args program_args) +(the (lux:program_args program_args) (with_vars [inputs value] (all _.then (_.set (list inputs) ..none) @@ -204,7 +204,7 @@ (..some (_.list (list value inputs))))) (_.return inputs)))) -(the (lux::exec code globals) +(the (lux:exec code globals) (all _.then (_.exec {.:Some globals} code) (_.return ..unit))) @@ -212,12 +212,12 @@ (.the runtime//lux _.Statement (all _.then - @lux::try - @lux::program_args - @lux::exec + @lux:try + @lux:program_args + @lux:exec )) -(the (io::log! message) +(the (io:log! message) (all _.then (_.print message) (|> (_.__import__/1 (_.unicode "sys")) @@ -226,7 +226,7 @@ _.;) (_.return ..unit))) -(the (io::throw! message) +(the (io:throw! message) (_.raise (_.Exception/1 (|> message (_.+ (_.string text.\n)) (_.+ (_.do "join" @@ -237,8 +237,8 @@ (.the runtime//io _.Statement (all _.then - @io::log! - @io::throw! + @io:log! + @io:throw! )) (.the last_index @@ -247,7 +247,7 @@ (expansion.let [ (these (all _.then (_.set (list lefts) (_.- last_index_right lefts)) (_.set (list tuple) (_.item last_index_right tuple))))] - (these (the (tuple::left lefts tuple) + (these (the (tuple:left lefts tuple) (with_vars [last_index_right] (_.while (_.bool true) (all _.then @@ -259,7 +259,7 @@ )) {.:None}))) - (the (tuple::right lefts tuple) + (the (tuple:right lefts tuple) (with_vars [last_index_right right_index] (_.while (_.bool true) (all _.then @@ -273,50 +273,50 @@ (_.return (_.slice_from right_index tuple)))) {.:None}))))) -(the (sum::get sum expected::right? expected::lefts) +(the (sum:get sum expected:right? expected:lefts) (let [mismatch! (_.return _.none) - actual::lefts (_.item (_.int +0) sum) - actual::right? (_.item (_.int +1) sum) - actual::value (_.item (_.int +2) sum) + actual:lefts (_.item (_.int +0) sum) + actual:right? (_.item (_.int +1) sum) + actual:value (_.item (_.int +2) sum) recur! (all _.then - (_.set (list expected::lefts) (|> expected::lefts - (_.- actual::lefts) - (_.- (_.int +1)))) - (_.set (list sum) actual::value))] + (_.set (list expected:lefts) (|> expected:lefts + (_.- actual:lefts) + (_.- (_.int +1)))) + (_.set (list sum) actual:value))] (_.while (_.bool true) - (<| (_.if (_.= expected::lefts actual::lefts) - (_.if (_.= expected::right? actual::right?) - (_.return actual::value) + (<| (_.if (_.= expected:lefts actual:lefts) + (_.if (_.= expected:right? actual:right?) + (_.return actual:value) mismatch!)) - (_.if (_.< expected::lefts actual::lefts) - (_.if (_.= ..unit actual::right?) + (_.if (_.< expected:lefts actual:lefts) + (_.if (_.= ..unit actual:right?) recur! mismatch!)) - (_.if (_.= ..unit expected::right?) - (_.return (variant' (|> actual::lefts - (_.- expected::lefts) + (_.if (_.= ..unit expected:right?) + (_.return (variant' (|> actual:lefts + (_.- expected:lefts) (_.- (_.int +1))) - actual::right? - actual::value))) + actual:right? + actual:value))) mismatch!) {.:None}))) (.the runtime//adt _.Statement (all _.then - @tuple::left - @tuple::right - @sum::get + @tuple:left + @tuple:right + @sum:get )) -(.the i64::+limit (_.manual "+0x7FFFFFFFFFFFFFFF")) -(.the i64::-limit (_.manual "-0x8000000000000000")) -(.the i64::+iteration (_.manual "+0x10000000000000000")) -(.the i64::-iteration (_.manual "-0x10000000000000000")) -(.the i64::+cap (_.manual "+0x8000000000000000")) -(.the i64::-cap (_.manual "-0x8000000000000001")) +(.the i64:+limit (_.manual "+0x7FFFFFFFFFFFFFFF")) +(.the i64:-limit (_.manual "-0x8000000000000000")) +(.the i64:+iteration (_.manual "+0x10000000000000000")) +(.the i64:-iteration (_.manual "-0x10000000000000000")) +(.the i64:+cap (_.manual "+0x8000000000000000")) +(.the i64:-cap (_.manual "-0x8000000000000001")) -(the (i64::64 input) +(the (i64:64 input) (with_vars [temp] (`` (<| (,, (template.with [ ] [(_.if (|> input ) @@ -326,22 +326,22 @@ (|> temp (_.- ) (_.+ )) temp))))] - [[(_.> ..i64::+limit) ..i64::+iteration ..i64::+cap ..i64::-limit] - [(_.< ..i64::-limit) ..i64::-iteration ..i64::-cap ..i64::+limit]] + [[(_.> ..i64:+limit) ..i64:+iteration ..i64:+cap ..i64:-limit] + [(_.< ..i64:-limit) ..i64:-iteration ..i64:-cap ..i64:+limit]] )) (_.return (for .python input ... This +- is only necessary to guarantee that values within the limits are always longs in Python 2 - (|> input (_.+ ..i64::+limit) (_.- ..i64::+limit)))))))) + (|> input (_.+ ..i64:+limit) (_.- ..i64:+limit)))))))) (.the as_natural - (_.% ..i64::+iteration)) + (_.% ..i64:+iteration)) -(the (i64::<< param subject) +(the (i64:<< param subject) (_.return (|> subject (_.bit_shl (_.% (_.int +64) param)) - ..i64::64))) + ..i64:64))) -(the (i64::>> param subject) +(the (i64:>> param subject) (all _.then (_.set (list param) (_.% (_.int +64) param)) (_.return (_.? (_.= (_.int +0) param) @@ -367,17 +367,17 @@ (_.manual "-9223372036854775808")) floored)))))) -(the (i64::remainder param subject) +(the (i64:remainder param subject) (_.return (_.- (|> subject (..i64:/ param) (_.* param)) subject))) (template.with [ ] [(the ( left right) - (_.return (..i64::64 ( (..as_natural left) (..as_natural right)))))] + (_.return (..i64:64 ( (..as_natural left) (..as_natural right)))))] - [[i64::and _.bit_and] - [i64::or _.bit_or] - [i64::xor _.bit_xor]] + [[i64:and _.bit_and] + [i64:or _.bit_or] + [i64:xor _.bit_xor]] ) (.the python_version @@ -386,7 +386,7 @@ (_.its "version_info") (_.its "major"))) -(the (i64::char value) +(the (i64:char value) (_.return (_.? (_.= (_.int +3) ..python_version) (_.chr/1 value) (_.unichr/1 value)))) @@ -394,18 +394,18 @@ (.the runtime//i64 _.Statement (all _.then - @i64::64 - @i64::<< - @i64::>> + @i64:64 + @i64:<< + @i64:>> @i64:/ - @i64::remainder - @i64::and - @i64::or - @i64::xor - @i64::char + @i64:remainder + @i64:and + @i64:or + @i64:xor + @i64:char )) -(the (f64::/ parameter subject) +(the (f64:/ parameter subject) (_.return (_.? (_.= (_.float +0.0) parameter) (<| (_.? (_.> (_.float +0.0) subject) (_.float d.positive_infinity)) @@ -417,16 +417,16 @@ (.the runtime//f64 _.Statement (all _.then - @f64::/ + @f64:/ )) -(the (text::index start param subject) +(the (text:index start param subject) (with_vars [idx] (all _.then (_.set (list idx) (|> subject (_.do "find" (list param start)))) (_.return (_.? (_.= (_.int -1) idx) ..none - (..some (..i64::64 idx))))))) + (..some (..i64:64 idx))))))) (.the ++ (|>> (_.+ (_.int +1)))) @@ -437,23 +437,23 @@ (_.and (|> value (_.>= (_.int +0))) (|> value (_.< top)))) -(the (text::clip @offset @length @text) +(the (text:clip @offset @length @text) (_.return (|> @text (_.slice @offset (_.+ @offset @length))))) -(the (text::char idx text) +(the (text:char idx text) (_.if (|> idx (within? (_.len/1 text))) - (_.return (|> text (_.slice idx (..++ idx)) _.ord/1 ..i64::64)) + (_.return (|> text (_.slice idx (..++ idx)) _.ord/1 ..i64:64)) (_.raise (_.Exception/1 (_.unicode "[Lux Error] Cannot get char from text."))))) (.the runtime//text _.Statement (all _.then - @text::index - @text::clip - @text::char + @text:index + @text:clip + @text:char )) -(the (array::write idx value array) +(the (array:write idx value array) (all _.then (_.set (list (_.item idx array)) value) (_.return array))) @@ -461,7 +461,7 @@ (.the runtime//array _.Statement (all _.then - @array::write + @array:write )) (.the full_runtime diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/translation/python/when.lux b/stdlib/source/library/lux/compiler/language/lux/phase/translation/python/when.lux index aa4290a095..23dece84dc 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/translation/python/when.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/translation/python/when.lux @@ -117,8 +117,8 @@ (the (projection it) ((.if (.its member.:right? it) - //runtime.tuple::right - //runtime.tuple::left) + //runtime.tuple:right + //runtime.tuple:left) (_.int (.integer (.its member.:lefts it))))) (the .public (its expression archive [pathP valueS]) @@ -169,8 +169,8 @@ [(the ( simple? idx) (-> Bit Natural _.Statement) (all _.then - (_.set (list @temp) (//runtime.sum::get ..peek - (|> idx .integer _.int))) + (_.set (list @temp) (//runtime.sum:get ..peek + (|> idx .integer _.int))) (.if simple? (_.when (_.= _.none @temp) fail_pm!) @@ -180,8 +180,7 @@ )))] [[left_choice _.none] - [right_choice //runtime.unit]] - ) + [right_choice //runtime.unit]]) (the (with_looping in_closure? 'once body!) (-> Bit SVar _.Statement _.Statement) @@ -256,8 +255,7 @@ [[synthesis.:I64_Fork //primitive.i64] [synthesis.:F64_Fork //primitive.f64] - [synthesis.:Text_Fork //primitive.text]] - )) + [synthesis.:Text_Fork //primitive.text]])) (,, (template.with [ ] [( idx) @@ -269,8 +267,7 @@ (phase:each (_.then ( true idx))))] [[synthesis.left_side synthesis.simple_left_side ..left_choice] - [synthesis.right_side synthesis.simple_right_side ..right_choice]] - )) + [synthesis.right_side synthesis.simple_right_side ..right_choice]])) (synthesis.left_member 0) (phase:pure (|> ..peek (_.item (_.int +0)) ..push!)) @@ -279,9 +276,8 @@ [( lefts) (phase:pure (|> ..peek ( (_.int (.integer lefts))) ..push!))] - [[synthesis.left_member //runtime.tuple::left] - [synthesis.right_member //runtime.tuple::right]] - )) + [[synthesis.left_member //runtime.tuple:left] + [synthesis.right_member //runtime.tuple:right]])) {synthesis.:List size} (phase:pure (_.when (_.not (_.= (_.int (.integer size)) @@ -411,8 +407,7 @@ (pure (,host parameter subject))))] [[or _.or] - [and _.and]] - ) + [and _.and]]) (template.with [,expression ,statement ,type ,injection] [(the .public (,statement statement expression archive [input clauses else]) @@ -455,5 +450,4 @@ [[when_i64 when_i64! I64 //primitive.i64] [when_f64 when_f64! F64 //primitive.f64] - [when_text when_text! Text //primitive.text]] - ) + [when_text when_text! Text //primitive.text]]) diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/translation/r/runtime.lux b/stdlib/source/library/lux/compiler/language/lux/phase/translation/r/runtime.lux index 7f17faa665..1546043743 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/translation/r/runtime.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/translation/r/runtime.lux @@ -139,16 +139,16 @@ (_.string "") _.null)) -(the (adt::variant tag last? value) - (_.named_list (list [..variant_tag_field (_.as::integer tag)] +(the (adt:variant tag last? value) + (_.named_list (list [..variant_tag_field (_.as:integer tag)] [..variant_flag_field last?] [..variant_value_field value]))) (.the .public (variant tag last? value) (-> Natural Bit Expression Expression) - (adt::variant (_.int (.integer tag)) - (flag last?) - value)) + (adt:variant (_.int (.integer tag)) + (flag last?) + value)) (.the .public none Expression @@ -170,8 +170,8 @@ (template.with [ ] [(the - (|> (_.as::integer (_.int +2)) - (_.** (_.as::integer (_.int )))))] + (|> (_.as:integer (_.int +2)) + (_.** (_.as:integer (_.int )))))] [[f2^32 +32] [f2^63 +63]]) @@ -183,7 +183,7 @@ (.the .public i64_high_field "luxIH") (.the .public i64_low_field "luxIL") -(the (i64::unsigned_low input) +(the (i64:unsigned_low input) (with_vars [low] (all _.then (_.set! low (_.item (_.string ..i64_low_field) input)) @@ -191,17 +191,17 @@ (_.+ f2^32 low) low)))) -(the (i64::float input) +(the (i64:float input) (let [high (|> input (_.item (_.string ..i64_high_field)) high_shift) low (|> input - i64::unsigned_low)] + i64:unsigned_low)] (|> high (_.+ low) as_double))) -(the (i64::new high low) - (_.named_list (list [..i64_high_field (_.as::integer high)] - [..i64_low_field (_.as::integer low)]))) +(the (i64:new high low) + (_.named_list (list [..i64_high_field (_.as:integer high)] + [..i64_low_field (_.as:integer low)]))) (.the high_32 (-> Natural Natural) @@ -214,8 +214,8 @@ (.the .public (i64 value) (-> Integer Expression) (let [value (.natural value)] - (i64::new (|> value ..high_32 ..cap_32 _.int) - (|> value ..low_32 ..cap_32 _.int)))) + (i64:new (|> value ..high_32 ..cap_32 _.int) + (|> value ..low_32 ..cap_32 _.int)))) (.the .public (lux_i64 high low) (-> Integer Integer Integer) @@ -227,19 +227,19 @@ [(the (..i64 ))] - [[i64::zero +0] - [i64::one +1] - [i64::minimum i:minimum] - [i64::maximum i:maximum]]) + [[i64:zero +0] + [i64:one +1] + [i64:minimum i:minimum] + [i64:maximum i:maximum]]) (.the .public i64_high (_.item (_.string ..i64_high_field))) (.the .public i64_low (_.item (_.string ..i64_low_field))) -(the (i64::not input) - (i64::new (|> input i64_high _.bit_not) - (|> input i64_low _.bit_not))) +(the (i64:not input) + (i64:new (|> input i64_high _.bit_not) + (|> input i64_low _.bit_not))) -(the (i64::+ param subject) +(the (i64:+ param subject) (with_vars [sH sL pH pL x00 x16 x32 x48] (all _.then @@ -268,10 +268,10 @@ (_.set! x16 (|> x00 maximum_16 (_.+ s16) (_.+ p16))) (_.set! x32 (|> x16 maximum_16 (_.+ s32) (_.+ p32))) (_.set! x48 (|> x32 maximum_16 (_.+ s48) (_.+ p48))) - (i64::new (new_half x48 x32) - (new_half x16 x00))))))) + (i64:new (new_half x48 x32) + (new_half x16 x00))))))) -(the (i64::= expected actual) +(the (i64:= expected actual) (let [n/a? (function (_ value) (_.of (list value) (_.var "is.na"))) isTRUE? (function (_ value) @@ -285,18 +285,18 @@ (_.and (comparison i64_low)) isTRUE?))) -(the (i64::opposite input) - (_.if (|> input (i64::= i64::minimum)) - i64::minimum - (|> input i64::not (i64::+ i64::one)))) +(the (i64:opposite input) + (_.if (|> input (i64:= i64:minimum)) + i64:minimum + (|> input i64:not (i64:+ i64:one)))) -(the i64::-one - (i64::opposite i64::one)) +(the i64:-one + (i64:opposite i64:one)) -(the (i64::- param subject) - (i64::+ (i64::opposite param) subject)) +(the (i64:- param subject) + (i64:+ (i64:opposite param) subject)) -(the (i64::< reference it) +(the (i64:< reference it) (with_vars [r_? s_?] (all _.then (_.set! s_? (|> it ..i64_high (_.< (_.int +0)))) @@ -304,23 +304,23 @@ (|> (|> s_? (_.and (_.not r_?))) (_.or (|> (_.not s_?) (_.and r_?) _.not)) (_.or (|> it - (i64::- reference) + (i64:- reference) ..i64_high (_.< (_.int +0)))))))) -(the (i64::of_float input) +(the (i64:of_float input) (_.cond (list [(_.of (list input) (_.var "is.nan")) - i64::zero] + i64:zero] [(|> input (_.<= (_.opposite f2^63))) - i64::minimum] + i64:minimum] [(|> input (_.+ (_.float +1.0)) (_.>= f2^63)) - i64::maximum] + i64:maximum] [(|> input (_.< (_.float +0.0))) - (|> input _.opposite i64::of_float i64::opposite)]) - (i64::new (|> input (_./ f2^32)) - (|> input (_.%% f2^32))))) + (|> input _.opposite i64:of_float i64:opposite)]) + (i64:new (|> input (_./ f2^32)) + (|> input (_.%% f2^32))))) -(the (i64::x param subject) +(the (i64:x param subject) (with_vars [sH sL pH pL x00 x16 x32 x48] (all _.then @@ -330,14 +330,14 @@ negative_param? (|> pH (_.< (_.int +0)))] (_.cond (list [negative_subject? (_.if negative_param? - (i64::x (i64::opposite param) - (i64::opposite subject)) - (i64::opposite (i64::x param - (i64::opposite subject))))] + (i64:x (i64:opposite param) + (i64:opposite subject)) + (i64:opposite (i64:x param + (i64:opposite subject))))] [negative_param? - (i64::opposite (i64::x (i64::opposite param) - subject))]) + (i64:opposite (i64:x (i64:opposite param) + subject))]) (all _.then (_.set! sL (|> subject i64_low)) (_.set! pL (|> param i64_low)) @@ -379,20 +379,20 @@ (_.+ (|> s32 (_.* p16))) (_.+ (|> s16 (_.* p32))) (_.+ (|> s00 (_.* p48))))) - (i64::new (new_half x48 x32) - (new_half x16 x00))))) + (i64:new (new_half x48 x32) + (new_half x16 x00))))) ))))))) (.the (limit_shift! shift) (-> SVar Expression) - (_.set! shift (|> shift (_.bit_and (_.as::integer (_.int +63)))))) + (_.set! shift (|> shift (_.bit_and (_.as:integer (_.int +63)))))) (.the (no_shift_clause shift input) (-> SVar SVar [Expression Expression]) [(|> shift (_.= (_.int +0))) input]) -(the (i64::<< shift input) +(the (i64:<< shift input) (all _.then (limit_shift! shift) (_.cond (list (no_shift_clause shift input) @@ -403,94 +403,94 @@ (_.bit_or mid)) low (|> (i64_low input) (_.bit_shl shift))] - (i64::new high low))]) + (i64:new high low))]) (let [high (|> (i64_high input) (_.bit_shl (|> shift (_.- (_.int +32)))))] - (i64::new high (_.int +0)))))) + (i64:new high (_.int +0)))))) -(the (i64::arithmetic_>>_32 shift input) - (let [maximum_bit (|> input (_.bit_and (_.as::integer (_.int (number.base_16 "+80000000")))))] +(the (i64:arithmetic_>>_32 shift input) + (let [maximum_bit (|> input (_.bit_and (_.as:integer (_.int (number.base_16 "+80000000")))))] (|> input (_.bit_ushr shift) (_.bit_or maximum_bit)))) -(the (i64::arithmetic_>> shift input) +(the (i64:arithmetic_>> shift input) (all _.then (limit_shift! shift) (_.cond (list (no_shift_clause shift input) [(|> shift (_.< (_.int +32))) (let [mid (|> (i64_high input) (_.bit_shl (|> (_.int +32) (_.- shift)))) high (|> (i64_high input) - (i64::arithmetic_>>_32 shift)) + (i64:arithmetic_>>_32 shift)) low (|> (i64_low input) (_.bit_ushr shift) (_.bit_or mid))] - (i64::new high low))]) + (i64:new high low))]) (let [low (|> (i64_high input) - (i64::arithmetic_>>_32 (|> shift (_.- (_.int +32))))) + (i64:arithmetic_>>_32 (|> shift (_.- (_.int +32))))) high (_.if (_.< (_.int +0) (i64_high input)) (_.int -1) (_.int +0))] - (i64::new high low))))) + (i64:new high low))))) -(the (i64::/ param subject) - (let [negative? (|>> (i64::< i64::zero)) - valid_division_check [(|> param (i64::= i64::zero)) +(the (i64:/ param subject) + (let [negative? (|>> (i64:< i64:zero)) + valid_division_check [(|> param (i64:= i64:zero)) (_.stop (_.string "Cannot divide by zero!"))] - short_circuit_check [(|> subject (i64::= i64::zero)) - i64::zero]] + short_circuit_check [(|> subject (i64:= i64:zero)) + i64:zero]] (_.cond (list valid_division_check short_circuit_check - [(|> subject (i64::= i64::minimum)) - (_.cond (list [(|> (|> param (i64::= i64::one)) - (_.or (|> param (i64::= i64::-one)))) - i64::minimum] - [(|> param (i64::= i64::minimum)) - i64::one]) + [(|> subject (i64:= i64:minimum)) + (_.cond (list [(|> (|> param (i64:= i64:one)) + (_.or (|> param (i64:= i64:-one)))) + i64:minimum] + [(|> param (i64:= i64:minimum)) + i64:one]) (with_vars [approximation] (all _.then (_.set! approximation (|> subject - (i64::arithmetic_>> (_.int +1)) - (i64::/ param) - (i64::<< (_.int +1)))) - (_.if (|> approximation (i64::= i64::zero)) + (i64:arithmetic_>> (_.int +1)) + (i64:/ param) + (i64:<< (_.int +1)))) + (_.if (|> approximation (i64:= i64:zero)) (_.if (negative? param) - i64::one - i64::-one) - (let [remainder (i64::- (i64::x param approximation) - subject)] + i64:one + i64:-one) + (let [remainder (i64:- (i64:x param approximation) + subject)] (|> remainder - (i64::/ param) - (i64::+ approximation)))))))] - [(|> param (i64::= i64::minimum)) - i64::zero] + (i64:/ param) + (i64:+ approximation)))))))] + [(|> param (i64:= i64:minimum)) + i64:zero] [(negative? subject) (_.if (negative? param) - (|> (i64::opposite subject) - (i64::/ (i64::opposite param))) - (|> (i64::opposite subject) - (i64::/ param) - i64::opposite))] + (|> (i64:opposite subject) + (i64:/ (i64:opposite param))) + (|> (i64:opposite subject) + (i64:/ param) + i64:opposite))] [(negative? param) (|> param - i64::opposite - (i64::/ subject) - i64::opposite)]) + i64:opposite + (i64:/ subject) + i64:opposite)]) (with_vars [result remainder approximate approximate_result log2 approximate_remainder] (all _.then - (_.set! result i64::zero) + (_.set! result i64:zero) (_.set! remainder subject) - (_.while (|> (|> remainder (i64::< param)) - (_.or (|> remainder (i64::= param)))) - (let [calc_rough_estimate (_.of (list (|> (i64::float remainder) (_./ (i64::float param)))) + (_.while (|> (|> remainder (i64:< param)) + (_.or (|> remainder (i64:= param)))) + (let [calc_rough_estimate (_.of (list (|> (i64:float remainder) (_./ (i64:float param)))) (_.var "floor")) - calc_approximate_result (i64::of_float approximate) - calc_approximate_remainder (|> approximate_result (i64::x param)) + calc_approximate_result (i64:of_float approximate) + calc_approximate_remainder (|> approximate_result (i64:x param)) delta (_.if (_.> log2 (_.float +48.0)) (_.** (|> log2 (_.- (_.float +48.0))) (_.float +2.0)) @@ -506,24 +506,24 @@ (_.set! approximate_result calc_approximate_result) (_.set! approximate_remainder calc_approximate_remainder) (_.while (|> (negative? approximate_remainder) - (_.or (|> approximate_remainder (i64::< remainder)))) + (_.or (|> approximate_remainder (i64:< remainder)))) (all _.then (_.set! approximate (|> delta (_.- approximate))) (_.set! approximate_result calc_approximate_result) (_.set! approximate_remainder calc_approximate_remainder))) - (_.set! result (|> (_.if (|> approximate_result (i64::= i64::zero)) - i64::one + (_.set! result (|> (_.if (|> approximate_result (i64:= i64:zero)) + i64:one approximate_result) - (i64::+ result))) - (_.set! remainder (|> remainder (i64::- approximate_remainder)))))) + (i64:+ result))) + (_.set! remainder (|> remainder (i64:- approximate_remainder)))))) result)) ))) -(the (i64::% param subject) - (let [flat (|> subject (i64::/ param) (i64::x param))] - (|> subject (i64::- flat)))) +(the (i64:% param subject) + (let [flat (|> subject (i64:/ param) (i64:x param))] + (|> subject (i64:- flat)))) -(the (lux::try op) +(the (lux:try op) (with_vars [error value] (_.try (all _.then (_.set! value (_.of (list ..unit) op)) @@ -534,7 +534,7 @@ error)))} {.:None}))) -(the (lux::program_args program_args) +(the (lux:program_args program_args) (with_vars [inputs value] (all _.then (_.set! inputs ..none) @@ -545,8 +545,8 @@ (.the runtime//lux Expression (all _.then - @lux::try - @lux::program_args + @lux:try + @lux:program_args )) (.the current_time_float @@ -554,15 +554,15 @@ (let [raw_time (_.of (list) (_.var "Sys.time"))] (_.of (list raw_time) (_.var "as.numeric")))) -(the (io::current_time! _) +(the (io:current_time! _) (|> current_time_float (_.* (_.float +1,000.0)) - i64::of_float)) + i64:of_float)) (.the runtime//io Expression (all _.then - @io::current_time! + @io:current_time! )) (.the minimum_index_length @@ -581,7 +581,7 @@ (-> Expression Expression Expression) (|> min_length (_.- (_.length product)))) -(the (tuple::left index product) +(the (tuple:left index product) (let [$index_min_length (_.var "index_min_length")] (all _.then (_.set! $index_min_length (minimum_index_length index)) @@ -589,10 +589,10 @@ ... No need for recursion (product_element product index) ... Needs recursion - (tuple::left (updated_index $index_min_length product) - (product_tail product)))))) + (tuple:left (updated_index $index_min_length product) + (product_tail product)))))) -(the (tuple::right index product) +(the (tuple:right index product) (let [$index_min_length (_.var "index_min_length")] (all _.then (_.set! $index_min_length (minimum_index_length index)) @@ -601,12 +601,12 @@ (product_element product index)] [... Needs recursion (|> (_.length product) (_.< $index_min_length)) - (tuple::right (updated_index $index_min_length product) - (product_tail product))]) + (tuple:right (updated_index $index_min_length product) + (product_tail product))]) ... Must slice (|> product (_.slice_from index)))))) -(the (sum::get sum wants_last? wanted_tag) +(the (sum:get sum wants_last? wanted_tag) (let [no_match _.null sum_tag (|> sum (_.item (_.string ..variant_tag_field))) sum_flag (|> sum (_.item (_.string ..variant_flag_field))) @@ -616,7 +616,7 @@ ... Must recurse. (|> wanted_tag (_.- sum_tag) - (sum::get sum_value wants_last?)) + (sum:get sum_value wants_last?)) no_match)] (_.cond (list [(_.= sum_tag wanted_tag) (_.if (_.= wants_last? sum_flag) @@ -628,31 +628,31 @@ [(|> (|> wants_last? (_.= (_.string ""))) (_.and (|> wanted_tag (_.< sum_tag)))) - (adt::variant (|> sum_tag (_.- wanted_tag)) sum_flag sum_value)]) + (adt:variant (|> sum_tag (_.- wanted_tag)) sum_flag sum_value)]) no_match))) (.the runtime//adt Expression (all _.then - @tuple::left - @tuple::right - @sum::get - @adt::variant + @tuple:left + @tuple:right + @sum:get + @adt:variant )) (template.with [ ] [(the ( mask input) - (i64::new ( (i64_high mask) - (i64_high input)) - ( (i64_low mask) - (i64_low input))))] + (i64:new ( (i64_high mask) + (i64_high input)) + ( (i64_low mask) + (i64_low input))))] - [[i64::and _.bit_and] - [i64::or _.bit_or] - [i64::xor _.bit_xor]]) + [[i64:and _.bit_and] + [i64:or _.bit_or] + [i64:xor _.bit_xor]]) -(the (i64::>> shift input) +(the (i64:>> shift input) (all _.then (limit_shift! shift) (_.cond (list (no_shift_clause shift input) @@ -663,16 +663,16 @@ low (|> (i64_low input) (_.bit_ushr shift) (_.bit_or (_.if (_.of (list $mid) (_.var "is.na")) - (_.as::integer (_.int +0)) + (_.as:integer (_.int +0)) $mid)))] (all _.then (_.set! $mid mid) - (i64::new high low))))] + (i64:new high low))))] [(|> shift (_.= (_.int +32))) (let [high (i64_high input)] - (i64::new (_.int +0) high))]) + (i64:new (_.int +0) high))]) (let [low (|> (i64_high input) (_.bit_ushr (|> shift (_.- (_.int +32)))))] - (i64::new (_.int +0) low))))) + (i64:new (_.int +0) low))))) (.the runtime//i64 Expression @@ -680,36 +680,36 @@ @f2^32 @f2^63 - @i64::new - @i64::of_float + @i64:new + @i64:of_float - @i64::and - @i64::or - @i64::xor - @i64::not - @i64::<< - @i64::arithmetic_>>_32 - @i64::arithmetic_>> - @i64::>> - - @i64::zero - @i64::one - @i64::minimum - @i64::maximum - @i64::= - @i64::< - @i64::+ - @i64::- - @i64::opposite - @i64::-one - @i64::unsigned_low - @i64::float - @i64::x - @i64::/ - @i64::% + @i64:and + @i64:or + @i64:xor + @i64:not + @i64:<< + @i64:arithmetic_>>_32 + @i64:arithmetic_>> + @i64:>> + + @i64:zero + @i64:one + @i64:minimum + @i64:maximum + @i64:= + @i64:< + @i64:+ + @i64:- + @i64:opposite + @i64:-one + @i64:unsigned_low + @i64:float + @i64:x + @i64:/ + @i64:% )) -(the (decimal::decode input) +(the (decimal:decode input) (with_vars [output] (all _.then (_.set! output (_.of (list input) (_.var "as.numeric"))) @@ -720,7 +720,7 @@ (.the runtime//decimal Expression (all _.then - @decimal::decode + @decimal:decode )) (.the ++ @@ -736,10 +736,10 @@ (-> Expression Expression) (_.of (list text) (_.var "nchar"))) -(the (text::index subject param start) +(the (text:index subject param start) (with_vars [idx startF subjectL] (all _.then - (_.set! startF (i64::float start)) + (_.set! startF (i64:float start)) (_.set! subjectL (text_length subject)) (_.if (_.< subjectL startF) (all _.then @@ -753,10 +753,10 @@ (_.item (_.int +1)))) (_.if (|> idx (_.= (_.int -1))) ..none - (..some (i64::of_float (|> idx (_.+ startF)))))) + (..some (i64:of_float (|> idx (_.+ startF)))))) ..none)))) -(the (text::clip text minimum additional) +(the (text:clip text minimum additional) (with_vars [length] (all _.then (_.set! length (_.length text)) @@ -770,19 +770,19 @@ (_.of (list (text_clip idx idx text)) (_.var "utf8ToInt"))) -(the (text::char text idx) +(the (text:char text idx) (_.if (_.< (_.length text) idx) (all _.then (_.set! idx (++ idx)) - (..some (i64::of_float (char_at idx text)))) + (..some (i64:of_float (char_at idx text)))) ..none)) (.the runtime//text Expression (all _.then - @text::index - @text::clip - @text::char + @text:index + @text:clip + @text:char )) (.the (check_index_out_of_bounds array idx body) @@ -791,7 +791,7 @@ (_.stop (_.string "Array index out of bounds!")) body)) -(the (array::new size) +(the (array:new size) (with_vars [output] (all _.then (_.set! output (_.list (list))) @@ -800,7 +800,7 @@ output) output))) -(the (array::get array idx) +(the (array:get array idx) (with_vars [temp] (<| (check_index_out_of_bounds array idx) (all _.then @@ -809,7 +809,7 @@ ..none (..some temp)))))) -(the (array::put array idx value) +(the (array:put array idx value) (<| (check_index_out_of_bounds array idx) (all _.then (_.set_item! (_.+ (_.int +1) idx) value array) @@ -818,9 +818,9 @@ (.the runtime//array Expression (all _.then - @array::new - @array::get - @array::put + @array:new + @array:get + @array:put )) (.the full_runtime diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/translation/r/when.lux b/stdlib/source/library/lux/compiler/language/lux/phase/translation/r/when.lux index b8571ed392..45f51ad210 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/translation/r/when.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/translation/r/when.lux @@ -75,8 +75,8 @@ [( lefts) ( (_.int (.integer lefts)))] - [[.:Left //runtime.tuple::left] - [.:Right //runtime.tuple::right]] + [[.:Left //runtime.tuple:left] + [.:Right //runtime.tuple:right]] ))))] (method source))) valueO @@ -182,7 +182,7 @@ ..fail! clauses)))] - [[/////synthesis.:I64_Fork //primitive.i64 //runtime.i64::=] + [[/////synthesis.:I64_Fork //primitive.i64 //runtime.i64:=] [/////synthesis.:F64_Fork //primitive.f64 _.=] [/////synthesis.:Text_Fork //primitive.text _.=]] )) @@ -190,7 +190,7 @@ (,, (template.with [ ] [( idx) (///////phase:pure (all _.then - (_.set! $temp (|> idx .integer _.int (//runtime.sum::get ..peek (//runtime.flag )))) + (_.set! $temp (|> idx .integer _.int (//runtime.sum:get ..peek (//runtime.flag )))) (_.if (_.= _.null $temp) ..fail! (..push_cursor! $temp))))] @@ -206,8 +206,8 @@ [( lefts) (///////phase:pure (|> ..peek ( (_.int (.integer lefts))) ..push_cursor!))] - [[/////synthesis.left_member //runtime.tuple::left] - [/////synthesis.right_member //runtime.tuple::right]] + [[/////synthesis.left_member //runtime.tuple:left] + [/////synthesis.right_member //runtime.tuple:right]] )) (/////synthesis.path/seq leftP rightP) diff --git a/stdlib/source/library/lux/compiler/language/lux/phase/translation/ruby/runtime.lux b/stdlib/source/library/lux/compiler/language/lux/phase/translation/ruby/runtime.lux index 75759735aa..d24c53be42 100644 --- a/stdlib/source/library/lux/compiler/language/lux/phase/translation/ruby/runtime.lux +++ b/stdlib/source/library/lux/compiler/language/lux/phase/translation/ruby/runtime.lux @@ -240,31 +240,31 @@ Computation) ..right) -(the (sum//get sum expected::right? expected::lefts) +(the (sum//get sum expected:right? expected:lefts) (let [mismatch! (_.return _.nil) - actual::lefts (_.item (_.string ..variant_tag_field) sum) - actual::right? (_.item (_.string ..variant_flag_field) sum) - actual::value (_.item (_.string ..variant_value_field) sum) + actual:lefts (_.item (_.string ..variant_tag_field) sum) + actual:right? (_.item (_.string ..variant_flag_field) sum) + actual:value (_.item (_.string ..variant_value_field) sum) recur! (all _.then - (_.; (_.set (list expected::lefts) (|> expected::lefts - (_.- actual::lefts) - (_.- (_.int +1))))) - (_.; (_.set (list sum) actual::value)))] + (_.; (_.set (list expected:lefts) (|> expected:lefts + (_.- actual:lefts) + (_.- (_.int +1))))) + (_.; (_.set (list sum) actual:value)))] (<| (_.while (_.bool true)) - (_.if (_.= expected::lefts actual::lefts) - (_.if (_.= expected::right? actual::right?) - (_.return actual::value) + (_.if (_.= expected:lefts actual:lefts) + (_.if (_.= expected:right? actual:right?) + (_.return actual:value) mismatch!)) - (_.if (_.< expected::lefts actual::lefts) - (_.if (_.= ..unit actual::right?) + (_.if (_.< expected:lefts actual:lefts) + (_.if (_.= ..unit actual:right?) recur! mismatch!)) - (_.if (_.= ..unit expected::right?) - (_.return (sum//make (|> actual::lefts - (_.- expected::lefts) + (_.if (_.= ..unit expected:right?) + (_.return (sum//make (|> actual:lefts + (_.- expected:lefts) (_.- (_.int +1))) - actual::right? - actual::value))) + actual:right? + actual:value))) mismatch!))) (.the runtime//adt @@ -299,18 +299,18 @@ @lux//program_args )) -(.the i64::+limit (_.manual "+0x7FFFFFFFFFFFFFFF")) -(.the i64::-limit (_.manual "-0x8000000000000000")) -(.the i64::+cap (_.manual "+0x8000000000000000")) -(.the i64::-cap (_.manual "-0x8000000000000001")) +(.the i64:+limit (_.manual "+0x7FFFFFFFFFFFFFFF")) +(.the i64:-limit (_.manual "-0x8000000000000000")) +(.the i64:+cap (_.manual "+0x8000000000000000")) +(.the i64:-cap (_.manual "-0x8000000000000001")) -(the i64::+iteration +(the i64:+iteration (_.manual "(+1<<64)")) -(the i64::-iteration +(the i64:-iteration (_.manual "(-1<<64)")) -(the (i64::i64 input) +(the (i64:i64 input) [..mruby? (_.return input)] (with_vars [temp] (`` (<| (,, (template.with [ ] @@ -321,50 +321,50 @@ (|> temp (_.- ) (_.+ )) temp))))] - [[(_.> ..i64::+limit) ..i64::+iteration ..i64::+cap ..i64::-limit] - [(_.< ..i64::-limit) ..i64::-iteration ..i64::-cap ..i64::+limit]] + [[(_.> ..i64:+limit) ..i64:+iteration ..i64:+cap ..i64:-limit] + [(_.< ..i64:-limit) ..i64:-iteration ..i64:-cap ..i64:+limit]] )) (_.return input))))) -(.the i32::low +(.the i32:low (|>> (_.bit_and (_.manual "+0xFFFFFFFF")))) -(.the i32::high +(.the i32:high (|>> (_.bit_shr (_.int +32)) - ..i32::low)) + ..i32:low)) -(.the i32::positive? +(.the i32:positive? (|>> (_.bit_and (_.manual "+0x80000000")) (_.= (_.int +0)))) -(.the i32::up +(.the i32:up (_.bit_shl (_.int +32))) (.the i64 (template.macro (_ @high @low) - [(|> (_.? (i32::positive? @high) + [(|> (_.? (i32:positive? @high) @high (|> (_.manual "+0xFFFFFFFF") (_.- @high) _.bit_not)) - i32::up + i32:up (_.bit_or @low))])) (.the as_natural - (_.% ..i64::+iteration)) + (_.% ..i64:+iteration)) (template.with [ ] [(the ( left right) - [..normal_ruby? (_.return (..i64::i64 ( (..as_natural left) (..as_natural right))))] + [..normal_ruby? (_.return (..i64:i64 ( (..as_natural left) (..as_natural right))))] (with_vars [high low] (all _.then - (_.; (_.set (list high) ( (i32::high left) (..i32::high right)))) - (_.; (_.set (list low) ( (i32::low left) (..i32::low right)))) + (_.; (_.set (list high) ( (i32:high left) (..i32:high right)))) + (_.; (_.set (list low) ( (i32:low left) (..i32:low right)))) (_.return (..i64 high low)))))] - [[i64::and _.bit_and] - [i64::or _.bit_or] - [i64::xor _.bit_xor]] + [[i64:and _.bit_and] + [i64:or _.bit_or] + [i64:xor _.bit_xor]] ) (.the (cap_shift! shift) @@ -384,28 +384,28 @@ _.Expression) (|>> (_.< (_.int +32)))) -(the (i64::<< shift input) +(the (i64:<< shift input) [..normal_ruby? (_.return (|> input (_.bit_shl (_.% (_.int +64) shift)) - ..i64::i64))] + ..i64:i64))] (with_vars [high low] (all _.then (..cap_shift! shift) (<| (..handle_no_shift! shift input) (_.if (..small_shift? shift) (all _.then - (_.; (_.set (list high) (_.bit_or (|> input i32::high (_.bit_shl shift)) - (|> input i32::low (_.bit_shr (_.- shift (_.int +32))))))) - (_.; (_.set (list low) (|> input i32::low (_.bit_shl shift)))) - (_.return (..i64 (i32::low high) - (i32::low low))))) + (_.; (_.set (list high) (_.bit_or (|> input i32:high (_.bit_shl shift)) + (|> input i32:low (_.bit_shr (_.- shift (_.int +32))))))) + (_.; (_.set (list low) (|> input i32:low (_.bit_shl shift)))) + (_.return (..i64 (i32:low high) + (i32:low low))))) (all _.then - (_.; (_.set (list high) (|> input i32::low (_.bit_shl (_.- (_.int +32) shift))))) - (_.return (..i64 (i32::low high) + (_.; (_.set (list high) (|> input i32:low (_.bit_shl (_.- (_.int +32) shift))))) + (_.return (..i64 (i32:low high) (_.int +0))))) ))) -(the (i64::>> shift input) +(the (i64:>> shift input) [..normal_ruby? (all _.then (_.; (_.set (list shift) (_.% (_.int +64) shift))) (_.return (_.? (_.= (_.int +0) shift) @@ -419,15 +419,15 @@ (<| (..handle_no_shift! shift input) (_.if (..small_shift? shift) (all _.then - (_.; (_.set (list high) (|> input i32::high (_.bit_shr shift)))) - (_.; (_.set (list low) (|> input i32::low (_.bit_shr shift) - (_.bit_or (|> input i32::high (_.bit_shl (_.- shift (_.int +32)))))))) + (_.; (_.set (list high) (|> input i32:high (_.bit_shr shift)))) + (_.; (_.set (list low) (|> input i32:low (_.bit_shr shift) + (_.bit_or (|> input i32:high (_.bit_shl (_.- shift (_.int +32)))))))) (_.return (..i64 high low)))) (_.return (_.? (|> shift (_.= (_.int +32))) - (i32::high input) - (|> input i32::high (_.bit_shr (_.- (_.int +32) shift))))))))) + (i32:high input) + (|> input i32:high (_.bit_shr (_.- (_.int +32) shift))))))))) -(the (i64::/ parameter subject) +(the (i64:/ parameter subject) (_.return (_.? (_.and (_.= (_.int -1) parameter) (_.= (_.int integer:minimum) subject)) subject @@ -436,47 +436,47 @@ (_.- extra) (_./ parameter)))))) -(the (i64::+ parameter subject) - [..normal_ruby? (_.return (i64::i64 (_.+ parameter subject)))] +(the (i64:+ parameter subject) + [..normal_ruby? (_.return (i64:i64 (_.+ parameter subject)))] (with_vars [high low] (all _.then - (_.; (_.set (list low) (_.+ (i32::low subject) - (i32::low parameter)))) - (_.; (_.set (list high) (|> (i32::high low) - (_.+ (i32::high subject)) - (_.+ (i32::high parameter)) - i32::low))) - - (_.return (..i64 high (i32::low low))) + (_.; (_.set (list low) (_.+ (i32:low subject) + (i32:low parameter)))) + (_.; (_.set (list high) (|> (i32:high low) + (_.+ (i32:high subject)) + (_.+ (i32:high parameter)) + i32:low))) + + (_.return (..i64 high (i32:low low))) ))) -(.the i64::minimum +(.the i64:minimum (_.manual "-0x8000000000000000")) -(.the (i64::opposite value) - (_.? (_.= i64::minimum value) - i64::minimum - (i64::+ (_.int +1) (_.bit_not value)))) +(.the (i64:opposite value) + (_.? (_.= i64:minimum value) + i64:minimum + (i64:+ (_.int +1) (_.bit_not value)))) -(the (i64::- parameter subject) - [..normal_ruby? (_.return (i64::i64 (_.- parameter subject)))] - (_.return (i64::+ (i64::opposite parameter) subject))) +(the (i64:- parameter subject) + [..normal_ruby? (_.return (i64:i64 (_.- parameter subject)))] + (_.return (i64:+ (i64:opposite parameter) subject))) -(.the i16::high +(.the i16:high (_.bit_shr (_.int +16))) -(.the i16::low +(.the i16:low (_.bit_and (_.manual "+0xFFFF"))) -(.the i16::up +(.the i16:up (_.bit_shl (_.int +16))) -(the (i64::x parameter subject) - [..normal_ruby? (_.return (i64::i64 (_.* parameter subject)))] - (let [hh (|>> i32::high i16::high) - hl (|>> i32::high i16::low) - lh (|>> i32::low i16::high) - ll (|>> i32::low i16::low)] +(the (i64:x parameter subject) + [..normal_ruby? (_.return (i64:i64 (_.* parameter subject)))] + (let [hh (|>> i32:high i16:high) + hl (|>> i32:high i16:low) + lh (|>> i32:low i16:high) + ll (|>> i32:low i16:low)] (with_vars [l48 l32 l16 l00 r48 r32 r16 r00 x48 x32 x16 x00 @@ -493,54 +493,54 @@ (_.; (_.set (list r00) (ll parameter))) (_.; (_.set (list x00) (_.* l00 r00))) - (_.; (_.set (list x16) (i16::high x00))) - (_.; (_.set (list x00) (i16::low x00))) + (_.; (_.set (list x16) (i16:high x00))) + (_.; (_.set (list x00) (i16:low x00))) (_.; (_.set (list x16) (|> x16 (_.+ (_.* l16 r00))))) - (_.; (_.set (list x32) (i16::high x16))) (_.; (_.set (list x16) (i16::low x16))) + (_.; (_.set (list x32) (i16:high x16))) (_.; (_.set (list x16) (i16:low x16))) (_.; (_.set (list x16) (|> x16 (_.+ (_.* l00 r16))))) - (_.; (_.set (list x32) (|> x32 (_.+ (i16::high x16))))) (_.; (_.set (list x16) (i16::low x16))) + (_.; (_.set (list x32) (|> x32 (_.+ (i16:high x16))))) (_.; (_.set (list x16) (i16:low x16))) (_.; (_.set (list x32) (|> x32 (_.+ (_.* l32 r00))))) - (_.; (_.set (list x48) (i16::high x32))) (_.; (_.set (list x32) (i16::low x32))) + (_.; (_.set (list x48) (i16:high x32))) (_.; (_.set (list x32) (i16:low x32))) (_.; (_.set (list x32) (|> x32 (_.+ (_.* l16 r16))))) - (_.; (_.set (list x48) (|> x48 (_.+ (i16::high x32))))) (_.; (_.set (list x32) (i16::low x32))) + (_.; (_.set (list x48) (|> x48 (_.+ (i16:high x32))))) (_.; (_.set (list x32) (i16:low x32))) (_.; (_.set (list x32) (|> x32 (_.+ (_.* l00 r32))))) - (_.; (_.set (list x48) (|> x48 (_.+ (i16::high x32))))) (_.; (_.set (list x32) (i16::low x32))) + (_.; (_.set (list x48) (|> x48 (_.+ (i16:high x32))))) (_.; (_.set (list x32) (i16:low x32))) (_.; (_.set (list x48) (|> x48 (_.+ (_.* l48 r00)) (_.+ (_.* l32 r16)) (_.+ (_.* l16 r32)) (_.+ (_.* l00 r48)) - i16::low))) + i16:low))) - (_.; (_.set (list high) (_.bit_or (i16::up x48) x32))) - (_.; (_.set (list low) (_.bit_or (i16::up x16) x00))) + (_.; (_.set (list high) (_.bit_or (i16:up x48) x32))) + (_.; (_.set (list low) (_.bit_or (i16:up x16) x00))) (_.return (..i64 high low)) ))) ) -(the (i64::char subject) +(the (i64:char subject) [..mruby? (_.return (_.do "chr" (list) {.:None} subject))] (_.return (_.do "chr" (list (_.string "UTF-8")) {.:None} subject))) (.the runtime//i64 _.Statement (all _.then - @i64::+iteration - @i64::-iteration - @i64::i64 - @i64::<< - @i64::>> - @i64::and - @i64::or - @i64::xor - @i64::+ - @i64::- - @i64::x - @i64::/ - @i64::char + @i64:+iteration + @i64:-iteration + @i64:i64 + @i64:<< + @i64:>> + @i64:and + @i64:or + @i64:xor + @i64:+ + @i64:- + @i64:x + @i64:/ + @i64:char )) (the (text//index subject param start) diff --git a/stdlib/source/library/lux/compiler/language/lux/syntax.lux b/stdlib/source/library/lux/compiler/language/lux/syntax.lux index 23de1dc1b7..595d5f9fa3 100644 --- a/stdlib/source/library/lux/compiler/language/lux/syntax.lux +++ b/stdlib/source/library/lux/compiler/language/lux/syntax.lux @@ -88,7 +88,7 @@ ... That way, it should be possible to obtain the character without wrapping ... it into a java.lang.Long, thereby improving performance. -... TODO: Make an extension to take advantage of java/lang/String::indexOf +... TODO: Make an extension to take advantage of java/lang/String:indexOf ... to get better performance than the current .text_index# extension. ... TODO: Instead of always keeping a "where" provenance variable, keep the @@ -216,8 +216,8 @@ (inlined (!forward length where) (-> Length Provenance Provenance) - (let [[where::file where::line where::column] where] - [where::file where::line (!n/+ length where::column)])) + (let [[where:file where:line where:column] where] + [where:file where:line (!n/+ length where:column)])) (every (Success it) [Source it]) @@ -345,8 +345,8 @@ (text.replaced ..digit_delimiter "") (by of)) {.:Right output} - (..success [(let [[where::file where::line where::column] ,where] - [where::file where::line (!n/+ (!n/- ) where::column)]) + (..success [(let [[where:file where:line where:column] ,where] + [where:file where:line (!n/+ (!n/- ) where:column)]) @code] output) @@ -363,8 +363,8 @@ (by of)) {.:Right output} (let [' (after )] - (..success [(let [[where::file where::line where::column] ,where] - [where::file where::line (!n/+ (!n/- ') where::column)]) + (..success [(let [[where:file where:line where:column] ,where] + [where:file where:line (!n/+ (!n/- ') where:column)]) ' @code] output)) @@ -380,8 +380,8 @@ (text.replaced ..digit_delimiter "") (by of)) {.:Right output} - (..success [(let [[where::file where::line where::column] where] - [where::file where::line (!n/+ (!n/- ) where::column)]) + (..success [(let [[where:file where:line where:column] where] + [where:file where:line (!n/+ (!n/- ) where:column)]) @code] { where output}) @@ -684,8 +684,8 @@ (inlined (!new_line where) (-> Provenance Provenance) - (let [[where::file where::line where::column] where] - [where::file (after where::line) 0])) + (let [[where:file where:line where:column] where] + [where:file (after where:line) 0])) (the !vertical (template.macro (_ the_globals where offset) diff --git a/stdlib/source/library/lux/compiler/meta/packager/jvm.lux b/stdlib/source/library/lux/compiler/meta/packager/jvm.lux index ec38312714..8d67a69bcc 100644 --- a/stdlib/source/library/lux/compiler/meta/packager/jvm.lux +++ b/stdlib/source/library/lux/compiler/meta/packager/jvm.lux @@ -54,72 +54,72 @@ ["[0]" runtime (.only Definition)]]]]]]]]]) (ffi.the java/lang/Object - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/String - "[1]::[0]") + "[1]:[0]") (ffi.the java/util/jar/Attributes - "[1]::[0]" + "[1]:[0]" (put [java/lang/Object java/lang/Object] "?" java/lang/Object)) (ffi.the java/util/jar/Attributes$Name - "[1]::[0]" + "[1]:[0]" ("read_only" "static" MAIN_CLASS java/util/jar/Attributes$Name) ("read_only" "static" MANIFEST_VERSION java/util/jar/Attributes$Name)) (ffi.the java/util/jar/Manifest - "[1]::[0]" + "[1]:[0]" (new []) (getMainAttributes [] java/util/jar/Attributes)) (ffi.the java/io/Flushable - "[1]::[0]" + "[1]:[0]" (flush [] void)) (ffi.the java/io/Closeable - "[1]::[0]" + "[1]:[0]" (close [] void)) (ffi.the java/io/OutputStream - "[1]::[0]" + "[1]:[0]" (write [[byte] int int] void)) (ffi.the java/io/ByteArrayOutputStream - "[1]::[0]" + "[1]:[0]" (new [int]) (toByteArray [] [byte])) (ffi.the java/util/zip/ZipEntry - "[1]::[0]" + "[1]:[0]" (getName [] java/lang/String) (isDirectory [] boolean) (getSize [] long)) (ffi.the java/util/zip/ZipOutputStream - "[1]::[0]" + "[1]:[0]" (write [[byte] int int] void) (closeEntry [] void)) (ffi.the java/util/jar/JarEntry - "[1]::[0]" + "[1]:[0]" (new [java/lang/String])) (ffi.the java/util/jar/JarOutputStream - "[1]::[0]" + "[1]:[0]" (new [java/io/OutputStream java/util/jar/Manifest]) (putNextEntry [java/util/zip/ZipEntry] "try" void)) (ffi.the java/io/ByteArrayInputStream - "[1]::[0]" + "[1]:[0]" (new [[byte]])) (ffi.the java/io/InputStream - "[1]::[0]" + "[1]:[0]" (read [[byte] int int] int)) (ffi.the java/util/jar/JarInputStream - "[1]::[0]" + "[1]:[0]" (new [java/io/InputStream]) (getNextJarEntry [] "try" "?" java/util/jar/JarEntry)) @@ -139,20 +139,20 @@ (the (manifest program) (-> (Maybe unit.ID) java/util/jar/Manifest) - (let [manifest (java/util/jar/Manifest::new []) - attrs (to (java/util/jar/Manifest::getMainAttributes [] manifest) - (java/util/jar/Attributes::put [(java/util/jar/Attributes$Name::MANIFEST_VERSION) - (ffi.as_string ..manifest_version)]))] + (let [manifest (java/util/jar/Manifest:new []) + attrs (to (java/util/jar/Manifest:getMainAttributes [] manifest) + (java/util/jar/Attributes:put [(java/util/jar/Attributes$Name:MANIFEST_VERSION) + (ffi.as_string ..manifest_version)]))] (exec (when program {.:Some program} (to attrs - (java/util/jar/Attributes::put [(java/util/jar/Attributes$Name::MAIN_CLASS) - (|> program - runtime.class_name - internal.name - internal.external - ffi.as_string)])) + (java/util/jar/Attributes:put [(java/util/jar/Attributes$Name:MAIN_CLASS) + (|> program + runtime.class_name + internal.name + internal.external + ffi.as_string)])) {.:None} attrs) @@ -167,12 +167,12 @@ (text.replaced "." "/") (text.suffix (its context.:artifact_extension static)))] (monad.let try.monad - [_ (java/util/jar/JarOutputStream::putNextEntry [(java/util/jar/JarEntry::new [(ffi.as_string class_path)])] - sink)] + [_ (java/util/jar/JarOutputStream:putNextEntry [(java/util/jar/JarEntry:new [(ffi.as_string class_path)])] + sink)] (pure (to sink - (java/util/zip/ZipOutputStream::write [content (ffi.as_int +0) (ffi.as_int (.integer (binary.size content)))]) - (java/io/Flushable::flush []) - (java/util/zip/ZipOutputStream::closeEntry [])))))) + (java/util/zip/ZipOutputStream:write [content (ffi.as_int +0) (ffi.as_int (.integer (binary.size content)))]) + (java/io/Flushable:flush []) + (java/util/zip/ZipOutputStream:closeEntry [])))))) (the (write_module static necessary_dependencies [module output] sink) (-> Context (Set unit.ID) [module.ID Output] java/util/jar/JarOutputStream @@ -190,16 +190,16 @@ (-> java/util/jar/JarInputStream [Natural Binary]) (let [chunk (binary.empty ..mebi_byte) chunk_size (.integer ..mebi_byte) - buffer (java/io/ByteArrayOutputStream::new [(ffi.as_int chunk_size)])] + buffer (java/io/ByteArrayOutputStream:new [(ffi.as_int chunk_size)])] (loop (again [so_far 0]) - (when (ffi.of_int (java/io/InputStream::read [chunk (ffi.as_int +0) (ffi.as_int chunk_size)] input)) + (when (ffi.of_int (java/io/InputStream:read [chunk (ffi.as_int +0) (ffi.as_int chunk_size)] input)) -1 [so_far - (java/io/ByteArrayOutputStream::toByteArray [] buffer)] + (java/io/ByteArrayOutputStream:toByteArray [] buffer)] bytes_read (exec - (java/io/OutputStream::write [chunk (ffi.as_int +0) (ffi.as_int bytes_read)] buffer) + (java/io/OutputStream:write [chunk (ffi.as_int +0) (ffi.as_int bytes_read)] buffer) (again (|> bytes_read .natural (n.+ so_far)))))))) (the (read_jar_entry_with_known_size expected_size input) @@ -207,7 +207,7 @@ (let [buffer (binary.empty expected_size)] (loop (again [so_far 0]) (let [so_far' (|> input - (java/io/InputStream::read [buffer (ffi.as_int (.integer so_far)) (ffi.as_int (.integer (n.- so_far expected_size)))]) + (java/io/InputStream:read [buffer (ffi.as_int (.integer so_far)) (ffi.as_int (.integer (n.- so_far expected_size)))]) ffi.of_int .natural (n.+ so_far))] @@ -217,7 +217,7 @@ (the (read_jar_entry entry input) (-> java/util/jar/JarEntry java/util/jar/JarInputStream [Natural Binary]) - (when (ffi.of_long (java/util/zip/ZipEntry::getSize [] entry)) + (when (ffi.of_long (java/util/zip/ZipEntry:getSize [] entry)) -1 (..read_jar_entry_with_unknown_size input) @@ -229,12 +229,12 @@ [(Set file.Path) (Set file.Path) java/util/jar/JarOutputStream] (Try [(Set file.Path) (Set file.Path) java/util/jar/JarOutputStream])) (let [input (|> jar - [] java/io/ByteArrayInputStream::new - [] java/util/jar/JarInputStream::new)] + [] java/io/ByteArrayInputStream:new + [] java/util/jar/JarInputStream:new)] (loop (again [entries entries duplicates duplicates sink sink]) - (when (java/util/jar/JarInputStream::getNextJarEntry [] input) + (when (java/util/jar/JarInputStream:getNextJarEntry [] input) {try.:Failure error} {try.:Failure error} @@ -242,19 +242,19 @@ (when ?entry {.:None} (exec - (java/io/Closeable::close [] input) + (java/io/Closeable:close [] input) {try.:Success [entries duplicates sink]}) {.:Some entry} - (let [entry_path (ffi.of_string (java/util/zip/ZipEntry::getName [] entry)) - entry_size (ffi.of_long (java/util/zip/ZipEntry::getSize [] entry))] - (if (not (or (ffi.of_boolean (java/util/zip/ZipEntry::isDirectory [] entry)) + (let [entry_path (ffi.of_string (java/util/zip/ZipEntry:getName [] entry)) + entry_size (ffi.of_long (java/util/zip/ZipEntry:getSize [] entry))] + (if (not (or (ffi.of_boolean (java/util/zip/ZipEntry:isDirectory [] entry)) (or (text.starts_with? "META-INF/maven/" entry_path) (text.starts_with? "META-INF/leiningen/" entry_path)) (or (text.ends_with? ".SF" entry_path) (text.ends_with? ".DSA" entry_path)))) - (when (java/util/jar/JarOutputStream::putNextEntry [(java/util/jar/JarEntry::new [(ffi.as_string entry_path)])] - sink) + (when (java/util/jar/JarOutputStream:putNextEntry [(java/util/jar/JarEntry:new [(ffi.as_string entry_path)])] + sink) {try.:Failure error} (again entries (set.has entry_path duplicates) @@ -265,9 +265,9 @@ (again (set.has entry_path entries) duplicates (to sink - (java/util/zip/ZipOutputStream::write [entry_data (ffi.as_int +0) (ffi.as_int (.integer entry_size))]) - (java/io/Flushable::flush []) - (java/util/zip/ZipOutputStream::closeEntry []))))) + (java/util/zip/ZipOutputStream:write [entry_data (ffi.as_int +0) (ffi.as_int (.integer entry_size))]) + (java/io/Flushable:flush []) + (java/util/zip/ZipOutputStream:closeEntry []))))) (again entries duplicates sink)))))))) @@ -278,12 +278,12 @@ (monad.let [! try.monad] [.let [necessary_dependencies (cache/artifact.necessary_dependencies archive)] order (cache/module.load_order $.key archive) - .let [buffer (java/io/ByteArrayOutputStream::new [(ffi.as_int (.integer ..mebi_byte))])] + .let [buffer (java/io/ByteArrayOutputStream:new [(ffi.as_int (.integer ..mebi_byte))])] sink (|> order (list:each (function (_ [module [module_id entry]]) [module_id (its archive.:output entry)])) (list.mix' ! (..write_module static necessary_dependencies) - (java/util/jar/JarOutputStream::new [buffer (..manifest program)]))) + (java/util/jar/JarOutputStream:new [buffer (..manifest program)]))) [entries duplicates sink] (|> host_dependencies dictionary.values (list.mix' ! ..write_host_dependency @@ -291,8 +291,8 @@ (set.empty text.hash) sink])) .let [_ (to sink - (java/io/Flushable::flush []) - (java/io/Closeable::close []))]] + (java/io/Flushable:flush []) + (java/io/Closeable:close []))]] (pure (|> buffer - (java/io/ByteArrayOutputStream::toByteArray []) + (java/io/ByteArrayOutputStream:toByteArray []) {.:Left}))))) diff --git a/stdlib/source/library/lux/concurrency/atom.lux b/stdlib/source/library/lux/concurrency/atom.lux index d27e1d3e81..720039d5f7 100644 --- a/stdlib/source/library/lux/concurrency/atom.lux +++ b/stdlib/source/library/lux/concurrency/atom.lux @@ -20,7 +20,7 @@ ["[0]" variance (.only Mutable)]]]]) (for .jvm (ffi.the (java/util/concurrent/atomic/AtomicReference it) - "[1]::[0]" + "[1]:[0]" (new [it]) (get [] it) (compareAndSet [it it] boolean)) @@ -41,20 +41,20 @@ (-> it (Atom it))) (nominal.of - (for .jvm (as_expected (java/util/concurrent/atomic/AtomicReference::new [value])) + (for .jvm (as_expected (java/util/concurrent/atomic/AtomicReference:new [value])) (array.has! 0 (variance.write value) (array.empty 1))))) (the .public (read! atom) (for_any (_ r w) (-> (Atom' r w) (IO r))) - (io.io (for .jvm (as_expected (java/util/concurrent/atomic/AtomicReference::get [] (nominal.as atom))) + (io.io (for .jvm (as_expected (java/util/concurrent/atomic/AtomicReference:get [] (nominal.as atom))) (variance.read (array.item 0 (nominal.as atom)))))) (the .public (compare_and_swap! current new atom) (for_any (_ r w) (-> r w (Atom' r w) (IO Bit))) (io.io (for .jvm (ffi.of_boolean - (java/util/concurrent/atomic/AtomicReference::compareAndSet [current new] (nominal.as atom))) + (java/util/concurrent/atomic/AtomicReference:compareAndSet [current new] (nominal.as atom))) (if (|> (nominal.as atom) (array.item 0) variance.read diff --git a/stdlib/source/library/lux/concurrency/thread.lux b/stdlib/source/library/lux/concurrency/thread.lux index b0cd2b0f04..05c0fe606c 100644 --- a/stdlib/source/library/lux/concurrency/thread.lux +++ b/stdlib/source/library/lux/concurrency/thread.lux @@ -32,32 +32,32 @@ ["[0]" event]]) (for .jvm (these (ffi.the java/lang/Object - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/Long - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/Runtime - "[1]::[0]" + "[1]:[0]" ("static" getRuntime [] java/lang/Runtime) (availableProcessors [] int)) (ffi.the java/lang/Runnable - "[1]::[0]") + "[1]:[0]") (ffi.the java/util/concurrent/TimeUnit - "[1]::[0]" + "[1]:[0]" ("enum" MILLISECONDS)) (ffi.the java/util/concurrent/Executor - "[1]::[0]" + "[1]:[0]" (execute [java/lang/Runnable] "io" void)) (ffi.the (java/util/concurrent/ScheduledFuture a) - "[1]::[0]") + "[1]:[0]") (ffi.the java/util/concurrent/ScheduledThreadPoolExecutor - "[1]::[0]" + "[1]:[0]" (new [int]) (schedule [java/lang/Runnable long java/util/concurrent/TimeUnit] "io" (java/util/concurrent/ScheduledFuture java/lang/Object)))) @@ -66,10 +66,10 @@ .python (these (ffi.the threading/Timer - "[1]::[0]" + "[1]:[0]" (start [] "io" "?" Any)) (ffi.the threading - "[1]::[0]" + "[1]:[0]" ("static" Timer [ffi.Float ffi.Function] threading/Timer))) ... Default @@ -82,8 +82,8 @@ (for .jvm (<| (configuration.for ["lua_compiler?" ""] ... TODO: Remove this when Rembulan is no longer being used. ) - (|> [] java/lang/Runtime::getRuntime - (java/lang/Runtime::availableProcessors []) + (|> [] java/lang/Runtime:getRuntime + (java/lang/Runtime:availableProcessors []) ffi.of_int .natural)) ... Default @@ -94,7 +94,7 @@ (|> ..parallelism .integer ffi.as_int - [] java/util/concurrent/ScheduledThreadPoolExecutor::new)) + [] java/util/concurrent/ScheduledThreadPoolExecutor:new)) .js (these) .python (these) @@ -141,9 +141,9 @@ (java/lang/Runnable [] (run self []) void (..execute! action)))] (when milli_seconds - 0 (java/util/concurrent/Executor::execute [runnable] runner) - _ (java/util/concurrent/ScheduledThreadPoolExecutor::schedule [runnable (.integer milli_seconds) java/util/concurrent/TimeUnit::MILLISECONDS] - runner))) + 0 (java/util/concurrent/Executor:execute [runnable] runner) + _ (java/util/concurrent/ScheduledThreadPoolExecutor:schedule [runnable (.integer milli_seconds) java/util/concurrent/TimeUnit:MILLISECONDS] + runner))) .js (..setTimeout [(ffi.function (_ []) Any (..execute! action)) @@ -153,8 +153,8 @@ (monad.let io.monad [_ (|> (ffi.function (_ []) Any (..execute! action)) [(|> milli_seconds n.decimal (d./ +1,000.0))] - threading::Timer - (threading/Timer::start []))] + threading:Timer + (threading/Timer:start []))] (pure [])) ... Default diff --git a/stdlib/source/library/lux/data/text/buffer.lux b/stdlib/source/library/lux/data/text/buffer.lux index 7b0bc60932..262d347849 100644 --- a/stdlib/source/library/lux/data/text/buffer.lux +++ b/stdlib/source/library/lux/data/text/buffer.lux @@ -24,21 +24,21 @@ ["[0]" //]) (`` (for .jvm (these (ffi.the java/lang/CharSequence - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/Appendable - "[1]::[0]" + "[1]:[0]" (append [java/lang/CharSequence] java/lang/Appendable)) (ffi.the java/lang/String - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/StringBuilder - "[1]::[0]" + "[1]:[0]" (new [int]) (toString [] java/lang/String))) .js (these (ffi.the (JS_Array a) - "[1]::[0]" + "[1]:[0]" (push [a] a) (join [Text] Text))) .lua (these (ffi.the (table/concat [(.Array Text) Text] Text)) @@ -47,13 +47,13 @@ ... https://www.lua.org/manual/5.3/manual.html#pdf-table.insert ) .python (these (ffi.the (Python_List of) - "[1]::[0]" + "[1]:[0]" (append [of] "?" Any)) (ffi.the Python_Text - "[1]::[0]" + "[1]:[0]" (join [(Python_List Text)] Text))) .ruby (these (ffi.the Ruby_Text - "[1]::[0]" + "[1]:[0]" (<< [Text] Ruby_Text))) ... ... default ... (these) @@ -88,9 +88,9 @@ then! (is (-> Text (Change java/lang/StringBuilder)) (function (_ chunk builder) (exec - (java/lang/Appendable::append [(as (-> Text java/lang/CharSequence) - chunk)] - builder) + (java/lang/Appendable:append [(as (-> Text java/lang/CharSequence) + chunk)] + builder) builder)))] (nominal.of [(n.+ (//.size chunk) capacity) @@ -99,7 +99,7 @@ then! (is (-> (JS_Array Text) (JS_Array Text)) (function (_ array) (exec - (JS_Array::push chunk array) + (JS_Array:push chunk array) array)))] (nominal.of [(n.+ (//.size chunk) capacity) @@ -117,7 +117,7 @@ then! (is (-> (Python_List Text) (Python_List Text)) (function (_ array) (exec - (Python_List::append chunk array) + (Python_List:append chunk array) array)))] (nominal.of [(n.+ (//.size chunk) capacity) @@ -126,7 +126,7 @@ then! (is (Change Ruby_Text) (function (_ it) (exec - (Ruby_Text::<< chunk it) + (Ruby_Text:<< chunk it) it)))] (nominal.of [(n.+ (//.size chunk) capacity) @@ -154,22 +154,22 @@ (-> Buffer Text) (for .jvm (let [[capacity transform] (nominal.as buffer)] - (|> (java/lang/StringBuilder::new [(ffi.as_int (.integer capacity))]) + (|> (java/lang/StringBuilder:new [(ffi.as_int (.integer capacity))]) transform - (java/lang/StringBuilder::toString []) + (java/lang/StringBuilder:toString []) ffi.of_string)) .js (let [[capacity transform] (nominal.as buffer)] (|> (array.empty 0) (as (-> (Array Text) (JS_Array Text))) transform - (JS_Array::join ""))) + (JS_Array:join ""))) .lua (let [[capacity transform] (nominal.as buffer)] (table/concat [(transform (array.empty 0)) ""])) .python (let [[capacity transform] (nominal.as buffer)] - (Python_Text::join (|> (array.empty 0) - (as (-> (Array Text) (Python_List Text))) - transform) - (as (-> Text Python_Text) ""))) + (Python_Text:join (|> (array.empty 0) + (as (-> (Array Text) (Python_List Text))) + transform) + (as (-> Text Python_Text) ""))) .ruby (let [[capacity transform] (nominal.as buffer)] (|> "" (as (-> Text Ruby_Text)) diff --git a/stdlib/source/library/lux/data/text/encoding/utf8.lux b/stdlib/source/library/lux/data/text/encoding/utf8.lux index 12ea95b380..6e97667b61 100644 --- a/stdlib/source/library/lux/data/text/encoding/utf8.lux +++ b/stdlib/source/library/lux/data/text/encoding/utf8.lux @@ -17,41 +17,41 @@ (for .jvm (ffi.the java/lang/String - "[1]::[0]" + "[1]:[0]" (new [[byte] java/lang/String]) (getBytes [java/lang/String] [byte])) .js (these (ffi.the Uint8Array - "[1]::[0]") + "[1]:[0]") ... On Node (ffi.the Buffer - "[1]::[0]" + "[1]:[0]" ("static" from "as" from|injection [ffi.String ffi.String] Buffer) ("static" from "as" from|projection [Uint8Array] Buffer) (toString [ffi.String] ffi.String)) ... On the browser (ffi.the TextEncoder - "[1]::[0]" + "[1]:[0]" (new [ffi.String]) (encode [ffi.String] Uint8Array)) (ffi.the TextDecoder - "[1]::[0]" + "[1]:[0]" (new [ffi.String]) (decode [Uint8Array] ffi.String))) .ruby (these (ffi.the String - "[1]::[0]" + "[1]:[0]" (encode [Text] String) (force_encoding [Text] Text) (bytes [] Binary)) (ffi.the Array - "[1]::[0]" + "[1]:[0]" (pack [Text] String))) .php @@ -65,8 +65,8 @@ (-> Text Binary) (for .jvm - (java/lang/String::getBytes [(ffi.as_string (//.name //.utf_8))] - (ffi.as_string value)) + (java/lang/String:getBytes [(ffi.as_string (//.name //.utf_8))] + (ffi.as_string value)) .js (if ffi.on_nashorn? @@ -74,14 +74,14 @@ (.js_object_do# "getBytes" value ["utf8"])) ffi.on_node_js? - (|> (Buffer::from|injection [value "utf8"]) + (|> (Buffer:from|injection [value "utf8"]) ... This coercion is valid as per NodeJS's documentation: ... https://nodejs.org/api/buffer.html#buffer_buffers_and_typedarrays (as (-> Any Uint8Array))) ... On the browser - (|> (TextEncoder::new [(//.name //.utf_8)]) - (TextEncoder::encode [value])) + (|> (TextEncoder:new [(//.name //.utf_8)]) + (TextEncoder:encode [value])) ) .python @@ -94,8 +94,8 @@ .ruby (|> value (as (-> Any String)) - (String::encode ["UTF-8"]) - (String::bytes [])) + (String:encode ["UTF-8"]) + (String:bytes [])) .php (|> (..unpack [..php_byte_array_format value]) @@ -107,7 +107,7 @@ (-> Binary (Try Text)) (for .jvm - (|> (java/lang/String::new [value (ffi.as_string (//.name //.utf_8))]) + (|> (java/lang/String:new [value (ffi.as_string (//.name //.utf_8))]) ffi.of_string {try.:Success}) @@ -118,13 +118,13 @@ {try.:Success}) ffi.on_node_js? - (|> (Buffer::from|projection [value]) - (Buffer::toString ["utf8"]) + (|> (Buffer:from|projection [value]) + (Buffer:toString ["utf8"]) {try.:Success}) ... On the browser - (|> (TextDecoder::new [(//.name //.utf_8)]) - (TextDecoder::decode [value]) + (|> (TextDecoder:new [(//.name //.utf_8)]) + (TextDecoder:decode [value]) {try.:Success})) .python @@ -137,9 +137,9 @@ .ruby (|> value (as (-> Any Array)) - (Array::pack ["C*"]) + (Array:pack ["C*"]) (as (-> Any String)) - (String::force_encoding ["UTF-8"]) + (String:force_encoding ["UTF-8"]) {try.:Success}) .php diff --git a/stdlib/source/library/lux/debug.lux b/stdlib/source/library/lux/debug.lux index 14d1d2e619..637b1143d3 100644 --- a/stdlib/source/library/lux/debug.lux +++ b/stdlib/source/library/lux/debug.lux @@ -57,35 +57,35 @@ (for .jvm (these (ffi.the java/lang/String - "[1]::[0]") + "[1]:[0]") (ffi.the (java/lang/Class a) - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/Object - "[1]::[0]" + "[1]:[0]" (toString [] java/lang/String)) (ffi.the java/lang/Integer - "[1]::[0]" + "[1]:[0]" (longValue [] long)) (ffi.the java/lang/Long - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/Double - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/Number - "[1]::[0]" + "[1]:[0]" (doubleValue [] double))) .js (these (ffi.the JSON - "[1]::[0]" + "[1]:[0]" ("static" stringify [.Any] ffi.String)) (ffi.the Array - "[1]::[0]" + "[1]:[0]" ("static" isArray [.Any] ffi.Boolean))) .python @@ -100,15 +100,15 @@ (ffi.the (tostring "as" lua_text [.Any] ffi.String)) (ffi.the math - "[1]::[0]" + "[1]:[0]" ("static" type [.Any] "?" ffi.String))) .ruby (these (ffi.the Class - "[1]::[0]") + "[1]:[0]") (ffi.the Object - "[1]::[0]" + "[1]:[0]" (class [] Class) (to_s [] ffi.String))) @@ -166,7 +166,7 @@ (expansion.let [,math_types (template.spliced ,lua_math_types)] (`` (and (text.= ,lua_type (..lua_type it)) (,, (template.with [,type] - [(when (math::type it) + [(when (math:type it) {.:Some ,type} true @@ -181,7 +181,7 @@ (template.let [(class ) [(|> (as (-> Any ..Object)) - (Object::class []))]] + (Object:class []))]] (let [it_class (class it)] (`` (or (,, (template.with [] [(identical? (class ) it_class)] @@ -213,7 +213,7 @@ {.:Some lefts}] [[(array.item 1 it) (array.item 2 it)] [right? {try.:Success choice}]]) - {try.:Success [(.natural (ffi.of_long (java/lang/Integer::longValue [] lefts))) + {try.:Success [(.natural (ffi.of_long (java/lang/Integer:longValue [] lefts))) (when right? {try.:Success _} 1b {try.:Failure _} 0b) @@ -285,7 +285,7 @@ (template.let [(class_of ) [(|> (as (-> Any ..Object)) - (Object::class []))] + (Object:class []))] (field ,field) [(.ruby_object_do# "[]" it [,field])]] @@ -338,7 +338,7 @@ .js (when (ffi.type_of it) "object" - (Array::isArray it) + (Array:isArray it) else false) @@ -365,7 +365,7 @@ (template.let [(class_of ) [(|> (as (-> Any ..Object)) - (Object::class []))]] + (Object:class []))]] (identical? (class_of [[] []]) (class_of it))) @@ -404,11 +404,11 @@ (for .jvm (|> it (as (-> Any java/lang/Object)) - (java/lang/Object::toString []) + (java/lang/Object:toString []) ffi.of_string) .js - (JSON::stringify it) + (JSON:stringify it) .python (python_text it) @@ -419,7 +419,7 @@ .ruby (|> it (as (-> Any ..Object)) - (Object::to_s [])) + (Object:to_s [])) .php (php_text it))))) diff --git a/stdlib/source/library/lux/ffi.lux b/stdlib/source/library/lux/ffi.lux index 541df01521..931293997c 100644 --- a/stdlib/source/library/lux/ffi.lux +++ b/stdlib/source/library/lux/ffi.lux @@ -855,7 +855,7 @@ get (` (.as (-> Any (io.IO (, (..output_type :field:)))) (io.io (, (<| (lux_optional :field:) (for .js (` ( (, (code.text (text (..host_path class_name) "." field))))) - .ruby (` ( (, (code.text (text (..host_path class_name) "::" field))))) + .ruby (` ( (, (code.text (text (..host_path class_name) ":" field))))) ... else (` ( (, (code.text field)) (, (..imported class_name)))))))))) @@ -925,7 +925,7 @@ (has :alias {.:Some name}) (..procedure_definition import! (for .js (` ( (, (code.text (text (..host_path class_name) "." method))))) - .ruby (` ( (, (code.text (text (..host_path class_name) "::" method))))) + .ruby (` ( (, (code.text (text (..host_path class_name) ":" method))))) (` ( (, (code.text method)) (.as (-> Any (..Object .Any)) (, (..imported class_name)))))))))) diff --git a/stdlib/source/library/lux/math/arithmetic/fixed_point.lux b/stdlib/source/library/lux/math/arithmetic/fixed_point.lux index 5e1ab73609..d62572bc05 100644 --- a/stdlib/source/library/lux/math/arithmetic/fixed_point.lux +++ b/stdlib/source/library/lux/math/arithmetic/fixed_point.lux @@ -183,31 +183,31 @@ (let [parameter (nominal.as parameter) subject (nominal.as subject) - s::u (units' subject) - s::s (sub_units' subject) + s:u (units' subject) + s:s (sub_units' subject) - p::u (units' parameter) - p::s (sub_units' parameter) + p:u (units' parameter) + p:s (sub_units' parameter) - sxp (i.x s::u p::s) - pxs (i.x p::u s::s) + sxp (i.x s:u p:s) + pxs (i.x p:u s:s) - x::u (all i.+ - (i.x p::u - s::u) - (units' sxp) - (units' pxs) - ) - x::s (all i.+ - (high_sub_units' - (i.x p::s - s::s)) - (sub_units' sxp) - (sub_units' pxs) - )] + x:u (all i.+ + (i.x p:u + s:u) + (units' sxp) + (units' pxs) + ) + x:s (all i.+ + (high_sub_units' + (i.x p:s + s:s)) + (sub_units' sxp) + (sub_units' pxs) + )] (nominal.of - (.integer (/64.or (of_units @ x::u) - x::s))))))) + (.integer (/64.or (of_units @ x:u) + x:s))))))) (the .public (/ @ parameter subject) (for_any (_ @) diff --git a/stdlib/source/library/lux/target/jvm/bytecode.lux b/stdlib/source/library/lux/target/jvm/bytecode.lux index 0db0f1fb39..3574127b09 100644 --- a/stdlib/source/library/lux/target/jvm/bytecode.lux +++ b/stdlib/source/library/lux/target/jvm/bytecode.lux @@ -627,14 +627,14 @@ (..bytecode $0 $1 @_ /.ldc_w/string [index])))) (ffi.the java/lang/Long - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/Float - "[1]::[0]" + "[1]:[0]" ("static" floatToRawIntBits "manual" [float] int)) (ffi.the java/lang/Double - "[1]::[0]" + "[1]:[0]" ("static" doubleToRawLongBits "manual" [double] long)) (template.with [ ] @@ -700,7 +700,7 @@ (the float_bits (-> Float .Integer) - (|>> [] java/lang/Float::floatToRawIntBits + (|>> [] java/lang/Float:floatToRawIntBits ffi.int_to_long (as (-> java/lang/Long .Integer)))) @@ -740,7 +740,7 @@ (-> Decimal .Integer) (|>> (as (-> Decimal java/lang/Double)) - [] java/lang/Double::doubleToRawLongBits + [] java/lang/Double:doubleToRawLongBits (as (-> java/lang/Long .Integer)))) (the negative_zero_double_bits diff --git a/stdlib/source/library/lux/target/jvm/constant/float.lux b/stdlib/source/library/lux/target/jvm/constant/float.lux index 350d6b8eb5..cd23624a96 100644 --- a/stdlib/source/library/lux/target/jvm/constant/float.lux +++ b/stdlib/source/library/lux/target/jvm/constant/float.lux @@ -17,7 +17,7 @@ ["[0]" decimal]]]]]]) (ffi.the java/lang/Float - "[1]::[0]" + "[1]:[0]" ("static" floatToRawIntBits "manual" [float] int)) (every .public Float @@ -35,7 +35,7 @@ (the .public as_binary (Injection Float) - (|>> [] java/lang/Float::floatToRawIntBits + (|>> [] java/lang/Float:floatToRawIntBits ffi.of_int binary.bits_32)) diff --git a/stdlib/source/library/lux/target/jvm/loader.lux b/stdlib/source/library/lux/target/jvm/loader.lux index 01569ed7e2..eeb64da527 100644 --- a/stdlib/source/library/lux/target/jvm/loader.lux +++ b/stdlib/source/library/lux/target/jvm/loader.lux @@ -43,47 +43,47 @@ ["Error" error]))) (ffi.the java/lang/Object - "[1]::[0]" + "[1]:[0]" (getClass [] (java/lang/Class java/lang/Object))) (ffi.the java/lang/String - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/reflect/Method - "[1]::[0]" + "[1]:[0]" (invoke [java/lang/Object [java/lang/Object]] "try" java/lang/Object)) (ffi.the (java/lang/Class a) - "[1]::[0]" + "[1]:[0]" (getDeclaredMethod [java/lang/String [(java/lang/Class [? < java/lang/Object])]] java/lang/reflect/Method)) (ffi.the java/lang/Integer - "[1]::[0]" + "[1]:[0]" ("read_only" "static" TYPE (java/lang/Class java/lang/Integer))) (ffi.the java/lang/reflect/AccessibleObject - "[1]::[0]" + "[1]:[0]" (setAccessible [boolean] void)) (ffi.the java/lang/ClassLoader - "[1]::[0]" + "[1]:[0]" (loadClass [java/lang/String] "io" "try" (java/lang/Class java/lang/Object))) (expansion.let [,class (these (java/lang/Class java/lang/Object))] - (the java/lang/ClassLoader::defineClass + (the java/lang/ClassLoader:defineClass java/lang/reflect/Method - (to (java/lang/Class::getDeclaredMethod [(ffi.as_string "defineClass") - (ffi.array ,class - [(as (-> (java/lang/Class java/lang/String) ,class) - (ffi.class_for java/lang/String)) - (java/lang/Object::getClass [] (ffi.array byte 0)) - (as (-> (java/lang/Class java/lang/Integer) ,class) - (java/lang/Integer::TYPE)) - (as (-> (java/lang/Class java/lang/Integer) ,class) - (java/lang/Integer::TYPE))])] - (ffi.class_for java/lang/ClassLoader)) - (java/lang/reflect/AccessibleObject::setAccessible [true])))) + (to (java/lang/Class:getDeclaredMethod [(ffi.as_string "defineClass") + (ffi.array ,class + [(as (-> (java/lang/Class java/lang/String) ,class) + (ffi.class_for java/lang/String)) + (java/lang/Object:getClass [] (ffi.array byte 0)) + (as (-> (java/lang/Class java/lang/Integer) ,class) + (java/lang/Integer:TYPE)) + (as (-> (java/lang/Class java/lang/Integer) ,class) + (java/lang/Integer:TYPE))])] + (ffi.class_for java/lang/ClassLoader)) + (java/lang/reflect/AccessibleObject:setAccessible [true])))) (the .public (define class_name bytecode loader) (-> Text Binary java/lang/ClassLoader @@ -101,7 +101,7 @@ binary.size (as (-> Natural (Nominal "java.lang.Long"))) ffi.long_to_int)))] - (java/lang/reflect/Method::invoke [loader (list.as_array signature)] java/lang/ClassLoader::defineClass))) + (java/lang/reflect/Method:invoke [loader (list.as_array signature)] java/lang/ClassLoader:defineClass))) (the .public (new_library _) (-> Any @@ -145,4 +145,4 @@ (the .public (load name loader) (-> Text java/lang/ClassLoader (IO (Try (java/lang/Class java/lang/Object)))) - (java/lang/ClassLoader::loadClass [(ffi.as_string name)] loader)) + (java/lang/ClassLoader:loadClass [(ffi.as_string name)] loader)) diff --git a/stdlib/source/library/lux/target/jvm/reflection.lux b/stdlib/source/library/lux/target/jvm/reflection.lux index 1ce86fb965..014a39adaa 100644 --- a/stdlib/source/library/lux/target/jvm/reflection.lux +++ b/stdlib/source/library/lux/target/jvm/reflection.lux @@ -43,61 +43,61 @@ ["[1][0]" projection]]]) (ffi.the java/lang/String - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/Object - "[1]::[0]" + "[1]:[0]" (toString [] java/lang/String) (getClass [] (java/lang/Class java/lang/Object))) (ffi.the java/lang/reflect/Type - "[1]::[0]" + "[1]:[0]" (getTypeName [] java/lang/String)) (ffi.the java/lang/reflect/GenericArrayType - "[1]::[0]" + "[1]:[0]" (getGenericComponentType [] java/lang/reflect/Type)) (ffi.the java/lang/reflect/ParameterizedType - "[1]::[0]" + "[1]:[0]" (getRawType [] java/lang/reflect/Type) (getActualTypeArguments [] [java/lang/reflect/Type])) (ffi.the (java/lang/reflect/TypeVariable d) - "[1]::[0]" + "[1]:[0]" (getName [] java/lang/String) (getBounds [] [java/lang/reflect/Type])) (ffi.the (java/lang/reflect/WildcardType d) - "[1]::[0]" + "[1]:[0]" (getLowerBounds [] [java/lang/reflect/Type]) (getUpperBounds [] [java/lang/reflect/Type])) (ffi.the java/lang/reflect/Modifier - "[1]::[0]" + "[1]:[0]" ("static" isStatic [int] boolean) ("static" isFinal [int] boolean) ("static" isInterface [int] boolean) ("static" isAbstract [int] boolean)) (ffi.the java/lang/annotation/Annotation - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/Deprecated - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/reflect/Field - "[1]::[0]" + "[1]:[0]" (getDeclaringClass [] (java/lang/Class java/lang/Object)) (getModifiers [] int) (getGenericType [] java/lang/reflect/Type) (getDeclaredAnnotations [] [java/lang/annotation/Annotation])) (ffi.the java/lang/ClassLoader - "[1]::[0]") + "[1]:[0]") (ffi.the (java/lang/Class c) - "[1]::[0]" + "[1]:[0]" ("static" forName [java/lang/String boolean java/lang/ClassLoader] "try" (java/lang/Class java/lang/Object)) (getName [] java/lang/String) (isAssignableFrom [(java/lang/Class [? < java/lang/Object])] boolean) @@ -116,11 +116,11 @@ (Exception java/lang/reflect/Type) (exception.report (list ["Type" (|> jvm_type - (java/lang/reflect/Type::getTypeName []) + (java/lang/reflect/Type:getTypeName []) ffi.of_string)] ["Class" (|> jvm_type - (java/lang/Object::getClass []) - (java/lang/Object::toString []) + (java/lang/Object:getClass []) + (java/lang/Object:toString []) ffi.of_string)])))] [[not_a_class] @@ -129,9 +129,9 @@ (the .public (load class_loader name) (-> java/lang/ClassLoader external.Name (Try (java/lang/Class java/lang/Object))) - (when (java/lang/Class::forName [(ffi.as_string name) - (ffi.as_boolean false) - class_loader]) + (when (java/lang/Class:forName [(ffi.as_string name) + (ffi.as_boolean false) + class_loader]) {try.:Failure _} (exception.except ..unknown_class [name]) @@ -144,10 +144,10 @@ (monad.let try.monad [super (..load class_loader super) sub (..load class_loader sub)] - (pure (ffi.of_boolean (java/lang/Class::isAssignableFrom [sub] - (as (-> (java/lang/Class java/lang/Object) - java/lang/Class) - super)))))) + (pure (ffi.of_boolean (java/lang/Class:isAssignableFrom [sub] + (as (-> (java/lang/Class java/lang/Object) + java/lang/Class) + super)))))) (the (class' parameter reflection) (-> (-> java/lang/reflect/Type (Try (/.Type Parameter))) java/lang/reflect/Type @@ -157,7 +157,7 @@ (let [class_name (|> class (as (-> Any (java/lang/Class java/lang/Object))) - (java/lang/Class::getName []) + (java/lang/Class:getName []) ffi.of_string)] (`` (if (or (,, (template.with [] [(text.= (/reflection.reflection ) @@ -177,19 +177,19 @@ _) (when (ffi.as java/lang/reflect/ParameterizedType reflection) {.:Some reflection'} - (let [raw (java/lang/reflect/ParameterizedType::getRawType [] reflection')] + (let [raw (java/lang/reflect/ParameterizedType:getRawType [] reflection')] (when (ffi.as java/lang/Class raw) {.:Some raw'} (let [! try.monad] (|> reflection' - (java/lang/reflect/ParameterizedType::getActualTypeArguments []) + (java/lang/reflect/ParameterizedType:getActualTypeArguments []) (list.of_array {.:None}) (list.each' ! parameter) (by ! each (function (_ parameters) (|> raw' (as (-> Any (java/lang/Class java/lang/Object))) - (java/lang/Class::getName []) + (java/lang/Class:getName []) ffi.of_string (/.class parameters)))) (exception.with ..cannot_convert_to_a_lux_type [reflection]))) @@ -205,14 +205,14 @@ (-> java/lang/reflect/Type (Try (/.Type Parameter)))) (<| (when (ffi.as java/lang/reflect/TypeVariable reflection) {.:Some reflection} - {try.:Success (/.var (ffi.of_string (java/lang/reflect/TypeVariable::getName [] reflection)))} + {try.:Success (/.var (ffi.of_string (java/lang/reflect/TypeVariable:getName [] reflection)))} _) (when (ffi.as java/lang/reflect/WildcardType reflection) {.:Some reflection} ... TODO: Instead of having single lower/upper bounds, should ... allow for multiple ones. - (`` (when [(array.item 0 (java/lang/reflect/WildcardType::getLowerBounds [] reflection)) - (array.item 0 (java/lang/reflect/WildcardType::getUpperBounds [] reflection))] + (`` (when [(array.item 0 (java/lang/reflect/WildcardType:getLowerBounds [] reflection)) + (array.item 0 (java/lang/reflect/WildcardType:getUpperBounds [] reflection))] (,, (template.with [ ] [ (when (ffi.as java/lang/reflect/GenericArrayType bound) @@ -233,7 +233,7 @@ (when (ffi.as java/lang/reflect/GenericArrayType reflection) {.:Some reflection} (|> reflection - (java/lang/reflect/GenericArrayType::getGenericComponentType []) + (java/lang/reflect/GenericArrayType:getGenericComponentType []) type (by try.monad each /.array)) _) @@ -242,9 +242,9 @@ (let [class (as (-> Any (java/lang/Class java/lang/Object)) class)] - (if (ffi.of_boolean (java/lang/Class::isArray [] class)) + (if (ffi.of_boolean (java/lang/Class:isArray [] class)) (|> class - (java/lang/Class::getComponentType []) + (java/lang/Class:getComponentType []) (ffi.is java/lang/reflect/Type) type (try:each /.array)) @@ -260,7 +260,7 @@ (let [class_name (|> reflection (as (-> Any (java/lang/Class java/lang/Object))) - (java/lang/Class::getName []) + (java/lang/Class:getName []) ffi.of_string)] (`` (if (,, (template.with [ ] [(text.= (/reflection.reflection ) @@ -296,7 +296,7 @@ (let [class_name (|> reflection (as (-> Any (java/lang/Class java/lang/Object))) - (java/lang/Class::getName []) + (java/lang/Class:getName []) ffi.of_string)] (if (text.= (/reflection.reflection /reflection.void) class_name) @@ -309,7 +309,7 @@ (exception.the .public (cannot_correspond [class type]) (Exception [(java/lang/Class java/lang/Object) Type]) (exception.report - (list ["Class" (ffi.of_string (java/lang/Object::toString [] class))] + (list ["Class" (ffi.of_string (java/lang/Object:toString [] class))] ["Type" (type.as_text type)]))) (exception.the .public (type_parameter_mismatch [expected actual class type]) @@ -317,7 +317,7 @@ (exception.report (list ["Expected" (%.natural expected)] ["Actual" (%.natural actual)] - ["Class" (ffi.of_string (java/lang/Object::toString [] class))] + ["Class" (ffi.of_string (java/lang/Object:toString [] class))] ["Type" (type.as_text type)]))) (exception.the .public (non_jvm_type type) @@ -330,20 +330,20 @@ (Try Mapping)) (when type (@type.Array to_write to_read) - (if (ffi.of_boolean (java/lang/Class::isArray [] class)) - (correspond (java/lang/Class::getComponentType [] class) + (if (ffi.of_boolean (java/lang/Class:isArray [] class)) + (correspond (java/lang/Class:getComponentType [] class) to_read) (exception.except ..cannot_correspond [class type])) {.:Nominal name params} - (let [class_name (ffi.of_string (java/lang/Class::getName [] class)) - class_params (list.of_array {.:None} (java/lang/Class::getTypeParameters [] class)) + (let [class_name (ffi.of_string (java/lang/Class:getName [] class)) + class_params (list.of_array {.:None} (java/lang/Class:getTypeParameters [] class)) num_class_params (list.size class_params) num_type_params (list.size params)] (if (text.= class_name name) (if (n.= num_class_params num_type_params) (|> params - (list.zipped_2 (list:each (|>> (java/lang/reflect/TypeVariable::getName []) + (list.zipped_2 (list:each (|>> (java/lang/reflect/TypeVariable:getName []) ffi.of_string) class_params)) (list:mix (function (_ [name [polarity paramT]] mapping) @@ -370,16 +370,16 @@ (exception.the .public (mistaken_field_owner [field owner target]) (Exception [java/lang/reflect/Field (java/lang/Class java/lang/Object) (java/lang/Class java/lang/Object)]) (exception.report - (list ["Field" (ffi.of_string (java/lang/Object::toString [] field))] - ["Owner" (ffi.of_string (java/lang/Object::toString [] owner))] - ["Target" (ffi.of_string (java/lang/Object::toString [] target))]))) + (list ["Field" (ffi.of_string (java/lang/Object:toString [] field))] + ["Owner" (ffi.of_string (java/lang/Object:toString [] owner))] + ["Target" (ffi.of_string (java/lang/Object:toString [] target))]))) (template.with [] [(exception.the .public ( [field class]) (Exception [Text (java/lang/Class java/lang/Object)]) (exception.report (list ["Field" (%.text field)] - ["Class" (ffi.of_string (java/lang/Object::toString [] class))])))] + ["Class" (ffi.of_string (java/lang/Object:toString [] class))])))] [[unknown_field] [not_a_static_field] @@ -388,9 +388,9 @@ (the .public (field field target) (-> Text (java/lang/Class java/lang/Object) (Try java/lang/reflect/Field)) - (when (java/lang/Class::getDeclaredField [(ffi.as_string field)] target) + (when (java/lang/Class:getDeclaredField [(ffi.as_string field)] target) {try.:Success field} - (let [owner (java/lang/reflect/Field::getDeclaringClass [] field)] + (let [owner (java/lang/reflect/Field:getDeclaringClass [] field)] (if (identical? owner target) {try.:Success field} (exception.except ..mistaken_field_owner [field owner target]))) @@ -411,13 +411,13 @@ (Try [Bit Bit (/.Type Value)])) (monad.let [! try.monad] [fieldJ (..field field class) - .let [modifiers (java/lang/reflect/Field::getModifiers [] fieldJ)]] - (when (ffi.of_boolean (java/lang/reflect/Modifier::isStatic [modifiers])) + .let [modifiers (java/lang/reflect/Field:getModifiers [] fieldJ)]] + (when (ffi.of_boolean (java/lang/reflect/Modifier:isStatic [modifiers])) (|> fieldJ - (java/lang/reflect/Field::getGenericType []) + (java/lang/reflect/Field:getGenericType []) ..type - (by ! each (|>> [(ffi.of_boolean (java/lang/reflect/Modifier::isFinal [modifiers])) - (..deprecated? (java/lang/reflect/Field::getDeclaredAnnotations [] fieldJ))]))) + (by ! each (|>> [(ffi.of_boolean (java/lang/reflect/Modifier:isFinal [modifiers])) + (..deprecated? (java/lang/reflect/Field:getDeclaredAnnotations [] fieldJ))]))) (exception.except [field class]))))] [[static_field ..not_a_static_field 1b 0b] diff --git a/stdlib/source/library/lux/target/r.lux b/stdlib/source/library/lux/target/r.lux index 262a0d3e22..e0cbae6cb0 100644 --- a/stdlib/source/library/lux/target/r.lux +++ b/stdlib/source/library/lux/target/r.lux @@ -240,7 +240,7 @@ [2 [["paste"]]]]) - (the .public as::integer + (the .public as:integer (-> Expression Expression) (..of/1 (..var "as.integer"))) diff --git a/stdlib/source/library/lux/time/date.lux b/stdlib/source/library/lux/time/date.lux index 8e3dea1a63..ebac338907 100644 --- a/stdlib/source/library/lux/time/date.lux +++ b/stdlib/source/library/lux/time/date.lux @@ -230,12 +230,12 @@ (the days_since_epoch Span - (let [years::70 70 - leaps::70 (n./ year.leap - years::70) - days::70 (|> years::70 - (n.x year.days) - (n.+ leaps::70)) + (let [years:70 70 + leaps:70 (n./ year.leap + years:70) + days:70 (|> years:70 + (n.x year.days) + (n.+ leaps:70)) ... The epoch is being calculated from March 1st, instead of January 1st. january_&_february (n.+ (month.days {month.:January}) (month.days {month.:February}))] @@ -245,7 +245,7 @@ ... 1900/01/01 (n.+ (n.x 3 days_per_century)) ... 1970/01/01 - (n.+ days::70) + (n.+ days:70) ... 1970/03/01 (n.- january_&_february)))) diff --git a/stdlib/source/library/lux/time/solar.lux b/stdlib/source/library/lux/time/solar.lux index 7ec29663d4..03917e400d 100644 --- a/stdlib/source/library/lux/time/solar.lux +++ b/stdlib/source/library/lux/time/solar.lux @@ -46,51 +46,51 @@ [offset :offset Duration]]) (for .jvm (these (ffi.the java/lang/String - "[1]::[0]") + "[1]:[0]") (ffi.the java/util/TimeZone - "[1]::[0]" + "[1]:[0]" ("static" getDefault [] "io" java/util/TimeZone) (getID [] java/lang/String) (getOffset [long] int)) ) .js (these (ffi.the ResolvedOptions - "[1]::[0]" + "[1]:[0]" (timeZone Text)) (ffi.the DateTimeFormat - "[1]::[0]" + "[1]:[0]" (resolvedOptions [] ResolvedOptions)) (ffi.the Intl - "[1]::[0]" + "[1]:[0]" ("static" DateTimeFormat [] "io" DateTimeFormat)) (ffi.the Date - "[1]::[0]" + "[1]:[0]" (new []) (getTimezoneOffset [] ffi.Number)) ) .lua (these (ffi.the os/date - "[1]::[0]" + "[1]:[0]" (hour Integer) (min Integer)) (ffi.the os - "[1]::[0]" + "[1]:[0]" ("static" date [Text] "io" os/date))) .python (these (ffi.the datetime/timedelta - "[1]::[0]") + "[1]:[0]") (ffi.the datetime/timezone - "[1]::[0]") + "[1]:[0]") (ffi.the datetime/utcoffset - "[1]::[0]" + "[1]:[0]" (total_seconds [] Decimal)) (ffi.the datetime/datetime - "[1]::[0]" + "[1]:[0]" (now [datetime/timezone] "io" datetime/datetime) (utcoffset [] datetime/utcoffset) (astimezone [] datetime/datetime) @@ -98,13 +98,13 @@ (tzname [] Text)) (ffi.the datetime - "[1]::[0]" + "[1]:[0]" ("static" timedelta [Integer] datetime/timedelta) ("static" timezone [datetime/timedelta] datetime/timezone) ("static" datetime datetime/datetime)) ) .ruby (these (ffi.the "time" Time - "[2]/[1]::[0]" + "[2]/[1]:[0]" ("static" now [] "io" Time) (zone Text) ("static" zone_offset [Text] "io" Integer))) @@ -114,21 +114,21 @@ (IO Zone) (monad.let [! io.monad] [_ (pure [])] - (for .jvm (|> (java/util/TimeZone::getDefault []) - (io:each (|>> (java/util/TimeZone::getID []) + (for .jvm (|> (java/util/TimeZone:getDefault []) + (io:each (|>> (java/util/TimeZone:getID []) ffi.of_string))) - .js (|> (Intl::DateTimeFormat []) - (io:each (|>> (DateTimeFormat::resolvedOptions []) - ResolvedOptions::timeZone))) + .js (|> (Intl:DateTimeFormat []) + (io:each (|>> (DateTimeFormat:resolvedOptions []) + ResolvedOptions:timeZone))) .lua (pure "") .python (monad.let ! - [it (datetime::datetime)] - (io:each (|>> (datetime/datetime::astimezone []) - (datetime/datetime::tzname [])) - (datetime/datetime::now [(datetime::timezone [(datetime::timedelta [+0])])] - it))) - .ruby (|> (time/Time::now []) - (io:each time/Time::zone)) + [it (datetime:datetime)] + (io:each (|>> (datetime/datetime:astimezone []) + (datetime/datetime:tzname [])) + (datetime/datetime:now [(datetime:timezone [(datetime:timedelta [+0])])] + it))) + .ruby (|> (time/Time:now []) + (io:each time/Time:zone)) ))) (the .public now @@ -136,13 +136,13 @@ (monad.let [! io.monad] [_ (pure [])] (for .jvm (monad.let ! - [zone (java/util/TimeZone::getDefault []) + [zone (java/util/TimeZone:getDefault []) utc //.now] (pure (nominal.of [:utc utc - :zone (ffi.of_string (java/util/TimeZone::getID [] zone)) + :zone (ffi.of_string (java/util/TimeZone:getID [] zone)) :offset (|> zone - (java/util/TimeZone::getOffset [(|> utc //.millis ffi.as_long)]) + (java/util/TimeZone:getOffset [(|> utc //.millis ffi.as_long)]) ffi.of_int duration.of_millis)]))) .js (monad.let ! @@ -151,46 +151,46 @@ (pure (nominal.of [:utc utc :zone zone - :offset (|> (Date::new []) - (Date::getTimezoneOffset []) + :offset (|> (Date:new []) + (Date:getTimezoneOffset []) d.integer (i.x -60,000) duration.of_millis)]))) .lua (monad.let ! [zone ..local_zone - univeral (os::date ["*t"]) - solar (os::date ["!*t"]) + univeral (os:date ["*t"]) + solar (os:date ["!*t"]) utc //.now] (pure (nominal.of [:utc utc :zone zone - :offset (|> (i.- (os/date::hour solar) - (os/date::hour univeral)) + :offset (|> (i.- (os/date:hour solar) + (os/date:hour univeral)) (i.x +60) - (i.+ (i.- (os/date::min solar) - (os/date::min univeral))) + (i.+ (i.- (os/date:min solar) + (os/date:min univeral))) (i.x +60,000) duration.of_millis)]))) .python (monad.let ! - [it (datetime::datetime) + [it (datetime:datetime) tz_now (|> it - (datetime/datetime::now [(datetime::timezone [(datetime::timedelta [+0])])]) - (by ! each (datetime/datetime::astimezone []))) + (datetime/datetime:now [(datetime:timezone [(datetime:timedelta [+0])])]) + (by ! each (datetime/datetime:astimezone []))) offset (|> it - (datetime/datetime::now [(datetime/datetime::tzinfo tz_now)]) - (by ! each (|>> (datetime/datetime::utcoffset []) - (datetime/utcoffset::total_seconds []) + (datetime/datetime:now [(datetime/datetime:tzinfo tz_now)]) + (by ! each (|>> (datetime/datetime:utcoffset []) + (datetime/utcoffset:total_seconds []) d.integer (i.x +1000) duration.of_millis))) utc //.now] (pure (nominal.of [:utc utc - :zone (datetime/datetime::tzname [] tz_now) + :zone (datetime/datetime:tzname [] tz_now) :offset offset]))) .ruby (monad.let ! [zone ..local_zone - seconds (time/Time::zone_offset [zone]) + seconds (time/Time:zone_offset [zone]) utc //.now] (pure (nominal.of [:utc utc diff --git a/stdlib/source/library/lux/world/console.lux b/stdlib/source/library/lux/world/console.lux index 2a3fbd7d6f..694838b387 100644 --- a/stdlib/source/library/lux/world/console.lux +++ b/stdlib/source/library/lux/world/console.lux @@ -50,22 +50,22 @@ (exception.the .public cannot_close) (for .jvm (these (ffi.the java/lang/String - "[1]::[0]") + "[1]:[0]") (ffi.the java/io/Console - "[1]::[0]" + "[1]:[0]" (readLine [] "io" "try" java/lang/String)) (ffi.the java/io/InputStream - "[1]::[0]" + "[1]:[0]" (read [] "io" "try" int)) (ffi.the java/io/PrintStream - "[1]::[0]" + "[1]:[0]" (print [java/lang/String] "io" "try" void)) (ffi.the java/lang/System - "[1]::[0]" + "[1]:[0]" ("static" console [] "io" "?" java/io/Console) ("read_only" "static" in java/io/InputStream) ("read_only" "static" out java/io/PrintStream)) @@ -75,50 +75,50 @@ (the .public default (IO (Try (Console IO))) (monad.let io.monad - [?jvm_console (java/lang/System::console [])] + [?jvm_console (java/lang/System:console [])] (when ?jvm_console {.:None} (pure (exception.except ..cannot_open [])) {.:Some jvm_console} - (let [jvm_input (java/lang/System::in) - jvm_output (java/lang/System::out)] + (let [jvm_input (java/lang/System:in) + jvm_output (java/lang/System:out)] (<| pure {try.:Success} (is (Console IO)) ... TODO: Remove ASAP (implementation (the (read _) (|> jvm_input - (java/io/InputStream::read []) + (java/io/InputStream:read []) (by (try.with io.monad) each (|>> ffi.of_int .natural)))) (the (read_line _) (io:each (try:each (|>> ffi.of_string)) - (java/io/Console::readLine [] jvm_console))) + (java/io/Console:readLine [] jvm_console))) (the (write message) - (java/io/PrintStream::print [(ffi.as_string message)] jvm_output)) + (java/io/PrintStream:print [(ffi.as_string message)] jvm_output)) (the close (|>> (exception.except ..cannot_close) pure))))))))) .js (these (ffi.the Buffer - "[1]::[0]" + "[1]:[0]" (toString [] ffi.String)) (ffi.the Readable_Stream - "[1]::[0]" + "[1]:[0]" (read [] "?" Buffer) (unshift "as" unshift|String [ffi.String] ffi.Boolean) (unshift "as" unshift|Buffer [Buffer] ffi.Boolean)) (ffi.the Writable_Stream - "[1]::[0]" + "[1]:[0]" (write [ffi.String ffi.Function] ffi.Boolean) (once [ffi.String ffi.Function] Any)) (ffi.the process - "[1]::[0]" + "[1]:[0]" ("static" stdout Writable_Stream) ("static" stdin Readable_Stream)) @@ -126,20 +126,20 @@ (the !read (template.macro (_ ) - [(let [it (io.value (process::stdin))] - (when (Readable_Stream::read [] it) + [(let [it (io.value (process:stdin))] + (when (Readable_Stream:read [] it) {.:Some buffer} - (let [input (Buffer::toString [] buffer)] + (let [input (Buffer:toString [] buffer)] (when (is (Maybe [ Text]) ) {.:Some [head tail]} (exec - (Readable_Stream::unshift|String [tail] it) + (Readable_Stream:unshift|String [tail] it) (future:pure {try.:Success head})) {.:None} (exec - (Readable_Stream::unshift|Buffer [buffer] it) + (Readable_Stream:unshift|Buffer [buffer] it) (future:pure (exception.except ..cannot_read []))))) {.:None} @@ -162,8 +162,8 @@ (let [[read! write!] (is [(future.Future (Try [])) (future.Resolver (Try []))] (future.future []))] (exec - (Writable_Stream::write [it (ffi.function (_ []) Any (io.value (write! {try.:Success []})))] - (io.value (process::stdout))) + (Writable_Stream:write [it (ffi.function (_ []) Any (io.value (write! {try.:Success []})))] + (io.value (process:stdout))) read!))) (the close diff --git a/stdlib/source/library/lux/world/environment.lux b/stdlib/source/library/lux/world/environment.lux index 3501dbb35f..899091ada3 100644 --- a/stdlib/source/library/lux/world/environment.lux +++ b/stdlib/source/library/lux/world/environment.lux @@ -118,35 +118,35 @@ ... https://wiki.sei.cmu.edu/confluence/display/java/ENV02-J.+Do+not+trust+the+values+of+environment+variables (for .jvm (these (ffi.the java/lang/String - "[1]::[0]") + "[1]:[0]") (ffi.the (java/util/Iterator it) - "[1]::[0]" + "[1]:[0]" (hasNext [] boolean) (next [] it)) (ffi.the (java/util/Set it) - "[1]::[0]" + "[1]:[0]" (iterator [] (java/util/Iterator it))) (ffi.the (java/util/Map k v) - "[1]::[0]" + "[1]:[0]" (keySet [] (java/util/Set k))) (ffi.the java/lang/System - "[1]::[0]" + "[1]:[0]" ("static" getenv [] (java/util/Map java/lang/String java/lang/String)) ("static" getenv "as" resolveEnv [java/lang/String] "io" "?" java/lang/String) ("static" getProperty [java/lang/String] "?" java/lang/String) ("static" exit [int] "io" void)) - (the (jvm::consume value iterator) + (the (jvm:consume value iterator) (for_any (_ it) (-> (List it) (java/util/Iterator it) (List it))) - (if (ffi.of_boolean (java/util/Iterator::hasNext [] iterator)) - (jvm::consume (list:composite value (list (as_expected (java/util/Iterator::next [] iterator)))) - iterator) + (if (ffi.of_boolean (java/util/Iterator:hasNext [] iterator)) + (jvm:consume (list:composite value (list (as_expected (java/util/Iterator:next [] iterator)))) + iterator) value)) ) .js (these (the default_exit! @@ -154,7 +154,7 @@ (|>> %.integer halt! io.io)) (ffi.the NodeJs_Process - "[1]::[0]" + "[1]:[0]" (exit [ffi.Number] "io" Nothing) (cwd [] "io" Path)) @@ -162,17 +162,17 @@ (-> Exit (IO Nothing)) (when (ffi.global ..NodeJs_Process [process]) {.:Some process} - (NodeJs_Process::exit [(i.decimal code)] process) + (NodeJs_Process:exit [(i.decimal code)] process) {.:None} (..default_exit! code))) (ffi.the Browser_Window - "[1]::[0]" + "[1]:[0]" (close [] Nothing)) (ffi.the Browser_Location - "[1]::[0]" + "[1]:[0]" (reload [] Nothing)) (the (exit_browser! code) @@ -181,48 +181,48 @@ (ffi.global ..Browser_Location [location])] [{.:Some window} {.:Some location}] (exec - (Browser_Window::close [] window) - (Browser_Location::reload [] location) + (Browser_Window:close [] window) + (Browser_Location:reload [] location) (..default_exit! code)) [{.:Some window} {.:None}] (exec - (Browser_Window::close [] window) + (Browser_Window:close [] window) (..default_exit! code)) [{.:None} {.:Some location}] (exec - (Browser_Location::reload [] location) + (Browser_Location:reload [] location) (..default_exit! code)) [{.:None} {.:None}] (..default_exit! code))) (ffi.the Object - "[1]::[0]" + "[1]:[0]" ("static" entries [Object] (Array (Array ffi.String)))) (ffi.the NodeJs_OS - "[1]::[0]" + "[1]:[0]" (homedir [] "io" Path))) .python (these (ffi.the os/path - "[1]::[0]" + "[1]:[0]" (expanduser [ffi.String] "io" ffi.String)) (ffi.the os/environ - "[1]::[0]" + "[1]:[0]" (keys [] "io" (Array ffi.String)) (get [ffi.String] "io" "?" ffi.String)) (ffi.the os - "[1]::[0]" + "[1]:[0]" ("static" getcwd [] "io" ffi.String) ("static" _exit [ffi.Integer] "io" Nothing) ("static" path os/path) ("static" environ os/environ))) .lua (these (ffi.the LuaFile - "[1]::[0]" + "[1]:[0]" (read [ffi.String] "io" "?" ffi.String) (close [] "io" ffi.Boolean)) @@ -239,8 +239,8 @@ (when outcome {.:Some file} (monad.let ! - [?output (LuaFile::read ["*l"] file) - _ (LuaFile::close [] file)] + [?output (LuaFile:read ["*l"] file) + _ (LuaFile:close [] file)] (pure (maybe.else default ?output))) {.:None} @@ -249,20 +249,20 @@ {try.:Failure _} (pure default))))) .ruby (these (ffi.the Env - "[1]::[0]" + "[1]:[0]" ("static" keys [] (Array Text)) ("static" fetch [Text] "io" "?" Text)) (ffi.the "fileutils" FileUtils - "[2]/[1]::[0]" + "[2]/[1]:[0]" ("static" pwd Path)) (ffi.the Dir - "[1]::[0]" + "[1]:[0]" ("static" home Path)) (ffi.the Kernel - "[1]::[0]" + "[1]:[0]" ("static" exit [Int] "io" Nothing))) ... .php @@ -283,16 +283,16 @@ (Environment IO) (implementation (the (available_variables _) - (for .jvm (|> (java/lang/System::getenv []) - (java/util/Map::keySet []) - (java/util/Set::iterator []) - (..jvm::consume list.empty) + (for .jvm (|> (java/lang/System:getenv []) + (java/util/Map:keySet []) + (java/util/Set:iterator []) + (..jvm:consume list.empty) (list:each (|>> ffi.of_string)) io.io) .js (io.io (if ffi.on_node_js? (when (ffi.global Object [process env]) {.:Some process/env} - (|> (Object::entries [process/env]) + (|> (Object:entries [process/env]) (list.of_array {.:None}) (list:each (|>> (array.item 0) maybe.trusted))) @@ -300,13 +300,13 @@ (list)) (list))) .python (monad.let [! io.monad] - [it (os::environ)] + [it (os:environ)] (by ! each (list.of_array {.:None}) - (os/environ::keys [] it))) + (os/environ:keys [] it))) ... Lua offers no way to get all the environment variables available. .lua (io.io (list)) - .ruby (io.io (list.of_array {.:None} (Env::keys []))) + .ruby (io.io (list.of_array {.:None} (Env:keys []))) ... .php (monad.let io.monad ... [environment (..getenv/0 [])] ... (pure (|> environment @@ -328,7 +328,7 @@ {.:None} (exception.except ..unknown_environment_variable [name]))))]] - (for .jvm (!fetch (<| java/lang/System::resolveEnv [] ffi.as_string) ffi.of_string) + (for .jvm (!fetch (<| java/lang/System:resolveEnv [] ffi.as_string) ffi.of_string) .js (io.io (if ffi.on_node_js? (when (monad.let maybe.monad [process/env (ffi.global (Array Text) [process env])] @@ -341,8 +341,8 @@ (exception.except ..unknown_environment_variable [name])) (exception.except ..unknown_environment_variable [name]))) .python (monad.let io.monad - [it (os::environ) - value (os/environ::get [name] it)] + [it (os:environ) + value (os/environ:get [name] it)] (pure (when value {.:Some value} {try.:Success value} @@ -350,13 +350,13 @@ {.:None} (exception.except ..unknown_environment_variable [name])))) .lua (!fetch os/getenv |>) - .ruby (!fetch Env::fetch |>) + .ruby (!fetch Env:fetch |>) ))) (the home (io.value (expansion.let [ (io.io "~")] - (for .jvm (|> (java/lang/System::getProperty [(ffi.as_string "user.home")]) + (for .jvm (|> (java/lang/System:getProperty [(ffi.as_string "user.home")]) (maybe:each (|>> ffi.of_string)) (maybe.else "") io.io) @@ -364,13 +364,13 @@ (|> (node_js.require "os") maybe.trusted (as (-> Any NodeJs_OS)) - (NodeJs_OS::homedir [])) + (NodeJs_OS:homedir [])) ) .python (monad.let io.monad - [it (os::path)] - (os/path::expanduser ["~"] it)) + [it (os:path)] + (os/path:expanduser ["~"] it)) .lua (..run_command "~" "echo ~") - .ruby (Dir::home) + .ruby (Dir:home) ... .php (monad.let io.monad ... [output (..getenv/1 ["HOME"])] ... (pure (if (bit.= false (as Bit output)) @@ -383,26 +383,26 @@ (the directory (io.value (expansion.let [ "."] - (for .jvm (|> (java/lang/System::getProperty [(ffi.as_string "user.dir")]) + (for .jvm (|> (java/lang/System:getProperty [(ffi.as_string "user.dir")]) (maybe:each (|>> ffi.of_string)) (maybe.else "") io.io) .js (if ffi.on_node_js? (when (ffi.global ..NodeJs_Process [process]) {.:Some process} - (NodeJs_Process::cwd [] process) + (NodeJs_Process:cwd [] process) {.:None} (io.io )) (io.io )) - .python (os::getcwd []) + .python (os:getcwd []) .lua (monad.let io.monad [.let [default ] on_windows (..run_command default "cd")] (if (identical? default on_windows) (..run_command default "pwd") (pure on_windows))) - .ruby (fileutils/FileUtils::pwd) + .ruby (fileutils/FileUtils:pwd) ... .php (monad.let io.monad ... [output (..getcwd [])] ... (pure (if (bit.= false (as Bit output)) @@ -414,7 +414,7 @@ (the (exit code) (for .jvm (monad.let io.monad - [_ (java/lang/System::exit [(ffi.as_int code)])] + [_ (java/lang/System:exit [(ffi.as_int code)])] (pure (undefined))) .js (if ffi.on_node_js? (..exit_node_js! code) @@ -424,8 +424,8 @@ ... else (..default_exit! code)) - .python (os::_exit [code]) + .python (os:_exit [code]) .lua (os/exit [code]) - .ruby (Kernel::exit code) + .ruby (Kernel:exit code) ... .php (..exit [code]) )))) diff --git a/stdlib/source/library/lux/world/file.lux b/stdlib/source/library/lux/world/file.lux index 06812cfec2..aff13a4202 100644 --- a/stdlib/source/library/lux/world/file.lux +++ b/stdlib/source/library/lux/world/file.lux @@ -173,10 +173,10 @@ (for .jvm (these (ffi.the java/lang/String - "[1]::[0]") + "[1]:[0]") (`` (ffi.the java/io/File - "[1]::[0]" + "[1]:[0]" (new [java/lang/String]) (,, (template.with [] [( [] "io" "try" boolean)] @@ -195,115 +195,115 @@ ("read_only" "static" separator java/lang/String))) (ffi.the java/lang/AutoCloseable - "[1]::[0]" + "[1]:[0]" (close [] "io" "try" void)) (ffi.the java/io/OutputStream - "[1]::[0]" + "[1]:[0]" (write [[byte]] "io" "try" void) (flush [] "io" "try" void)) (ffi.the java/io/FileOutputStream - "[1]::[0]" + "[1]:[0]" (new [java/io/File boolean] "io" "try")) (ffi.the java/io/InputStream - "[1]::[0]" + "[1]:[0]" (read [[byte]] "io" "try" int)) (ffi.the java/io/FileInputStream - "[1]::[0]" + "[1]:[0]" (new [java/io/File] "io" "try")) (`` (the .public default (System IO) (implementation (the delimiter - (ffi.of_string (java/io/File::separator))) + (ffi.of_string (java/io/File:separator))) (,, (template.with [ ] [(the (|>> ffi.as_string - [] java/io/File::new + [] java/io/File:new ( []) (io:each (|>> (try:each (|>> ffi.of_boolean)) (try.else false)))))] - [[file? java/io/File::isFile] - [directory? java/io/File::isDirectory]])) + [[file? java/io/File:isFile] + [directory? java/io/File:isDirectory]])) (the make_directory (|>> ffi.as_string - [] java/io/File::new - (java/io/File::mkdir []))) + [] java/io/File:new + (java/io/File:mkdir []))) (,, (template.with [ ] [(the ( path) (monad.let [! (try.with io.monad)] - [?children (java/io/File::listFiles [] (java/io/File::new [(ffi.as_string path)]))] + [?children (java/io/File:listFiles [] (java/io/File:new [(ffi.as_string path)]))] (when ?children {.:Some children} (|> children (list.of_array {.:None}) (list.only' ! (|>> ( []) (by ! each (|>> ffi.of_boolean)))) - (by ! each (list.each' ! (|>> (java/io/File::getAbsolutePath []) + (by ! each (list.each' ! (|>> (java/io/File:getAbsolutePath []) (by ! each (|>> ffi.of_string))))) (by ! conjoint)) {.:None} (by io.monad pure (exception.except ..cannot_find_directory [path])))))] - [[directory_files java/io/File::isFile] - [sub_directories java/io/File::isDirectory]])) + [[directory_files java/io/File:isFile] + [sub_directories java/io/File:isDirectory]])) (the file_size (|>> ffi.as_string - [] java/io/File::new - (java/io/File::length []) + [] java/io/File:new + (java/io/File:length []) (by (try.with io.monad) each (|>> ffi.of_long .natural)))) (the last_modified (|>> ffi.as_string - [] java/io/File::new - (java/io/File::lastModified []) + [] java/io/File:new + (java/io/File:lastModified []) (by (try.with io.monad) each (|>> ffi.of_long duration.of_millis instant.absolute)))) (the can_execute? (|>> ffi.as_string - [] java/io/File::new - (java/io/File::canExecute []) + [] java/io/File:new + (java/io/File:canExecute []) (io:each (try:each (|>> ffi.of_boolean))))) (the (read path) (monad.let (try.with io.monad) - [.let [file (java/io/File::new [(ffi.as_string path)])] - size (java/io/File::length [] file) - stream (java/io/FileInputStream::new [file]) + [.let [file (java/io/File:new [(ffi.as_string path)])] + size (java/io/File:length [] file) + stream (java/io/FileInputStream:new [file]) .let [data (binary.empty (.natural (ffi.of_long size)))] - bytes_read (java/io/InputStream::read [data] stream) - _ (java/lang/AutoCloseable::close [] stream)] + bytes_read (java/io/InputStream:read [data] stream) + _ (java/lang/AutoCloseable:close [] stream)] (pure data))) (the (delete path) (|> path ffi.as_string - [] java/io/File::new - (java/io/File::delete []))) + [] java/io/File:new + (java/io/File:delete []))) (the (modify path time_stamp) (|> path ffi.as_string - [] java/io/File::new - (java/io/File::setLastModified [(|> time_stamp instant.relative duration.millis ffi.as_long)]))) + [] java/io/File:new + (java/io/File:setLastModified [(|> time_stamp instant.relative duration.millis ffi.as_long)]))) (,, (template.with [ ] [(the ( path data) (monad.let (try.with io.monad) - [stream (java/io/FileOutputStream::new [[(java/io/File::new [(ffi.as_string path)])] - (ffi.as_boolean )]) - _ (java/io/OutputStream::write [data] stream) - _ (java/io/OutputStream::flush [] stream)] - (java/lang/AutoCloseable::close [] stream)))] + [stream (java/io/FileOutputStream:new [[(java/io/File:new [(ffi.as_string path)])] + (ffi.as_boolean )]) + _ (java/io/OutputStream:write [data] stream) + _ (java/io/OutputStream:flush [] stream)] + (java/lang/AutoCloseable:close [] stream)))] [[0b write] [1b append]])) @@ -311,29 +311,29 @@ (the (move origin destination) (|> origin ffi.as_string - [] java/io/File::new - (java/io/File::renameTo [(java/io/File::new [(ffi.as_string destination)])]))) + [] java/io/File:new + (java/io/File:renameTo [(java/io/File:new [(ffi.as_string destination)])]))) )))) .js (these (ffi.the Buffer - "[1]::[0]" + "[1]:[0]" ("static" from [Binary] ..Buffer)) (ffi.the Stats - "[1]::[0]" + "[1]:[0]" (size ffi.Number) (mtimeMs ffi.Number) (isFile [] ffi.Boolean) (isDirectory [] ffi.Boolean)) (ffi.the FsConstants - "[1]::[0]" + "[1]:[0]" (F_OK ffi.Number) (X_OK ffi.Number)) (ffi.the Error - "[1]::[0]" + "[1]:[0]" (toString [] ffi.String)) (the with_future @@ -346,7 +346,7 @@ )))])) (ffi.the Fs - "[1]::[0]" + "[1]:[0]" (constants FsConstants) (readFile [ffi.String ffi.Function] Any) (appendFile [ffi.String Buffer ffi.Function] Any) @@ -367,7 +367,7 @@ write! (if (ffi.null? error) {try.:Success []} - {try.:Failure (Error::toString [] error)}))) + {try.:Failure (Error:toString [] error)}))) (the (value_callback write!) (for_any (_ a) (-> (future.Resolver (Try a)) ffi.Function)) @@ -376,10 +376,10 @@ write! (if (ffi.null? error) {try.:Success (as_expected datum)} - {try.:Failure (Error::toString [] error)}))) + {try.:Failure (Error:toString [] error)}))) (ffi.the JsPath - "[1]::[0]" + "[1]:[0]" (sep ffi.String)) (the .public default @@ -389,7 +389,7 @@ node_path (node_js.require "path") .let [node_fs (as (-> Any ..Fs) node_fs) js_delimiter (if ffi.on_node_js? - (JsPath::sep (as (-> Any ..JsPath) node_path)) + (JsPath:sep (as (-> Any ..JsPath) node_path)) "/")]] (pure (is (System Future) (`` (implementation @@ -400,8 +400,8 @@ [(the ( path) (monad.let future.monad [?stats (with_future write! (Try Stats) - (Fs::stat [path (..value_callback write!)] - node_fs))] + (Fs:stat [path (..value_callback write!)] + node_fs))] (pure (when ?stats {try.:Success stats} ( [] stats) @@ -409,60 +409,60 @@ {try.:Failure _} false))))] - [[file? Stats::isFile] - [directory? Stats::isDirectory]])) + [[file? Stats:isFile] + [directory? Stats:isDirectory]])) (the (make_directory path) (monad.let future.monad [outcome (with_future write! (Try Any) - (Fs::access [path - (|> node_fs Fs::constants FsConstants::F_OK) - (..any_callback write!)] - node_fs))] + (Fs:access [path + (|> node_fs Fs:constants FsConstants:F_OK) + (..any_callback write!)] + node_fs))] (when outcome {try.:Success _} (pure (exception.except ..cannot_make_directory [path])) {try.:Failure _} (with_future write! (Try Any) - (Fs::mkdir [path (..any_callback write!)] node_fs))))) + (Fs:mkdir [path (..any_callback write!)] node_fs))))) (,, (template.with [ ] [(the ( path) (monad.let [! (try.with future.monad)] [subs (with_future write! (Try (Array ffi.String)) - (Fs::readdir [path (..value_callback write!)] - node_fs))] + (Fs:readdir [path (..value_callback write!)] + node_fs))] (|> subs (list.of_array {.:None}) (list:each (|>> (text path js_delimiter))) (list.each' ! (function (_ sub) (by ! each (|>> ( []) [sub]) (with_future write! (Try Stats) - (Fs::stat [sub (..value_callback write!)] - node_fs))))) + (Fs:stat [sub (..value_callback write!)] + node_fs))))) (by ! each (|>> (list.only product.right) (list:each product.left))))))] - [[directory_files Stats::isFile] - [sub_directories Stats::isDirectory]])) + [[directory_files Stats:isFile] + [sub_directories Stats:isDirectory]])) (the (file_size path) (monad.let (try.with future.monad) [stats (with_future write! (Try Stats) - (Fs::stat [path (..value_callback write!)] - node_fs))] + (Fs:stat [path (..value_callback write!)] + node_fs))] (pure (|> stats - Stats::size + Stats:size d.natural)))) (the (last_modified path) (monad.let (try.with future.monad) [stats (with_future write! (Try Stats) - (Fs::stat [path (..value_callback write!)] - node_fs))] + (Fs:stat [path (..value_callback write!)] + node_fs))] (pure (|> stats - Stats::mtimeMs + Stats:mtimeMs d.integer duration.of_millis instant.absolute)))) @@ -477,47 +477,47 @@ false) {try.:Success}) (with_future write! (Try Any) - (Fs::access [path - (|> node_fs Fs::constants FsConstants::X_OK) - (..any_callback write!)] - node_fs)))) + (Fs:access [path + (|> node_fs Fs:constants FsConstants:X_OK) + (..any_callback write!)] + node_fs)))) (the (read path) (with_future write! (Try Binary) - (Fs::readFile [path (..value_callback write!)] - node_fs))) + (Fs:readFile [path (..value_callback write!)] + node_fs))) (the (delete path) (monad.let (try.with future.monad) [stats (with_future write! (Try Stats) - (Fs::stat [path (..value_callback write!)] - node_fs))] + (Fs:stat [path (..value_callback write!)] + node_fs))] (with_future write! (Try Any) - (if (Stats::isFile [] stats) - (Fs::unlink [path (..any_callback write!)] - node_fs) - (Fs::rmdir [path (..any_callback write!)] - node_fs))))) + (if (Stats:isFile [] stats) + (Fs:unlink [path (..any_callback write!)] + node_fs) + (Fs:rmdir [path (..any_callback write!)] + node_fs))))) (the (modify path time_stamp) (with_future write! (Try Any) (let [when (|> time_stamp instant.relative duration.millis i.decimal)] - (Fs::utimes [path when when (..any_callback write!)] - node_fs)))) + (Fs:utimes [path when when (..any_callback write!)] + node_fs)))) (,, (template.with [ ] [(the ( path data) (with_future write! (Try Any) - ( [path (Buffer::from [data]) (..any_callback write!)] + ( [path (Buffer:from [data]) (..any_callback write!)] node_fs)))] - [[write Fs::writeFile] - [append Fs::appendFile]])) + [[write Fs:writeFile] + [append Fs:appendFile]])) (the (move origin destination) (with_future write! (Try Any) - (Fs::rename [origin destination (..any_callback write!)] - node_fs)))))))))) + (Fs:rename [origin destination (..any_callback write!)] + node_fs)))))))))) .python (these (`` (every (Tuple/2 left right) @@ -525,7 +525,7 @@ [(,, (static .co_variant)) right]]))) (ffi.the PyFile - "[1]::[0]" + "[1]:[0]" (read [] "io" "try" Binary) (write [Binary] "io" "try" "?" Any) (close [] "io" "try" "?" Any)) @@ -534,7 +534,7 @@ (ffi.the (tuple [[ffi.Integer ffi.Integer]] (Tuple/2 ffi.Integer ffi.Integer))) (ffi.the os - "[1]::[0]" + "[1]:[0]" ("static" X_OK ffi.Integer) ("static" mkdir [ffi.String] "io" "try" "?" Any) @@ -546,7 +546,7 @@ ("static" listdir [ffi.String] "io" "try" (Array ffi.String))) (ffi.the os/path - "[1]::[0]" + "[1]:[0]" ("static" isfile [ffi.String] "io" "try" ffi.Boolean) ("static" isdir [ffi.String] "io" "try" ffi.Boolean) ("static" sep ffi.String) @@ -554,7 +554,7 @@ ("static" getmtime [ffi.String] "io" "try" ffi.Float)) (the python_delimiter - (io.value (os/path::sep))) + (io.value (os/path:sep))) (`` (the .public default (System IO) @@ -568,18 +568,18 @@ (io:each (|>> (try.else false)))))] - [[file? os/path::isfile] - [directory? os/path::isdir]])) + [[file? os/path:isfile] + [directory? os/path:isdir]])) (the make_directory - (|>> [] os::mkdir)) + (|>> [] os:mkdir)) (,, (template.with [ ] [(the ( path) (let [! (try.with io.monad)] (|> path [] - os::listdir + os:listdir (by ! each (|>> (list.of_array {.:None}) (list:each (|>> (text path ..python_delimiter))) (list.each' ! (function (_ sub) @@ -588,17 +588,17 @@ (list:each product.left))))) (by ! conjoint))))] - [[directory_files os/path::isfile] - [sub_directories os/path::isdir]])) + [[directory_files os/path:isfile] + [sub_directories os/path:isdir]])) (the file_size (|>> [] - os/path::getsize + os/path:getsize (by (try.with io.monad) each (|>> .natural)))) (the last_modified (|>> [] - os/path::getmtime + os/path:getmtime (by (try.with io.monad) each (|>> d.integer (i.x +1,000) duration.of_millis @@ -606,55 +606,55 @@ (the (can_execute? path) (monad.let io.monad - [permission (os::X_OK)] - (os::access [path permission]))) + [permission (os:X_OK)] + (os:access [path permission]))) (the (read path) (monad.let (try.with io.monad) [file (..open [path "rb"]) - data (PyFile::read [] file) - _ (PyFile::close [] file)] + data (PyFile:read [] file) + _ (PyFile:close [] file)] (pure data))) (the (delete path) (monad.let (try.with io.monad) - [? (os/path::isfile [path])] + [? (os/path:isfile [path])] (if ? - (os::remove [path]) - (os::rmdir [path])))) + (os:remove [path]) + (os:rmdir [path])))) (the (modify path time_stamp) (let [when (|> time_stamp instant.relative duration.millis (i./ +1,000))] - (os::utime [path (..tuple [when when])]))) + (os:utime [path (..tuple [when when])]))) (,, (template.with [ ] [(the ( path data) (monad.let (try.with io.monad) [file (..open [path ]) - _ (PyFile::write [data] file)] - (PyFile::close [] file)))] + _ (PyFile:write [data] file)] + (PyFile:close [] file)))] [[write "w+b"] [append "ab"]])) (the (move origin destination) - (os::rename [origin destination])) + (os:rename [origin destination])) )))) .ruby (these (ffi.the Time - "[1]::[0]" + "[1]:[0]" ("static" at [Decimal] Time) (to_f [] Decimal)) (ffi.the Stat - "[1]::[0]" + "[1]:[0]" (executable? [] Bit) (size Integer) (mtime [] Time)) (ffi.the File "as" RubyFile - "[1]::[0]" + "[1]:[0]" ("static" SEPARATOR ffi.String) ("static" open [Path ffi.String] "io" "try" RubyFile) ("static" stat [Path] "io" "try" Stat) @@ -669,21 +669,21 @@ (close [] "io" "try" "?" Any)) (ffi.the Dir - "[1]::[0]" + "[1]:[0]" ("static" open [Path] "io" "try" Dir) (children [] "io" "try" (Array Path)) (close [] "io" "try" "?" Any)) (ffi.the "fileutils" FileUtils - "[2]/[1]::[0]" + "[2]/[1]:[0]" ("static" move [Path Path] "io" "try" "?" Any) ("static" rmdir [Path] "io" "try" "?" Any) ("static" mkdir [Path] "io" "try" "?" Any)) (the ruby_delimiter Text - (io.value (..RubyFile::SEPARATOR))) + (io.value (..RubyFile:SEPARATOR))) (`` (the .public default (System IO) @@ -696,17 +696,17 @@ (|>> [] (io:each (|>> (try.else false)))))] - [[file? RubyFile::file?] - [directory? RubyFile::directory?]])) + [[file? RubyFile:file?] + [directory? RubyFile:directory?]])) (the make_directory - (|>> [] fileutils/FileUtils::mkdir)) + (|>> [] fileutils/FileUtils:mkdir)) (,, (template.with [ ] [(the ( path) (monad.let [! (try.with io.monad)] - [self (Dir::open [path]) - children (Dir::children [] self) + [self (Dir:open [path]) + children (Dir:children [] self) output (loop (again [input (|> children (list.of_array {.:None}) (list:each (|>> (text path ..ruby_delimiter))) @@ -723,40 +723,40 @@ (again tail (if verdict {.:Top head output} output))))) - _ (Dir::close [] self)] + _ (Dir:close [] self)] (pure (view.of list.stack output))))] - [[directory_files RubyFile::file?] - [sub_directories RubyFile::directory?]])) + [[directory_files RubyFile:file?] + [sub_directories RubyFile:directory?]])) (,, (template.with [ ] [(the (let [! (try.with io.monad)] - (|>> [] RubyFile::stat + (|>> [] RubyFile:stat (by ! each (`` (|>> (,, (template.spliced ))))))))] - [[file_size [Stat::size .natural]] - [last_modified [(Stat::mtime []) - (Time::to_f []) + [[file_size [Stat:size .natural]] + [last_modified [(Stat:mtime []) + (Time:to_f []) (d.x +1,000.0) d.integer duration.of_millis instant.absolute]] - [can_execute? [(Stat::executable? [])]]])) + [can_execute? [(Stat:executable? [])]]])) (the (read path) (monad.let (try.with io.monad) - [file (RubyFile::open [path "rb"]) - data (RubyFile::read [] file) - _ (RubyFile::close [] file)] + [file (RubyFile:open [path "rb"]) + data (RubyFile:read [] file) + _ (RubyFile:close [] file)] (pure data))) (the (delete path) (monad.let (try.with io.monad) - [? (RubyFile::file? [path])] + [? (RubyFile:file? [path])] (if ? - (RubyFile::delete [path]) - (fileutils/FileUtils::rmdir [path])))) + (RubyFile:delete [path]) + (fileutils/FileUtils:rmdir [path])))) (the (modify path moment) (let [moment (|> moment @@ -764,16 +764,16 @@ duration.millis i.decimal (d./ +1,000.0) - [] Time::at)] - (RubyFile::utime [moment moment path]))) + [] Time:at)] + (RubyFile:utime [moment moment path]))) (,, (template.with [ ] [(the ( path data) (monad.let [! (try.with io.monad)] - [file (RubyFile::open [path ]) - data (RubyFile::write [data] file) - _ (RubyFile::flush [] file) - _ (RubyFile::close [] file)] + [file (RubyFile:open [path ]) + data (RubyFile:write [data] file) + _ (RubyFile:flush [] file) + _ (RubyFile:close [] file)] (pure [])))] [["wb" write] @@ -781,7 +781,7 @@ (the (move origin destination) (monad.let (try.with io.monad) - [_ (fileutils/FileUtils::move [origin destination])] + [_ (fileutils/FileUtils:move [origin destination])] (pure []))) )))) diff --git a/stdlib/source/library/lux/world/file/watch.lux b/stdlib/source/library/lux/world/file/watch.lux index 96da6cdacf..bc60edf949 100644 --- a/stdlib/source/library/lux/world/file/watch.lux +++ b/stdlib/source/library/lux/world/file/watch.lux @@ -285,13 +285,13 @@ (for .jvm (these (ffi.the java/lang/Object - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/String - "[1]::[0]") + "[1]:[0]") (ffi.the (java/util/List it) - "[1]::[0]" + "[1]:[0]" (size [] int) (get [int] it)) @@ -299,7 +299,7 @@ (for_any (_ it) (-> (java/util/List it) (List it))) - (let [size (.natural (ffi.of_int (java/util/List::size [] it)))] + (let [size (.natural (ffi.of_int (java/util/List:size [] it)))] (loop (again [idx 0 output (type.sharing [it] (is (java/util/List it) @@ -309,26 +309,26 @@ (if (n.< size idx) (again (++ idx) (list:composite output - (list (as_expected (java/util/List::get [(ffi.as_int (.integer idx))] it))))) + (list (as_expected (java/util/List:get [(ffi.as_int (.integer idx))] it))))) output)))) (ffi.the (java/nio/file/WatchEvent$Kind it) - "[1]::[0]") + "[1]:[0]") (ffi.the (java/nio/file/WatchEvent it) - "[1]::[0]" + "[1]:[0]" (kind [] (java/nio/file/WatchEvent$Kind it))) (ffi.the java/nio/file/Watchable - "[1]::[0]") + "[1]:[0]") (ffi.the java/nio/file/Path - "[1]::[0]" + "[1]:[0]" (register [java/nio/file/WatchService [(java/nio/file/WatchEvent$Kind [? < java/lang/Object])]] "io" "try" java/nio/file/WatchKey) (toString [] java/lang/String)) (ffi.the java/nio/file/StandardWatchEventKinds - "[1]::[0]" + "[1]:[0]" ("read_only" "static" ENTRY_CREATE (java/nio/file/WatchEvent$Kind java/nio/file/Path)) ("read_only" "static" ENTRY_MODIFY (java/nio/file/WatchEvent$Kind java/nio/file/Path)) ("read_only" "static" ENTRY_DELETE (java/nio/file/WatchEvent$Kind java/nio/file/Path))) @@ -339,16 +339,16 @@ Concern)) (let [kind (as (-> (java/nio/file/WatchEvent$Kind Any) (java/nio/file/WatchEvent$Kind java/nio/file/Path)) - (java/nio/file/WatchEvent::kind [] event))] - (if (identical? (java/nio/file/StandardWatchEventKinds::ENTRY_CREATE) + (java/nio/file/WatchEvent:kind [] event))] + (if (identical? (java/nio/file/StandardWatchEventKinds:ENTRY_CREATE) kind) ..creation - (identical? (java/nio/file/StandardWatchEventKinds::ENTRY_MODIFY) + (identical? (java/nio/file/StandardWatchEventKinds:ENTRY_MODIFY) kind) ..modification - (identical? (java/nio/file/StandardWatchEventKinds::ENTRY_DELETE) + (identical? (java/nio/file/StandardWatchEventKinds:ENTRY_DELETE) kind) ..deletion @@ -357,7 +357,7 @@ ))) (ffi.the java/nio/file/WatchKey - "[1]::[0]" + "[1]:[0]" (reset [] "io" boolean) (cancel [] "io" void) (watchable [] java/nio/file/Watchable) @@ -366,25 +366,25 @@ (the default_key_concern (-> java/nio/file/WatchKey (IO Concern)) - (|>> (java/nio/file/WatchKey::pollEvents []) + (|>> (java/nio/file/WatchKey:pollEvents []) (by io.monad each (|>> ..default_list (list:each default_event_concern) (list:mix ..and ..none))))) (ffi.the java/nio/file/WatchService - "[1]::[0]" + "[1]:[0]" (poll [] "io" "try" "?" java/nio/file/WatchKey)) (ffi.the java/nio/file/FileSystem - "[1]::[0]" + "[1]:[0]" (newWatchService [] "io" "try" java/nio/file/WatchService)) (ffi.the java/nio/file/FileSystems - "[1]::[0]" + "[1]:[0]" ("static" getDefault [] java/nio/file/FileSystem)) (ffi.the java/io/File - "[1]::[0]" + "[1]:[0]" (new [java/lang/String]) (toPath [] java/nio/file/Path)) @@ -400,9 +400,9 @@ (list.size watch_events)) (list.enumeration watch_events))] (future.soon - (java/nio/file/Path::register [watcher - watch_events'] - (|> path ffi.as_string [] java/io/File::new (java/io/File::toPath [])))))) + (java/nio/file/Path:register [watcher + watch_events'] + (|> path ffi.as_string [] java/io/File:new (java/io/File:toPath [])))))) (the (default_poll watcher) (-> java/nio/file/WatchService @@ -410,17 +410,17 @@ (loop (again [output (is (List [Concern //.Path]) (list))]) (monad.let (try.with io.monad) - [?key (java/nio/file/WatchService::poll [] watcher)] + [?key (java/nio/file/WatchService:poll [] watcher)] (when ?key {.:Some key} (monad.let [! io.monad] - [valid? (java/nio/file/WatchKey::reset [] key)] + [valid? (java/nio/file/WatchKey:reset [] key)] (if (ffi.of_boolean valid?) (monad.let ! [.let [path (|> key - (java/nio/file/WatchKey::watchable []) + (java/nio/file/WatchKey:watchable []) (as (-> java/nio/file/Watchable java/nio/file/Path)) - (java/nio/file/Path::toString []) + (java/nio/file/Path:toString []) ffi.of_string (as (-> Text //.Path)))] the_concern (..default_key_concern key)] @@ -436,23 +436,23 @@ (.all list:composite (if (..creation? concern) (list (as (-> (java/nio/file/WatchEvent$Kind java/nio/file/Path) Watch_Event) - (java/nio/file/StandardWatchEventKinds::ENTRY_CREATE))) + (java/nio/file/StandardWatchEventKinds:ENTRY_CREATE))) (list)) (if (..modification? concern) (list (as (-> (java/nio/file/WatchEvent$Kind java/nio/file/Path) Watch_Event) - (java/nio/file/StandardWatchEventKinds::ENTRY_MODIFY))) + (java/nio/file/StandardWatchEventKinds:ENTRY_MODIFY))) (list)) (if (..deletion? concern) (list (as (-> (java/nio/file/WatchEvent$Kind java/nio/file/Path) Watch_Event) - (java/nio/file/StandardWatchEventKinds::ENTRY_DELETE))) + (java/nio/file/StandardWatchEventKinds:ENTRY_DELETE))) (list)) )) (the .public default (IO (Try (Watcher Future))) (monad.let (try.with io.monad) - [watcher (|> (java/nio/file/FileSystems::getDefault []) - (java/nio/file/FileSystem::newWatchService [])) + [watcher (|> (java/nio/file/FileSystems:getDefault []) + (java/nio/file/FileSystem:newWatchService [])) .let [tracker (stm.var (is (Dictionary //.Path [Concern java/nio/file/WatchKey]) (dictionary.empty text.hash))) @@ -464,7 +464,7 @@ {try.:Success [the_concern key]} (monad.let ! [_ (future.soon - (java/nio/file/WatchKey::cancel [] key)) + (java/nio/file/WatchKey:cancel [] key)) _ (stm.commit! (stm.update (dictionary.lacks path) tracker))] (pure {try.:Success the_concern})) diff --git a/stdlib/source/library/lux/world/net/http/client.lux b/stdlib/source/library/lux/world/net/http/client.lux index bca5f095b0..b6c9ff2a98 100644 --- a/stdlib/source/library/lux/world/net/http/client.lux +++ b/stdlib/source/library/lux/world/net/http/client.lux @@ -95,22 +95,22 @@ {//.:Trace} "TRACE"))) (for .jvm (these (ffi.the java/lang/String - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/AutoCloseable - "[1]::[0]" + "[1]:[0]" (close [] "io" "try" void)) (ffi.the java/io/InputStream - "[1]::[0]") + "[1]:[0]") (ffi.the java/io/OutputStream - "[1]::[0]" + "[1]:[0]" (flush [] "io" "try" void) (write [[byte]] "io" "try" void)) (ffi.the java/net/URLConnection - "[1]::[0]" + "[1]:[0]" (setDoOutput [boolean] "io" "try" void) (setRequestProperty [java/lang/String java/lang/String] "io" "try" void) (getInputStream [] "io" "try" java/io/InputStream) @@ -119,17 +119,17 @@ (getHeaderField [int] "io" "try" "?" java/lang/String)) (ffi.the java/net/HttpURLConnection - "[1]::[0]" + "[1]:[0]" (setRequestMethod [java/lang/String] "io" "try" void) (getResponseCode [] "io" "try" int)) (ffi.the java/net/URL - "[1]::[0]" + "[1]:[0]" (new [java/lang/String]) (openConnection [] "io" "try" java/net/URLConnection)) (ffi.the java/io/BufferedInputStream - "[1]::[0]" + "[1]:[0]" (new [java/io/InputStream]) (read [[byte] int int] "io" "try" int)) @@ -141,7 +141,7 @@ (pipe.when [_ 0] (monad.let (try.with io.monad) - [_ (java/lang/AutoCloseable::close [] input)] + [_ (java/lang/AutoCloseable:close [] input)] (pure ..empty_body)) [partial? buffer_size] @@ -151,10 +151,10 @@ (monad.let [! (try.with io.monad)] [.let [remaining (i.- so_far (.integer buffer_size))] bytes_read (by ! each (|>> ffi.of_int) - (java/io/BufferedInputStream::read [buffer (ffi.as_int so_far) (ffi.as_int remaining)] input))] + (java/io/BufferedInputStream:read [buffer (ffi.as_int so_far) (ffi.as_int remaining)] input))] (when bytes_read -1 (monad.let ! - [_ (java/lang/AutoCloseable::close [] input)] + [_ (java/lang/AutoCloseable:close [] input)] (pure [(.natural so_far) buffer])) +0 (again so_far) _ (if (i.= remaining bytes_read) @@ -165,10 +165,10 @@ (monad.let [! (try.with io.monad)] [.let [remaining (i.- so_far (.integer buffer_size))] bytes_read (by ! each (|>> ffi.of_int) - (java/io/BufferedInputStream::read [buffer (ffi.as_int so_far) (ffi.as_int remaining)] input))] + (java/io/BufferedInputStream:read [buffer (ffi.as_int so_far) (ffi.as_int remaining)] input))] (when bytes_read -1 (monad.let ! - [_ (java/lang/AutoCloseable::close [] input)] + [_ (java/lang/AutoCloseable:close [] input)] (when so_far +0 (pure (..body_of output)) _ (|> buffer @@ -190,11 +190,11 @@ (loop (again [index +0 headers header.empty]) (monad.let [! (try.with io.monad)] - [?name (java/net/URLConnection::getHeaderFieldKey [(ffi.as_int index)] connection)] + [?name (java/net/URLConnection:getHeaderFieldKey [(ffi.as_int index)] connection)] (when ?name {.:Some name} (monad.let ! - [?value (java/net/URLConnection::getHeaderField [(ffi.as_int index)] connection)] + [?value (java/net/URLConnection:getHeaderField [(ffi.as_int index)] connection)] (again (++ index) (dictionary.has (ffi.of_string name) (maybe.else "" (maybe:each (|>> ffi.of_string) ?value)) headers))) @@ -207,30 +207,30 @@ (the (request method url headers data) (is (IO (Try (Response IO))) (monad.let [! (try.with io.monad)] - [connection (|> url ffi.as_string [] java/net/URL::new (java/net/URL::openConnection [])) + [connection (|> url ffi.as_string [] java/net/URL:new (java/net/URL:openConnection [])) .let [connection (as (-> java/net/URLConnection java/net/HttpURLConnection) connection)] - _ (java/net/HttpURLConnection::setRequestMethod [(ffi.as_string (..method_name method))] connection) + _ (java/net/HttpURLConnection:setRequestMethod [(ffi.as_string (..method_name method))] connection) _ (list.each' ! (function (_ [name value]) - (java/net/URLConnection::setRequestProperty [(ffi.as_string name) (ffi.as_string value)] connection)) + (java/net/URLConnection:setRequestProperty [(ffi.as_string name) (ffi.as_string value)] connection)) (dictionary.entries headers)) _ (when data {.:Some data} (monad.let ! - [_ (java/net/URLConnection::setDoOutput [true] connection) - stream (java/net/URLConnection::getOutputStream [] connection) - _ (java/io/OutputStream::write [data] stream) - _ (java/io/OutputStream::flush [] stream) - _ (java/lang/AutoCloseable::close [] stream)] + [_ (java/net/URLConnection:setDoOutput [true] connection) + stream (java/net/URLConnection:getOutputStream [] connection) + _ (java/io/OutputStream:write [data] stream) + _ (java/io/OutputStream:flush [] stream) + _ (java/lang/AutoCloseable:close [] stream)] (pure [])) {.:None} (pure [])) - status (java/net/HttpURLConnection::getResponseCode [] connection) + status (java/net/HttpURLConnection:getResponseCode [] connection) headers (..default_headers connection) input (|> connection - (java/net/URLConnection::getInputStream []) - (by ! each (|>> [] java/io/BufferedInputStream::new)))] + (java/net/URLConnection:getInputStream []) + (by ! each (|>> [] java/io/BufferedInputStream:new)))] (pure [(.natural (ffi.of_int status)) [//.:headers headers //.:body (..default_body input)]]))))))) diff --git a/stdlib/source/library/lux/world/shell.lux b/stdlib/source/library/lux/world/shell.lux index 492edb4f5f..2e3245c052 100644 --- a/stdlib/source/library/lux/world/shell.lux +++ b/stdlib/source/library/lux/world/shell.lux @@ -183,10 +183,10 @@ (for .jvm (these (ffi.the java/lang/String - "[1]::[0]" + "[1]:[0]" (toLowerCase [] java/lang/String)) - (the (jvm::arguments_array arguments) + (the (jvm:arguments_array arguments) (-> (List Argument) (ffi.type [java/lang/String])) (product.right @@ -198,43 +198,43 @@ arguments))) (ffi.the (java/util/Map k v) - "[1]::[0]" + "[1]:[0]" (put [k v] "?" v)) - (the (jvm::load_environment input target) + (the (jvm:load_environment input target) (-> Environment (java/util/Map java/lang/String java/lang/String) (java/util/Map java/lang/String java/lang/String)) (list:mix (function (_ [key value] target') (exec - (java/util/Map::put [(as (-> Text java/lang/String) key) - (as (-> Text java/lang/String) value)] - target') + (java/util/Map:put [(as (-> Text java/lang/String) key) + (as (-> Text java/lang/String) value)] + target') target')) target (dictionary.entries input))) (ffi.the java/io/Reader - "[1]::[0]") + "[1]:[0]") (ffi.the java/io/BufferedReader - "[1]::[0]" + "[1]:[0]" (new [java/io/Reader]) (readLine [] "io" "try" "?" java/lang/String)) (ffi.the java/io/InputStream - "[1]::[0]") + "[1]:[0]") (ffi.the java/io/InputStreamReader - "[1]::[0]" + "[1]:[0]" (new [java/io/InputStream])) (ffi.the java/io/OutputStream - "[1]::[0]" + "[1]:[0]" (write [[byte]] "io" "try" void)) (ffi.the java/lang/Process - "[1]::[0]" + "[1]:[0]" (getInputStream [] "io" "try" java/io/InputStream) (getErrorStream [] "io" "try" java/io/InputStream) (getOutputStream [] "io" "try" java/io/OutputStream) @@ -246,21 +246,21 @@ (the (default_process process) (-> java/lang/Process (IO (Try (Process IO)))) (monad.let [! (try.with io.monad)] - [jvm_input (java/lang/Process::getInputStream [] process) - jvm_error (java/lang/Process::getErrorStream [] process) - jvm_output (java/lang/Process::getOutputStream [] process) + [jvm_input (java/lang/Process:getInputStream [] process) + jvm_error (java/lang/Process:getErrorStream [] process) + jvm_output (java/lang/Process:getOutputStream [] process) .let [jvm_input (|> jvm_input - [] java/io/InputStreamReader::new - [] java/io/BufferedReader::new) + [] java/io/InputStreamReader:new + [] java/io/BufferedReader:new) jvm_error (|> jvm_error - [] java/io/InputStreamReader::new - [] java/io/BufferedReader::new)]] + [] java/io/InputStreamReader:new + [] java/io/BufferedReader:new)]] (pure (is (Process IO) (`` (implementation (,, (template.with [ ] [(the ( _) (monad.let ! - [output (java/io/BufferedReader::readLine [] )] + [output (java/io/BufferedReader:readLine [] )] (when output {.:Some output} (pure (ffi.of_string output)) @@ -271,40 +271,40 @@ [[read jvm_input] [fail jvm_error]])) (the (write message) - (java/io/OutputStream::write [(by utf8.binary as message)] - jvm_output)) + (java/io/OutputStream:write [(by utf8.binary as message)] + jvm_output)) (,, (template.with [ ] [(the ( _) (|> process ))] - [[destroy (java/lang/Process::destroy [])] + [[destroy (java/lang/Process:destroy [])] [await (<| (by ! each (|>> ffi.of_int)) - (java/lang/Process::waitFor []))]])))))))) + (java/lang/Process:waitFor []))]])))))))) (ffi.the java/io/File - "[1]::[0]" + "[1]:[0]" (new [java/lang/String])) (ffi.the java/lang/ProcessBuilder - "[1]::[0]" + "[1]:[0]" (new [[java/lang/String]]) (environment [] "try" (java/util/Map java/lang/String java/lang/String)) (directory [java/io/File] java/lang/ProcessBuilder) (start [] "io" "try" java/lang/Process)) (ffi.the java/lang/System - "[1]::[0]" + "[1]:[0]" ("static" getProperty [java/lang/String] "io" "try" java/lang/String)) ... https://en.wikipedia.org/wiki/Code_injection#Shell_injection (the windows? (IO (Try Bit)) (by (try.with io.monad) each - (|>> (java/lang/String::toLowerCase []) + (|>> (java/lang/String:toLowerCase []) ffi.of_string (text.starts_with? "windows")) - (java/lang/System::getProperty [(ffi.as_string "os.name")]))) + (java/lang/System:getProperty [(ffi.as_string "os.name")]))) (the .public default (Shell IO) @@ -312,14 +312,14 @@ (the (execute [environment working_directory the_command arguments]) (monad.let [! (try.with io.monad)] [.let [builder (|> (list:composite (list the_command) arguments) - ..jvm::arguments_array - [] java/lang/ProcessBuilder::new - (java/lang/ProcessBuilder::directory [(java/io/File::new [(ffi.as_string working_directory)])]))] + ..jvm:arguments_array + [] java/lang/ProcessBuilder:new + (java/lang/ProcessBuilder:directory [(java/io/File:new [(ffi.as_string working_directory)])]))] _ (|> builder - (java/lang/ProcessBuilder::environment []) - (by try.functor each (..jvm::load_environment environment)) + (java/lang/ProcessBuilder:environment []) + (by try.functor each (..jvm:load_environment environment)) (by io.monad pure)) - process (java/lang/ProcessBuilder::start [] builder)] + process (java/lang/ProcessBuilder:start [] builder)] (..default_process process))))) ) diff --git a/stdlib/source/test/lux/compiler/language/lux/phase/translation/jvm/function/abstract.lux b/stdlib/source/test/lux/compiler/language/lux/phase/translation/jvm/function/abstract.lux index 5e7bbf8dcc..70fda19b59 100644 --- a/stdlib/source/test/lux/compiler/language/lux/phase/translation/jvm/function/abstract.lux +++ b/stdlib/source/test/lux/compiler/language/lux/phase/translation/jvm/function/abstract.lux @@ -44,18 +44,18 @@ ["[0]T" complex]]) (ffi.the java/lang/String - "[1]::[0]") + "[1]:[0]") (ffi.the (java/lang/Class of) - "[1]::[0]" + "[1]:[0]" (getCanonicalName [] java/lang/String)) (ffi.the java/lang/Object - "[1]::[0]" + "[1]:[0]" (getClass [] (java/lang/Class [? < java/lang/Object]))) (ffi.the java/lang/ClassLoader - "[1]::[0]" + "[1]:[0]" ("static" getSystemClassLoader [] java/lang/ClassLoader)) (the (function? loader it) @@ -64,8 +64,8 @@ (let [super (type/reflection.reflection (type.reflection /.class)) sub (|> it (as (-> Any java/lang/Object)) - (java/lang/Object::getClass []) - (java/lang/Class::getCanonicalName []) + (java/lang/Object:getClass []) + (java/lang/Class:getCanonicalName []) ffi.of_string)] (try.else false (reflection.sub? loader super sub)))) @@ -78,7 +78,7 @@ expected_i64 random.i64 arity (by ! each (|>> (n.% 10) ++) random.natural) - .let [system_class_loader (java/lang/ClassLoader::getSystemClassLoader [])]]) + .let [system_class_loader (java/lang/ClassLoader:getSystemClassLoader [])]]) (all _.and (_.coverage [/.id] (not (n.= runtime.id /.id))) diff --git a/stdlib/source/test/lux/compiler/language/lux/phase/translation/jvm/function/method/implementation.lux b/stdlib/source/test/lux/compiler/language/lux/phase/translation/jvm/function/method/implementation.lux index 1bbc392ad2..2d56487dbb 100644 --- a/stdlib/source/test/lux/compiler/language/lux/phase/translation/jvm/function/method/implementation.lux +++ b/stdlib/source/test/lux/compiler/language/lux/phase/translation/jvm/function/method/implementation.lux @@ -46,11 +46,11 @@ ["[0]T" complex]]) (ffi.the (java/lang/Class of) - "[1]::[0]" + "[1]:[0]" (getCanonicalName [] java/lang/String)) (ffi.the java/lang/Object - "[1]::[0]" + "[1]:[0]" (getClass [] (java/lang/Class java/lang/Object))) (the .public (test valid_modifier?) @@ -92,8 +92,8 @@ phase.of_try) .let [class (|> it (as (-> Any java/lang/Object)) - (java/lang/Object::getClass []) - (java/lang/Class::getCanonicalName []) + (java/lang/Object:getClass []) + (java/lang/Class:getCanonicalName []) ffi.of_string (type.class (list)))]] (pure (|> (monad.let !.monad diff --git a/stdlib/source/test/lux/compiler/language/lux/phase/translation/jvm/function/method/reset.lux b/stdlib/source/test/lux/compiler/language/lux/phase/translation/jvm/function/method/reset.lux index ac241b0263..58667c86f2 100644 --- a/stdlib/source/test/lux/compiler/language/lux/phase/translation/jvm/function/method/reset.lux +++ b/stdlib/source/test/lux/compiler/language/lux/phase/translation/jvm/function/method/reset.lux @@ -46,11 +46,11 @@ ["[0]T" complex]]) (ffi.the (java/lang/Class of) - "[1]::[0]" + "[1]:[0]" (getCanonicalName [] java/lang/String)) (ffi.the java/lang/Object - "[1]::[0]" + "[1]:[0]" (getClass [] (java/lang/Class java/lang/Object))) (the .public test @@ -92,8 +92,8 @@ phase.of_try) .let [class (|> it (as (-> Any java/lang/Object)) - (java/lang/Object::getClass []) - (java/lang/Class::getCanonicalName []) + (java/lang/Object:getClass []) + (java/lang/Class:getCanonicalName []) ffi.of_string (type.class (list)))] .let [what_happens_when_its_not_reset! diff --git a/stdlib/source/test/lux/debug.lux b/stdlib/source/test/lux/debug.lux index 1953efb633..4847fcd9e4 100644 --- a/stdlib/source/test/lux/debug.lux +++ b/stdlib/source/test/lux/debug.lux @@ -201,38 +201,38 @@ Text) (for .jvm (these (ffi.the java/lang/String - "[1]::[0]") + "[1]:[0]") (ffi.the java/io/ByteArrayOutputStream - "[1]::[0]" + "[1]:[0]" (new []) (toString [] java/lang/String)) (ffi.the java/io/OutputStream - "[1]::[0]") + "[1]:[0]") (ffi.the java/io/PrintStream - "[1]::[0]" + "[1]:[0]" (new [java/io/OutputStream])) (ffi.the java/lang/System - "[1]::[0]" + "[1]:[0]" ("static" out java/io/PrintStream) ("static" setOut [java/io/PrintStream] void)) (the system_output java/io/PrintStream - (io.value (java/lang/System::out)))) + (io.value (java/lang/System:out)))) .js (these (ffi.the console - "[1]::[0]" + "[1]:[0]" ("static" log (-> Text Any)))) .python (these (ffi.the io/StringIO - "[1]::[0]" + "[1]:[0]" (new []) (getvalue [] Text)) (ffi.the sys - "[1]::[0]" + "[1]:[0]" ("static" stdout io/StringIO))) ... else (these)) @@ -240,26 +240,26 @@ (the with_out (template.macro (_ ,body) [(for .jvm (ffi.synchronized ..system_output - (let [buffer (java/io/ByteArrayOutputStream::new []) - _ (java/lang/System::setOut [(java/io/PrintStream::new [buffer])]) + (let [buffer (java/io/ByteArrayOutputStream:new []) + _ (java/lang/System:setOut [(java/io/PrintStream:new [buffer])]) output ,body - _ (java/lang/System::setOut [..system_output])] - [(ffi.of_string (java/io/ByteArrayOutputStream::toString [] buffer)) + _ (java/lang/System:setOut [..system_output])] + [(ffi.of_string (java/io/ByteArrayOutputStream:toString [] buffer)) output])) - .js (let [old (io.value (console::log)) + .js (let [old (io.value (console:log)) buffer (atom.atom "") - _ (io.value (console::log (function (_ it) - (io.value (atom.write! (text it text.\n) buffer))))) + _ (io.value (console:log (function (_ it) + (io.value (atom.write! (text it text.\n) buffer))))) output ,body - _ (io.value (console::log old))] + _ (io.value (console:log old))] [(io.value (atom.read! buffer)) output]) - .python (let [old (io.value (sys::stdout)) - buffer (io/StringIO::new []) - _ (io.value (sys::stdout buffer)) + .python (let [old (io.value (sys:stdout)) + buffer (io/StringIO:new []) + _ (io.value (sys:stdout buffer)) output ,body - _ (io.value (sys::stdout old))] - [(io/StringIO::getvalue [] buffer) + _ (io.value (sys:stdout old))] + [(io/StringIO:getvalue [] buffer) output]) .lua ["" ,body] diff --git a/stdlib/source/test/lux/ffi.js.lux b/stdlib/source/test/lux/ffi.js.lux index 02a2eb605d..c9398e6d8b 100644 --- a/stdlib/source/test/lux/ffi.js.lux +++ b/stdlib/source/test/lux/ffi.js.lux @@ -30,28 +30,28 @@ (.,, (.these))))]))) (/.the Uint8Array - "[1]::[0]") + "[1]:[0]") ... On Nashorn (/.the java/lang/String - "[1]::[0]" + "[1]:[0]" (new [Uint8Array /.String]) (getBytes [/.String] Uint8Array)) ... On Node (/.the Buffer - "[1]::[0]" + "[1]:[0]" ("static" from [/.String /.String] Buffer) (toString [/.String] /.String)) ... On the browser (/.the TextEncoder - "[1]::[0]" + "[1]:[0]" (new [/.String]) (encode [/.String] Uint8Array)) (/.the TextDecoder - "[1]::[0]" + "[1]:[0]" (new [/.String]) (decode [Uint8Array] /.String)) @@ -139,19 +139,19 @@ (if /.on_nashorn? (let [binary (|> string (as java/lang/String) - (java/lang/String::getBytes [encoding]))] - (|> (java/lang/String::new [binary encoding]) + (java/lang/String:getBytes [encoding]))] + (|> (java/lang/String:new [binary encoding]) (as Text))) /.on_node_js? - (|> (Buffer::from [string encoding]) - (Buffer::toString [encoding])) + (|> (Buffer:from [string encoding]) + (Buffer:toString [encoding])) ... On the browser - (let [binary (|> (TextEncoder::new [encoding]) - (TextEncoder::encode [string]))] - (|> (TextDecoder::new [encoding]) - (TextDecoder::decode [binary]))) + (let [binary (|> (TextEncoder:new [encoding]) + (TextEncoder:encode [string]))] + (|> (TextDecoder:new [encoding]) + (TextDecoder:decode [binary]))) )))) (_.coverage [/.undefined /.undefined?] (and (not (/.undefined? number)) diff --git a/stdlib/source/test/lux/ffi.jvm.lux b/stdlib/source/test/lux/ffi.jvm.lux index 917463461d..37f524e5ae 100644 --- a/stdlib/source/test/lux/ffi.jvm.lux +++ b/stdlib/source/test/lux/ffi.jvm.lux @@ -50,19 +50,19 @@ ["[1][0]" export]]) (/.the java/lang/Boolean - "[1]::[0]") + "[1]:[0]") (/.the java/lang/Long - "[1]::[0]") + "[1]:[0]") (/.the java/lang/String - "[1]::[0]") + "[1]:[0]") (/.the java/lang/Object - "[1]::[0]") + "[1]:[0]") (/.the (java/lang/Class a) - "[1]::[0]" + "[1]:[0]" (getName [] java/lang/String)) (template.with [ <=>] @@ -183,7 +183,7 @@ (_.coverage [/.synchronized] (/.synchronized sample true)) (_.coverage [/.class_for] - (text.= "java.lang.Class" (/.of_string (java/lang/Class::getName [] (/.class_for java/lang/Class))))) + (text.= "java.lang.Class" (/.of_string (java/lang/Class:getName [] (/.class_for java/lang/Class))))) (_.coverage [/.null /.null?] (and (/.null? (/.null)) (not (/.null? sample)))) @@ -281,35 +281,35 @@ ([] actual0 [] java/lang/Long)) (/.the test/TestInterface0 - "[1]::[0]" + "[1]:[0]" (actual0 [] java/lang/Long)) (/.interface test/TestInterface1 ([] actual1 [java/lang/Boolean] java/lang/Long "throws" [java/lang/Throwable])) (/.the test/TestInterface1 - "[1]::[0]" + "[1]:[0]" (actual1 [java/lang/Boolean] "try" java/lang/Long)) (/.interface test/TestInterface2 ([a] actual2 [a] a)) (/.the test/TestInterface2 - "[1]::[0]" + "[1]:[0]" ([a] actual2 [a] a)) (/.interface (test/TestInterface3 a) ([] actual3 [] a)) (/.the (test/TestInterface3 a) - "[1]::[0]" + "[1]:[0]" (actual3 [] a)) (/.interface test/TestInterface4 ([] actual4 [long long] long)) (/.the test/TestInterface4 - "[1]::[0]" + "[1]:[0]" (actual4 [long long] long)) (the for_interface @@ -326,7 +326,7 @@ (/.as_long (.integer expected)))) example/0! (identical? (is Any expected) - (is Any (test/TestInterface0::actual0 [] object/0))) + (is Any (test/TestInterface0:actual0 [] object/0))) object/1 (/.object [] [test/TestInterface1] [] @@ -338,14 +338,14 @@ (/.as_long (.integer expected)) (halt! "YOLO")))) example/1! - (and (when (test/TestInterface1::actual1 [(/.as_boolean false)] object/1) + (and (when (test/TestInterface1:actual1 [(/.as_boolean false)] object/1) {try.:Success actual} (identical? (is Any expected) (is Any actual)) {try.:Failure error} false) - (when (test/TestInterface1::actual1 [(/.as_boolean true)] object/1) + (when (test/TestInterface1:actual1 [(/.as_boolean true)] object/1) {try.:Success actual} false @@ -360,7 +360,7 @@ input)) example/2! (identical? (is Any expected) - (is Any (test/TestInterface2::actual2 [(/.as_long (.integer expected))] object/2))) + (is Any (test/TestInterface2:actual2 [(/.as_long (.integer expected))] object/2))) object/3 (/.object [] [(test/TestInterface3 java/lang/Long)] [] @@ -370,7 +370,7 @@ (/.as_long (.integer expected)))) example/3! (identical? (is Any expected) - (is Any (test/TestInterface3::actual3 [] object/3))) + (is Any (test/TestInterface3:actual3 [] object/3))) example/4! (let [expected (i.+ left right) @@ -383,7 +383,7 @@ (/.as_long (i.+ (/.of_long actual_left) (/.of_long actual_right)))))] (i.= expected - (/.of_long (test/TestInterface4::actual4 [left right] object/4))))]] + (/.of_long (test/TestInterface4:actual4 [left right] object/4))))]] (_.coverage [/.interface /.object] (and example/0! example/1! @@ -403,7 +403,7 @@ (/.get value self))) (/.the test/TestClass0 - "[1]::[0]" + "[1]:[0]" (new [java/lang/Long])) (/.class "final" test/TestClass1 [test/TestInterface1] @@ -421,7 +421,7 @@ (halt! "YOLO")))) (/.the test/TestClass1 - "[1]::[0]" + "[1]:[0]" (new [java/lang/Long])) (/.class "final" test/TestClass2 [test/TestInterface2] @@ -435,7 +435,7 @@ input)) (/.the test/TestClass2 - "[1]::[0]" + "[1]:[0]" (new [])) (/.class "final" (test/TestClass3 a) [(test/TestInterface3 a)] @@ -451,7 +451,7 @@ (/.get value self))) (/.the (test/TestClass3 a) - "[1]::[0]" + "[1]:[0]" (new [a])) (/.class "final" test/TestClass4 [] @@ -463,7 +463,7 @@ value)) (/.the test/TestClass4 - "[1]::[0]" + "[1]:[0]" (new []) (actual4 [java/lang/Long] java/lang/Long)) @@ -477,7 +477,7 @@ value)) (/.the test/TestClass5 - "[1]::[0]" + "[1]:[0]" ("static" actual5 [java/lang/Long] java/lang/Long)) (/.class "abstract" test/TestClass6 [] @@ -489,7 +489,7 @@ java/lang/Long)) (/.the test/TestClass6 - "[1]::[0]" + "[1]:[0]" (actual6 [java/lang/Long] java/lang/Long)) (/.class "final" test/TestClass7 test/TestClass6 [] @@ -503,7 +503,7 @@ input)) (/.the test/TestClass7 - "[1]::[0]" + "[1]:[0]" (new [])) (/.class "final" test/TestClass8 [test/TestInterface4] @@ -520,7 +520,7 @@ (/.of_long actual_right))))) (/.the test/TestClass8 - "[1]::[0]" + "[1]:[0]" (new [])) (/.class "final" (test/TestClass9 a) [] @@ -536,7 +536,7 @@ (/.get value9 self))) (/.the (test/TestClass9 a) - "[1]::[0]" + "[1]:[0]" (new [a]) (set_actual9 [a] void) (get_actual9 [] a)) @@ -549,7 +549,7 @@ (/.set value10 init self))) (/.the (test/TestClass10 a) - "[1]::[0]" + "[1]:[0]" (new [a]) (value10 a)) @@ -561,7 +561,7 @@ (/.set value11 init self))) (/.the (test/TestClass11 a) - "[1]::[0]" + "[1]:[0]" (new [a]) ("read_only" value11 a)) @@ -572,57 +572,57 @@ left random.integer right random.integer - .let [object/0 (test/TestClass0::new [(/.as_long (.integer expected))]) + .let [object/0 (test/TestClass0:new [(/.as_long (.integer expected))]) example/0! (n.= expected - (.natural (/.of_long (test/TestInterface0::actual0 [] object/0)))) + (.natural (/.of_long (test/TestInterface0:actual0 [] object/0)))) - object/1 (test/TestClass1::new [(/.as_long (.integer expected))]) + object/1 (test/TestClass1:new [(/.as_long (.integer expected))]) example/1! - (and (when (test/TestInterface1::actual1 [(/.as_boolean false)] object/1) + (and (when (test/TestInterface1:actual1 [(/.as_boolean false)] object/1) {try.:Success actual} (n.= expected (.natural (/.of_long actual))) {try.:Failure error} false) - (when (test/TestInterface1::actual1 [(/.as_boolean true)] object/1) + (when (test/TestInterface1:actual1 [(/.as_boolean true)] object/1) {try.:Success actual} false {try.:Failure error} true)) - object/2 (test/TestClass2::new []) + object/2 (test/TestClass2:new []) example/2! (n.= expected - (.natural (/.of_long (as (-> Any /.Long) (test/TestInterface2::actual2 [(/.as_long (.integer expected))] object/2))))) + (.natural (/.of_long (as (-> Any /.Long) (test/TestInterface2:actual2 [(/.as_long (.integer expected))] object/2))))) object/3 (is (test/TestClass3 java/lang/Long) - (test/TestClass3::new [(/.as_long (.integer expected))])) + (test/TestClass3:new [(/.as_long (.integer expected))])) example/3! (n.= expected - (.natural (/.of_long (as (-> Any /.Long) (test/TestInterface3::actual3 [] object/3))))) + (.natural (/.of_long (as (-> Any /.Long) (test/TestInterface3:actual3 [] object/3))))) - object/4 (test/TestClass4::new []) + object/4 (test/TestClass4:new []) example/4! (n.= expected - (.natural (/.of_long (test/TestClass4::actual4 [(/.as_long (.integer expected))] object/4)))) + (.natural (/.of_long (test/TestClass4:actual4 [(/.as_long (.integer expected))] object/4)))) example/5! (n.= expected - (.natural (/.of_long (test/TestClass5::actual5 [(/.as_long (.integer expected))])))) + (.natural (/.of_long (test/TestClass5:actual5 [(/.as_long (.integer expected))])))) - object/7 (test/TestClass7::new []) + object/7 (test/TestClass7:new []) example/7! (n.= expected - (.natural (/.of_long (test/TestClass6::actual6 [(/.as_long (.integer expected))] object/7)))) + (.natural (/.of_long (test/TestClass6:actual6 [(/.as_long (.integer expected))] object/7)))) example_8! (let [expected (i.+ left right) - object_8 (test/TestClass8::new [])] + object_8 (test/TestClass8:new [])] (i.= expected - (/.of_long (test/TestInterface4::actual4 [(/.as_long left) (/.as_long right)] object_8))))] + (/.of_long (test/TestInterface4:actual4 [(/.as_long left) (/.as_long right)] object_8))))] .let [random_long (is (Random java/lang/Long) (by ! each (|>> /.as_long) @@ -631,41 +631,41 @@ dummy/1 random_long dummy/2 random_long .let [object/9 (/.to (is (test/TestClass9 java/lang/Long) - (test/TestClass9::new [dummy/0])) - (test/TestClass9::set_actual9 [dummy/1]) - (test/TestClass9::set_actual9 [dummy/2])) + (test/TestClass9:new [dummy/0])) + (test/TestClass9:set_actual9 [dummy/1]) + (test/TestClass9:set_actual9 [dummy/2])) example/9! (|> object/9 - (test/TestClass9::get_actual9 []) + (test/TestClass9:get_actual9 []) (as (-> Any Integer)) /.as_long (identical? dummy/2)) object/10 (is (test/TestClass10 java/lang/Long) - (test/TestClass10::new [dummy/0])) + (test/TestClass10:new [dummy/0])) example/10! (and (|> object/10 - test/TestClass10::value10 + test/TestClass10:value10 io.value (as (-> Any /.Long)) (identical? dummy/0)) (|> object/10 - (test/TestClass10::value10 dummy/1) + (test/TestClass10:value10 dummy/1) io.value - test/TestClass10::value10 + test/TestClass10:value10 io.value (as (-> Any /.Long)) (identical? dummy/1))) object/11 (is (test/TestClass11 java/lang/Long) - (test/TestClass11::new [dummy/0])) + (test/TestClass11:new [dummy/0])) example/11! (and (|> object/11 - test/TestClass11::value11 + test/TestClass11:value11 (as (-> Any /.Long)) (identical? dummy/0)) (|> object/11 - (test/TestClass11::value11 dummy/1) + (test/TestClass11:value11 dummy/1) macro_error (text.contains? (its exception.:label /.cannot_write_to_field))))]] (all _.and @@ -713,10 +713,10 @@ (not (expands? (/.the ))))) (_.coverage [/.class_name_cannot_be_a_type_variable] (and (not (expands? (/.the (java/lang/Double a) - "[1]::[0]" + "[1]:[0]" (invalid [] (a java/lang/String))))) (not (expands? (/.the java/lang/Double - "[1]::[0]" + "[1]:[0]" ([a] invalid [] (a java/lang/String))))))) (_.coverage [/.unknown_type_variable] (let [type_variable ((debug.private /.type_variable) (list (jvm.var var/0) (jvm.var var/1)))] diff --git a/stdlib/source/test/lux/ffi.py.lux b/stdlib/source/test/lux/ffi.py.lux index fc9c8238ec..a391701b9d 100644 --- a/stdlib/source/test/lux/ffi.py.lux +++ b/stdlib/source/test/lux/ffi.py.lux @@ -23,7 +23,7 @@ ["[1][0]" export]]) (/.the os - "[1]::[0]" + "[1]:[0]" ("static" R_OK /.Integer) ("static" W_OK /.Integer)) @@ -67,10 +67,10 @@ (is (for_some (_ a) (/.Object a)))) true)) (_.coverage [/.the] - (and (i.= (io.value (os::R_OK)) - (io.value (os::R_OK))) - (not (i.= (io.value (os::W_OK)) - (io.value (os::R_OK)))))) + (and (i.= (io.value (os:R_OK)) + (io.value (os:R_OK))) + (not (i.= (io.value (os:W_OK)) + (io.value (os:R_OK)))))) $/export.test ))))) diff --git a/stdlib/source/test/lux/ffi.rb.lux b/stdlib/source/test/lux/ffi.rb.lux index 27d1c8b96c..8012e1323f 100644 --- a/stdlib/source/test/lux/ffi.rb.lux +++ b/stdlib/source/test/lux/ffi.rb.lux @@ -20,7 +20,7 @@ ["[1][0]" export]]) (/.the File - "[1]::[0]" + "[1]:[0]" ("static" SEPARATOR /.String)) (the .public test @@ -55,8 +55,8 @@ [[/.Nil] [/.Function]])))) (_.coverage [/.the] - (identical? (io.value (..File::SEPARATOR)) - (io.value (..File::SEPARATOR)))) + (identical? (io.value (..File:SEPARATOR)) + (io.value (..File:SEPARATOR)))) (_.coverage [/.nil?] (and (not (/.nil? boolean)) (not (/.nil? integer)) diff --git a/stdlib/source/test/lux/ffi/export.jvm.lux b/stdlib/source/test/lux/ffi/export.jvm.lux index 21d7279555..2519d0c43b 100644 --- a/stdlib/source/test/lux/ffi/export.jvm.lux +++ b/stdlib/source/test/lux/ffi/export.jvm.lux @@ -72,7 +72,7 @@ ))) (`` (`` (//.the Primitives - "[1]::[0]" + "[1]:[0]" ("read_only" "static" actual_boolean boolean) ("read_only" "static" actual_byte byte) ("read_only" "static" actual_short short) @@ -96,10 +96,10 @@ ))) (//.the java/lang/Long - "[1]::[0]") + "[1]:[0]") (//.the java/lang/String - "[1]::[0]") + "[1]:[0]") (/.export Objects (actual_string java/lang/String ..expected_string) @@ -112,7 +112,7 @@ (([a] right [left a right a]) a right)) (//.the Objects - "[1]::[0]" + "[1]:[0]" ("read_only" "static" actual_string java/lang/String) ("static" string_method [java/lang/String java/lang/String] java/lang/String) @@ -151,20 +151,20 @@ [string //.as_string (random.lower_cased 1)]]))] (all _.and (_.coverage [/.export] - (and (bit.= (//.of_boolean ..expected_boolean) (//.of_boolean (Primitives::actual_boolean))) - (integer.= (//.of_byte ..expected_byte) (//.of_byte (Primitives::actual_byte))) - (integer.= (//.of_short ..expected_short) (//.of_short (Primitives::actual_short))) - (integer.= (//.of_int ..expected_int) (//.of_int (Primitives::actual_int))) - (integer.= (//.of_long ..expected_long) (//.of_long (Primitives::actual_long))) - (integer.= (//.of_char ..expected_char) (//.of_char (Primitives::actual_char))) - (decimal.= (//.of_float ..expected_float) (//.of_float (Primitives::actual_float))) - (decimal.= (//.of_double ..expected_double) (//.of_double (Primitives::actual_double))) + (and (bit.= (//.of_boolean ..expected_boolean) (//.of_boolean (Primitives:actual_boolean))) + (integer.= (//.of_byte ..expected_byte) (//.of_byte (Primitives:actual_byte))) + (integer.= (//.of_short ..expected_short) (//.of_short (Primitives:actual_short))) + (integer.= (//.of_int ..expected_int) (//.of_int (Primitives:actual_int))) + (integer.= (//.of_long ..expected_long) (//.of_long (Primitives:actual_long))) + (integer.= (//.of_char ..expected_char) (//.of_char (Primitives:actual_char))) + (decimal.= (//.of_float ..expected_float) (//.of_float (Primitives:actual_float))) + (decimal.= (//.of_double ..expected_double) (//.of_double (Primitives:actual_double))) (,, (template.with [<=> <+> ] [(expansion.let [ (template.name ["left_" ]) (template.name ["right_" ]) (template.name [//._] ["of_" ]) - (template.name ["Primitives::" "_method"])] + (template.name ["Primitives:" "_method"])] (<=> (<+> ( ) ( )) ( ( [ ]))))] @@ -177,18 +177,18 @@ [decimal.= decimal.+ float] [decimal.= decimal.+ double]])) - (text.= (//.of_string ..expected_string) (//.of_string (Objects::actual_string))) + (text.= (//.of_string ..expected_string) (//.of_string (Objects:actual_string))) (text.= (text (//.of_string left_string) (//.of_string right_string)) - (//.of_string (Objects::string_method [left_string right_string]))) + (//.of_string (Objects:string_method [left_string right_string]))) (text.= (//.of_string left_string) - (//.of_string (as (-> Any java/lang/String) (Objects::left [left_string right_string])))) + (//.of_string (as (-> Any java/lang/String) (Objects:left [left_string right_string])))) (text.= (//.of_string right_string) - (//.of_string (as (-> Any java/lang/String) (Objects::right [left_string right_string])))) + (//.of_string (as (-> Any java/lang/String) (Objects:right [left_string right_string])))) (integer.= (//.of_long left_long) - (//.of_long (as (-> Any java/lang/Long) (Objects::left [left_long right_long])))) + (//.of_long (as (-> Any java/lang/Long) (Objects:left [left_long right_long])))) (integer.= (//.of_long right_long) - (//.of_long (as (-> Any java/lang/Long) (Objects::right [left_long right_long])))) + (//.of_long (as (-> Any java/lang/Long) (Objects:right [left_long right_long])))) )) )))))) diff --git a/stdlib/source/test/lux/math/arithmetic/modular.lux b/stdlib/source/test/lux/math/arithmetic/modular.lux index ed60e6c186..0b7c7af3ae 100644 --- a/stdlib/source/test/lux/math/arithmetic/modular.lux +++ b/stdlib/source/test/lux/math/arithmetic/modular.lux @@ -53,32 +53,32 @@ (<| (_.covering /._) (_.for [/.Modulo]) (monad.let random.monad - [param::% (//T.random +1,000,000) - param (..random param::%) + [param:% (//T.random +1,000,000) + param (..random param:%) - subject::% (random.only (predicate.and (|>> //.divisor (i.> +2)) - (|>> (//.= param::%) not)) - (//T.random +1,000,000)) - subject (..random subject::%) - another (..random subject::%)] + subject:% (random.only (predicate.and (|>> //.divisor (i.> +2)) + (|>> (//.= param:%) not)) + (//T.random +1,000,000)) + subject (..random subject:%) + another (..random subject:%)] (`` (all _.and (_.for [/.equivalence /.=] - (equivalenceT.spec /.equivalence (..random subject::%))) + (equivalenceT.spec /.equivalence (..random subject:%))) (_.for [/.order /.<] - (orderT.spec /.order (..random subject::%))) + (orderT.spec /.order (..random subject:%))) (,, (template.with [ ] [(_.for [ ] - (monoidT.spec /.equivalence ( subject::%) (..random subject::%)))] + (monoidT.spec /.equivalence ( subject:%) (..random subject:%)))] [[/.+ /.addition] [/.x /.multiplication]])) (_.for [/.text] - (formatT.spec /.equivalence (/.text subject::%) (..random subject::%))) + (formatT.spec /.equivalence (/.text subject:%) (..random subject:%))) (_.coverage [/.incorrect_modulus] (when (|> param - (by (/.text param::%) as) - (by (/.text subject::%) of)) + (by (/.text param:%) as) + (by (/.text subject:%) of)) {try.:Failure error} (exception.is? /.incorrect_modulus error) @@ -120,15 +120,15 @@ (_.coverage [/.adapter] (<| (try.else false) (monad.let try.monad - [copy::% (//.modulus (//.divisor subject::%)) - adapt (/.adapter subject::% copy::%)] + [copy:% (//.modulus (//.divisor subject:%)) + adapt (/.adapter subject:% copy:%)] (pure (|> subject /.value - (/.modulo copy::%) + (/.modulo copy:%) adapt (/.= subject)))))) (_.coverage [/.moduli_are_not_equal] - (when (/.adapter subject::% param::%) + (when (/.adapter subject:% param:%) {try.:Failure error} (exception.is? /.moduli_are_not_equal error) diff --git a/stdlib/source/test/lux/math/number/64/decimal.lux b/stdlib/source/test/lux/math/number/64/decimal.lux index bc1802ebc3..1b54893838 100644 --- a/stdlib/source/test/lux/math/number/64/decimal.lux +++ b/stdlib/source/test/lux/math/number/64/decimal.lux @@ -176,7 +176,7 @@ (for .jvm (ffi.the java/lang/Double - "[1]::[0]" + "[1]:[0]" ("static" doubleToRawLongBits [double] long) ("static" longBitsToDouble [long] double)) @@ -333,7 +333,7 @@ (all _.and (let [test (is (-> Decimal Bit) (function (_ value) - (n.= (.natural (ffi.of_long (java/lang/Double::doubleToRawLongBits [(ffi.as_double value)]))) + (n.= (.natural (ffi.of_long (java/lang/Double:doubleToRawLongBits [(ffi.as_double value)]))) (/.bits value))))] (monad.let random.monad [sample random.decimal] @@ -347,7 +347,7 @@ (monad.let random.monad [sample random.i64] (_.coverage [/.of_bits] - (let [expected (ffi.of_double (java/lang/Double::longBitsToDouble [(ffi.as_long sample)])) + (let [expected (ffi.of_double (java/lang/Double:longBitsToDouble [(ffi.as_long sample)])) actual (/.of_bits sample)] (or (/.= expected actual) (and (/.not_a_number? expected) diff --git a/stdlib/source/test/lux/target/jvm.lux b/stdlib/source/test/lux/target/jvm.lux index 20ec0017a1..092d7982f2 100644 --- a/stdlib/source/test/lux/target/jvm.lux +++ b/stdlib/source/test/lux/target/jvm.lux @@ -92,42 +92,42 @@ )) (ffi.the java/lang/Boolean - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/Byte - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/Short - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/Integer - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/Long - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/Float - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/Double - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/Character - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/String - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/reflect/Method - "[1]::[0]" + "[1]:[0]" (invoke [java/lang/Object [java/lang/Object]] "try" java/lang/Object)) (ffi.the (java/lang/Class c) - "[1]::[0]" + "[1]:[0]" (getDeclaredMethod [java/lang/String [(java/lang/Class [? < java/lang/Object])]] java/lang/reflect/Method)) (ffi.the java/lang/Object - "[1]::[0]") + "[1]:[0]") (the class_name (Random Text) @@ -141,9 +141,9 @@ (the (get_method name class) (-> Text (java/lang/Class java/lang/Object) java/lang/reflect/Method) - (java/lang/Class::getDeclaredMethod [(ffi.as_string name) - (ffi.array (java/lang/Class java/lang/Object) 0)] - class)) + (java/lang/Class:getDeclaredMethod [(ffi.as_string name) + (ffi.array (java/lang/Class java/lang/Object) 0)] + class)) (the $Object (type.class (.list) "java.lang.Object")) @@ -172,7 +172,7 @@ _ (/loader.define class_name bytecode loader) class (io.value (/loader.load class_name loader)) method (try (get_method method_name class))] - (java/lang/reflect/Method::invoke [(ffi.null) (ffi.array java/lang/Object 0)] method)) + (java/lang/reflect/Method:invoke [(ffi.null) (ffi.array java/lang/Object 0)] method)) {try.:Success actual} (test actual) @@ -190,18 +190,18 @@ (these (the $Boolean (type.class (.list) "java.lang.Boolean")) - (the $Boolean::wrap + (the $Boolean:wrap (/.invokestatic ..$Boolean "valueOf" (type.method [(.list) (.list type.boolean) ..$Boolean (.list)]))) - (the $Boolean::random (as (-> (Random Bit) - (Random java/lang/Boolean)) - random.bit)) + (the $Boolean:random (as (-> (Random Bit) + (Random java/lang/Boolean)) + random.bit)) (the !false (|> 0 .i64 /32.of /.int)) (the !true (|> 1 .i64 /32.of /.int)) - (the ($Boolean::literal value) + (the ($Boolean:literal value) (-> java/lang/Boolean (Bytecode Any)) (if (as (-> java/lang/Boolean Bit) @@ -209,32 +209,32 @@ ..!true ..!false)) - (the $Boolean::primitive + (the $Boolean:primitive (Primitive java/lang/Boolean) [:unboxed type.boolean :boxed ..$Boolean - :wrap ..$Boolean::wrap - :random ..$Boolean::random - :literal ..$Boolean::literal])) + :wrap ..$Boolean:wrap + :random ..$Boolean:random + :literal ..$Boolean:literal])) (these (the $Byte (type.class (.list) "java.lang.Byte")) - (the $Byte::wrap + (the $Byte:wrap (/.invokestatic ..$Byte "valueOf" (type.method [(.list) (.list type.byte) ..$Byte (.list)]))) - (the $Byte::random + (the $Byte:random (Random java/lang/Byte) (by random.monad each (|>> (as (-> Integer java/lang/Long)) ffi.long_to_byte) random.integer)) - (the $Byte::literal + (the $Byte:literal (-> java/lang/Byte (Bytecode Any)) (|>> ffi.byte_to_long @@ -242,28 +242,28 @@ /32.of /.int)) - (the $Byte::primitive + (the $Byte:primitive (Primitive java/lang/Byte) [:unboxed type.byte :boxed ..$Byte - :wrap ..$Byte::wrap - :random ..$Byte::random - :literal ..$Byte::literal])) + :wrap ..$Byte:wrap + :random ..$Byte:random + :literal ..$Byte:literal])) (these (the $Short (type.class (.list) "java.lang.Short")) - (the $Short::wrap + (the $Short:wrap (/.invokestatic ..$Short "valueOf" (type.method [(.list) (.list type.short) ..$Short (.list)]))) - (the $Short::random + (the $Short:random (Random java/lang/Short) (by random.monad each (|>> (as (-> Integer java/lang/Long)) ffi.long_to_short) random.integer)) - (the $Short::literal + (the $Short:literal (-> java/lang/Short (Bytecode Any)) (|>> ffi.short_to_long @@ -271,28 +271,28 @@ /32.of /.int)) - (the $Short::primitive + (the $Short:primitive (Primitive java/lang/Short) [:unboxed type.short :boxed ..$Short - :wrap ..$Short::wrap - :random ..$Short::random - :literal ..$Short::literal])) + :wrap ..$Short:wrap + :random ..$Short:random + :literal ..$Short:literal])) (these (the $Integer (type.class (.list) "java.lang.Integer")) - (the $Integer::wrap + (the $Integer:wrap (/.invokestatic ..$Integer "valueOf" (type.method [(.list) (.list type.int) ..$Integer (.list)]))) - (the $Integer::random + (the $Integer:random (Random java/lang/Integer) (by random.monad each (|>> (as (-> Integer java/lang/Long)) ffi.long_to_int) random.integer)) - (the $Integer::literal + (the $Integer:literal (-> java/lang/Integer (Bytecode Any)) (|>> ffi.int_to_long @@ -300,47 +300,47 @@ /32.of /.int)) - (the $Integer::primitive + (the $Integer:primitive (Primitive java/lang/Integer) [:unboxed type.int :boxed ..$Integer - :wrap ..$Integer::wrap - :random ..$Integer::random - :literal ..$Integer::literal])) + :wrap ..$Integer:wrap + :random ..$Integer:random + :literal ..$Integer:literal])) (these (the $Long (type.class (.list) "java.lang.Long")) - (the $Long::wrap (/.invokestatic ..$Long "valueOf" (type.method [(.list) (.list type.long) ..$Long (.list)]))) + (the $Long:wrap (/.invokestatic ..$Long "valueOf" (type.method [(.list) (.list type.long) ..$Long (.list)]))) - (the $Long::random + (the $Long:random (as (-> (Random Integer) (Random java/lang/Long)) random.integer)) - (the $Long::literal + (the $Long:literal (-> java/lang/Long (Bytecode Any)) (|>> (as (-> java/lang/Long Integer)) /.long)) - (the $Long::primitive + (the $Long:primitive (Primitive java/lang/Long) [:unboxed type.long :boxed ..$Long - :wrap ..$Long::wrap - :random ..$Long::random - :literal ..$Long::literal])) + :wrap ..$Long:wrap + :random ..$Long:random + :literal ..$Long:literal])) (these (the $Float (type.class (.list) "java.lang.Float")) - (the $Float::wrap + (the $Float:wrap (/.invokestatic ..$Float "valueOf" (type.method [(.list) (.list type.float) ..$Float (.list)]))) - (the $Float::random + (the $Float:random (Random java/lang/Float) (by random.monad each (|>> (as (-> Decimal java/lang/Double)) @@ -353,31 +353,31 @@ (as (-> java/lang/Double Decimal)) d.not_a_number? not) - ..$Float::random)) + ..$Float:random)) - (the $Float::primitive + (the $Float:primitive (Primitive java/lang/Float) [:unboxed type.float :boxed ..$Float - :wrap ..$Float::wrap + :wrap ..$Float:wrap :random ..valid_float :literal /.float])) (these (the $Double (type.class (.list) "java.lang.Double")) - (the $Double::wrap + (the $Double:wrap (/.invokestatic ..$Double "valueOf" (type.method [(.list) (.list type.double) ..$Double (.list)]))) - (the $Double::random + (the $Double:random (as (-> (Random Decimal) (Random java/lang/Double)) random.decimal)) - (the $Double::literal + (the $Double:literal (-> java/lang/Double (Bytecode Any)) (|>> (as (-> java/lang/Double Decimal)) @@ -388,27 +388,27 @@ (random.only (|>> (as (-> java/lang/Double Decimal)) d.not_a_number? not) - ..$Double::random)) + ..$Double:random)) - (the $Double::primitive + (the $Double:primitive (Primitive java/lang/Double) [:unboxed type.double :boxed ..$Double - :wrap ..$Double::wrap + :wrap ..$Double:wrap :random ..valid_double - :literal ..$Double::literal])) + :literal ..$Double:literal])) (these (the $Character (type.class (.list) "java.lang.Character")) - (the $Character::wrap + (the $Character:wrap (/.invokestatic ..$Character "valueOf" (type.method [(.list) (.list type.char) ..$Character (.list)]))) - (the $Character::random + (the $Character:random (Random java/lang/Character) (by random.monad each (|>> (as (-> Integer java/lang/Long)) @@ -416,7 +416,7 @@ ffi.int_to_char) random.integer)) - (the $Character::literal + (the $Character:literal (-> java/lang/Character (Bytecode Any)) (|>> ffi.char_to_long @@ -424,35 +424,35 @@ /32.of /.int)) - (the $Character::primitive + (the $Character:primitive (Primitive java/lang/Character) [:unboxed type.char :boxed ..$Character - :wrap ..$Character::wrap - :random ..$Character::random - :literal ..$Character::literal])) + :wrap ..$Character:wrap + :random ..$Character:random + :literal ..$Character:literal])) (these (the $String (type.class (.list) "java.lang.String")) - (the $String::random + (the $String:random (as (-> (Random Text) (Random java/lang/String)) (random.alphabetic 10))) - (the $String::literal + (the $String:literal (-> java/lang/String (Bytecode Any)) (|>> (as (-> java/lang/String Text)) /.string)) - (the $String::primitive + (the $String:primitive (Primitive java/lang/String) [:unboxed ..$String :boxed ..$String :wrap /.nop - :random ..$String::random - :literal ..$String::literal])) + :random ..$String:random + :literal ..$String:literal])) (the coverage (template.macro (_ ,coverage ,condition) @@ -476,8 +476,8 @@ [_ ( (|> expected .integer try.trusted))] ))))] - [[byte 7 java/lang/Byte /.bipush ..$Byte::wrap ffi.byte_to_long signed.s1] - [short 15 java/lang/Short /.sipush ..$Short::wrap ffi.short_to_long signed.s2]]) + [[byte 7 java/lang/Byte /.bipush ..$Byte:wrap ffi.byte_to_long signed.s1] + [short 15 java/lang/Short /.sipush ..$Short:wrap ffi.short_to_long signed.s2]]) (template.with [ ] [(the @@ -510,26 +510,26 @@ (.jvm_int_=# (.jvm_object_cast# expected)))) (monad.let /.monad [_ bytecode] - ..$Integer::wrap)))) + ..$Integer:wrap)))) unary (is (-> (-> java/lang/Integer java/lang/Integer) (Bytecode Any) (Random Bit)) (function (_ reference instruction) (monad.let random.monad - [subject ..$Integer::random] + [subject ..$Integer:random] (int (reference subject) (monad.let /.monad - [_ (..$Integer::literal subject)] + [_ (..$Integer:literal subject)] instruction))))) binary (is (-> (-> java/lang/Integer java/lang/Integer java/lang/Integer) (Bytecode Any) (Random Bit)) (function (_ reference instruction) (monad.let random.monad - [parameter ..$Integer::random - subject ..$Integer::random] + [parameter ..$Integer:random + subject ..$Integer:random] (int (reference parameter subject) (monad.let /.monad - [_ (..$Integer::literal subject) - _ (..$Integer::literal parameter)] + [_ (..$Integer:literal subject) + _ (..$Integer:literal parameter)] instruction))))) shift (is (-> (-> java/lang/Integer java/lang/Integer java/lang/Integer) (Bytecode Any) (Random Bit)) (function (_ reference instruction) @@ -538,11 +538,11 @@ (as (-> Natural java/lang/Long)) ffi.long_to_int) random.natural) - subject ..$Integer::random] + subject ..$Integer:random] (int (reference parameter subject) (monad.let /.monad - [_ (..$Integer::literal subject) - _ (..$Integer::literal parameter)] + [_ (..$Integer:literal subject) + _ (..$Integer:literal parameter)] instruction))))) literal (all _.and (..coverage [/.iconst_m1] (int (ffi.long_to_int (as (-> Integer java/lang/Long) -1)) /.iconst_m1)) @@ -554,8 +554,8 @@ (..coverage [/.iconst_5] (int (ffi.long_to_int (as (-> Integer java/lang/Long) +5)) /.iconst_5)) (..coverage [/.int] (monad.let random.monad - [expected ..$Integer::random] - (int expected (..$Integer::literal expected))))) + [expected ..$Integer:random] + (int expected (..$Integer:literal expected))))) arithmetic (all _.and (..coverage [/.iadd] (binary (int/2 "jvm iadd" .jvm_int_+#) /.iadd)) (..coverage [/.isub] (binary (int/2 "jvm isub" .jvm_int_-#) /.isub)) @@ -589,24 +589,24 @@ (.jvm_long_=# (.jvm_object_cast# expected)))) (monad.let /.monad [_ bytecode] - ..$Long::wrap)))) + ..$Long:wrap)))) unary (is (-> (-> java/lang/Long java/lang/Long) (Bytecode Any) (Random Bit)) (function (_ reference instruction) (monad.let random.monad - [subject ..$Long::random] + [subject ..$Long:random] (long (reference subject) (monad.let /.monad - [_ (..$Long::literal subject)] + [_ (..$Long:literal subject)] instruction))))) binary (is (-> (-> java/lang/Long java/lang/Long java/lang/Long) (Bytecode Any) (Random Bit)) (function (_ reference instruction) (monad.let random.monad - [parameter ..$Long::random - subject ..$Long::random] + [parameter ..$Long:random + subject ..$Long:random] (long (reference parameter subject) (monad.let /.monad - [_ (..$Long::literal subject) - _ (..$Long::literal parameter)] + [_ (..$Long:literal subject) + _ (..$Long:literal parameter)] instruction))))) shift (is (-> (-> java/lang/Integer java/lang/Long java/lang/Long) (Bytecode Any) (Random Bit)) (function (_ reference instruction) @@ -614,19 +614,19 @@ [parameter (by ! each (|>> (n.% 64) (as (-> Natural java/lang/Long))) random.natural) - subject ..$Long::random] + subject ..$Long:random] (long (reference (ffi.long_to_int parameter) subject) (monad.let /.monad - [_ (..$Long::literal subject) - _ (..$Integer::literal (ffi.long_to_int parameter))] + [_ (..$Long:literal subject) + _ (..$Integer:literal (ffi.long_to_int parameter))] instruction))))) literal (all _.and (..coverage [/.lconst_0] (long (as (-> Integer java/lang/Long) +0) /.lconst_0)) (..coverage [/.lconst_1] (long (as (-> Integer java/lang/Long) +1) /.lconst_1)) (..coverage [/.long] (monad.let random.monad - [expected ..$Long::random] - (long expected (..$Long::literal expected))))) + [expected ..$Long:random] + (long expected (..$Long:literal expected))))) arithmetic (all _.and (..coverage [/.ladd] (binary (long/2 "jvm ladd" .jvm_long_+#) /.ladd)) (..coverage [/.lsub] (binary (long/2 "jvm lsub" .jvm_long_-#) /.lsub)) @@ -646,8 +646,8 @@ (..coverage [/.lshr] (shift (int+long/2 "jvm lshr" .jvm_long_shr#) /.lshr)) (..coverage [/.lushr] (shift (int+long/2 "jvm lushr" .jvm_long_ushr#) /.lushr))) comparison (monad.let random.monad - [reference ..$Long::random - subject ..$Long::random + [reference ..$Long:random + subject ..$Long:random .let [expected (<| (as (-> Integer java/lang/Long)) (if (i.< (as (-> java/lang/Long Integer) reference) (as (-> java/lang/Long Integer) subject)) @@ -665,11 +665,11 @@ .jvm_object_cast# (.jvm_long_=# (.jvm_object_cast# expected))))) (monad.let /.monad - [_ (..$Long::literal subject) - _ (..$Long::literal reference) + [_ (..$Long:literal subject) + _ (..$Long:literal reference) _ /.lcmp _ /.i2l] - ..$Long::wrap)))] + ..$Long:wrap)))] (all _.and literal arithmetic @@ -690,13 +690,13 @@ (d.not_a_number? (as (-> java/lang/Double Decimal) (ffi.float_to_double (as (-> Any java/lang/Float) actual)))))))) (monad.let /.monad [_ bytecode] - ..$Float::wrap)))) + ..$Float:wrap)))) unary (is (-> (-> java/lang/Float java/lang/Float) (Bytecode Any) (Random Bit)) (function (_ reference instruction) (monad.let random.monad - [subject ..$Float::random] + [subject ..$Float:random] (float (reference subject) (monad.let /.monad [_ (/.float subject)] @@ -706,8 +706,8 @@ (Random Bit)) (function (_ reference instruction) (monad.let random.monad - [parameter ..$Float::random - subject ..$Float::random] + [parameter ..$Float:random + subject ..$Float:random] (float (reference parameter subject) (monad.let /.monad [_ (/.float subject) @@ -719,7 +719,7 @@ (..coverage [/.fconst_2] (float (ffi.double_to_float (as (-> Decimal java/lang/Double) +2.0)) /.fconst_2)) (..coverage [/.float] (monad.let random.monad - [expected ..$Float::random] + [expected ..$Float:random] (float expected (/.float expected))))) arithmetic (all _.and (..coverage [/.fadd] (binary (float/2 "jvm fadd" .jvm_float_+#) /.fadd)) @@ -736,7 +736,7 @@ (function (_ instruction standard) (monad.let random.monad [.let [valid_float (random.only (|>> ffi.float_to_double (as (-> java/lang/Double Decimal)) d.not_a_number? not) - ..$Float::random)] + ..$Float:random)] expected valid_float actual valid_float .let [expected_result (if (.jvm_float_=# (.jvm_object_cast# expected) (.jvm_object_cast# actual)) @@ -751,7 +751,7 @@ _ (/.float expected) _ instruction _ /.i2l] - ..$Long::wrap))))) + ..$Long:wrap))))) comparison_standard (is (-> java/lang/Float java/lang/Float Bit) (function (_ expected actual) (.jvm_float_<# (.jvm_object_cast# actual) (.jvm_object_cast# expected)))) @@ -777,32 +777,32 @@ (d.not_a_number? (as (-> Any Decimal) actual)))))) (monad.let /.monad [_ bytecode] - ..$Double::wrap)))) + ..$Double:wrap)))) unary (is (-> (-> java/lang/Double java/lang/Double) (Bytecode Any) (Random Bit)) (function (_ reference instruction) (monad.let random.monad - [subject ..$Double::random] + [subject ..$Double:random] (double (reference subject) (monad.let /.monad - [_ (..$Double::literal subject)] + [_ (..$Double:literal subject)] instruction))))) binary (is (-> (-> java/lang/Double java/lang/Double java/lang/Double) (Bytecode Any) (Random Bit)) (function (_ reference instruction) (monad.let random.monad - [parameter ..$Double::random - subject ..$Double::random] + [parameter ..$Double:random + subject ..$Double:random] (double (reference parameter subject) (monad.let /.monad - [_ (..$Double::literal subject) - _ (..$Double::literal parameter)] + [_ (..$Double:literal subject) + _ (..$Double:literal parameter)] instruction))))) literal (all _.and (..coverage [/.dconst_0] (double (as (-> Decimal java/lang/Double) +0.0) /.dconst_0)) (..coverage [/.dconst_1] (double (as (-> Decimal java/lang/Double) +1.0) /.dconst_1)) (..coverage [/.double] (monad.let random.monad - [expected ..$Double::random] - (double expected (..$Double::literal expected))))) + [expected ..$Double:random] + (double expected (..$Double:literal expected))))) arithmetic (all _.and (..coverage [/.dadd] (binary (double/2 "jvm dadd" .jvm_double_+#) /.dadd)) (..coverage [/.dsub] (binary (double/2 "jvm dsub" .jvm_double_-#) /.dsub)) @@ -827,11 +827,11 @@ (<| (..bytecode (|>> (as (-> Any Integer)) (i.= expected_result))) (monad.let /.monad - [_ (..$Double::literal actual) - _ (..$Double::literal expected) + [_ (..$Double:literal actual) + _ (..$Double:literal expected) _ instruction _ /.i2l] - ..$Long::wrap))))) + ..$Long:wrap))))) ... https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-6.html#jvms-6.5.dcmp_op comparison_standard (is (-> java/lang/Double java/lang/Double Bit) (function (_ expected actual) @@ -867,7 +867,7 @@ (<| (..coverage [/.string]) (monad.let [! random.monad] [expected (by ! each (|>> (as (-> java/lang/String Text))) - ..$String::random)]) + ..$String:random)]) (..bytecode (|>> (as (-> Any Text)) (text.= expected))) (/.string expected)) @@ -877,38 +877,38 @@ (monad.let /.monad [_ /.aconst_null _ (/.instanceof ..$String)] - ..$Boolean::wrap)) + ..$Boolean:wrap)) (<| (..coverage [/.instanceof]) (monad.let random.monad - [value ..$String::random]) + [value ..$String:random]) (..bytecode (|>> (as (-> Any Bit)))) (monad.let /.monad [_ (/.string (as (-> java/lang/String Text) value)) _ (/.instanceof ..$String)] - ..$Boolean::wrap)) + ..$Boolean:wrap)) (<| (..coverage [/.new]) (..bytecode (|>> (as (-> Any Bit)))) (monad.let /.monad [_ !object _ ..!true] - ..$Boolean::wrap)) + ..$Boolean:wrap)) (<| (..coverage [/.checkcast]) (..bytecode (|>> (as (-> Any Bit)))) (monad.let /.monad [_ !object _ (/.checkcast ..$Object) _ (/.instanceof ..$Object)] - ..$Boolean::wrap)) + ..$Boolean:wrap)) (<| (..coverage [/.monitorenter /.monitorexit]) (monad.let random.monad - [value ..$String::random]) + [value ..$String:random]) (..bytecode (|>> (as (-> Any Bit)))) (monad.let /.monad [_ (/.string (as (-> java/lang/String Text) value)) _ /.dup _ /.monitorenter _ /.dup _ /.monitorexit _ (/.instanceof ..$String)] - ..$Boolean::wrap)) + ..$Boolean:wrap)) ))) (the method @@ -919,7 +919,7 @@ [expected (random.only (|>> (as (-> java/lang/Double Decimal)) d.not_a_number? not) - ..$Double::random)]) + ..$Double:random)]) (..bytecode (|>> (as (-> Any java/lang/Double)) .jvm_object_cast# (.jvm_double_=# (.jvm_object_cast# expected)))) @@ -928,20 +928,20 @@ (/.invokestatic ..$Double "valueOf" (type.method [(.list) (.list type.double) ..$Double (.list)])))) (<| (..coverage [/.invokevirtual]) (monad.let random.monad - [expected ..$Double::random]) + [expected ..$Double:random]) (..bytecode (|>> (as (-> Any Bit)) (bit.= (d.not_a_number? (as (-> java/lang/Double Decimal) expected))))) (monad.let /.monad [_ (/.double (as (-> java/lang/Double Decimal) expected)) - _ ..$Double::wrap + _ ..$Double:wrap _ (/.invokevirtual ..$Double "isNaN" (type.method [(.list) (.list) type.boolean (.list)]))] - ..$Boolean::wrap)) + ..$Boolean:wrap)) (<| (..coverage [/.invokespecial]) (monad.let random.monad [expected (random.only (|>> (as (-> java/lang/Double Decimal)) d.not_a_number? not) - ..$Double::random)]) + ..$Double:random)]) (..bytecode (|>> (as (-> Any java/lang/Double)) .jvm_object_cast# (.jvm_double_=# (.jvm_object_cast# expected)))) @@ -952,22 +952,22 @@ (/.invokespecial ..$Double "" (type.method [(.list) (.list type.double) type.void (.list)])))) (<| (..coverage [/.invokeinterface]) (monad.let random.monad - [subject ..$String::random]) + [subject ..$String:random]) (..bytecode (|>> (as (-> Any Natural)) (n.= (text.size (as (-> java/lang/String Text) subject))))) (monad.let /.monad [_ (/.string (as (-> java/lang/String Text) subject)) _ (/.invokeinterface (type.class (.list) "java.lang.CharSequence") "length" (type.method [(.list) (.list) type.int (.list)])) _ /.i2l] - ..$Long::wrap)) + ..$Long:wrap)) )) (the field Test (monad.let random.monad [class_name ..class_name - part0 ..$Long::random - part1 ..$Long::random + part0 ..$Long:random + part1 ..$Long:random .let [expected (is java/lang/Long (.jvm_object_cast# (.jvm_long_+# (.jvm_object_cast# part0) (.jvm_object_cast# part1)))) @@ -975,7 +975,7 @@ class_field "class_field" object_field "object_field" constructor "" - constructor::type (type.method [(.list) (.list type.long) type.void (.list)]) + constructor:type (type.method [(.list) (.list type.long) type.void (.list)]) static_method "static_method" bytecode (|> (class.class version.v6_0 class.public (internal.name class_name) @@ -986,12 +986,12 @@ (/field.field /field.public object_field false type.long (sequence.sequence))) (.list (/method.method /method.private constructor - false constructor::type + false constructor:type (.list) {.:Some (monad.let /.monad [_ /.aload_0 _ (/.invokespecial ..$Object constructor (type.method [(.list) (.list) type.void (.list)])) - _ (..$Long::literal part0) + _ (..$Long:literal part0) _ (/.putstatic $Self class_field type.long) _ /.aload_0 _ /.lload_1 @@ -1006,12 +1006,12 @@ {.:Some (monad.let /.monad [_ (/.new $Self) _ /.dup - _ (..$Long::literal part1) - _ (/.invokespecial $Self constructor constructor::type) + _ (..$Long:literal part1) + _ (/.invokespecial $Self constructor constructor:type) _ (/.getfield $Self object_field type.long) _ (/.getstatic $Self class_field type.long) _ /.ladd - _ ..$Long::wrap] + _ ..$Long:wrap] /.areturn)})) (.list)) try.trusted @@ -1023,7 +1023,7 @@ [_ (/loader.define class_name bytecode loader) class (io.value (/loader.load class_name loader)) method (try (get_method static_method class)) - output (java/lang/reflect/Method::invoke [(ffi.null) (ffi.array java/lang/Object 0)] method)] + output (java/lang/reflect/Method:invoke [(ffi.null) (ffi.array java/lang/Object 0)] method)] (pure (as (-> Any Integer) output))) {try.:Success actual} (i.= (as (-> java/lang/Long Integer) expected) actual) @@ -1031,7 +1031,7 @@ {try.:Failure error} false)))) -(the !::= +(the !:= (template.macro (_ ,=) [(is (-> Any Bit) (function (_ expected) @@ -1044,7 +1044,7 @@ (let [!length (is (-> Natural (Bytecode Any)) (function (_ size) (monad.let /.monad - [_ ($Long::literal (as (-> Natural java/lang/Long) size))] + [_ ($Long:literal (as (-> Natural java/lang/Long) size))] /.l2i))) ?length (is (Bytecode Any) (monad.let /.monad @@ -1058,7 +1058,7 @@ [_ (!length size) _ constructor _ ?length] - $Long::wrap)))) + $Long:wrap)))) write_and_read (is (for_any (_ a) (-> Natural (Bytecode Any) a (-> a (Bytecode Any)) @@ -1066,7 +1066,7 @@ (-> a Any Bit) (Random Bit))) (function (_ size constructor value literal [*store *load *wrap] test) - (let [!index ($Integer::literal (ffi.long_to_int (as (-> Integer java/lang/Long) +0)))] + (let [!index ($Integer:literal (ffi.long_to_int (as (-> Integer java/lang/Long) +0)))] (<| (..bytecode (test value)) (monad.let /.monad [_ (!length size) @@ -1091,42 +1091,42 @@ (_.for [/.newarray] (all _.and (..coverage [/.bastore /.baload] - (array (/.newarray /instruction.t_boolean) $Boolean::random $Boolean::literal [/.bastore /.baload $Boolean::wrap] + (array (/.newarray /instruction.t_boolean) $Boolean:random $Boolean:literal [/.bastore /.baload $Boolean:wrap] (function (_ expected) (|>> (as (-> Any Bit)) (bit.= (as (-> java/lang/Boolean Bit) expected)))))) (..coverage [/.bastore /.baload] - (array (/.newarray /instruction.t_byte) $Byte::random $Byte::literal [/.bastore /.baload $Byte::wrap] + (array (/.newarray /instruction.t_byte) $Byte:random $Byte:literal [/.bastore /.baload $Byte:wrap] (function (_ expected) (|>> (as (-> Any java/lang/Byte)) ffi.byte_to_long .jvm_object_cast# (.jvm_long_=# (.jvm_object_cast# (ffi.byte_to_long expected))))))) (..coverage [/.sastore /.saload] - (array (/.newarray /instruction.t_short) $Short::random $Short::literal [/.sastore /.saload $Short::wrap] + (array (/.newarray /instruction.t_short) $Short:random $Short:literal [/.sastore /.saload $Short:wrap] (function (_ expected) (|>> (as (-> Any java/lang/Short)) ffi.short_to_long .jvm_object_cast# (.jvm_long_=# (.jvm_object_cast# (ffi.short_to_long expected))))))) (..coverage [/.iastore /.iaload] - (array (/.newarray /instruction.t_int) $Integer::random $Integer::literal [/.iastore /.iaload $Integer::wrap] - (!::= java/lang/Integer .jvm_int_=#))) + (array (/.newarray /instruction.t_int) $Integer:random $Integer:literal [/.iastore /.iaload $Integer:wrap] + (!:= java/lang/Integer .jvm_int_=#))) (..coverage [/.lastore /.laload] - (array (/.newarray /instruction.t_long) $Long::random $Long::literal [/.lastore /.laload $Long::wrap] - (!::= java/lang/Long .jvm_long_=#))) + (array (/.newarray /instruction.t_long) $Long:random $Long:literal [/.lastore /.laload $Long:wrap] + (!:= java/lang/Long .jvm_long_=#))) (..coverage [/.fastore /.faload] - (array (/.newarray /instruction.t_float) ..valid_float /.float [/.fastore /.faload $Float::wrap] - (!::= java/lang/Float .jvm_float_=#))) + (array (/.newarray /instruction.t_float) ..valid_float /.float [/.fastore /.faload $Float:wrap] + (!:= java/lang/Float .jvm_float_=#))) (..coverage [/.dastore /.daload] - (array (/.newarray /instruction.t_double) ..valid_double $Double::literal [/.dastore /.daload $Double::wrap] - (!::= java/lang/Double .jvm_double_=#))) + (array (/.newarray /instruction.t_double) ..valid_double $Double:literal [/.dastore /.daload $Double:wrap] + (!:= java/lang/Double .jvm_double_=#))) (..coverage [/.castore /.caload] - (array (/.newarray /instruction.t_char) $Character::random $Character::literal [/.castore /.caload $Character::wrap] - (!::= java/lang/Character .jvm_char_=#))) + (array (/.newarray /instruction.t_char) $Character:random $Character:literal [/.castore /.caload $Character:wrap] + (!:= java/lang/Character .jvm_char_=#))) )) (..coverage [/.anewarray /.aastore /.aaload] - (array (/.anewarray ..$String) $String::random $String::literal [/.aastore /.aaload /.nop] + (array (/.anewarray ..$String) $String:random $String:literal [/.aastore /.aaload /.nop] (function (_ expected) (|>> (as (-> Any Text)) (text.= (as (-> java/lang/String Text) expected)))))) @@ -1150,11 +1150,11 @@ (monad.let [! /.monad] [_ (list.each' ! (|>> (as (-> Natural java/lang/Long)) ffi.long_to_int - ..$Integer::literal) + ..$Integer:literal) (list:composite (list sizesH) sizesT)) _ (/.multianewarray type (n/08.of dimensions)) _ ?length] - $Long::wrap)))) + $Long:wrap)))) ))) (the conversion @@ -1170,40 +1170,40 @@ [_ ((its :literal from) input) _ instruction] (its :wrap to)))))) - int::= (!::= java/lang/Integer .jvm_int_=#) - long::= (!::= java/lang/Long .jvm_long_=#) - float::= (!::= java/lang/Float .jvm_float_=#) - double::= (!::= java/lang/Double .jvm_double_=#)] + int:= (!:= java/lang/Integer .jvm_int_=#) + long:= (!:= java/lang/Long .jvm_long_=#) + float:= (!:= java/lang/Float .jvm_float_=#) + double:= (!:= java/lang/Double .jvm_double_=#)] (all _.and - (..coverage [/.i2l] (conversion ..$Integer::primitive ..$Long::primitive /.i2l (|>> ffi.int_to_long) long::=)) - (..coverage [/.i2f] (conversion ..$Integer::primitive ..$Float::primitive /.i2f (|>> ffi.int_to_float) float::=)) - (..coverage [/.i2d] (conversion ..$Integer::primitive ..$Double::primitive /.i2d (|>> ffi.int_to_double) double::=)) - (..coverage [/.i2b] (conversion ..$Integer::primitive ..$Byte::primitive /.i2b (|>> ffi.int_to_byte) + (..coverage [/.i2l] (conversion ..$Integer:primitive ..$Long:primitive /.i2l (|>> ffi.int_to_long) long:=)) + (..coverage [/.i2f] (conversion ..$Integer:primitive ..$Float:primitive /.i2f (|>> ffi.int_to_float) float:=)) + (..coverage [/.i2d] (conversion ..$Integer:primitive ..$Double:primitive /.i2d (|>> ffi.int_to_double) double:=)) + (..coverage [/.i2b] (conversion ..$Integer:primitive ..$Byte:primitive /.i2b (|>> ffi.int_to_byte) (function (_ expected) (|>> (as (-> Any java/lang/Byte)) ffi.byte_to_long .jvm_object_cast# (.jvm_long_=# (.jvm_object_cast# (ffi.byte_to_long expected))))))) - (..coverage [/.i2c] (conversion ..$Integer::primitive ..$Character::primitive /.i2c (|>> ffi.int_to_char) - (!::= java/lang/Character .jvm_char_=#))) - (..coverage [/.i2s] (conversion ..$Integer::primitive ..$Short::primitive /.i2s (|>> ffi.int_to_short) + (..coverage [/.i2c] (conversion ..$Integer:primitive ..$Character:primitive /.i2c (|>> ffi.int_to_char) + (!:= java/lang/Character .jvm_char_=#))) + (..coverage [/.i2s] (conversion ..$Integer:primitive ..$Short:primitive /.i2s (|>> ffi.int_to_short) (function (_ expected) (|>> (as (-> Any java/lang/Short)) ffi.short_to_long .jvm_object_cast# (.jvm_long_=# (.jvm_object_cast# (ffi.short_to_long expected))))))) - (..coverage [/.l2i] (conversion ..$Long::primitive ..$Integer::primitive /.l2i (|>> ffi.long_to_int) int::=)) - (..coverage [/.l2f] (conversion ..$Long::primitive ..$Float::primitive /.l2f (|>> ffi.long_to_float) float::=)) - (..coverage [/.l2d] (conversion ..$Long::primitive ..$Double::primitive /.l2d (|>> ffi.long_to_double) double::=)) + (..coverage [/.l2i] (conversion ..$Long:primitive ..$Integer:primitive /.l2i (|>> ffi.long_to_int) int:=)) + (..coverage [/.l2f] (conversion ..$Long:primitive ..$Float:primitive /.l2f (|>> ffi.long_to_float) float:=)) + (..coverage [/.l2d] (conversion ..$Long:primitive ..$Double:primitive /.l2d (|>> ffi.long_to_double) double:=)) - (..coverage [/.f2i] (conversion ..$Float::primitive ..$Integer::primitive /.f2i (|>> ffi.float_to_int) int::=)) - (..coverage [/.f2l] (conversion ..$Float::primitive ..$Long::primitive /.f2l (|>> ffi.float_to_long) long::=)) - (..coverage [/.f2d] (conversion ..$Float::primitive ..$Double::primitive /.f2d (|>> ffi.float_to_double) double::=)) + (..coverage [/.f2i] (conversion ..$Float:primitive ..$Integer:primitive /.f2i (|>> ffi.float_to_int) int:=)) + (..coverage [/.f2l] (conversion ..$Float:primitive ..$Long:primitive /.f2l (|>> ffi.float_to_long) long:=)) + (..coverage [/.f2d] (conversion ..$Float:primitive ..$Double:primitive /.f2d (|>> ffi.float_to_double) double:=)) - (..coverage [/.d2i] (conversion ..$Double::primitive ..$Integer::primitive /.d2i (|>> ffi.double_to_int) int::=)) - (..coverage [/.d2l] (conversion ..$Double::primitive ..$Long::primitive /.d2l (|>> ffi.double_to_long) long::=)) - (..coverage [/.d2f] (conversion ..$Double::primitive ..$Float::primitive /.d2f (|>> ffi.double_to_float) float::=)) + (..coverage [/.d2i] (conversion ..$Double:primitive ..$Integer:primitive /.d2i (|>> ffi.double_to_int) int:=)) + (..coverage [/.d2l] (conversion ..$Double:primitive ..$Long:primitive /.d2l (|>> ffi.double_to_long) long:=)) + (..coverage [/.d2f] (conversion ..$Double:primitive ..$Float:primitive /.d2f (|>> ffi.double_to_float) float:=)) ))) (the value @@ -1235,21 +1235,21 @@ _ (load register)] *wrap)))))] (all _.and - (let [test (!::= java/lang/Integer .jvm_int_=#)] + (let [test (!:= java/lang/Integer .jvm_int_=#)] (all _.and (..coverage [/.istore_0 /.iload_0] - (store_and_load ..$Integer::random ..$Integer::literal ..$Integer::wrap [(function.constant /.istore_0) (function.constant /.iload_0)] test)) + (store_and_load ..$Integer:random ..$Integer:literal ..$Integer:wrap [(function.constant /.istore_0) (function.constant /.iload_0)] test)) (..coverage [/.istore_1 /.iload_1] - (store_and_load ..$Integer::random ..$Integer::literal ..$Integer::wrap [(function.constant /.istore_1) (function.constant /.iload_1)] test)) + (store_and_load ..$Integer:random ..$Integer:literal ..$Integer:wrap [(function.constant /.istore_1) (function.constant /.iload_1)] test)) (..coverage [/.istore_2 /.iload_2] - (store_and_load ..$Integer::random ..$Integer::literal ..$Integer::wrap [(function.constant /.istore_2) (function.constant /.iload_2)] test)) + (store_and_load ..$Integer:random ..$Integer:literal ..$Integer:wrap [(function.constant /.istore_2) (function.constant /.iload_2)] test)) (..coverage [/.istore_3 /.iload_3] - (store_and_load ..$Integer::random ..$Integer::literal ..$Integer::wrap [(function.constant /.istore_3) (function.constant /.iload_3)] test)) + (store_and_load ..$Integer:random ..$Integer:literal ..$Integer:wrap [(function.constant /.istore_3) (function.constant /.iload_3)] test)) (..coverage [/.istore /.iload] - (store_and_load ..$Integer::random ..$Integer::literal ..$Integer::wrap [/.istore /.iload] test)) + (store_and_load ..$Integer:random ..$Integer:literal ..$Integer:wrap [/.istore /.iload] test)) (..coverage [/.iinc] (monad.let [! random.monad] - [base ..$Byte::random + [base ..$Byte:random increment (by ! each (|>> (n.% 100) n/08.of) random.natural) .let [expected (is java/lang/Long @@ -1259,135 +1259,135 @@ (..bytecode (|>> (as (-> Any Integer)) (i.= (as (-> java/lang/Long Integer) expected))) (monad.let /.monad - [_ (..$Byte::literal base) + [_ (..$Byte:literal base) _ /.istore_0 _ (/.iinc 0 increment) _ /.iload_0 _ /.i2l] - ..$Long::wrap)))))) - (let [test (!::= java/lang/Long .jvm_long_=#)] + ..$Long:wrap)))))) + (let [test (!:= java/lang/Long .jvm_long_=#)] (all _.and (..coverage [/.lstore_0 /.lload_0] - (store_and_load ..$Long::random ..$Long::literal ..$Long::wrap [(function.constant /.lstore_0) (function.constant /.lload_0)] test)) + (store_and_load ..$Long:random ..$Long:literal ..$Long:wrap [(function.constant /.lstore_0) (function.constant /.lload_0)] test)) (..coverage [/.lstore_1 /.lload_1] - (store_and_load ..$Long::random ..$Long::literal ..$Long::wrap [(function.constant /.lstore_1) (function.constant /.lload_1)] test)) + (store_and_load ..$Long:random ..$Long:literal ..$Long:wrap [(function.constant /.lstore_1) (function.constant /.lload_1)] test)) (..coverage [/.lstore_2 /.lload_2] - (store_and_load ..$Long::random ..$Long::literal ..$Long::wrap [(function.constant /.lstore_2) (function.constant /.lload_2)] test)) + (store_and_load ..$Long:random ..$Long:literal ..$Long:wrap [(function.constant /.lstore_2) (function.constant /.lload_2)] test)) (..coverage [/.lstore_3 /.lload_3] - (store_and_load ..$Long::random ..$Long::literal ..$Long::wrap [(function.constant /.lstore_3) (function.constant /.lload_3)] test)) + (store_and_load ..$Long:random ..$Long:literal ..$Long:wrap [(function.constant /.lstore_3) (function.constant /.lload_3)] test)) (..coverage [/.lstore /.lload] - (store_and_load ..$Long::random ..$Long::literal ..$Long::wrap [/.lstore /.lload] test)))) - (let [test (!::= java/lang/Float .jvm_float_=#)] + (store_and_load ..$Long:random ..$Long:literal ..$Long:wrap [/.lstore /.lload] test)))) + (let [test (!:= java/lang/Float .jvm_float_=#)] (all _.and (..coverage [/.fstore_0 /.fload_0] - (store_and_load ..valid_float /.float ..$Float::wrap [(function.constant /.fstore_0) (function.constant /.fload_0)] test)) + (store_and_load ..valid_float /.float ..$Float:wrap [(function.constant /.fstore_0) (function.constant /.fload_0)] test)) (..coverage [/.fstore_1 /.fload_1] - (store_and_load ..valid_float /.float ..$Float::wrap [(function.constant /.fstore_1) (function.constant /.fload_1)] test)) + (store_and_load ..valid_float /.float ..$Float:wrap [(function.constant /.fstore_1) (function.constant /.fload_1)] test)) (..coverage [/.fstore_2 /.fload_2] - (store_and_load ..valid_float /.float ..$Float::wrap [(function.constant /.fstore_2) (function.constant /.fload_2)] test)) + (store_and_load ..valid_float /.float ..$Float:wrap [(function.constant /.fstore_2) (function.constant /.fload_2)] test)) (..coverage [/.fstore_3 /.fload_3] - (store_and_load ..valid_float /.float ..$Float::wrap [(function.constant /.fstore_3) (function.constant /.fload_3)] test)) + (store_and_load ..valid_float /.float ..$Float:wrap [(function.constant /.fstore_3) (function.constant /.fload_3)] test)) (..coverage [/.fstore /.fload] - (store_and_load ..valid_float /.float ..$Float::wrap [/.fstore /.fload] test)))) - (let [test (!::= java/lang/Double .jvm_double_=#)] + (store_and_load ..valid_float /.float ..$Float:wrap [/.fstore /.fload] test)))) + (let [test (!:= java/lang/Double .jvm_double_=#)] (all _.and (..coverage [/.dstore_0 /.dload_0] - (store_and_load ..valid_double ..$Double::literal ..$Double::wrap [(function.constant /.dstore_0) (function.constant /.dload_0)] test)) + (store_and_load ..valid_double ..$Double:literal ..$Double:wrap [(function.constant /.dstore_0) (function.constant /.dload_0)] test)) (..coverage [/.dstore_1 /.dload_1] - (store_and_load ..valid_double ..$Double::literal ..$Double::wrap [(function.constant /.dstore_1) (function.constant /.dload_1)] test)) + (store_and_load ..valid_double ..$Double:literal ..$Double:wrap [(function.constant /.dstore_1) (function.constant /.dload_1)] test)) (..coverage [/.dstore_2 /.dload_2] - (store_and_load ..valid_double ..$Double::literal ..$Double::wrap [(function.constant /.dstore_2) (function.constant /.dload_2)] test)) + (store_and_load ..valid_double ..$Double:literal ..$Double:wrap [(function.constant /.dstore_2) (function.constant /.dload_2)] test)) (..coverage [/.dstore_3 /.dload_3] - (store_and_load ..valid_double ..$Double::literal ..$Double::wrap [(function.constant /.dstore_3) (function.constant /.dload_3)] test)) + (store_and_load ..valid_double ..$Double:literal ..$Double:wrap [(function.constant /.dstore_3) (function.constant /.dload_3)] test)) (..coverage [/.dstore /.dload] - (store_and_load ..valid_double ..$Double::literal ..$Double::wrap [/.dstore /.dload] test)))) + (store_and_load ..valid_double ..$Double:literal ..$Double:wrap [/.dstore /.dload] test)))) (let [test (is (-> java/lang/String Any Bit) (function (_ expected) (|>> (as (-> Any Text)) (text.= (as (-> java/lang/String Text) expected)))))] (all _.and (..coverage [/.astore_0 /.aload_0] - (store_and_load ..$String::random ..$String::literal /.nop [(function.constant /.astore_0) (function.constant /.aload_0)] test)) + (store_and_load ..$String:random ..$String:literal /.nop [(function.constant /.astore_0) (function.constant /.aload_0)] test)) (..coverage [/.astore_1 /.aload_1] - (store_and_load ..$String::random ..$String::literal /.nop [(function.constant /.astore_1) (function.constant /.aload_1)] test)) + (store_and_load ..$String:random ..$String:literal /.nop [(function.constant /.astore_1) (function.constant /.aload_1)] test)) (..coverage [/.astore_2 /.aload_2] - (store_and_load ..$String::random ..$String::literal /.nop [(function.constant /.astore_2) (function.constant /.aload_2)] test)) + (store_and_load ..$String:random ..$String:literal /.nop [(function.constant /.astore_2) (function.constant /.aload_2)] test)) (..coverage [/.astore_3 /.aload_3] - (store_and_load ..$String::random ..$String::literal /.nop [(function.constant /.astore_3) (function.constant /.aload_3)] test)) + (store_and_load ..$String:random ..$String:literal /.nop [(function.constant /.astore_3) (function.constant /.aload_3)] test)) (..coverage [/.astore /.aload] - (store_and_load ..$String::random ..$String::literal /.nop [/.astore /.aload] test)))) + (store_and_load ..$String:random ..$String:literal /.nop [/.astore /.aload] test)))) ))) (the stack Test (monad.let random.monad - [expected/1 $String::random + [expected/1 $String:random .let [object_test (is (-> Any Bit) (|>> (as (-> Any Text)) (text.= (as (-> java/lang/String Text) expected/1))))] - dummy/1 $String::random + dummy/1 $String:random .let [single (all _.and (<| (..coverage [/.dup /.pop]) (..bytecode object_test) (monad.let /.monad - [_ ($String::literal expected/1) + [_ ($String:literal expected/1) _ /.dup] /.pop)) (<| (..coverage [/.dup_x1 /.pop2]) (..bytecode object_test) (monad.let /.monad - [_ ($String::literal dummy/1) - _ ($String::literal expected/1) + [_ ($String:literal dummy/1) + _ ($String:literal expected/1) _ /.dup_x1] /.pop2)) (<| (..coverage [/.dup_x2]) (..bytecode object_test) (monad.let /.monad - [_ ($String::literal dummy/1) - _ ($String::literal dummy/1) - _ ($String::literal expected/1) + [_ ($String:literal dummy/1) + _ ($String:literal dummy/1) + _ ($String:literal expected/1) _ /.dup_x2 _ /.pop2] /.pop)) (<| (..coverage [/.swap]) (..bytecode object_test) (monad.let /.monad - [_ ($String::literal dummy/1) - _ ($String::literal expected/1) + [_ ($String:literal dummy/1) + _ ($String:literal expected/1) _ /.swap] /.pop)) )] - expected/2 $Long::random + expected/2 $Long:random .let [long_test (is (-> Any Bit) (|>> (as (-> Any Integer)) (i.= (as (-> java/lang/Long Integer) expected/2))))] - dummy/2 $Long::random + dummy/2 $Long:random .let [double (all _.and (<| (..coverage [/.dup2]) (..bytecode long_test) (monad.let /.monad - [_ ($Long::literal expected/2) + [_ ($Long:literal expected/2) _ /.dup2 _ /.pop2] - ..$Long::wrap)) + ..$Long:wrap)) (<| (..coverage [/.dup2_x1]) (..bytecode long_test) (monad.let /.monad - [_ ($String::literal dummy/1) - _ ($Long::literal expected/2) + [_ ($String:literal dummy/1) + _ ($Long:literal expected/2) _ /.dup2_x1 _ /.pop2 _ /.pop] - ..$Long::wrap)) + ..$Long:wrap)) (<| (..coverage [/.dup2_x2]) (..bytecode long_test) (monad.let /.monad - [_ ($Long::literal dummy/2) - _ ($Long::literal expected/2) + [_ ($Long:literal dummy/2) + _ ($Long:literal expected/2) _ /.dup2_x2 _ /.pop2 _ /.pop2] - ..$Long::wrap)) + ..$Long:wrap)) )]] (all _.and single @@ -1449,7 +1449,7 @@ _ (/loader.define class_name bytecode loader) class (io.value (/loader.load class_name loader)) method (try (get_method object_method_name class))] - (java/lang/reflect/Method::invoke [(ffi.null) (ffi.array java/lang/Object 0)] method)) + (java/lang/reflect/Method:invoke [(ffi.null) (ffi.array java/lang/Object 0)] method)) {try.:Success actual} (test expected actual) @@ -1459,26 +1459,26 @@ ] (all _.and (..coverage [/.ireturn] - (primitive_return ..$Integer::primitive /.ireturn {.:None} (!::= java/lang/Integer .jvm_int_=#))) + (primitive_return ..$Integer:primitive /.ireturn {.:None} (!:= java/lang/Integer .jvm_int_=#))) (..coverage [/.lreturn] - (primitive_return ..$Long::primitive /.lreturn {.:None} (!::= java/lang/Long .jvm_long_=#))) + (primitive_return ..$Long:primitive /.lreturn {.:None} (!:= java/lang/Long .jvm_long_=#))) (..coverage [/.freturn] - (primitive_return ..$Float::primitive /.freturn {.:None} (!::= java/lang/Float .jvm_float_=#))) + (primitive_return ..$Float:primitive /.freturn {.:None} (!:= java/lang/Float .jvm_float_=#))) (..coverage [/.dreturn] - (primitive_return ..$Double::primitive /.dreturn {.:None} (!::= java/lang/Double .jvm_double_=#))) + (primitive_return ..$Double:primitive /.dreturn {.:None} (!:= java/lang/Double .jvm_double_=#))) (..coverage [/.areturn] - (primitive_return ..$String::primitive /.areturn {.:None} (function (_ expected actual) - (text.= (as (-> java/lang/String Text) expected) - (as (-> Any Text) actual))))) + (primitive_return ..$String:primitive /.areturn {.:None} (function (_ expected actual) + (text.= (as (-> java/lang/String Text) expected) + (as (-> Any Text) actual))))) (..coverage [/.return] (primitive_return (is (Primitive java/lang/String) [:unboxed type.void :boxed ..$String :wrap /.nop - :random ..$String::random + :random ..$String:random :literal (function.constant /.nop)]) /.return - {.:Some ..$String::literal} + {.:Some ..$String:literal} (function (_ expected actual) (text.= (as (-> java/lang/String Text) expected) (as (-> Any Text) actual))))) @@ -1487,22 +1487,22 @@ (the branching Test (monad.let random.monad - [expected ..$Long::random - dummy ..$Long::random + [expected ..$Long:random + dummy ..$Long:random .let [if! (is (-> (-> /.Label (Bytecode Any)) (Bytecode Any) (Random Bit)) (function (_ instruction prelude) - (<| (..bytecode ((!::= java/lang/Long .jvm_long_=#) expected)) + (<| (..bytecode ((!:= java/lang/Long .jvm_long_=#) expected)) (monad.let /.monad [@then /.new_label @end /.new_label _ prelude _ (instruction @then) - _ (..$Long::literal dummy) + _ (..$Long:literal dummy) _ (/.goto @end) _ (/.set_label @then) - _ (..$Long::literal expected) + _ (..$Long:literal expected) _ (/.set_label @end)] - ..$Long::wrap)))) + ..$Long:wrap)))) comparison_against_zero (all _.and (..coverage [/.ifeq] (if! /.ifeq /.iconst_0)) (..coverage [/.ifne] (if! /.ifne /.iconst_1)) @@ -1513,19 +1513,19 @@ null_test (all _.and (..coverage [/.ifnull] (if! /.ifnull /.aconst_null)) (..coverage [/.ifnonnull] (if! /.ifnonnull (/.string ""))))] - expected ..$Integer::random - actual (|> ..$Integer::random - (random.only (|>> ((!::= java/lang/Integer .jvm_int_=#) expected) not))) + expected ..$Integer:random + actual (|> ..$Integer:random + (random.only (|>> ((!:= java/lang/Integer .jvm_int_=#) expected) not))) .let [[lesser greater] (if (.jvm_int_<# (.jvm_object_cast# actual) (.jvm_object_cast# expected)) [expected actual] [actual expected]) int_comparison (all _.and - (..coverage [/.if_icmpeq] (if! /.if_icmpeq (monad.let /.monad [_ (..$Integer::literal expected)] /.dup))) - (..coverage [/.if_icmpne] (if! /.if_icmpne (monad.let /.monad [_ (..$Integer::literal expected)] (..$Integer::literal actual)))) - (..coverage [/.if_icmplt] (if! /.if_icmplt (monad.let /.monad [_ (..$Integer::literal lesser)] (..$Integer::literal greater)))) - (..coverage [/.if_icmple] (if! /.if_icmple (monad.let /.monad [_ (..$Integer::literal lesser)] (..$Integer::literal greater)))) - (..coverage [/.if_icmpgt] (if! /.if_icmpgt (monad.let /.monad [_ (..$Integer::literal greater)] (..$Integer::literal lesser)))) - (..coverage [/.if_icmpge] (if! /.if_icmpge (monad.let /.monad [_ (..$Integer::literal greater)] (..$Integer::literal lesser))))) + (..coverage [/.if_icmpeq] (if! /.if_icmpeq (monad.let /.monad [_ (..$Integer:literal expected)] /.dup))) + (..coverage [/.if_icmpne] (if! /.if_icmpne (monad.let /.monad [_ (..$Integer:literal expected)] (..$Integer:literal actual)))) + (..coverage [/.if_icmplt] (if! /.if_icmplt (monad.let /.monad [_ (..$Integer:literal lesser)] (..$Integer:literal greater)))) + (..coverage [/.if_icmple] (if! /.if_icmple (monad.let /.monad [_ (..$Integer:literal lesser)] (..$Integer:literal greater)))) + (..coverage [/.if_icmpgt] (if! /.if_icmpgt (monad.let /.monad [_ (..$Integer:literal greater)] (..$Integer:literal lesser)))) + (..coverage [/.if_icmpge] (if! /.if_icmpge (monad.let /.monad [_ (..$Integer:literal greater)] (..$Integer:literal lesser))))) new_object (is (Bytecode Any) (monad.let /.monad [_ (/.new ..$Object) @@ -1545,23 +1545,23 @@ (the jump Test (monad.let random.monad - [expected ..$Long::random - dummy ..$Long::random + [expected ..$Long:random + dummy ..$Long:random .let [jump (is (-> (-> /.Label (Bytecode Any)) (Random Bit)) (function (_ goto) - (<| (..bytecode ((!::= java/lang/Long .jvm_long_=#) expected)) + (<| (..bytecode ((!:= java/lang/Long .jvm_long_=#) expected)) (monad.let /.monad [@skipped /.new_label @value /.new_label @end /.new_label _ (goto @value) _ (/.set_label @skipped) - _ (..$Long::literal dummy) + _ (..$Long:literal dummy) _ (goto @end) _ (/.set_label @value) - _ (..$Long::literal expected) + _ (..$Long:literal expected) _ (/.set_label @end)] - ..$Long::wrap)))) + ..$Long:wrap)))) value (let [method (type.method [(.list) (.list) (type.class (.list) "java.lang.Object") (.list)])] (is (for_any (_ it) (-> (Bytecode it) @@ -1629,12 +1629,12 @@ (all _.and (<| (..coverage [/.tableswitch]) (monad.let [! random.monad] - [expected ..$Long::random - dummy ..$Long::random + [expected ..$Long:random + dummy ..$Long:random minimum (by ! each (|>> (n.% 100) .integer /32.of) random.natural) afterwards (by ! each (n.% 10) random.natural)]) - (..bytecode ((!::= java/lang/Long .jvm_long_=#) expected)) + (..bytecode ((!:= java/lang/Long .jvm_long_=#) expected)) (monad.let /.monad [@right /.new_label @wrong /.new_label @@ -1642,12 +1642,12 @@ _ (/.bipush (|> minimum /32.as .integer signed.s1 try.trusted)) _ (/.tableswitch minimum @wrong [@right (list.repeated afterwards @wrong)]) _ (/.set_label @wrong) - _ (..$Long::literal dummy) + _ (..$Long:literal dummy) _ (/.goto @return) _ (/.set_label @right) - _ (..$Long::literal expected) + _ (..$Long:literal expected) _ (/.set_label @return)] - ..$Long::wrap)) + ..$Long:wrap)) (<| (..coverage [/.lookupswitch]) (monad.let [! random.monad] [options (by ! each (|>> (n.% 10) (n.+ 1)) @@ -1661,35 +1661,35 @@ (random.set i.hash options) (by ! each set.as_list)) .let [choice (maybe.trusted (list.item choice options))] - expected ..$Long::random - dummy ..$Long::random]) - (..bytecode ((!::= java/lang/Long .jvm_long_=#) expected)) + expected ..$Long:random + dummy ..$Long:random]) + (..bytecode ((!:= java/lang/Long .jvm_long_=#) expected)) (monad.let /.monad [@right /.new_label @wrong /.new_label @return /.new_label - _ (..$Integer::literal (ffi.long_to_int (as (-> Integer java/lang/Long) choice))) + _ (..$Integer:literal (ffi.long_to_int (as (-> Integer java/lang/Long) choice))) _ (/.lookupswitch @wrong (list:each (function (_ option) [(/32.of option) (if (i.= choice option) @right @wrong)]) options)) _ (/.set_label @wrong) - _ (..$Long::literal dummy) + _ (..$Long:literal dummy) _ (/.goto @return) _ (/.set_label @right) - _ (..$Long::literal expected) + _ (..$Long:literal expected) _ (/.set_label @return)] - ..$Long::wrap)) + ..$Long:wrap)) )) (the exception Test (monad.let random.monad - [expected ..$Long::random - dummy ..$Long::random - exception ..$String::random] + [expected ..$Long:random + dummy ..$Long:random + exception ..$String:random] (<| (..coverage [/.try /.athrow]) - (..bytecode ((!::= java/lang/Long .jvm_long_=#) expected)) + (..bytecode ((!:= java/lang/Long .jvm_long_=#) expected)) (monad.let /.monad [.let [$Exception (type.class (.list) "java.lang.Exception")] @skipped /.new_label @@ -1700,17 +1700,17 @@ _ (/.set_label @try) _ (/.new $Exception) _ /.dup - _ (..$String::literal exception) + _ (..$String:literal exception) _ (/.invokespecial $Exception "" (type.method [(.list) (.list ..$String) type.void (.list)])) _ /.athrow _ (/.set_label @skipped) - _ (..$Long::literal dummy) + _ (..$Long:literal dummy) _ (/.goto @return) _ (/.set_label @handler) _ /.pop - _ (..$Long::literal expected) + _ (..$Long:literal expected) _ (/.set_label @return)] - ..$Long::wrap)))) + ..$Long:wrap)))) (the code Test @@ -1740,12 +1740,12 @@ (random.only (function (_ class) (not (or (text.= abstract_class class) (text.= interface_class class)))))) - part0 ..$Long::random - part1 ..$Long::random - part2 ..$Long::random - fake_part2 ..$Long::random - part3 ..$Long::random - part4 ..$Long::random + part0 ..$Long:random + part1 ..$Long:random + part2 ..$Long:random + fake_part2 ..$Long:random + part3 ..$Long:random + part4 ..$Long:random .let [expected (all i.+ (as (-> java/lang/Long Integer) part0) (as (-> java/lang/Long Integer) part1) @@ -1756,8 +1756,8 @@ $Abstract (type.class (.list) abstract_class) $Interface (type.class (.list) interface_class) - constructor::type (type.method [(.list) (.list) type.void (.list)]) - method::type (type.method [(.list) (.list) type.long (.list)]) + constructor:type (type.method [(.list) (.list) type.void (.list)]) + method:type (type.method [(.list) (.list) type.long (.list)]) inherited_method "inherited_method" overriden_method "overriden_method" @@ -1770,10 +1770,10 @@ (function (_ name value) (/method.method /method.public name - false method::type + false method:type (.list) {.:Some (monad.let /.monad - [_ (..$Long::literal value)] + [_ (..$Long:literal value)] /.lreturn)}))) interface_bytecode (|> (class.class version.v6_0 (all /modifier:composite class.public class.abstract class.interface) @@ -1783,7 +1783,7 @@ (.list) (.list) (.list (/method.method (all /modifier:composite /method.public /method.abstract) - interface_method false method::type (.list) {.:None})) + interface_method false method:type (.list) {.:None})) (.list)) try.trusted (binary.value class.as_binary)) @@ -1795,16 +1795,16 @@ (.list) (.list (/method.method /method.public "" - false constructor::type + false constructor:type (.list) {.:Some (monad.let /.monad [_ /.aload_0 - _ (/.invokespecial ..$Object "" constructor::type)] + _ (/.invokespecial ..$Object "" constructor:type)] /.return)}) (method inherited_method part0) (method overriden_method fake_part2) (/method.method (all /modifier:composite /method.public /method.abstract) - abstract_method false method::type (.list) {.:None})) + abstract_method false method:type (.list) {.:None})) (.list)) try.trusted (binary.value class.as_binary)) @@ -1812,7 +1812,7 @@ (function (_ class method) (monad.let /.monad [_ /.aload_0] - (/.invokevirtual class method method::type)))) + (/.invokevirtual class method method:type)))) concrete_bytecode (|> (class.class version.v6_0 class.public (internal.name concrete_class) {.:None} @@ -1821,11 +1821,11 @@ (.list) (.list (/method.method /method.public "" - false constructor::type + false constructor:type (.list) {.:Some (monad.let /.monad [_ /.aload_0 - _ (/.invokespecial $Abstract "" constructor::type)] + _ (/.invokespecial $Abstract "" constructor:type)] /.return)}) (method virtual_method part1) (method overriden_method part2) @@ -1840,18 +1840,18 @@ {.:Some (monad.let /.monad [_ (/.new $Concrete) _ /.dup - _ (/.invokespecial $Concrete "" constructor::type) + _ (/.invokespecial $Concrete "" constructor:type) _ /.astore_0 _ (invoke $Abstract inherited_method) _ (invoke $Concrete virtual_method) _ /.ladd _ (invoke $Abstract overriden_method) _ /.ladd - _ /.aload_0 _ (/.invokeinterface $Interface interface_method method::type) + _ /.aload_0 _ (/.invokeinterface $Interface interface_method method:type) _ /.ladd _ (invoke $Abstract abstract_method) _ /.ladd - _ ..$Long::wrap] + _ ..$Long:wrap] /.areturn)})) (.list)) try.trusted @@ -1864,7 +1864,7 @@ _ (/loader.define concrete_class concrete_bytecode loader) class (io.value (/loader.load concrete_class loader)) method (try (get_method static_method class)) - output (java/lang/reflect/Method::invoke [(ffi.null) (ffi.array java/lang/Object 0)] method)] + output (java/lang/reflect/Method:invoke [(ffi.null) (ffi.array java/lang/Object 0)] method)] (pure (as (-> Any Integer) output))) (try:each (i.= expected)) (try.else false))))) diff --git a/stdlib/source/test/lux/target/python.lux b/stdlib/source/test/lux/target/python.lux index 2f19d84949..7959a7fcd1 100644 --- a/stdlib/source/test/lux/target/python.lux +++ b/stdlib/source/test/lux/target/python.lux @@ -432,7 +432,7 @@ )))) (ffi.the Dict - "[1]::[0]" + "[1]:[0]" (get [ffi.String] Any)) (ffi.the (dict [] ..Dict)) @@ -444,7 +444,7 @@ environment (..dict [])] (exec (.python_exec# (/.code (it (/.var $output))) (as_expected environment)) - (Dict::get $output environment)))) + (Dict:get $output environment)))) (the test|access Test diff --git a/stdlib/source/test/lux/type.lux b/stdlib/source/test/lux/type.lux index f50d7d8b5b..6c3ab8316b 100644 --- a/stdlib/source/test/lux/type.lux +++ b/stdlib/source/test/lux/type.lux @@ -176,13 +176,13 @@ (|> (\\projection.value (<| (\\projection.with_extension [quantification argument]) \\projection.any) not_parameter) - (!expect (^.multi {try.:Success [[quantification::binding argument::binding] actual]} + (!expect (^.multi {try.:Success [[quantification:binding argument:binding] actual]} (identical? not_parameter actual))))) (_.coverage [\\projection.parameter] (|> (\\projection.value (<| (\\projection.with_extension [quantification argument]) \\projection.parameter) {.:Parameter .abstraction 0}) - (!expect {try.:Success [[quantification::binding argument::binding] _]}))) + (!expect {try.:Success [[quantification:binding argument:binding] _]}))) (_.coverage [\\projection.argument] (let [argument? (is (-> Natural Natural Bit) (function (_ @ expected) @@ -208,7 +208,7 @@ (|> (\\projection.value (<| (\\projection.with_extension [quantification argument]) (\\projection.this_parameter 0)) {.:Parameter .abstraction 0}) - (!expect {try.:Success [[quantification::binding argument::binding] _]}))) + (!expect {try.:Success [[quantification:binding argument:binding] _]}))) ))) (the test|polymorphic diff --git a/stdlib/source/test/lux/type/unit/scale.lux b/stdlib/source/test/lux/type/unit/scale.lux index dc508ac70d..418f198674 100644 --- a/stdlib/source/test/lux/type/unit/scale.lux +++ b/stdlib/source/test/lux/type/unit/scale.lux @@ -37,8 +37,8 @@ (these (the how (/.scale (fraction.new ))) (the How (/.type how)) - (the how::from ) - (the how::to ))) + (the how:from ) + (the how:to ))) (the .public test Test @@ -57,7 +57,7 @@ //.equivalence)] unscaled (|> random.integer (by ! each (|>> (i.% +1,000) - (i.x (.integer how::to)) + (i.x (.integer how:to)) (by //.meter in))))] (`` (all _.and (,, (template.with [ ] @@ -97,6 +97,6 @@ (is (//.Measure How //.Meter)) (by ..how down) (meter:= unscaled)) - (fraction.= (fraction.new ..how::from ..how::to) + (fraction.= (fraction.new ..how:from ..how:to) (by ..how fraction)))) ))))) diff --git a/stdlib/source/test/lux/world/file/watch.lux b/stdlib/source/test/lux/world/file/watch.lux index 34fce7d092..97799f6fe3 100644 --- a/stdlib/source/test/lux/world/file/watch.lux +++ b/stdlib/source/test/lux/world/file/watch.lux @@ -39,7 +39,7 @@ (random:pure [/.deletion /.deletion?]) )) -(the concern::test +(the concern:test Test (all _.and (_.coverage [/.creation /.creation?] @@ -161,7 +161,7 @@ (_.for [/.Watcher]) (all _.and (_.for [/.Concern] - ..concern::test) + ..concern:test) ..exception (monad.let [! random.monad] diff --git a/stdlib/source/unsafe/lux/data/binary.lux b/stdlib/source/unsafe/lux/data/binary.lux index 15dfaa1564..82eff76172 100644 --- a/stdlib/source/unsafe/lux/data/binary.lux +++ b/stdlib/source/unsafe/lux/data/binary.lux @@ -23,22 +23,22 @@ (ffi.type [byte])) (ffi.the java/lang/Object - "[1]::[0]") + "[1]:[0]") (ffi.the java/lang/System - "[1]::[0]" + "[1]:[0]" ("static" arraycopy [java/lang/Object int java/lang/Object int int] void)) (ffi.the java/util/Arrays - "[1]::[0]" + "[1]:[0]" ("static" copyOfRange [[byte] int int] [byte]) ("static" equals [[byte] [byte]] boolean))) .js (these (ffi.the ArrayBuffer - "[1]::[0]") + "[1]:[0]") (ffi.the Uint8Array - "[1]::[0]") + "[1]:[0]") (every .public Binary Uint8Array)) @@ -232,7 +232,7 @@ (.is ..Binary sample')] (`` (template.the .public (= reference' sample') [(.for .jvm - (ffi.of_boolean (,, (java/util/Arrays::equals [ ]))) + (ffi.of_boolean (,, (java/util/Arrays:equals [ ]))) ... else (.let [reference @@ -253,9 +253,9 @@ ..Binary) (.for .jvm (.exec - (java/lang/System::arraycopy [source (ffi.as_int (.integer source_offset)) - target (ffi.as_int (.integer target_offset)) - (ffi.as_int (.integer bytes))]) + (java/lang/System:arraycopy [source (ffi.as_int (.integer source_offset)) + target (ffi.as_int (.integer target_offset)) + (ffi.as_int (.integer bytes))]) target) ... Default @@ -275,9 +275,9 @@ ..Binary) (.for .jvm (.let [limit (.i64_+# size offset)] - (java/util/Arrays::copyOfRange [binary - (ffi.as_int (.integer offset)) - (ffi.as_int (.integer limit))])) + (java/util/Arrays:copyOfRange [binary + (ffi.as_int (.integer offset)) + (ffi.as_int (.integer limit))])) ... Default (..copy! size offset binary 0 (..empty size)))))