diff options
Diffstat (limited to '')
38 files changed, 667 insertions, 624 deletions
diff --git a/stdlib/source/documentation/lux/ffi.js.lux b/stdlib/source/documentation/lux/ffi.js.lux index 66b629d22..81082ada3 100644 --- a/stdlib/source/documentation/lux/ffi.js.lux +++ b/stdlib/source/documentation/lux/ffi.js.lux @@ -1,31 +1,32 @@ (.using - [library - [lux {"-" int char type :as} - ["$" documentation {"+" documentation:}] - [data - ["[0]" text {"+" \n} - ["%" format {"+" format}]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]]) + [library + [lux {"-" int char type :as} + ["$" documentation {"+" documentation:}] + [data + ["[0]" text {"+" \n} + ["%" format {"+" format}]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]]) (documentation: /.null "The null pointer.") (documentation: /.import: "Easily import types, methods, functions and constants." - [(import: Uint8Array) + [(import: Uint8Array + "[1]::[0]") (import: TextEncoder - ["[1]::[0]" - (new [/.String]) - (encode [/.String] Uint8Array)]) + "[1]::[0]" + (new [/.String]) + (encode [/.String] Uint8Array)) (import: TextDecoder - ["[1]::[0]" - (new [/.String]) - (decode [/.String] String)])]) + "[1]::[0]" + (new [/.String]) + (decode [/.String] String))]) (documentation: /.type_of "The type of an object, as text." diff --git a/stdlib/source/documentation/lux/ffi.jvm.lux b/stdlib/source/documentation/lux/ffi.jvm.lux index b3c628ffe..5bf182890 100644 --- a/stdlib/source/documentation/lux/ffi.jvm.lux +++ b/stdlib/source/documentation/lux/ffi.jvm.lux @@ -1,14 +1,14 @@ (.using - [library - [lux {"-" int char type :as} - ["$" documentation {"+" documentation:}] - [data - ["[0]" text {"+" \n} - ["%" format {"+" format}]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]]) + [library + [lux {"-" int char type :as} + ["$" documentation {"+" documentation:}] + [data + ["[0]" text {"+" \n} + ["%" format {"+" format}]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]]) (template [<name>] [(`` (documentation: <name> @@ -179,44 +179,44 @@ "Allows importing JVM classes, and using them as types." ["Their methods, fields and enum options can also be imported." (import: java/lang/Object - ["[1]::[0]" - (new []) - (equals [java/lang/Object] boolean) - (wait [int] "io" "try" void)])] + "[1]::[0]" + (new []) + (equals [java/lang/Object] boolean) + (wait [int] "io" "try" void))] ["Special options can also be given for the return values." "'?' means that the values will be returned inside a Maybe type. That way, null becomes .#None." "'try' means that the computation might throw an exception, and the return value will be wrapped by the Try type." "'io' means the computation has side effects, and will be wrapped by the IO type." "These options must show up in the following order ['io' 'try' '?'] (although, each option can be used independently)." (import: java/lang/String - ["[1]::[0]" - (new [[byte]]) - ("static" valueOf [char] java/lang/String) - ("static" valueOf "as" int_valueOf [int] java/lang/String)]) + "[1]::[0]" + (new [[byte]]) + ("static" valueOf [char] java/lang/String) + ("static" valueOf "as" int_valueOf [int] java/lang/String)) (import: (java/util/List e) - ["[1]::[0]" - (size [] int) - (get [int] e)]) + "[1]::[0]" + (size [] int) + (get [int] e)) (import: (java/util/ArrayList a) - ["[1]::[0]" - ([T] toArray [[T]] [T])])] + "[1]::[0]" + ([T] toArray [[T]] [T]))] ["The class-type that is generated is of the fully-qualified name." "This avoids a clash between the java.util.List type, and Lux's own List type." "All enum options to be imported must be specified." (import: java/lang/Character$UnicodeScript - ["[1]::[0]" - ("enum" ARABIC CYRILLIC LATIN)])] + "[1]::[0]" + ("enum" ARABIC CYRILLIC LATIN))] ["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." "Lux types, such as Maybe cannot be named (otherwise, they'd be confused for Java classes)." (import: (lux/concurrency/async/JvmAsync A) - ["[1]::[0]" - (resolve [A] boolean) - (poll [] A) - (wasResolved [] boolean) - (waitOn [lux/Function] void) - ("static" [A] make [A] (lux/concurrency/async/JvmAsync A))])] + "[1]::[0]" + (resolve [A] boolean) + (poll [] A) + (wasResolved [] boolean) + (waitOn [lux/Function] void) + ("static" [A] make [A] (lux/concurrency/async/JvmAsync A)))] ["Also, the names of the imported members will look like Class::member" (java/lang/Object::new []) (java/lang/Object::equals [other_object] my_object) diff --git a/stdlib/source/documentation/lux/ffi.old.lux b/stdlib/source/documentation/lux/ffi.old.lux index 6f27cb3f6..56336a41b 100644 --- a/stdlib/source/documentation/lux/ffi.old.lux +++ b/stdlib/source/documentation/lux/ffi.old.lux @@ -1,14 +1,14 @@ (.using - [library - [lux {"-" int char type :as} - ["$" documentation {"+" documentation:}] - [data - ["[0]" text {"+" \n} - ["%" format {"+" format}]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]]) + [library + [lux {"-" int char type :as} + ["$" documentation {"+" documentation:}] + [data + ["[0]" text {"+" \n} + ["%" format {"+" format}]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]]) (template [<name> <from> <to>] [(documentation: <name> @@ -142,44 +142,44 @@ (format "Allows importing JVM classes, and using them as types." \n "Their methods, fields and enum options can also be imported.") [(import: java/lang/Object - ["[1]::[0]" - (new []) - (equals [java/lang/Object] boolean) - (wait [int] "io" "try" void)])] + "[1]::[0]" + (new []) + (equals [java/lang/Object] boolean) + (wait [int] "io" "try" void))] ["Special options can also be given for the return values." "'?' means that the values will be returned inside a Maybe type. That way, null becomes .#None." "'try' means that the computation might throw an exception, and the return value will be wrapped by the Try type." "'io' means the computation has side effects, and will be wrapped by the IO type." "These options must show up in the following order ['io' 'try' '?'] (although, each option can be used independently)." (import: java/lang/String - ["[1]::[0]" - (new [[byte]]) - ("static" valueOf [char] java/lang/String) - ("static" valueOf "as" int_valueOf [int] java/lang/String)]) + "[1]::[0]" + (new [[byte]]) + ("static" valueOf [char] java/lang/String) + ("static" valueOf "as" int_valueOf [int] java/lang/String)) (import: (java/util/List e) - ["[1]::[0]" - (size [] int) - (get [int] e)]) + "[1]::[0]" + (size [] int) + (get [int] e)) (import: (java/util/ArrayList a) - ["[1]::[0]" - ([T] toArray [[T]] [T])])] + "[1]::[0]" + ([T] toArray [[T]] [T]))] ["The class-type that is generated is of the fully-qualified name." "This avoids a clash between the java.util.List type, and Lux's own List type." "All enum options to be imported must be specified." (import: java/lang/Character$UnicodeScript - ["[1]::[0]" - ("enum" ARABIC CYRILLIC LATIN)])] + "[1]::[0]" + ("enum" ARABIC CYRILLIC LATIN))] ["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-parameters." "Lux types, such as Maybe cannot be named (otherwise, they'd be confused for Java classes)." (import: (lux/concurrency/async/JvmAsync A) - ["[1]::[0]" - (resolve [A] boolean) - (poll [] A) - (wasResolved [] boolean) - (waitOn [lux/Function] void) - ("static" [A] make [A] (lux/concurrency/async/JvmAsync A))])] + "[1]::[0]" + (resolve [A] boolean) + (poll [] A) + (wasResolved [] boolean) + (waitOn [lux/Function] void) + ("static" [A] make [A] (lux/concurrency/async/JvmAsync A)))] ["Also, the names of the imported members will look like Class::member" (java/lang/Object::new []) (java/lang/Object::equals [other_object] my_object) diff --git a/stdlib/source/documentation/lux/ffi.py.lux b/stdlib/source/documentation/lux/ffi.py.lux index 6b24c1926..34a88e01d 100644 --- a/stdlib/source/documentation/lux/ffi.py.lux +++ b/stdlib/source/documentation/lux/ffi.py.lux @@ -13,26 +13,26 @@ (documentation: /.import: "Easily import types, methods, functions and constants." [(import: os - ["[1]::[0]" - ("static" F_OK Integer) - ("static" R_OK Integer) - ("static" W_OK Integer) - ("static" X_OK Integer) + "[1]::[0]" + ("static" F_OK Integer) + ("static" R_OK Integer) + ("static" W_OK Integer) + ("static" X_OK Integer) - ("static" mkdir [String] "io" "try" "?" Any) - ("static" access [String Integer] "io" "try" Boolean) - ("static" remove [String] "io" "try" "?" Any) - ("static" rmdir [String] "io" "try" "?" Any) - ("static" rename [String String] "io" "try" "?" Any) - ("static" listdir [String] "io" "try" (Array String))]) + ("static" mkdir [String] "io" "try" "?" Any) + ("static" access [String Integer] "io" "try" Boolean) + ("static" remove [String] "io" "try" "?" Any) + ("static" rmdir [String] "io" "try" "?" Any) + ("static" rename [String String] "io" "try" "?" Any) + ("static" listdir [String] "io" "try" (Array String))) (import: os/path - ["[1]::[0]" - ("static" isfile [String] "io" "try" Boolean) - ("static" isdir [String] "io" "try" Boolean) - ("static" sep String) - ("static" getsize [String] "io" "try" Integer) - ("static" getmtime [String] "io" "try" Float)])]) + "[1]::[0]" + ("static" isfile [String] "io" "try" Boolean) + ("static" isdir [String] "io" "try" Boolean) + ("static" sep String) + ("static" getsize [String] "io" "try" Integer) + ("static" getmtime [String] "io" "try" Float))]) (documentation: /.lambda (format "Allows defining closures/anonymous-functions in the form that Python expects." diff --git a/stdlib/source/documentation/lux/ffi.rb.lux b/stdlib/source/documentation/lux/ffi.rb.lux index 33b4ef148..01b883a84 100644 --- a/stdlib/source/documentation/lux/ffi.rb.lux +++ b/stdlib/source/documentation/lux/ffi.rb.lux @@ -13,23 +13,23 @@ (documentation: /.import: "Easily import types, methods, functions and constants." [(import: Stat - ["[1]::[0]" - (executable? [] Bit) - (size Int)]) + "[1]::[0]" + (executable? [] Bit) + (size Int)) (import: File "as" RubyFile - ["[1]::[0]" - ("static" SEPARATOR ..String) - ("static" open [Path ..String] "io" "try" RubyFile) - ("static" stat [Path] "io" "try" Stat) - ("static" delete [Path] "io" "try" Int) - ("static" file? [Path] "io" "try" Bit) - ("static" directory? [Path] "io" "try" Bit) + "[1]::[0]" + ("static" SEPARATOR ..String) + ("static" open [Path ..String] "io" "try" RubyFile) + ("static" stat [Path] "io" "try" Stat) + ("static" delete [Path] "io" "try" Int) + ("static" file? [Path] "io" "try" Bit) + ("static" directory? [Path] "io" "try" Bit) - (read [] "io" "try" Binary) - (write [Binary] "io" "try" Int) - (flush [] "io" "try" "?" Any) - (close [] "io" "try" "?" Any)])]) + (read [] "io" "try" Binary) + (write [Binary] "io" "try" Int) + (flush [] "io" "try" "?" Any) + (close [] "io" "try" "?" Any))]) (.def: .public documentation (.List $.Module) diff --git a/stdlib/source/library/lux/control/concurrency/atom.lux b/stdlib/source/library/lux/control/concurrency/atom.lux index 5ce90157e..b15cecead 100644 --- a/stdlib/source/library/lux/control/concurrency/atom.lux +++ b/stdlib/source/library/lux/control/concurrency/atom.lux @@ -16,10 +16,10 @@ abstract]]]) (with_expansions [<jvm> (as_is (ffi.import: (java/util/concurrent/atomic/AtomicReference a) - ["[1]::[0]" - (new [a]) - (get [] "io" a) - (compareAndSet [a a] boolean)]))] + "[1]::[0]" + (new [a]) + (get [] "io" a) + (compareAndSet [a a] boolean)))] (for @.old <jvm> @.jvm <jvm> (as_is))) diff --git a/stdlib/source/library/lux/control/concurrency/thread.lux b/stdlib/source/library/lux/control/concurrency/thread.lux index 5f164eaae..6c2a36ebc 100644 --- a/stdlib/source/library/lux/control/concurrency/thread.lux +++ b/stdlib/source/library/lux/control/concurrency/thread.lux @@ -24,30 +24,35 @@ [// ["[0]" atom {"+" Atom}]]) -(with_expansions [<jvm> (as_is (ffi.import: java/lang/Object) - (ffi.import: java/lang/Long) +(with_expansions [<jvm> (as_is (ffi.import: java/lang/Object + "[1]::[0]") + + (ffi.import: java/lang/Long + "[1]::[0]") (ffi.import: java/lang/Runtime - ["[1]::[0]" - ("static" getRuntime [] java/lang/Runtime) - (availableProcessors [] int)]) + "[1]::[0]" + ("static" getRuntime [] java/lang/Runtime) + (availableProcessors [] int)) - (ffi.import: java/lang/Runnable) + (ffi.import: java/lang/Runnable + "[1]::[0]") (ffi.import: java/util/concurrent/TimeUnit - ["[1]::[0]" - ("enum" MILLISECONDS)]) + "[1]::[0]" + ("enum" MILLISECONDS)) (ffi.import: java/util/concurrent/Executor - ["[1]::[0]" - (execute [java/lang/Runnable] "io" void)]) + "[1]::[0]" + (execute [java/lang/Runnable] "io" void)) - (ffi.import: (java/util/concurrent/ScheduledFuture a)) + (ffi.import: (java/util/concurrent/ScheduledFuture a) + "[1]::[0]") (ffi.import: java/util/concurrent/ScheduledThreadPoolExecutor - ["[1]::[0]" - (new [int]) - (schedule [java/lang/Runnable long java/util/concurrent/TimeUnit] "io" (java/util/concurrent/ScheduledFuture java/lang/Object))]))] + "[1]::[0]" + (new [int]) + (schedule [java/lang/Runnable long java/util/concurrent/TimeUnit] "io" (java/util/concurrent/ScheduledFuture java/lang/Object))))] (for @.old (as_is <jvm>) @.jvm (as_is <jvm>) diff --git a/stdlib/source/library/lux/data/text/buffer.lux b/stdlib/source/library/lux/data/text/buffer.lux index 78652d3fe..98526e286 100644 --- a/stdlib/source/library/lux/data/text/buffer.lux +++ b/stdlib/source/library/lux/data/text/buffer.lux @@ -19,21 +19,22 @@ abstract]]] ["[0]" //]) -(with_expansions [<jvm> (as_is (import: java/lang/CharSequence) +(with_expansions [<jvm> (as_is (import: java/lang/CharSequence + "[1]::[0]") (import: java/lang/Appendable - ["[1]::[0]" - (append [java/lang/CharSequence] java/lang/Appendable)]) + "[1]::[0]" + (append [java/lang/CharSequence] java/lang/Appendable)) (import: java/lang/String - ["[1]::[0]" - (new [int]) - (toString [] java/lang/String)]) + "[1]::[0]" + (new [int]) + (toString [] java/lang/String)) (import: java/lang/StringBuilder - ["[1]::[0]" - (new [int]) - (toString [] java/lang/String)]))] + "[1]::[0]" + (new [int]) + (toString [] java/lang/String)))] (`` (for @.old (as_is <jvm>) @.jvm (as_is <jvm>) @.js (as_is (import: (JS_Array a) diff --git a/stdlib/source/library/lux/data/text/encoding/utf8.lux b/stdlib/source/library/lux/data/text/encoding/utf8.lux index 9b13114a4..a1627c8d2 100644 --- a/stdlib/source/library/lux/data/text/encoding/utf8.lux +++ b/stdlib/source/library/lux/data/text/encoding/utf8.lux @@ -12,9 +12,9 @@ ["[0]" //]) (with_expansions [<jvm> (as_is (ffi.import: java/lang/String - ["[1]::[0]" - (new [[byte] java/lang/String]) - (getBytes [java/lang/String] [byte])]))] + "[1]::[0]" + (new [[byte] java/lang/String]) + (getBytes [java/lang/String] [byte])))] (for @.old (as_is <jvm>) @.jvm (as_is <jvm>) diff --git a/stdlib/source/library/lux/debug.lux b/stdlib/source/library/lux/debug.lux index ef90dc663..a6d04ca55 100644 --- a/stdlib/source/library/lux/debug.lux +++ b/stdlib/source/library/lux/debug.lux @@ -41,31 +41,32 @@ [month {"+" Month}] [day {"+" Day}]]]]) -(with_expansions [<jvm> (as_is (import: java/lang/String) +(with_expansions [<jvm> (as_is (import: java/lang/String + "[1]::[0]") (import: (java/lang/Class a) - ["[1]::[0]" - (getCanonicalName [] java/lang/String)]) + "[1]::[0]" + (getCanonicalName [] java/lang/String)) (import: java/lang/Object - ["[1]::[0]" - (new []) - (toString [] java/lang/String) - (getClass [] (java/lang/Class java/lang/Object))]) + "[1]::[0]" + (new []) + (toString [] java/lang/String) + (getClass [] (java/lang/Class java/lang/Object))) (import: java/lang/Integer - ["[1]::[0]" - (longValue [] long)]) + "[1]::[0]" + (longValue [] long)) (import: java/lang/Long - ["[1]::[0]" - (intValue [] int)]) + "[1]::[0]" + (intValue [] int)) (import: java/lang/Number - ["[1]::[0]" - (intValue [] int) - (longValue [] long) - (doubleValue [] double)]))] + "[1]::[0]" + (intValue [] int) + (longValue [] long) + (doubleValue [] double)))] (for @.old (as_is <jvm>) @.jvm (as_is <jvm>) diff --git a/stdlib/source/library/lux/ffi.jvm.lux b/stdlib/source/library/lux/ffi.jvm.lux index 5720c4dff..3a53efeb9 100644 --- a/stdlib/source/library/lux/ffi.jvm.lux +++ b/stdlib/source/library/lux/ffi.jvm.lux @@ -999,13 +999,6 @@ #import_field_type gtype]}))) )) -(def: bundle - (-> (List (Type Var)) (Parser [Text (List Import_Member_Declaration)])) - (|>> ..import_member_decl^ - <>.some - (<>.and <code>.text) - <code>.tuple)) - (def: (privacy_modifier$ pm) (-> Privacy Code) (case pm @@ -1668,13 +1661,12 @@ (syntax: .public (import: [declaration ..declaration^ .let [[class_name class_type_vars] (parser.declaration declaration)] - bundles (<>.some (..bundle class_type_vars))]) + import_format <code>.text + members (<>.some (..import_member_decl^ class_type_vars))]) (do [! meta.monad] [kind (class_kind declaration) - =members (|> bundles - (list#each (function (_ [import_format members]) - (list#each (|>> [import_format]) members))) - list.together + =members (|> members + (list#each (|>> [import_format])) (monad.each ! (member_import$ class_type_vars kind declaration)))] (in (list& (class_import$ declaration) (list#conjoint =members))))) diff --git a/stdlib/source/library/lux/ffi.old.lux b/stdlib/source/library/lux/ffi.old.lux index 43a327049..caff78c66 100644 --- a/stdlib/source/library/lux/ffi.old.lux +++ b/stdlib/source/library/lux/ffi.old.lux @@ -968,13 +968,6 @@ #import_field_type gtype]}))) )) -(def: bundle - (-> (List Type_Parameter) (Parser [Text (List Import_Member_Declaration)])) - (|>> ..import_member_decl^ - <>.some - (<>.and <code>.text) - <code>.tuple)) - ... Generators (def: with_parens (-> JVM_Code JVM_Code) @@ -1618,13 +1611,12 @@ error))))) (syntax: .public (import: [class_decl ..class_decl^ - bundles (<>.some (..bundle (product.right class_decl)))]) + import_format <code>.text + members (<>.some (..import_member_decl^ (product.right class_decl)))]) (do [! meta.monad] [kind (class_kind class_decl) - =members (|> bundles - (list#each (function (_ [import_format members]) - (list#each (|>> [import_format]) members))) - list.together + =members (|> members + (list#each (|>> [import_format])) (monad.each ! (member_import$ (product.right class_decl) kind class_decl)))] (in (list& (class_import$ class_decl) (list#conjoint =members))))) diff --git a/stdlib/source/library/lux/target/jvm/bytecode.lux b/stdlib/source/library/lux/target/jvm/bytecode.lux index 29d93fad0..c104eb74a 100644 --- a/stdlib/source/library/lux/target/jvm/bytecode.lux +++ b/stdlib/source/library/lux/target/jvm/bytecode.lux @@ -560,12 +560,12 @@ (..bytecode $0 $1 @_ _.ldc_w/string [index])))) (import: java/lang/Float - ["[1]::[0]" - ("static" floatToRawIntBits "manual" [float] int)]) + "[1]::[0]" + ("static" floatToRawIntBits "manual" [float] int)) (import: java/lang/Double - ["[1]::[0]" - ("static" doubleToRawLongBits "manual" [double] long)]) + "[1]::[0]" + ("static" doubleToRawLongBits "manual" [double] long)) (template [<name> <type> <constructor> <constant> <wide> <to_lux> <specializations>] [(def: .public (<name> value) diff --git a/stdlib/source/library/lux/target/jvm/constant.lux b/stdlib/source/library/lux/target/jvm/constant.lux index 2dddcee7b..101e723fd 100644 --- a/stdlib/source/library/lux/target/jvm/constant.lux +++ b/stdlib/source/library/lux/target/jvm/constant.lux @@ -62,8 +62,8 @@ ) (import: java/lang/Float - ["[1]::[0]" - ("static" floatToRawIntBits "manual" [float] int)]) + "[1]::[0]" + ("static" floatToRawIntBits "manual" [float] int)) (implementation: .public float_equivalence (Equivalence java/lang/Float) @@ -78,8 +78,8 @@ ("jvm object cast" subject))))) (import: java/lang/Double - ["[1]::[0]" - ("static" doubleToRawLongBits [double] long)]) + "[1]::[0]" + ("static" doubleToRawLongBits [double] long)) (abstract: .public (Value kind) kind diff --git a/stdlib/source/library/lux/target/jvm/loader.lux b/stdlib/source/library/lux/target/jvm/loader.lux index ce31e2e12..5b0a65bb5 100644 --- a/stdlib/source/library/lux/target/jvm/loader.lux +++ b/stdlib/source/library/lux/target/jvm/loader.lux @@ -37,31 +37,32 @@ ["Error" error])) (import: java/lang/Object - ["[1]::[0]" - (getClass [] (java/lang/Class java/lang/Object))]) + "[1]::[0]" + (getClass [] (java/lang/Class java/lang/Object))) -(import: java/lang/String) +(import: java/lang/String + "[1]::[0]") (import: java/lang/reflect/Method - ["[1]::[0]" - (invoke [java/lang/Object [java/lang/Object]] "try" java/lang/Object)]) + "[1]::[0]" + (invoke [java/lang/Object [java/lang/Object]] "try" java/lang/Object)) (import: (java/lang/Class a) - ["[1]::[0]" - (getDeclaredMethod [java/lang/String [(java/lang/Class [? < java/lang/Object])]] java/lang/reflect/Method)]) + "[1]::[0]" + (getDeclaredMethod [java/lang/String [(java/lang/Class [? < java/lang/Object])]] java/lang/reflect/Method)) (import: java/lang/Integer - ["[1]::[0]" - ("static" TYPE (java/lang/Class java/lang/Integer))]) + "[1]::[0]" + ("static" TYPE (java/lang/Class java/lang/Integer))) (import: java/lang/reflect/AccessibleObject - ["[1]::[0]" - (setAccessible [boolean] void)]) + "[1]::[0]" + (setAccessible [boolean] void)) (import: java/lang/ClassLoader - ["[1]::[0]" - (loadClass [java/lang/String] - "io" "try" (java/lang/Class java/lang/Object))]) + "[1]::[0]" + (loadClass [java/lang/String] + "io" "try" (java/lang/Class java/lang/Object))) (with_expansions [<elemT> (as_is (java/lang/Class java/lang/Object))] (def: java/lang/ClassLoader::defineClass diff --git a/stdlib/source/library/lux/target/jvm/reflection.lux b/stdlib/source/library/lux/target/jvm/reflection.lux index 6d170ac6b..98896184c 100644 --- a/stdlib/source/library/lux/target/jvm/reflection.lux +++ b/stdlib/source/library/lux/target/jvm/reflection.lux @@ -30,65 +30,69 @@ ["[1][0]" reflection] ["[1][0]" parser]]]) -(import: java/lang/String) +(import: java/lang/String + "[1]::[0]") (import: java/lang/Object - ["[1]::[0]" - (toString [] java/lang/String) - (getClass [] (java/lang/Class java/lang/Object))]) + "[1]::[0]" + (toString [] java/lang/String) + (getClass [] (java/lang/Class java/lang/Object))) (import: java/lang/reflect/Type - ["[1]::[0]" - (getTypeName [] java/lang/String)]) + "[1]::[0]" + (getTypeName [] java/lang/String)) (import: java/lang/reflect/GenericArrayType - ["[1]::[0]" - (getGenericComponentType [] java/lang/reflect/Type)]) + "[1]::[0]" + (getGenericComponentType [] java/lang/reflect/Type)) (import: java/lang/reflect/ParameterizedType - ["[1]::[0]" - (getRawType [] java/lang/reflect/Type) - (getActualTypeArguments [] [java/lang/reflect/Type])]) + "[1]::[0]" + (getRawType [] java/lang/reflect/Type) + (getActualTypeArguments [] [java/lang/reflect/Type])) (import: (java/lang/reflect/TypeVariable d) - ["[1]::[0]" - (getName [] java/lang/String) - (getBounds [] [java/lang/reflect/Type])]) + "[1]::[0]" + (getName [] java/lang/String) + (getBounds [] [java/lang/reflect/Type])) (import: (java/lang/reflect/WildcardType d) - ["[1]::[0]" - (getLowerBounds [] [java/lang/reflect/Type]) - (getUpperBounds [] [java/lang/reflect/Type])]) + "[1]::[0]" + (getLowerBounds [] [java/lang/reflect/Type]) + (getUpperBounds [] [java/lang/reflect/Type])) (import: java/lang/reflect/Modifier - ["[1]::[0]" - ("static" isStatic [int] boolean) - ("static" isFinal [int] boolean) - ("static" isInterface [int] boolean) - ("static" isAbstract [int] boolean)]) + "[1]::[0]" + ("static" isStatic [int] boolean) + ("static" isFinal [int] boolean) + ("static" isInterface [int] boolean) + ("static" isAbstract [int] boolean)) -(import: java/lang/annotation/Annotation) +(import: java/lang/annotation/Annotation + "[1]::[0]") -(import: java/lang/Deprecated) +(import: java/lang/Deprecated + "[1]::[0]") (import: java/lang/reflect/Field - ["[1]::[0]" - (getDeclaringClass [] (java/lang/Class java/lang/Object)) - (getModifiers [] int) - (getGenericType [] java/lang/reflect/Type) - (getDeclaredAnnotations [] [java/lang/annotation/Annotation])]) + "[1]::[0]" + (getDeclaringClass [] (java/lang/Class java/lang/Object)) + (getModifiers [] int) + (getGenericType [] java/lang/reflect/Type) + (getDeclaredAnnotations [] [java/lang/annotation/Annotation])) -(import: java/lang/ClassLoader) +(import: java/lang/ClassLoader + "[1]::[0]") (import: (java/lang/Class c) - ["[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) - (getTypeParameters [] [(java/lang/reflect/TypeVariable (java/lang/Class c))]) - (getDeclaredField [java/lang/String] "try" java/lang/reflect/Field) - (isArray [] boolean) - (getComponentType [] (java/lang/Class java/lang/Object))]) + "[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) + (getTypeParameters [] [(java/lang/reflect/TypeVariable (java/lang/Class c))]) + (getDeclaredField [java/lang/String] "try" java/lang/reflect/Field) + (isArray [] boolean) + (getComponentType [] (java/lang/Class java/lang/Object))) (exception: .public (unknown_class [class External]) (exception.report diff --git a/stdlib/source/library/lux/target/python.lux b/stdlib/source/library/lux/target/python.lux index 2e991c91f..0f25e6eb2 100644 --- a/stdlib/source/library/lux/target/python.lux +++ b/stdlib/source/library/lux/target/python.lux @@ -34,10 +34,12 @@ (-> Text Text) (text.enclosed ["(" ")"])) -(for @.old (as_is (ffi.import: java/lang/CharSequence) +(for @.old (as_is (ffi.import: java/lang/CharSequence + "[1]::[0]") + (ffi.import: java/lang/String - ["[1]::[0]" - (replace [java/lang/CharSequence java/lang/CharSequence] java/lang/String)])) + "[1]::[0]" + (replace [java/lang/CharSequence java/lang/CharSequence] java/lang/String))) (as_is)) ... Added the carriage return for better Windows compatibility. diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux index ea13344ed..18e485a46 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux @@ -81,70 +81,73 @@ [module [descriptor {"+" Module}]]]]]]]]]) -(import: java/lang/ClassLoader) +(import: java/lang/ClassLoader + "[1]::[0]") (import: java/lang/Object - ["[1]::[0]" - (equals [java/lang/Object] boolean)]) + "[1]::[0]" + (equals [java/lang/Object] boolean)) -(import: java/lang/reflect/Type) +(import: java/lang/reflect/Type + "[1]::[0]") (import: (java/lang/reflect/TypeVariable d) - ["[1]::[0]" - (getName [] java/lang/String) - (getBounds [] [java/lang/reflect/Type])]) + "[1]::[0]" + (getName [] java/lang/String) + (getBounds [] [java/lang/reflect/Type])) (import: java/lang/reflect/Modifier - ["[1]::[0]" - ("static" isStatic [int] boolean) - ("static" isFinal [int] boolean) - ("static" isInterface [int] boolean) - ("static" isAbstract [int] boolean) - ("static" isPublic [int] boolean) - ("static" isProtected [int] boolean)]) + "[1]::[0]" + ("static" isStatic [int] boolean) + ("static" isFinal [int] boolean) + ("static" isInterface [int] boolean) + ("static" isAbstract [int] boolean) + ("static" isPublic [int] boolean) + ("static" isProtected [int] boolean)) -(import: java/lang/annotation/Annotation) +(import: java/lang/annotation/Annotation + "[1]::[0]") (import: java/lang/reflect/Method - ["[1]::[0]" - (getName [] java/lang/String) - (getModifiers [] int) - (getDeclaringClass [] (java/lang/Class java/lang/Object)) - (getTypeParameters [] [(java/lang/reflect/TypeVariable java/lang/reflect/Method)]) - (getGenericParameterTypes [] [java/lang/reflect/Type]) - (getDeclaredAnnotations [] [java/lang/annotation/Annotation]) - - (getReturnType [] (java/lang/Class java/lang/Object)) - (getGenericReturnType [] "?" java/lang/reflect/Type) - - (getExceptionTypes [] [(java/lang/Class java/lang/Object)]) - (getGenericExceptionTypes [] [java/lang/reflect/Type])]) + "[1]::[0]" + (getName [] java/lang/String) + (getModifiers [] int) + (getDeclaringClass [] (java/lang/Class java/lang/Object)) + (getTypeParameters [] [(java/lang/reflect/TypeVariable java/lang/reflect/Method)]) + (getGenericParameterTypes [] [java/lang/reflect/Type]) + (getDeclaredAnnotations [] [java/lang/annotation/Annotation]) + + (getReturnType [] (java/lang/Class java/lang/Object)) + (getGenericReturnType [] "?" java/lang/reflect/Type) + + (getExceptionTypes [] [(java/lang/Class java/lang/Object)]) + (getGenericExceptionTypes [] [java/lang/reflect/Type])) (import: (java/lang/reflect/Constructor c) - ["[1]::[0]" - (getModifiers [] int) - (getDeclaringClass [] (java/lang/Class c)) - (getTypeParameters [] [(java/lang/reflect/TypeVariable (java/lang/reflect/Constructor c))]) - (getGenericParameterTypes [] [java/lang/reflect/Type]) - (getExceptionTypes [] [(java/lang/Class java/lang/Object)]) - (getGenericExceptionTypes [] [java/lang/reflect/Type]) - (getDeclaredAnnotations [] [java/lang/annotation/Annotation])]) + "[1]::[0]" + (getModifiers [] int) + (getDeclaringClass [] (java/lang/Class c)) + (getTypeParameters [] [(java/lang/reflect/TypeVariable (java/lang/reflect/Constructor c))]) + (getGenericParameterTypes [] [java/lang/reflect/Type]) + (getExceptionTypes [] [(java/lang/Class java/lang/Object)]) + (getGenericExceptionTypes [] [java/lang/reflect/Type]) + (getDeclaredAnnotations [] [java/lang/annotation/Annotation])) (import: (java/lang/Class c) - ["[1]::[0]" - ("static" forName [java/lang/String] "try" (java/lang/Class java/lang/Object)) - (getName [] java/lang/String) - (getModifiers [] int) - (isAssignableFrom [(java/lang/Class java/lang/Object)] boolean) - (getTypeParameters [] [(java/lang/reflect/TypeVariable (java/lang/Class c))]) - (getGenericInterfaces [] [java/lang/reflect/Type]) - (getGenericSuperclass [] "?" java/lang/reflect/Type) - (getDeclaredField [java/lang/String] "try" java/lang/reflect/Field) - (getConstructors [] [(java/lang/reflect/Constructor java/lang/Object)]) - (getDeclaredMethods [] [java/lang/reflect/Method]) - (getDeclaredAnnotations [] [java/lang/annotation/Annotation]) - (getSuperclass [] "?" (java/lang/Class java/lang/Object)) - (getInterfaces [] [(java/lang/Class java/lang/Object)])]) + "[1]::[0]" + ("static" forName [java/lang/String] "try" (java/lang/Class java/lang/Object)) + (getName [] java/lang/String) + (getModifiers [] int) + (isAssignableFrom [(java/lang/Class java/lang/Object)] boolean) + (getTypeParameters [] [(java/lang/reflect/TypeVariable (java/lang/Class c))]) + (getGenericInterfaces [] [java/lang/reflect/Type]) + (getGenericSuperclass [] "?" java/lang/reflect/Type) + (getDeclaredField [java/lang/String] "try" java/lang/reflect/Field) + (getConstructors [] [(java/lang/reflect/Constructor java/lang/Object)]) + (getDeclaredMethods [] [java/lang/reflect/Method]) + (getDeclaredAnnotations [] [java/lang/annotation/Annotation]) + (getSuperclass [] "?" (java/lang/Class java/lang/Object)) + (getInterfaces [] [(java/lang/Class java/lang/Object)])) (template [<name>] [(exception: .public (<name> [class External @@ -551,7 +554,8 @@ {.#None} (in (jvm.class ..object_class (list))))) - {.#Ex id} + (^or {.#Ex id} + {.#Parameter id}) (phase#in (jvm.class ..object_class (list))) (^template [<tag>] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux index a69d511f3..8c314121a 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux @@ -961,7 +961,8 @@ _ (generation.log! (format "JVM Interface " (%.text name)))] (in directive.no_requirements))))])) -(import: java/lang/ClassLoader) +(import: java/lang/ClassLoader + "[1]::[0]") (def: .public (bundle class_loader extender) (-> java/lang/ClassLoader Extender (Bundle Anchor (Bytecode Any) Definition)) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux index d4c947953..dc3e63e85 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux @@ -49,18 +49,19 @@ ) (import: java/lang/reflect/Field - ["[1]::[0]" - (get ["?" java/lang/Object] "try" "?" java/lang/Object)]) + "[1]::[0]" + (get ["?" java/lang/Object] "try" "?" java/lang/Object)) (import: (java/lang/Class a) - ["[1]::[0]" - (getField [java/lang/String] "try" java/lang/reflect/Field)]) + "[1]::[0]" + (getField [java/lang/String] "try" java/lang/reflect/Field)) (import: java/lang/Object - ["[1]::[0]" - (getClass [] (java/lang/Class java/lang/Object))]) + "[1]::[0]" + (getClass [] (java/lang/Class java/lang/Object))) -(import: java/lang/ClassLoader) +(import: java/lang/ClassLoader + "[1]::[0]") (def: value::modifier ($_ modifier#composite field.public field.final field.static)) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/primitive.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/primitive.lux index 27cba044c..c1b79618b 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/primitive.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/primitive.lux @@ -79,8 +79,8 @@ (_.invokestatic $Double "valueOf" (type.method [(list) (list type.double) $Double (list)]))) (import: java/lang/Double - ["[1]::[0]" - ("static" doubleToRawLongBits "manual" [double] int)]) + "[1]::[0]" + ("static" doubleToRawLongBits "manual" [double] int)) (def: d0_bits Int diff --git a/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux b/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux index 4e1c841b5..1e27186b1 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux @@ -48,73 +48,75 @@ [jvm ["[0]" runtime {"+" Definition}]]]]]]]]]) -(import: java/lang/Object) +(import: java/lang/Object + "[1]::[0]") -(import: java/lang/String) +(import: java/lang/String + "[1]::[0]") (import: java/util/jar/Attributes - ["[1]::[0]" - (put [java/lang/Object java/lang/Object] "?" java/lang/Object)]) + "[1]::[0]" + (put [java/lang/Object java/lang/Object] "?" java/lang/Object)) (import: java/util/jar/Attributes$Name - ["[1]::[0]" - ("static" MAIN_CLASS java/util/jar/Attributes$Name) - ("static" MANIFEST_VERSION java/util/jar/Attributes$Name)]) + "[1]::[0]" + ("static" MAIN_CLASS java/util/jar/Attributes$Name) + ("static" MANIFEST_VERSION java/util/jar/Attributes$Name)) (import: java/util/jar/Manifest - ["[1]::[0]" - (new []) - (getMainAttributes [] java/util/jar/Attributes)]) + "[1]::[0]" + (new []) + (getMainAttributes [] java/util/jar/Attributes)) (import: java/io/Flushable - ["[1]::[0]" - (flush [] void)]) + "[1]::[0]" + (flush [] void)) (import: java/io/Closeable - ["[1]::[0]" - (close [] void)]) + "[1]::[0]" + (close [] void)) (import: java/io/OutputStream - ["[1]::[0]" - (write [[byte] int int] void)]) + "[1]::[0]" + (write [[byte] int int] void)) (import: java/io/ByteArrayOutputStream - ["[1]::[0]" - (new [int]) - (toByteArray [] [byte])]) + "[1]::[0]" + (new [int]) + (toByteArray [] [byte])) (import: java/util/zip/ZipEntry - ["[1]::[0]" - (getName [] java/lang/String) - (isDirectory [] boolean) - (getSize [] long)]) + "[1]::[0]" + (getName [] java/lang/String) + (isDirectory [] boolean) + (getSize [] long)) (import: java/util/zip/ZipOutputStream - ["[1]::[0]" - (write [[byte] int int] void) - (closeEntry [] void)]) + "[1]::[0]" + (write [[byte] int int] void) + (closeEntry [] void)) (import: java/util/jar/JarEntry - ["[1]::[0]" - (new [java/lang/String])]) + "[1]::[0]" + (new [java/lang/String])) (import: java/util/jar/JarOutputStream - ["[1]::[0]" - (new [java/io/OutputStream java/util/jar/Manifest]) - (putNextEntry [java/util/zip/ZipEntry] "try" void)]) + "[1]::[0]" + (new [java/io/OutputStream java/util/jar/Manifest]) + (putNextEntry [java/util/zip/ZipEntry] "try" void)) (import: java/io/ByteArrayInputStream - ["[1]::[0]" - (new [[byte]])]) + "[1]::[0]" + (new [[byte]])) (import: java/io/InputStream - ["[1]::[0]" - (read [[byte] int int] int)]) + "[1]::[0]" + (read [[byte] int int] int)) (import: java/util/jar/JarInputStream - ["[1]::[0]" - (new [java/io/InputStream]) - (getNextJarEntry [] "try" "?" java/util/jar/JarEntry)]) + "[1]::[0]" + (new [java/io/InputStream]) + (getNextJarEntry [] "try" "?" java/util/jar/JarEntry)) (def: byte 1) diff --git a/stdlib/source/library/lux/world/console.lux b/stdlib/source/library/lux/world/console.lux index b8f3f6cbc..5f0fef818 100644 --- a/stdlib/source/library/lux/world/console.lux +++ b/stdlib/source/library/lux/world/console.lux @@ -42,25 +42,26 @@ (exception: .public cannot_close) -(with_expansions [<jvm> (as_is (import: java/lang/String) +(with_expansions [<jvm> (as_is (import: java/lang/String + "[1]::[0]") (import: java/io/Console - ["[1]::[0]" - (readLine [] "io" "try" java/lang/String)]) + "[1]::[0]" + (readLine [] "io" "try" java/lang/String)) (import: java/io/InputStream - ["[1]::[0]" - (read [] "io" "try" int)]) + "[1]::[0]" + (read [] "io" "try" int)) (import: java/io/PrintStream - ["[1]::[0]" - (print [java/lang/String] "io" "try" void)]) + "[1]::[0]" + (print [java/lang/String] "io" "try" void)) (import: java/lang/System - ["[1]::[0]" - ("static" console [] "io" "?" java/io/Console) - ("static" in java/io/InputStream) - ("static" out java/io/PrintStream)]) + "[1]::[0]" + ("static" console [] "io" "?" java/io/Console) + ("static" in java/io/InputStream) + ("static" out java/io/PrintStream)) (exception: .public cannot_open) diff --git a/stdlib/source/library/lux/world/file.lux b/stdlib/source/library/lux/world/file.lux index 63fa2e88b..e3f87b053 100644 --- a/stdlib/source/library/lux/world/file.lux +++ b/stdlib/source/library/lux/world/file.lux @@ -157,47 +157,48 @@ [cannot_find_directory] ) -(with_expansions [<for_jvm> (as_is (ffi.import: java/lang/String) +(with_expansions [<for_jvm> (as_is (ffi.import: java/lang/String + "[1]::[0]") (`` (ffi.import: java/io/File - ["[1]::[0]" - (new [java/lang/String]) - (~~ (template [<name>] - [(<name> [] "io" "try" boolean)] - - [createNewFile] [mkdir] - [delete] - [isFile] [isDirectory] - [canRead] [canWrite] [canExecute])) - - (length [] "io" "try" long) - (listFiles [] "io" "try" "?" [java/io/File]) - (getAbsolutePath [] "io" "try" java/lang/String) - (renameTo [java/io/File] "io" "try" boolean) - (lastModified [] "io" "try" long) - (setLastModified [long] "io" "try" boolean) - ("static" separator java/lang/String)])) + "[1]::[0]" + (new [java/lang/String]) + (~~ (template [<name>] + [(<name> [] "io" "try" boolean)] + + [createNewFile] [mkdir] + [delete] + [isFile] [isDirectory] + [canRead] [canWrite] [canExecute])) + + (length [] "io" "try" long) + (listFiles [] "io" "try" "?" [java/io/File]) + (getAbsolutePath [] "io" "try" java/lang/String) + (renameTo [java/io/File] "io" "try" boolean) + (lastModified [] "io" "try" long) + (setLastModified [long] "io" "try" boolean) + ("static" separator java/lang/String))) (ffi.import: java/lang/AutoCloseable - ["[1]::[0]" - (close [] "io" "try" void)]) + "[1]::[0]" + (close [] "io" "try" void)) (ffi.import: java/io/OutputStream - ["[1]::[0]" - (write [[byte]] "io" "try" void) - (flush [] "io" "try" void)]) + "[1]::[0]" + (write [[byte]] "io" "try" void) + (flush [] "io" "try" void)) (ffi.import: java/io/FileOutputStream - ["[1]::[0]" - (new [java/io/File boolean] "io" "try")]) + "[1]::[0]" + (new [java/io/File boolean] "io" "try")) (ffi.import: java/io/InputStream - ["[1]::[0]" - (read [[byte]] "io" "try" int)]) + "[1]::[0]" + (read [[byte]] "io" "try" int)) (ffi.import: java/io/FileInputStream - ["[1]::[0]" - (new [java/io/File] "io" "try")]) + "[1]::[0]" + (new [java/io/File] "io" "try")) (`` (implementation: .public default (System IO) diff --git a/stdlib/source/library/lux/world/file/watch.lux b/stdlib/source/library/lux/world/file/watch.lux index a5828f116..65a75d232 100644 --- a/stdlib/source/library/lux/world/file/watch.lux +++ b/stdlib/source/library/lux/world/file/watch.lux @@ -262,14 +262,16 @@ [fs (..polling fs)])) -(with_expansions [<jvm> (as_is (import: java/lang/Object) +(with_expansions [<jvm> (as_is (import: java/lang/Object + "[1]::[0]") - (import: java/lang/String) + (import: java/lang/String + "[1]::[0]") (import: (java/util/List a) - ["[1]::[0]" - (size [] int) - (get [int] a)]) + "[1]::[0]" + (size [] int) + (get [int] a)) (def: (default_list list) (All (_ a) (-> (java/util/List a) (List a))) @@ -282,24 +284,26 @@ output}) output)))) - (import: (java/nio/file/WatchEvent$Kind a)) + (import: (java/nio/file/WatchEvent$Kind a) + "[1]::[0]") (import: (java/nio/file/WatchEvent a) - ["[1]::[0]" - (kind [] (java/nio/file/WatchEvent$Kind a))]) + "[1]::[0]" + (kind [] (java/nio/file/WatchEvent$Kind a))) - (import: java/nio/file/Watchable) + (import: java/nio/file/Watchable + "[1]::[0]") (import: java/nio/file/Path - ["[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)]) + "[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)) (import: java/nio/file/StandardWatchEventKinds - ["[1]::[0]" - ("static" ENTRY_CREATE (java/nio/file/WatchEvent$Kind java/nio/file/Path)) - ("static" ENTRY_MODIFY (java/nio/file/WatchEvent$Kind java/nio/file/Path)) - ("static" ENTRY_DELETE (java/nio/file/WatchEvent$Kind java/nio/file/Path))]) + "[1]::[0]" + ("static" ENTRY_CREATE (java/nio/file/WatchEvent$Kind java/nio/file/Path)) + ("static" ENTRY_MODIFY (java/nio/file/WatchEvent$Kind java/nio/file/Path)) + ("static" ENTRY_DELETE (java/nio/file/WatchEvent$Kind java/nio/file/Path))) (def: (default_event_concern event) (All (_ a) @@ -323,11 +327,11 @@ ))) (import: java/nio/file/WatchKey - ["[1]::[0]" - (reset [] "io" boolean) - (cancel [] "io" void) - (watchable [] java/nio/file/Watchable) - (pollEvents [] "io" (java/util/List (java/nio/file/WatchEvent ?)))]) + "[1]::[0]" + (reset [] "io" boolean) + (cancel [] "io" void) + (watchable [] java/nio/file/Watchable) + (pollEvents [] "io" (java/util/List (java/nio/file/WatchEvent ?)))) (def: default_key_concern (-> java/nio/file/WatchKey (IO Concern)) @@ -337,21 +341,21 @@ (list#mix ..also ..none))))) (import: java/nio/file/WatchService - ["[1]::[0]" - (poll [] "io" "try" "?" java/nio/file/WatchKey)]) + "[1]::[0]" + (poll [] "io" "try" "?" java/nio/file/WatchKey)) (import: java/nio/file/FileSystem - ["[1]::[0]" - (newWatchService [] "io" "try" java/nio/file/WatchService)]) + "[1]::[0]" + (newWatchService [] "io" "try" java/nio/file/WatchService)) (import: java/nio/file/FileSystems - ["[1]::[0]" - ("static" getDefault [] java/nio/file/FileSystem)]) + "[1]::[0]" + ("static" getDefault [] java/nio/file/FileSystem)) (import: java/io/File - ["[1]::[0]" - (new [java/lang/String]) - (toPath [] java/nio/file/Path)]) + "[1]::[0]" + (new [java/lang/String]) + (toPath [] java/nio/file/Path)) (type: Watch_Event (java/nio/file/WatchEvent$Kind java/lang/Object)) diff --git a/stdlib/source/library/lux/world/net/http/client.lux b/stdlib/source/library/lux/world/net/http/client.lux index 9ce51d32a..973ad7ca2 100644 --- a/stdlib/source/library/lux/world/net/http/client.lux +++ b/stdlib/source/library/lux/world/net/http/client.lux @@ -69,42 +69,44 @@ (-> Binary [Nat Binary]) [(binary.size data) data]) -(with_expansions [<jvm> (as_is (ffi.import: java/lang/String) +(with_expansions [<jvm> (as_is (ffi.import: java/lang/String + "[1]::[0]") (ffi.import: java/lang/AutoCloseable - ["[1]::[0]" - (close [] "io" "try" void)]) + "[1]::[0]" + (close [] "io" "try" void)) - (ffi.import: java/io/InputStream) + (ffi.import: java/io/InputStream + "[1]::[0]") (ffi.import: java/io/OutputStream - ["[1]::[0]" - (flush [] "io" "try" void) - (write [[byte]] "io" "try" void)]) + "[1]::[0]" + (flush [] "io" "try" void) + (write [[byte]] "io" "try" void)) (ffi.import: java/net/URLConnection - ["[1]::[0]" - (setDoOutput [boolean] "io" "try" void) - (setRequestProperty [java/lang/String java/lang/String] "io" "try" void) - (getInputStream [] "io" "try" java/io/InputStream) - (getOutputStream [] "io" "try" java/io/OutputStream) - (getHeaderFieldKey [int] "io" "try" "?" java/lang/String) - (getHeaderField [int] "io" "try" "?" java/lang/String)]) + "[1]::[0]" + (setDoOutput [boolean] "io" "try" void) + (setRequestProperty [java/lang/String java/lang/String] "io" "try" void) + (getInputStream [] "io" "try" java/io/InputStream) + (getOutputStream [] "io" "try" java/io/OutputStream) + (getHeaderFieldKey [int] "io" "try" "?" java/lang/String) + (getHeaderField [int] "io" "try" "?" java/lang/String)) (ffi.import: java/net/HttpURLConnection - ["[1]::[0]" - (setRequestMethod [java/lang/String] "io" "try" void) - (getResponseCode [] "io" "try" int)]) + "[1]::[0]" + (setRequestMethod [java/lang/String] "io" "try" void) + (getResponseCode [] "io" "try" int)) (ffi.import: java/net/URL - ["[1]::[0]" - (new [java/lang/String]) - (openConnection [] "io" "try" java/net/URLConnection)]) + "[1]::[0]" + (new [java/lang/String]) + (openConnection [] "io" "try" java/net/URLConnection)) (ffi.import: java/io/BufferedInputStream - ["[1]::[0]" - (new [java/io/InputStream]) - (read [[byte] int int] "io" "try" int)]) + "[1]::[0]" + (new [java/io/InputStream]) + (read [[byte] int int] "io" "try" int)) (def: jvm_method (-> //.Method Text) diff --git a/stdlib/source/library/lux/world/program.lux b/stdlib/source/library/lux/world/program.lux index c3870d14d..3da3c779f 100644 --- a/stdlib/source/library/lux/world/program.lux +++ b/stdlib/source/library/lux/world/program.lux @@ -115,27 +115,28 @@ ... Do not trust the values of environment variables ... https://wiki.sei.cmu.edu/confluence/display/java/ENV02-J.+Do+not+trust+the+values+of+environment+variables -(with_expansions [<jvm> (as_is (import: java/lang/String) +(with_expansions [<jvm> (as_is (import: java/lang/String + "[1]::[0]") (import: (java/util/Iterator a) - ["[1]::[0]" - (hasNext [] boolean) - (next [] a)]) + "[1]::[0]" + (hasNext [] boolean) + (next [] a)) (import: (java/util/Set a) - ["[1]::[0]" - (iterator [] (java/util/Iterator a))]) + "[1]::[0]" + (iterator [] (java/util/Iterator a))) (import: (java/util/Map k v) - ["[1]::[0]" - (keySet [] (java/util/Set k))]) + "[1]::[0]" + (keySet [] (java/util/Set k))) (import: java/lang/System - ["[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)]) + "[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)) (def: (jvm##consume iterator) (All (_ a) (-> (java/util/Iterator a) (List a))) diff --git a/stdlib/source/library/lux/world/shell.lux b/stdlib/source/library/lux/world/shell.lux index 154fb6290..d77f1aa2f 100644 --- a/stdlib/source/library/lux/world/shell.lux +++ b/stdlib/source/library/lux/world/shell.lux @@ -171,8 +171,8 @@ (..policy safe_command safe_argument))) (with_expansions [<jvm> (as_is (import: java/lang/String - ["[1]::[0]" - (toLowerCase [] java/lang/String)]) + "[1]::[0]" + (toLowerCase [] java/lang/String)) (def: (jvm::arguments_array arguments) (-> (List Argument) (Array java/lang/String)) @@ -185,8 +185,8 @@ arguments))) (import: (java/util/Map k v) - ["[1]::[0]" - (put [k v] v)]) + "[1]::[0]" + (put [k v] v)) (def: (jvm::load_environment input target) (-> Environment @@ -202,31 +202,32 @@ (dictionary.entries input))) (import: java/io/Reader - ["[1]::[0]" - (read [] "io" "try" int)]) + "[1]::[0]" + (read [] "io" "try" int)) (import: java/io/BufferedReader - ["[1]::[0]" - (new [java/io/Reader]) - (readLine [] "io" "try" "?" java/lang/String)]) + "[1]::[0]" + (new [java/io/Reader]) + (readLine [] "io" "try" "?" java/lang/String)) - (import: java/io/InputStream) + (import: java/io/InputStream + "[1]::[0]") (import: java/io/InputStreamReader - ["[1]::[0]" - (new [java/io/InputStream])]) + "[1]::[0]" + (new [java/io/InputStream])) (import: java/io/OutputStream - ["[1]::[0]" - (write [[byte]] "io" "try" void)]) + "[1]::[0]" + (write [[byte]] "io" "try" void)) (import: java/lang/Process - ["[1]::[0]" - (getInputStream [] "io" "try" java/io/InputStream) - (getErrorStream [] "io" "try" java/io/InputStream) - (getOutputStream [] "io" "try" java/io/OutputStream) - (destroy [] "io" "try" void) - (waitFor [] "io" "try" int)]) + "[1]::[0]" + (getInputStream [] "io" "try" java/io/InputStream) + (getErrorStream [] "io" "try" java/io/InputStream) + (getOutputStream [] "io" "try" java/io/OutputStream) + (destroy [] "io" "try" void) + (waitFor [] "io" "try" int)) (exception: .public no_more_output) @@ -269,19 +270,19 @@ )))))))) (import: java/io/File - ["[1]::[0]" - (new [java/lang/String])]) + "[1]::[0]" + (new [java/lang/String])) (import: java/lang/ProcessBuilder - ["[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)]) + "[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)) (import: java/lang/System - ["[1]::[0]" - ("static" getProperty [java/lang/String] "io" "try" java/lang/String)]) + "[1]::[0]" + ("static" getProperty [java/lang/String] "io" "try" java/lang/String)) ... https://en.wikipedia.org/wiki/Code_injection#Shell_injection (def: windows? diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux index a0cd97fd9..ecbcb703f 100644 --- a/stdlib/source/program/aedifex/command/build.lux +++ b/stdlib/source/program/aedifex/command/build.lux @@ -236,8 +236,8 @@ ) (import: java/lang/System - ["[1]::[0]" - ("static" getProperty [java/lang/String] "io" "try" java/lang/String)]) + "[1]::[0]" + ("static" getProperty [java/lang/String] "io" "try" java/lang/String)) (def: windows? Bit diff --git a/stdlib/source/program/aedifex/dependency/resolution.lux b/stdlib/source/program/aedifex/dependency/resolution.lux index 1fcc77dd7..2100c1ca1 100644 --- a/stdlib/source/program/aedifex/dependency/resolution.lux +++ b/stdlib/source/program/aedifex/dependency/resolution.lux @@ -72,8 +72,8 @@ ) (import: java/lang/String - ["[1]::[0]" - (trim [] java/lang/String)]) + "[1]::[0]" + (trim [] java/lang/String)) (def: (verified_hash library repository version_template artifact extension hash codec exception) (All (_ h) diff --git a/stdlib/source/program/aedifex/hash.lux b/stdlib/source/program/aedifex/hash.lux index 30b0cdcee..23421b264 100644 --- a/stdlib/source/program/aedifex/hash.lux +++ b/stdlib/source/program/aedifex/hash.lux @@ -24,12 +24,13 @@ ... TODO: Replace with pure-Lux implementations of these algorithms ... https://en.wikipedia.org/wiki/SHA-1#SHA-1_pseudocode ... https://en.wikipedia.org/wiki/MD5#Algorithm -(import: java/lang/String) +(import: java/lang/String + "[1]::[0]") (import: java/security/MessageDigest - ["[1]::[0]" - ("static" getInstance [java/lang/String] java/security/MessageDigest) - (digest [[byte]] [byte])]) + "[1]::[0]" + ("static" getInstance [java/lang/String] java/security/MessageDigest) + (digest [[byte]] [byte])) (abstract: .public SHA-1 Any) (abstract: .public MD5 Any) diff --git a/stdlib/source/program/aedifex/repository/identity.lux b/stdlib/source/program/aedifex/repository/identity.lux index 8288f2d74..6ab4e380d 100644 --- a/stdlib/source/program/aedifex/repository/identity.lux +++ b/stdlib/source/program/aedifex/repository/identity.lux @@ -30,12 +30,12 @@ )) (import: java/util/Base64$Encoder - ["[1]::[0]" - (encodeToString [[byte]] java/lang/String)]) + "[1]::[0]" + (encodeToString [[byte]] java/lang/String)) (import: java/util/Base64 - ["[1]::[0]" - ("static" getEncoder [] java/util/Base64$Encoder)]) + "[1]::[0]" + ("static" getEncoder [] java/util/Base64$Encoder)) (def: .public (basic_auth user password) (-> User Password Text) diff --git a/stdlib/source/test/lux/ffi.jvm.lux b/stdlib/source/test/lux/ffi.jvm.lux index a7d5c88bb..74107be7d 100644 --- a/stdlib/source/test/lux/ffi.jvm.lux +++ b/stdlib/source/test/lux/ffi.jvm.lux @@ -39,16 +39,21 @@ ["$[0]" / "_" ["[1][0]" export]]) -(/.import: java/lang/Boolean) -(/.import: java/lang/Long) +(/.import: java/lang/Boolean + "[1]::[0]") -(/.import: java/lang/String) +(/.import: java/lang/Long + "[1]::[0]") -(/.import: java/lang/Object) +(/.import: java/lang/String + "[1]::[0]") + +(/.import: java/lang/Object + "[1]::[0]") (/.import: (java/lang/Class a) - ["[1]::[0]" - (getName [] java/lang/String)]) + "[1]::[0]" + (getName [] java/lang/String)) (template [<name> <type> <conversion> <lux> <=>] [(def: (<name> left right) @@ -257,36 +262,36 @@ ([] actual0 [] java/lang/Long)) (/.import: test/TestInterface0 - ["[1]::[0]" - (actual0 [] java/lang/Long)]) + "[1]::[0]" + (actual0 [] java/lang/Long)) (/.interface: test/TestInterface1 ([] actual1 [java/lang/Boolean] java/lang/Long "throws" [java/lang/Throwable])) (/.import: test/TestInterface1 - ["[1]::[0]" - (actual1 [java/lang/Boolean] "try" java/lang/Long)]) + "[1]::[0]" + (actual1 [java/lang/Boolean] "try" java/lang/Long)) (/.interface: test/TestInterface2 ([a] actual2 [a] a)) (/.import: test/TestInterface2 - ["[1]::[0]" - ([a] actual2 [a] a)]) + "[1]::[0]" + ([a] actual2 [a] a)) (/.interface: (test/TestInterface3 a) ([] actual3 [] a)) (/.import: (test/TestInterface3 a) - ["[1]::[0]" - (actual3 [] a)]) + "[1]::[0]" + (actual3 [] a)) (/.interface: test/TestInterface4 ([] actual4 [long long] long)) (/.import: test/TestInterface4 - ["[1]::[0]" - (actual4 [long long] long)]) + "[1]::[0]" + (actual4 [long long] long)) (def: for_interface Test @@ -379,8 +384,8 @@ ::value)) (/.import: test/TestClass0 - ["[1]::[0]" - (new [java/lang/Long])]) + "[1]::[0]" + (new [java/lang/Long])) (/.class: "final" test/TestClass1 [test/TestInterface1] ... Fields @@ -397,8 +402,8 @@ ::value))) (/.import: test/TestClass1 - ["[1]::[0]" - (new [java/lang/Long])]) + "[1]::[0]" + (new [java/lang/Long])) (/.class: "final" test/TestClass2 [test/TestInterface2] ... Constructors @@ -411,8 +416,8 @@ input)) (/.import: test/TestClass2 - ["[1]::[0]" - (new [])]) + "[1]::[0]" + (new [])) (/.class: "final" (test/TestClass3 a) [(test/TestInterface3 a)] ... Fields @@ -427,8 +432,8 @@ ::value)) (/.import: (test/TestClass3 a) - ["[1]::[0]" - (new [a])]) + "[1]::[0]" + (new [a])) (/.class: "final" test/TestClass4 [] ... Constructors @@ -439,9 +444,9 @@ value)) (/.import: test/TestClass4 - ["[1]::[0]" - (new []) - (actual4 [java/lang/Long] java/lang/Long)]) + "[1]::[0]" + (new []) + (actual4 [java/lang/Long] java/lang/Long)) (/.class: "final" test/TestClass5 [] ... Constructors @@ -453,8 +458,8 @@ value)) (/.import: test/TestClass5 - ["[1]::[0]" - ("static" actual5 [java/lang/Long] java/lang/Long)]) + "[1]::[0]" + ("static" actual5 [java/lang/Long] java/lang/Long)) (/.class: "abstract" test/TestClass6 [] ... Constructors @@ -465,8 +470,8 @@ java/lang/Long)) (/.import: test/TestClass6 - ["[1]::[0]" - (actual6 [java/lang/Long] java/lang/Long)]) + "[1]::[0]" + (actual6 [java/lang/Long] java/lang/Long)) (/.class: "final" test/TestClass7 test/TestClass6 [] ... Constructors @@ -479,8 +484,8 @@ input)) (/.import: test/TestClass7 - ["[1]::[0]" - (new [])]) + "[1]::[0]" + (new [])) (/.class: "final" test/TestClass8 [test/TestInterface4] ... Constructors @@ -496,8 +501,8 @@ (/.of_long actual_right))))) (/.import: test/TestClass8 - ["[1]::[0]" - (new [])]) + "[1]::[0]" + (new [])) (/.class: "final" (test/TestClass9 a) [] ... Fields @@ -512,10 +517,10 @@ ::value9)) (/.import: (test/TestClass9 a) - ["[1]::[0]" - (new [a]) - (set_actual9 [a] void) - (get_actual9 [] a)]) + "[1]::[0]" + (new [a]) + (set_actual9 [a] void) + (get_actual9 [] a)) (def: for_class Test @@ -632,11 +637,11 @@ (not (expands? (/.import: <class>))))) (_.cover [/.class_name_cannot_be_a_type_variable] (and (not (expands? (/.import: (java/lang/Double a) - ["[1]::[0]" - (invalid [] (a java/lang/String))]))) + "[1]::[0]" + (invalid [] (a java/lang/String))))) (not (expands? (/.import: java/lang/Double - ["[1]::[0]" - ([a] invalid [] (a java/lang/String))]))))) + "[1]::[0]" + ([a] invalid [] (a java/lang/String))))))) (_.cover [/.unknown_type_variable] (let [type_variable ((debug.private /.type_variable) (list (jvm.var var/0) (jvm.var var/1)))] (and (|> (list (code.local_symbol var/0)) diff --git a/stdlib/source/test/lux/ffi.old.lux b/stdlib/source/test/lux/ffi.old.lux index fc503636a..1a9db190f 100644 --- a/stdlib/source/test/lux/ffi.old.lux +++ b/stdlib/source/test/lux/ffi.old.lux @@ -1,37 +1,40 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [equivalence {"+" Equivalence}] - [monad {"+" do}]] - [control - [pipe {"+" case>}]] - [data - ["[0]" text ("[1]#[0]" equivalence) - ["%" format {"+" format}]]] - [macro - ["[0]" template]] - [math - ["[0]" random] - [number - ["n" nat] - ["i" int] - ["f" frac]]] - ["[0]" type ("[1]#[0]" equivalence)]]] - [\\library - ["[0]" /]]) - -(/.import: java/lang/Object) -(/.import: java/lang/String) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [equivalence {"+" Equivalence}] + [monad {"+" do}]] + [control + [pipe {"+" case>}]] + [data + ["[0]" text ("[1]#[0]" equivalence) + ["%" format {"+" format}]]] + [macro + ["[0]" template]] + [math + ["[0]" random] + [number + ["n" nat] + ["i" int] + ["f" frac]]] + ["[0]" type ("[1]#[0]" equivalence)]]] + [\\library + ["[0]" /]]) + +(/.import: java/lang/Object + "[1]::[0]") + +(/.import: java/lang/String + "[1]::[0]") (/.import: java/lang/Exception - ["[1]::[0]" - (new [java/lang/String])]) + "[1]::[0]" + (new [java/lang/String])) (/.import: (java/lang/Class a) - ["[1]::[0]" - (getName [] java/lang/String)]) + "[1]::[0]" + (getName [] java/lang/String)) (/.class: "final" (TestClass A) [] ... Fields @@ -51,11 +54,11 @@ (:= ::counter (i.- ::increase ::counter)))) (/.import: (test/lux/ffi/TestClass a) - ["[1]::[0]" - (new [java/lang/Long java/lang/Long]) - (currentC [] java/lang/Long) - (upC [] void) - (downC [] void)]) + "[1]::[0]" + (new [java/lang/Long java/lang/Long]) + (currentC [] java/lang/Long) + (upC [] void) + (downC [] void)) (/.interface: TestInterface ([] current [] java/lang/Long "throws" [java/lang/Exception]) @@ -63,10 +66,10 @@ ([] down [] test/lux/ffi/TestInterface "throws" [java/lang/Exception])) (/.import: test/lux/ffi/TestInterface - ["[1]::[0]" - (current [] java/lang/Long) - (up [] java/lang/Long) - (down [] java/lang/Long)]) + "[1]::[0]" + (current [] java/lang/Long) + (up [] java/lang/Long) + (down [] java/lang/Long)) (def: (test_object increase counter) (-> Int Int test/lux/ffi/TestInterface) diff --git a/stdlib/source/test/lux/ffi/export.jvm.lux b/stdlib/source/test/lux/ffi/export.jvm.lux index 24ef68929..cde493f1f 100644 --- a/stdlib/source/test/lux/ffi/export.jvm.lux +++ b/stdlib/source/test/lux/ffi/export.jvm.lux @@ -67,29 +67,29 @@ ))) (`` (`` (//.import: Primitives - ["[1]::[0]" - ("static" actual_boolean boolean) - ("static" actual_byte byte) - ("static" actual_short short) - ("static" actual_int int) - ("static" actual_long long) - ("static" actual_char char) - ("static" actual_float float) - ("static" actual_double double) - - (~~ (template [<type>] - [("static" (~~ (template.symbol [<type> "_method"])) [<type> <type>] <type>)] - - [boolean] - [byte] - [short] - [int] - [long] - [char] - [float] - [double] - )) - ]))) + "[1]::[0]" + ("static" actual_boolean boolean) + ("static" actual_byte byte) + ("static" actual_short short) + ("static" actual_int int) + ("static" actual_long long) + ("static" actual_char char) + ("static" actual_float float) + ("static" actual_double double) + + (~~ (template [<type>] + [("static" (~~ (template.symbol [<type> "_method"])) [<type> <type>] <type>)] + + [boolean] + [byte] + [short] + [int] + [long] + [char] + [float] + [double] + )) + ))) (/.export: Objects (actual_string java/lang/String ..expected_string) @@ -102,13 +102,13 @@ (([a] right [left a right a]) a right)) (//.import: Objects - ["[1]::[0]" - ("static" actual_string java/lang/String) + "[1]::[0]" + ("static" actual_string java/lang/String) - ("static" string_method [java/lang/String java/lang/String] java/lang/String) - - ("static" [a] left [a a] a) - ("static" [a] right [a a] a)]) + ("static" string_method [java/lang/String java/lang/String] java/lang/String) + + ("static" [a] left [a a] a) + ("static" [a] right [a a] a)) (def: tiny_int (Random Int) diff --git a/stdlib/source/test/lux/math/number/frac.lux b/stdlib/source/test/lux/math/number/frac.lux index c8b786701..f78b23afd 100644 --- a/stdlib/source/test/lux/math/number/frac.lux +++ b/stdlib/source/test/lux/math/number/frac.lux @@ -119,9 +119,9 @@ ))) (with_expansions [<jvm> (as_is (ffi.import: java/lang/Double - ["[1]::[0]" - ("static" doubleToRawLongBits [double] long) - ("static" longBitsToDouble [long] double)]))] + "[1]::[0]" + ("static" doubleToRawLongBits [double] long) + ("static" longBitsToDouble [long] double)))] (for @.old (as_is <jvm>) @.jvm (as_is <jvm>) (as_is))) diff --git a/stdlib/source/test/lux/target/jvm.lux b/stdlib/source/test/lux/target/jvm.lux index 562473fb0..5a919761c 100644 --- a/stdlib/source/test/lux/target/jvm.lux +++ b/stdlib/source/test/lux/target/jvm.lux @@ -59,30 +59,46 @@ /method.public /method.static)) -(import: java/lang/Boolean) -(import: java/lang/Byte) -(import: java/lang/Short) -(import: java/lang/Integer) -(import: java/lang/Long) -(import: java/lang/Float) +(import: java/lang/Boolean + "[1]::[0]") + +(import: java/lang/Byte + "[1]::[0]") + +(import: java/lang/Short + "[1]::[0]") + +(import: java/lang/Integer + "[1]::[0]") + +(import: java/lang/Long + "[1]::[0]") + +(import: java/lang/Float + "[1]::[0]") + (import: java/lang/Double - ["[1]::[0]" - ("static" compare [double double] int)]) -(import: java/lang/Character) -(import: java/lang/String) + "[1]::[0]" + ("static" compare [double double] int)) + +(import: java/lang/Character + "[1]::[0]") + +(import: java/lang/String + "[1]::[0]") (import: java/lang/reflect/Method - ["[1]::[0]" - (invoke [java/lang/Object [java/lang/Object]] "try" java/lang/Object)]) + "[1]::[0]" + (invoke [java/lang/Object [java/lang/Object]] "try" java/lang/Object)) (import: (java/lang/Class c) - ["[1]::[0]" - (getDeclaredMethod [java/lang/String [(java/lang/Class [? < java/lang/Object])]] java/lang/reflect/Method)]) + "[1]::[0]" + (getDeclaredMethod [java/lang/String [(java/lang/Class [? < java/lang/Object])]] java/lang/reflect/Method)) (import: java/lang/Object - ["[1]::[0]" - (getClass [] (java/lang/Class java/lang/Object)) - (toString [] java/lang/String)]) + "[1]::[0]" + (getClass [] (java/lang/Class java/lang/Object)) + (toString [] java/lang/String)) (def: class_name (Random Text) diff --git a/stdlib/source/unsafe/lux/data/binary.lux b/stdlib/source/unsafe/lux/data/binary.lux index e7936fd06..a36223c05 100644 --- a/stdlib/source/unsafe/lux/data/binary.lux +++ b/stdlib/source/unsafe/lux/data/binary.lux @@ -17,16 +17,17 @@ (with_expansions [<jvm> (as_is (type: .public Binary (ffi.type [byte])) - (ffi.import: java/lang/Object) + (ffi.import: java/lang/Object + "[1]::[0]") (ffi.import: java/lang/System - ["[1]::[0]" - ("static" arraycopy [java/lang/Object int java/lang/Object int int] void)]) + "[1]::[0]" + ("static" arraycopy [java/lang/Object int java/lang/Object int int] void)) (ffi.import: java/util/Arrays - ["[1]::[0]" - ("static" copyOfRange [[byte] int int] [byte]) - ("static" equals [[byte] [byte]] boolean)]))] + "[1]::[0]" + ("static" copyOfRange [[byte] int int] [byte]) + ("static" equals [[byte] [byte]] boolean)))] (for @.old (as_is <jvm>) @.jvm (as_is <jvm>) |