diff options
Diffstat (limited to 'stdlib/source/library')
32 files changed, 269 insertions, 283 deletions
diff --git a/stdlib/source/library/lux/control/concurrency/thread.lux b/stdlib/source/library/lux/control/concurrency/thread.lux index d618d7270..603b44da8 100644 --- a/stdlib/source/library/lux/control/concurrency/thread.lux +++ b/stdlib/source/library/lux/control/concurrency/thread.lux @@ -26,36 +26,36 @@ (ffi.import: java/lang/Runtime ["#::." - (#static getRuntime [] java/lang/Runtime) + ("static" getRuntime [] java/lang/Runtime) (availableProcessors [] int)]) (ffi.import: java/lang/Runnable) (ffi.import: java/util/concurrent/TimeUnit ["#::." - (#enum MILLISECONDS)]) + ("enum" MILLISECONDS)]) (ffi.import: java/util/concurrent/Executor ["#::." - (execute [java/lang/Runnable] #io void)]) + (execute [java/lang/Runnable] "io" void)]) (ffi.import: (java/util/concurrent/ScheduledFuture a)) (ffi.import: java/util/concurrent/ScheduledThreadPoolExecutor ["#::." (new [int]) - (schedule [java/lang/Runnable long java/util/concurrent/TimeUnit] #io (java/util/concurrent/ScheduledFuture java/lang/Object))]))] + (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>) @.js - (as_is (ffi.import: (setTimeout [ffi.Function ffi.Number] #io Any))) + (as_is (ffi.import: (setTimeout [ffi.Function ffi.Number] "io" Any))) @.python (ffi.import: threading/Timer ["#::." (new [ffi.Float ffi.Function]) - (start [] #io #? Any)])} + (start [] "io" "?" Any)])} ... Default (type: Thread diff --git a/stdlib/source/library/lux/data/binary.lux b/stdlib/source/library/lux/data/binary.lux index c87d157ea..c4dd05e8e 100644 --- a/stdlib/source/library/lux/data/binary.lux +++ b/stdlib/source/library/lux/data/binary.lux @@ -40,12 +40,12 @@ (ffi.import: java/lang/System ["#::." - (#static arraycopy [java/lang/Object int java/lang/Object int int] #try void)]) + ("static" arraycopy [java/lang/Object int java/lang/Object int int] "try" void)]) (ffi.import: java/util/Arrays ["#::." - (#static copyOfRange [[byte] int int] [byte]) - (#static equals [[byte] [byte]] boolean)]) + ("static" copyOfRange [[byte] int int] [byte]) + ("static" equals [[byte] [byte]] boolean)]) (def: byte_mask I64 diff --git a/stdlib/source/library/lux/data/text/buffer.lux b/stdlib/source/library/lux/data/text/buffer.lux index e23a11f63..ddbf123c6 100644 --- a/stdlib/source/library/lux/data/text/buffer.lux +++ b/stdlib/source/library/lux/data/text/buffer.lux @@ -42,7 +42,7 @@ (join [Text] Text)])) @.lua (as_is (import: (table/concat [(array.Array Text) Text] Text)) ...https://www.lua.org/manual/5.3/manual.html#pdf-table.concat - (import: (table/insert [(array.Array Text) Text] #? Nothing)) + (import: (table/insert [(array.Array Text) Text] "?" Nothing)) ... https://www.lua.org/manual/5.3/manual.html#pdf-table.insert )} (as_is)))) diff --git a/stdlib/source/library/lux/data/text/encoding/utf8.lux b/stdlib/source/library/lux/data/text/encoding/utf8.lux index e7d9b611c..dd0881732 100644 --- a/stdlib/source/library/lux/data/text/encoding/utf8.lux +++ b/stdlib/source/library/lux/data/text/encoding/utf8.lux @@ -24,8 +24,8 @@ ... On Node (ffi.import: Buffer ["#::." - (#static from #as from|encoded [ffi.String ffi.String] Buffer) - (#static from #as from|decoded [Uint8Array] Buffer) + ("static" from #as from|encoded [ffi.String ffi.String] Buffer) + ("static" from #as from|decoded [Uint8Array] Buffer) (toString [ffi.String] ffi.String)]) ... On the browser diff --git a/stdlib/source/library/lux/debug.lux b/stdlib/source/library/lux/debug.lux index c08076bcf..531bb7cd8 100644 --- a/stdlib/source/library/lux/debug.lux +++ b/stdlib/source/library/lux/debug.lux @@ -72,10 +72,10 @@ @.js (as_is (import: JSON ["#::." - (#static stringify [.Any] ffi.String)]) + ("static" stringify [.Any] ffi.String)]) (import: Array ["#::." - (#static isArray [.Any] ffi.Boolean)])) + ("static" isArray [.Any] ffi.Boolean)])) @.python (as_is (type: PyType @@ -90,7 +90,7 @@ (import: math ["#::." - (#static type [.Any] #? ffi.String)])) + ("static" type [.Any] "?" ffi.String)])) @.ruby (as_is (import: Class) diff --git a/stdlib/source/library/lux/ffi.js.lux b/stdlib/source/library/lux/ffi.js.lux index cb2fafe6f..247894177 100644 --- a/stdlib/source/library/lux/ffi.js.lux +++ b/stdlib/source/library/lux/ffi.js.lux @@ -53,7 +53,7 @@ (def: nullable (Parser Nullable) - (let [token (' #?)] + (let [token (' "?")] (<| (<>.and (<>.parses? (<code>.this! token))) (<>.after (<>.not (<code>.this! token))) <code>.any))) @@ -71,7 +71,7 @@ (def: static! (Parser Any) - (<code>.this! (' #static))) + (<code>.this! (' "static"))) (def: field (Parser Field) @@ -103,8 +103,8 @@ <code>.local_identifier (<>.maybe (<>.after (<code>.this! (' #as)) <code>.local_identifier)) (<code>.tuple (<>.some ..nullable)) - (<>.parses? (<code>.this! (' #io))) - (<>.parses? (<code>.this! (' #try))) + (<>.parses? (<code>.this! (' "io"))) + (<>.parses? (<code>.this! (' "try"))) ..nullable)) (def: static_method diff --git a/stdlib/source/library/lux/ffi.jvm.lux b/stdlib/source/library/lux/ffi.jvm.lux index d01286a1a..e50f12602 100644 --- a/stdlib/source/library/lux/ffi.jvm.lux +++ b/stdlib/source/library/lux/ffi.jvm.lux @@ -852,7 +852,7 @@ (<code>.form (do <>.monad [pm privacy_modifier^ strict_fp? (<>.parses? (<code>.this! (' #strict))) - _ (<code>.this! (' #static)) + _ (<code>.this! (' "static")) method_vars (<>.else (list) ..vars^) .let [total_vars method_vars] [name arguments] (<code>.form (<>.and <code>.local_identifier @@ -938,20 +938,20 @@ (def: import_member_return_flags^ (Parser [Bit Bit Bit]) ($_ <>.and - (<>.parses? (<code>.this! (' #io))) - (<>.parses? (<code>.this! (' #try))) - (<>.parses? (<code>.this! (' #?))))) + (<>.parses? (<code>.this! (' "io"))) + (<>.parses? (<code>.this! (' "try"))) + (<>.parses? (<code>.this! (' "?"))))) (def: primitive_mode^ (Parser Primitive_Mode) - (<>.or (<code>.tag! ["" "manual"]) - (<code>.tag! ["" "auto"]))) + (<>.or (<code>.this! (' "manual")) + (<code>.this! (' "auto")))) (def: (import_member_decl^ owner_vars) (-> (List (Type Var)) (Parser Import_Member_Declaration)) ($_ <>.either (<code>.form (do <>.monad - [_ (<code>.this! (' #enum)) + [_ (<code>.this! (' "enum")) enum_members (<>.some <code>.local_identifier)] (in (#EnumDecl enum_members)))) (<code>.form (do <>.monad @@ -974,7 +974,7 @@ )) (<code>.form (do <>.monad [kind (: (Parser ImportMethodKind) - (<>.or (<code>.tag! ["" "static"]) + (<>.or (<code>.this! (' "static")) (in []))) tvars (<>.else (list) ..vars^) name <code>.local_identifier @@ -995,11 +995,11 @@ {#import_method_name name #import_method_return return}])))) (<code>.form (do <>.monad - [static? (<>.parses? (<code>.this! (' #static))) + [static? (<>.parses? (<code>.this! (' "static"))) name <code>.local_identifier ?prim_mode (<>.maybe primitive_mode^) gtype (..type^ owner_vars) - maybe? (<>.parses? (<code>.this! (' #?))) + maybe? (<>.parses? (<code>.this! (' "?"))) setter? (<>.parses? (<code>.this! (' #!)))] (in (#FieldAccessDecl {#import_field_mode (maybe.else #AutoPrM ?prim_mode) #import_field_name name diff --git a/stdlib/source/library/lux/ffi.lua.lux b/stdlib/source/library/lux/ffi.lua.lux index d8bcfdb42..4d9fcf6a1 100644 --- a/stdlib/source/library/lux/ffi.lua.lux +++ b/stdlib/source/library/lux/ffi.lua.lux @@ -53,7 +53,7 @@ (def: nilable (Parser Nilable) - (let [token (' #?)] + (let [token (' "?")] (<| (<>.and (<>.parses? (<code>.this! token))) (<>.after (<>.not (<code>.this! token))) <code>.any))) @@ -63,7 +63,7 @@ (def: static! (Parser Any) - (<code>.this! (' #static))) + (<code>.this! (' "static"))) (def: field (Parser Field) @@ -102,8 +102,8 @@ <code>.local_identifier (<>.maybe (<>.after (<code>.this! (' #as)) <code>.local_identifier)) (<code>.tuple (<>.some ..nilable)) - (<>.parses? (<code>.this! (' #io))) - (<>.parses? (<code>.this! (' #try))) + (<>.parses? (<code>.this! (' "io"))) + (<>.parses? (<code>.this! (' "try"))) ..nilable)) (def: static_method @@ -220,7 +220,7 @@ (syntax: .public (import: [import ..import]) {#.doc (example "Easily import types, methods, functions and constants." - (import: (os/getenv [..String] #io #? ..String)))} + (import: (os/getenv [..String] "io" "?" ..String)))} (with_identifiers [g!temp] (case import (#Class [class format members]) diff --git a/stdlib/source/library/lux/ffi.old.lux b/stdlib/source/library/lux/ffi.old.lux index 016bce2b5..a6dd4c4bf 100644 --- a/stdlib/source/library/lux/ffi.old.lux +++ b/stdlib/source/library/lux/ffi.old.lux @@ -802,7 +802,7 @@ (<code>.form (do <>.monad [pm privacy_modifier^ strict_fp? (<>.parses? (<code>.this! (' #strict))) - _ (<code>.this! (' #static)) + _ (<code>.this! (' "static")) method_vars ..type_params^ .let [total_vars method_vars] [name arg_decls] (<code>.form (<>.and <code>.local_identifier @@ -882,22 +882,22 @@ (def: (import_member_args^ type_vars) (-> (List Type_Parameter) (Parser (List [Bit GenericType]))) - (<code>.tuple (<>.some (<>.and (<>.parses? (<code>.this! (' #?))) (..generic_type^ type_vars))))) + (<code>.tuple (<>.some (<>.and (<>.parses? (<code>.this! (' "?"))) (..generic_type^ type_vars))))) (def: import_member_return_flags^ (Parser [Bit Bit Bit]) - ($_ <>.and (<>.parses? (<code>.this! (' #io))) (<>.parses? (<code>.this! (' #try))) (<>.parses? (<code>.this! (' #?))))) + ($_ <>.and (<>.parses? (<code>.this! (' "io"))) (<>.parses? (<code>.this! (' "try"))) (<>.parses? (<code>.this! (' "?"))))) (def: primitive_mode^ (Parser Primitive_Mode) - (<>.or (<code>.this! (' #manual)) - (<code>.this! (' #auto)))) + (<>.or (<code>.this! (' "manual")) + (<code>.this! (' "auto")))) (def: (import_member_decl^ owner_vars) (-> (List Type_Parameter) (Parser Import_Member_Declaration)) ($_ <>.either (<code>.form (do <>.monad - [_ (<code>.this! (' #enum)) + [_ (<code>.this! (' "enum")) enum_members (<>.some <code>.local_identifier)] (in (#EnumDecl enum_members)))) (<code>.form (do <>.monad @@ -920,7 +920,7 @@ )) (<code>.form (do <>.monad [kind (: (Parser ImportMethodKind) - (<>.or (<code>.this! (' #static)) + (<>.or (<code>.this! (' "static")) (in []))) tvars ..type_params^ name <code>.local_identifier @@ -942,11 +942,11 @@ #import_method_return return }])))) (<code>.form (do <>.monad - [static? (<>.parses? (<code>.this! (' #static))) + [static? (<>.parses? (<code>.this! (' "static"))) name <code>.local_identifier ?prim_mode (<>.maybe primitive_mode^) gtype (..generic_type^ owner_vars) - maybe? (<>.parses? (<code>.this! (' #?))) + maybe? (<>.parses? (<code>.this! (' "?"))) setter? (<>.parses? (<code>.this! (' #!)))] (in (#FieldAccessDecl {#import_field_mode (maybe.else #AutoPrM ?prim_mode) #import_field_name name diff --git a/stdlib/source/library/lux/ffi.php.lux b/stdlib/source/library/lux/ffi.php.lux index c06124708..1e7f61563 100644 --- a/stdlib/source/library/lux/ffi.php.lux +++ b/stdlib/source/library/lux/ffi.php.lux @@ -50,7 +50,7 @@ (def: nullable (Parser Nullable) - (let [token (' #?)] + (let [token (' "?")] (<| (<>.and (<>.parses? (<code>.this! token))) (<>.after (<>.not (<code>.this! token))) <code>.any))) @@ -67,7 +67,7 @@ (def: static! (Parser Any) - (<code>.this! (' #static))) + (<code>.this! (' "static"))) (def: field (Parser Field) @@ -108,8 +108,8 @@ <code>.local_identifier (<>.maybe ..alias) (<code>.tuple (<>.some ..nullable)) - (<>.parses? (<code>.this! (' #io))) - (<>.parses? (<code>.this! (' #try))) + (<>.parses? (<code>.this! (' "io"))) + (<>.parses? (<code>.this! (' "try"))) ..nullable)) (def: static_method diff --git a/stdlib/source/library/lux/ffi.py.lux b/stdlib/source/library/lux/ffi.py.lux index bf455fc2e..b523ce1e4 100644 --- a/stdlib/source/library/lux/ffi.py.lux +++ b/stdlib/source/library/lux/ffi.py.lux @@ -53,7 +53,7 @@ (def: noneable (Parser Noneable) - (let [token (' #?)] + (let [token (' "?")] (<| (<>.and (<>.parses? (<code>.this! token))) (<>.after (<>.not (<code>.this! token))) <code>.any))) @@ -71,7 +71,7 @@ (def: static! (Parser Any) - (<code>.this! (' #static))) + (<code>.this! (' "static"))) (def: field (Parser Field) @@ -103,8 +103,8 @@ <code>.local_identifier (<>.maybe (<>.after (<code>.this! (' #as)) <code>.local_identifier)) (<code>.tuple (<>.some ..noneable)) - (<>.parses? (<code>.this! (' #io))) - (<>.parses? (<code>.this! (' #try))) + (<>.parses? (<code>.this! (' "io"))) + (<>.parses? (<code>.this! (' "try"))) ..noneable)) (def: static_method @@ -222,25 +222,25 @@ {#.doc (example "Easily import types, methods, functions and constants." (import: os ["#::." - (#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" 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))]) (import: os/path ["#::." - (#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)]))} + ("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)]))} (with_identifiers [g!temp] (case import (#Class [class format members]) diff --git a/stdlib/source/library/lux/ffi.rb.lux b/stdlib/source/library/lux/ffi.rb.lux index 3c1da5d57..62bafd5e5 100644 --- a/stdlib/source/library/lux/ffi.rb.lux +++ b/stdlib/source/library/lux/ffi.rb.lux @@ -52,7 +52,7 @@ (def: nilable (Parser Nilable) - (let [token (' #?)] + (let [token (' "?")] (<| (<>.and (<>.parses? (<code>.this! token))) (<>.after (<>.not (<code>.this! token))) <code>.any))) @@ -69,7 +69,7 @@ (def: static! (Parser Any) - (<code>.this! (' #static))) + (<code>.this! (' "static"))) (def: field (Parser Field) @@ -110,8 +110,8 @@ <code>.local_identifier (<>.maybe ..alias) (<code>.tuple (<>.some ..nilable)) - (<>.parses? (<code>.this! (' #io))) - (<>.parses? (<code>.this! (' #try))) + (<>.parses? (<code>.this! (' "io"))) + (<>.parses? (<code>.this! (' "try"))) ..nilable)) (def: static_method diff --git a/stdlib/source/library/lux/ffi.scm.lux b/stdlib/source/library/lux/ffi.scm.lux index f8f75f21e..58603cef7 100644 --- a/stdlib/source/library/lux/ffi.scm.lux +++ b/stdlib/source/library/lux/ffi.scm.lux @@ -50,7 +50,7 @@ (def: nilable (Parser Nilable) - (let [token (' #?)] + (let [token (' "?")] (<| (<>.and (<>.parses? (<code>.this! token))) (<>.after (<>.not (<code>.this! token))) <code>.any))) @@ -67,7 +67,7 @@ (def: static! (Parser Any) - (<code>.this! (' #static))) + (<code>.this! (' "static"))) (def: field (Parser Field) @@ -100,8 +100,8 @@ <code>.local_identifier (<>.maybe ..alias) (<code>.tuple (<>.some ..nilable)) - (<>.parses? (<code>.this! (' #io))) - (<>.parses? (<code>.this! (' #try))) + (<>.parses? (<code>.this! (' "io"))) + (<>.parses? (<code>.this! (' "try"))) ..nilable)) (def: input_variables diff --git a/stdlib/source/library/lux/math/infix.lux b/stdlib/source/library/lux/math/infix.lux index 207484719..fca3ed8ec 100644 --- a/stdlib/source/library/lux/math/infix.lux +++ b/stdlib/source/library/lux/math/infix.lux @@ -45,29 +45,15 @@ ..literal (<code>.form (<>.many <code>.any)) (<code>.tuple (<>.and <code>.any expression)) - (<code>.tuple ($_ <>.either - (do <>.monad - [_ (<code>.this! (' #and)) - init_subject expression - init_op <code>.any - init_param expression - steps (<>.some (<>.and <code>.any expression))] - (in (product.right (list\mix (function (_ [op param] [subject [_subject _op _param]]) - [param [(#Binary _subject _op _param) - (` and) - (#Binary subject op param)]]) - [init_param [init_subject init_op init_param]] - steps)))) - (do <>.monad - [init_subject expression - init_op <code>.any - init_param expression - steps (<>.some (<>.and <code>.any expression))] - (in (list\mix (function (_ [op param] [_subject _op _param]) - [(#Binary _subject _op _param) op param]) - [init_subject init_op init_param] - steps))) - )) + (<code>.tuple (do <>.monad + [init_subject expression + init_op <code>.any + init_param expression + steps (<>.some (<>.and <code>.any expression))] + (in (list\mix (function (_ [op param] [_subject _op _param]) + [(#Binary _subject _op _param) op param]) + [init_subject init_op init_param] + steps)))) ))) (def: (prefix infix) diff --git a/stdlib/source/library/lux/target/jvm/bytecode.lux b/stdlib/source/library/lux/target/jvm/bytecode.lux index 53886c7b5..e3c1fc9db 100644 --- a/stdlib/source/library/lux/target/jvm/bytecode.lux +++ b/stdlib/source/library/lux/target/jvm/bytecode.lux @@ -463,11 +463,11 @@ (import: java/lang/Float ["#::." - (#static floatToRawIntBits #manual [float] int)]) + ("static" floatToRawIntBits "manual" [float] int)]) (import: java/lang/Double ["#::." - (#static doubleToRawLongBits #manual [double] long)]) + ("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 0775af818..63eff794c 100644 --- a/stdlib/source/library/lux/target/jvm/constant.lux +++ b/stdlib/source/library/lux/target/jvm/constant.lux @@ -67,7 +67,7 @@ (import: java/lang/Float ["#::." - (#static floatToRawIntBits #manual [float] int)]) + ("static" floatToRawIntBits "manual" [float] int)]) (implementation: .public float_equivalence (Equivalence java/lang/Float) @@ -83,7 +83,7 @@ (import: java/lang/Double ["#::." - (#static doubleToRawLongBits [double] long)]) + ("static" doubleToRawLongBits [double] long)]) (abstract: .public (Value kind) {} diff --git a/stdlib/source/library/lux/target/jvm/loader.lux b/stdlib/source/library/lux/target/jvm/loader.lux index 3d644cf5d..796e8f0f8 100644 --- a/stdlib/source/library/lux/target/jvm/loader.lux +++ b/stdlib/source/library/lux/target/jvm/loader.lux @@ -43,7 +43,7 @@ (import: java/lang/reflect/Method ["#::." - (invoke [java/lang/Object [java/lang/Object]] #try java/lang/Object)]) + (invoke [java/lang/Object [java/lang/Object]] "try" java/lang/Object)]) (import: (java/lang/Class a) ["#::." @@ -51,7 +51,7 @@ (import: java/lang/Integer ["#::." - (#static TYPE (java/lang/Class java/lang/Integer))]) + ("static" TYPE (java/lang/Class java/lang/Integer))]) (import: java/lang/reflect/AccessibleObject ["#::." @@ -60,7 +60,7 @@ (import: java/lang/ClassLoader ["#::." (loadClass [java/lang/String] - #io #try (java/lang/Class java/lang/Object))]) + "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 55316e26f..dfb2ff5d1 100644 --- a/stdlib/source/library/lux/target/jvm/reflection.lux +++ b/stdlib/source/library/lux/target/jvm/reflection.lux @@ -62,10 +62,10 @@ (import: java/lang/reflect/Modifier ["#::." - (#static isStatic [int] boolean) - (#static isFinal [int] boolean) - (#static isInterface [int] boolean) - (#static isAbstract [int] boolean)]) + ("static" isStatic [int] boolean) + ("static" isFinal [int] boolean) + ("static" isInterface [int] boolean) + ("static" isAbstract [int] boolean)]) (import: java/lang/annotation/Annotation) @@ -100,14 +100,14 @@ (import: (java/lang/Class c) ["#::." - (#static forName [java/lang/String boolean java/lang/ClassLoader] #try (java/lang/Class java/lang/Object)) + ("static" forName [java/lang/String boolean java/lang/ClassLoader] "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) + (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])]) 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 30da17c13..05a6aa294 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 @@ -73,10 +73,10 @@ (import: java/lang/reflect/Modifier ["#::." - (#static isStatic [int] boolean) - (#static isFinal [int] boolean) - (#static isInterface [int] boolean) - (#static isAbstract [int] boolean)]) + ("static" isStatic [int] boolean) + ("static" isFinal [int] boolean) + ("static" isInterface [int] boolean) + ("static" isAbstract [int] boolean)]) (import: java/lang/annotation/Annotation) @@ -102,14 +102,14 @@ (import: (java/lang/Class c) ["#::." - (#static forName [java/lang/String] #try (java/lang/Class java/lang/Object)) + ("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) + (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])]) 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 832fce239..e3c07cd49 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 @@ -43,10 +43,10 @@ ) (import: java/lang/reflect/Field - (get [#? java/lang/Object] #try #? java/lang/Object)) + (get ["?" java/lang/Object] "try" "?" java/lang/Object)) (import: (java/lang/Class a) - (getField [java/lang/String] #try java/lang/reflect/Field)) + (getField [java/lang/String] "try" java/lang/reflect/Field)) (import: java/lang/Object (getClass [] (java/lang/Class java/lang/Object))) 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 7a5e65744..3a278c4d4 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 @@ -74,7 +74,7 @@ (_.invokestatic $Double "valueOf" (type.method [(list type.double) $Double (list)]))) (import: java/lang/Double - (#static doubleToRawLongBits #manual [double] int)) + ("static" doubleToRawLongBits "manual" [double] int)) (def: .public (f64 value) (-> Frac (Bytecode Any)) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/common.lux index e528b33a0..eb15a08a7 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/common.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/common.lux @@ -184,8 +184,8 @@ ... [[Numbers]] (host.import: java/lang/Double - (#static MIN_VALUE Double) - (#static MAX_VALUE Double)) + ("static" MIN_VALUE Double) + ("static" MAX_VALUE Double)) (template [<name> <const> <encode>] [(def: (<name> _) 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 832c6f8f6..37d9f7623 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux @@ -53,12 +53,12 @@ (import: java/util/jar/Attributes ["#::." - (put [java/lang/Object java/lang/Object] #? java/lang/Object)]) + (put [java/lang/Object java/lang/Object] "?" java/lang/Object)]) (import: java/util/jar/Attributes$Name ["#::." - (#static MAIN_CLASS java/util/jar/Attributes$Name) - (#static MANIFEST_VERSION java/util/jar/Attributes$Name)]) + ("static" MAIN_CLASS java/util/jar/Attributes$Name) + ("static" MANIFEST_VERSION java/util/jar/Attributes$Name)]) (import: java/util/jar/Manifest ["#::." @@ -100,7 +100,7 @@ (import: java/util/jar/JarOutputStream ["#::." (new [java/io/OutputStream java/util/jar/Manifest]) - (putNextEntry [java/util/zip/ZipEntry] #try void)]) + (putNextEntry [java/util/zip/ZipEntry] "try" void)]) (import: java/io/ByteArrayInputStream ["#::." @@ -113,7 +113,7 @@ (import: java/util/jar/JarInputStream ["#::." (new [java/io/InputStream]) - (getNextJarEntry [] #try #? java/util/jar/JarEntry)]) + (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 b3b9813ed..b34096ea5 100644 --- a/stdlib/source/library/lux/world/console.lux +++ b/stdlib/source/library/lux/world/console.lux @@ -43,21 +43,21 @@ (import: java/io/Console ["#::." - (readLine [] #io #try java/lang/String)]) + (readLine [] "io" "try" java/lang/String)]) (import: java/io/InputStream ["#::." - (read [] #io #try int)]) + (read [] "io" "try" int)]) (import: java/io/PrintStream ["#::." - (print [java/lang/String] #io #try void)]) + (print [java/lang/String] "io" "try" void)]) (import: java/lang/System ["#::." - (#static console [] #io #? java/io/Console) - (#static in java/io/InputStream) - (#static out java/io/PrintStream)]) + ("static" console [] "io" "?" java/io/Console) + ("static" in java/io/InputStream) + ("static" out java/io/PrintStream)]) (template [<name>] [(exception: .public (<name>) diff --git a/stdlib/source/library/lux/world/db/jdbc.lux b/stdlib/source/library/lux/world/db/jdbc.lux index 47701f3b0..67b8d5354 100644 --- a/stdlib/source/library/lux/world/db/jdbc.lux +++ b/stdlib/source/library/lux/world/db/jdbc.lux @@ -28,27 +28,27 @@ (import: java/lang/String) (import: java/sql/ResultSet - (getRow [] #try int) - (next [] #try boolean) - (close [] #io #try void)) + (getRow [] "try" int) + (next [] "try" boolean) + (close [] "io" "try" void)) (import: java/sql/Statement - (#static NO_GENERATED_KEYS int) - (#static RETURN_GENERATED_KEYS int) - (getGeneratedKeys [] #try java/sql/ResultSet) - (close [] #io #try void)) + ("static" NO_GENERATED_KEYS int) + ("static" RETURN_GENERATED_KEYS int) + (getGeneratedKeys [] "try" java/sql/ResultSet) + (close [] "io" "try" void)) (import: java/sql/PreparedStatement - (executeUpdate [] #io #try int) - (executeQuery [] #io #try java/sql/ResultSet)) + (executeUpdate [] "io" "try" int) + (executeQuery [] "io" "try" java/sql/ResultSet)) (import: java/sql/Connection - (prepareStatement [java/lang/String int] #try java/sql/PreparedStatement) - (isValid [int] #try boolean) - (close [] #io #try void)) + (prepareStatement [java/lang/String int] "try" java/sql/PreparedStatement) + (isValid [int] "try" boolean) + (close [] "io" "try" void)) (import: java/sql/DriverManager - (#static getConnection [java/lang/String java/lang/String java/lang/String] #io #try java/sql/Connection)) + ("static" getConnection [java/lang/String java/lang/String java/lang/String] "io" "try" java/sql/Connection)) (type: .public Credentials (Record diff --git a/stdlib/source/library/lux/world/db/jdbc/input.lux b/stdlib/source/library/lux/world/db/jdbc/input.lux index f108a2fbf..633663bcf 100644 --- a/stdlib/source/library/lux/world/db/jdbc/input.lux +++ b/stdlib/source/library/lux/world/db/jdbc/input.lux @@ -23,7 +23,7 @@ (`` (import: java/sql/PreparedStatement (~~ (template [<name> <type>] - [(<name> [int <type>] #try void)] + [(<name> [int <type>] "try" void)] [setBoolean boolean] diff --git a/stdlib/source/library/lux/world/db/jdbc/output.lux b/stdlib/source/library/lux/world/db/jdbc/output.lux index 59e30845c..dd3e19751 100644 --- a/stdlib/source/library/lux/world/db/jdbc/output.lux +++ b/stdlib/source/library/lux/world/db/jdbc/output.lux @@ -25,7 +25,7 @@ (`` (import: java/sql/ResultSet (~~ (template [<method_name> <return_class>] - [(<method_name> [int] #try <return_class>)] + [(<method_name> [int] "try" <return_class>)] [getBoolean boolean] @@ -44,8 +44,8 @@ [getTime java/sql/Time] [getTimestamp java/sql/Timestamp] )) - (next [] #try boolean) - (close [] #io #try void))) + (next [] "try" boolean) + (close [] "io" "try" void))) (type: .public (Output a) (-> [Nat java/sql/ResultSet] (Try [Nat a]))) diff --git a/stdlib/source/library/lux/world/file.lux b/stdlib/source/library/lux/world/file.lux index f80d00462..6e7a2e1ed 100644 --- a/stdlib/source/library/lux/world/file.lux +++ b/stdlib/source/library/lux/world/file.lux @@ -167,41 +167,41 @@ ["#::." (new [java/lang/String]) (~~ (template [<name>] - [(<name> [] #io #try boolean)] + [(<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)])) + (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 ["#::." - (close [] #io #try void)]) + (close [] "io" "try" void)]) (ffi.import: java/io/OutputStream ["#::." - (write [[byte]] #io #try void) - (flush [] #io #try void)]) + (write [[byte]] "io" "try" void) + (flush [] "io" "try" void)]) (ffi.import: java/io/FileOutputStream ["#::." - (new [java/io/File boolean] #io #try)]) + (new [java/io/File boolean] "io" "try")]) (ffi.import: java/io/InputStream ["#::." - (read [[byte]] #io #try int)]) + (read [[byte]] "io" "try" int)]) (ffi.import: java/io/FileInputStream ["#::." - (new [java/io/File] #io #try)]) + (new [java/io/File] "io" "try")]) (`` (implementation: .public default (System IO) @@ -302,7 +302,7 @@ @.js (as_is (ffi.import: Buffer ["#::." - (#static from [Binary] ..Buffer)]) + ("static" from [Binary] ..Buffer)]) (ffi.import: FileDescriptor) @@ -541,35 +541,35 @@ (ffi.import: PyFile ["#::." - (read [] #io #try Binary) - (write [Binary] #io #try #? Any) - (close [] #io #try #? Any)]) + (read [] "io" "try" Binary) + (write [Binary] "io" "try" "?" Any) + (close [] "io" "try" "?" Any)]) - (ffi.import: (open [ffi.String ffi.String] #io #try PyFile)) + (ffi.import: (open [ffi.String ffi.String] "io" "try" PyFile)) (ffi.import: (tuple [[ffi.Integer ffi.Integer]] (Tuple/2 ffi.Integer ffi.Integer))) (ffi.import: os ["#::." - (#static F_OK ffi.Integer) - (#static R_OK ffi.Integer) - (#static W_OK ffi.Integer) - (#static X_OK ffi.Integer) - - (#static mkdir [ffi.String] #io #try #? Any) - (#static access [ffi.String ffi.Integer] #io #try ffi.Boolean) - (#static remove [ffi.String] #io #try #? Any) - (#static rmdir [ffi.String] #io #try #? Any) - (#static rename [ffi.String ffi.String] #io #try #? Any) - (#static utime [ffi.String (Tuple/2 ffi.Integer ffi.Integer)] #io #try #? Any) - (#static listdir [ffi.String] #io #try (Array ffi.String))]) + ("static" F_OK ffi.Integer) + ("static" R_OK ffi.Integer) + ("static" W_OK ffi.Integer) + ("static" X_OK ffi.Integer) + + ("static" mkdir [ffi.String] "io" "try" "?" Any) + ("static" access [ffi.String ffi.Integer] "io" "try" ffi.Boolean) + ("static" remove [ffi.String] "io" "try" "?" Any) + ("static" rmdir [ffi.String] "io" "try" "?" Any) + ("static" rename [ffi.String ffi.String] "io" "try" "?" Any) + ("static" utime [ffi.String (Tuple/2 ffi.Integer ffi.Integer)] "io" "try" "?" Any) + ("static" listdir [ffi.String] "io" "try" (Array ffi.String))]) (ffi.import: os/path ["#::." - (#static isfile [ffi.String] #io #try ffi.Boolean) - (#static isdir [ffi.String] #io #try ffi.Boolean) - (#static sep ffi.String) - (#static getsize [ffi.String] #io #try ffi.Integer) - (#static getmtime [ffi.String] #io #try ffi.Float)]) + ("static" isfile [ffi.String] "io" "try" ffi.Boolean) + ("static" isdir [ffi.String] "io" "try" ffi.Boolean) + ("static" sep ffi.String) + ("static" getsize [ffi.String] "io" "try" ffi.Integer) + ("static" getmtime [ffi.String] "io" "try" ffi.Float)]) (def: python_separator (os/path::sep)) @@ -659,7 +659,7 @@ @.ruby (as_is (ffi.import: Time #as RubyTime ["#::." - (#static at [Frac] RubyTime) + ("static" at [Frac] RubyTime) (to_f [] Frac)]) (ffi.import: Stat #as RubyStat @@ -670,31 +670,31 @@ (ffi.import: File #as RubyFile ["#::." - (#static SEPARATOR ffi.String) - (#static open [Path ffi.String] #io #try RubyFile) - (#static stat [Path] #io #try RubyStat) - (#static delete [Path] #io #try Int) - (#static file? [Path] #io #try Bit) - (#static directory? [Path] #io #try Bit) - (#static utime [RubyTime RubyTime Path] #io #try Int) - - (read [] #io #try Binary) - (write [Binary] #io #try Int) - (flush [] #io #try #? Any) - (close [] #io #try #? Any)]) + ("static" SEPARATOR ffi.String) + ("static" open [Path ffi.String] "io" "try" RubyFile) + ("static" stat [Path] "io" "try" RubyStat) + ("static" delete [Path] "io" "try" Int) + ("static" file? [Path] "io" "try" Bit) + ("static" directory? [Path] "io" "try" Bit) + ("static" utime [RubyTime RubyTime Path] "io" "try" Int) + + (read [] "io" "try" Binary) + (write [Binary] "io" "try" Int) + (flush [] "io" "try" "?" Any) + (close [] "io" "try" "?" Any)]) (ffi.import: Dir #as RubyDir ["#::." - (#static open [Path] #io #try RubyDir) + ("static" open [Path] "io" "try" RubyDir) - (children [] #io #try (Array Path)) - (close [] #io #try #? Any)]) + (children [] "io" "try" (Array Path)) + (close [] "io" "try" "?" Any)]) (ffi.import: "fileutils" FileUtils #as RubyFileUtils ["#::." - (#static move [Path Path] #io #try #? Any) - (#static rmdir [Path] #io #try #? Any) - (#static mkdir [Path] #io #try #? Any)]) + ("static" move [Path Path] "io" "try" "?" Any) + ("static" rmdir [Path] "io" "try" "?" Any) + ("static" mkdir [Path] "io" "try" "?" Any)]) (def: ruby_separator Text @@ -812,26 +812,26 @@ ... (ffi.import: (unpack [ffi.String ffi.String] Binary)) ... ... https://www.php.net/manual/en/ref.filesystem.php ... ... https://www.php.net/manual/en/function.file-get-contents.php - ... (ffi.import: (file_get_contents [Path] #io #try ffi.String)) + ... (ffi.import: (file_get_contents [Path] "io" "try" ffi.String)) ... ... https://www.php.net/manual/en/function.file-put-contents.php - ... (ffi.import: (file_put_contents [Path ffi.String Int] #io #try ffi.Integer)) - ... (ffi.import: (filemtime [Path] #io #try ffi.Integer)) - ... (ffi.import: (filesize [Path] #io #try ffi.Integer)) - ... (ffi.import: (is_executable [Path] #io #try ffi.Boolean)) - ... (ffi.import: (touch [Path ffi.Integer] #io #try ffi.Boolean)) - ... (ffi.import: (rename [Path Path] #io #try ffi.Boolean)) - ... (ffi.import: (unlink [Path] #io #try ffi.Boolean)) + ... (ffi.import: (file_put_contents [Path ffi.String Int] "io" "try" ffi.Integer)) + ... (ffi.import: (filemtime [Path] "io" "try" ffi.Integer)) + ... (ffi.import: (filesize [Path] "io" "try" ffi.Integer)) + ... (ffi.import: (is_executable [Path] "io" "try" ffi.Boolean)) + ... (ffi.import: (touch [Path ffi.Integer] "io" "try" ffi.Boolean)) + ... (ffi.import: (rename [Path Path] "io" "try" ffi.Boolean)) + ... (ffi.import: (unlink [Path] "io" "try" ffi.Boolean)) ... ... https://www.php.net/manual/en/function.rmdir.php - ... (ffi.import: (rmdir [Path] #io #try ffi.Boolean)) + ... (ffi.import: (rmdir [Path] "io" "try" ffi.Boolean)) ... ... https://www.php.net/manual/en/function.scandir.php - ... (ffi.import: (scandir [Path] #io #try (Array Path))) + ... (ffi.import: (scandir [Path] "io" "try" (Array Path))) ... ... https://www.php.net/manual/en/function.is-file.php - ... (ffi.import: (is_file [Path] #io #try ffi.Boolean)) + ... (ffi.import: (is_file [Path] "io" "try" ffi.Boolean)) ... ... https://www.php.net/manual/en/function.is-dir.php - ... (ffi.import: (is_dir [Path] #io #try ffi.Boolean)) + ... (ffi.import: (is_dir [Path] "io" "try" ffi.Boolean)) ... ... https://www.php.net/manual/en/function.mkdir.php - ... (ffi.import: (mkdir [Path] #io #try ffi.Boolean)) + ... (ffi.import: (mkdir [Path] "io" "try" ffi.Boolean)) ... (def: byte_array_format "C*") ... (def: default_separator (..DIRECTORY_SEPARATOR)) diff --git a/stdlib/source/library/lux/world/file/watch.lux b/stdlib/source/library/lux/world/file/watch.lux index e5998a925..cb316fbd4 100644 --- a/stdlib/source/library/lux/world/file/watch.lux +++ b/stdlib/source/library/lux/world/file/watch.lux @@ -294,14 +294,14 @@ (import: java/nio/file/Path ["#::." - (register [java/nio/file/WatchService [(java/nio/file/WatchEvent$Kind [? < java/lang/Object])]] #io #try java/nio/file/WatchKey) + (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 ["#::." - (#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))]) + ("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) @@ -326,10 +326,10 @@ (import: java/nio/file/WatchKey ["#::." - (reset [] #io boolean) - (cancel [] #io void) + (reset [] "io" boolean) + (cancel [] "io" void) (watchable [] java/nio/file/Watchable) - (pollEvents [] #io (java/util/List (java/nio/file/WatchEvent ?)))]) + (pollEvents [] "io" (java/util/List (java/nio/file/WatchEvent ?)))]) (def: default_key_concern (-> java/nio/file/WatchKey (IO Concern)) @@ -340,15 +340,15 @@ (import: java/nio/file/WatchService ["#::." - (poll [] #io #try #? java/nio/file/WatchKey)]) + (poll [] "io" "try" "?" java/nio/file/WatchKey)]) (import: java/nio/file/FileSystem ["#::." - (newWatchService [] #io #try java/nio/file/WatchService)]) + (newWatchService [] "io" "try" java/nio/file/WatchService)]) (import: java/nio/file/FileSystems ["#::." - (#static getDefault [] java/nio/file/FileSystem)]) + ("static" getDefault [] java/nio/file/FileSystem)]) (import: java/io/File ["#::." diff --git a/stdlib/source/library/lux/world/net/http/client.lux b/stdlib/source/library/lux/world/net/http/client.lux index 72130914c..0292ab79b 100644 --- a/stdlib/source/library/lux/world/net/http/client.lux +++ b/stdlib/source/library/lux/world/net/http/client.lux @@ -73,38 +73,38 @@ (ffi.import: java/lang/AutoCloseable ["#::." - (close [] #io #try void)]) + (close [] "io" "try" void)]) (ffi.import: java/io/InputStream) (ffi.import: java/io/OutputStream ["#::." - (flush [] #io #try void) - (write [[byte]] #io #try void)]) + (flush [] "io" "try" void) + (write [[byte]] "io" "try" void)]) (ffi.import: java/net/URLConnection ["#::." - (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)]) + (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 ["#::." - (setRequestMethod [java/lang/String] #io #try void) - (getResponseCode [] #io #try int)]) + (setRequestMethod [java/lang/String] "io" "try" void) + (getResponseCode [] "io" "try" int)]) (ffi.import: java/net/URL ["#::." (new [java/lang/String]) - (openConnection [] #io #try java/net/URLConnection)]) + (openConnection [] "io" "try" java/net/URLConnection)]) (ffi.import: java/io/BufferedInputStream ["#::." (new [java/io/InputStream]) - (read [[byte] int int] #io #try int)]) + (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 98a642fcf..9b0733ec5 100644 --- a/stdlib/source/library/lux/world/program.lux +++ b/stdlib/source/library/lux/world/program.lux @@ -129,10 +129,10 @@ (import: java/lang/System ["#::." - (#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)]) + ("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))) @@ -149,8 +149,8 @@ (import: NodeJs_Process ["#::." - (exit [ffi.Number] #io Nothing) - (cwd [] #io Path)]) + (exit [ffi.Number] "io" Nothing) + (cwd [] "io" Path)]) (def: (exit_node_js! code) (-> Exit (IO Nothing)) @@ -194,11 +194,11 @@ (import: Object ["#::." - (#static entries [Object] (Array (Array ffi.String)))]) + ("static" entries [Object] (Array (Array ffi.String)))]) (import: NodeJs_OS ["#::." - (homedir [] #io Path)]) + (homedir [] "io" Path)]) (template [<name> <path>] [(def: (<name> _) @@ -222,25 +222,25 @@ (undefined)))) @.python (as_is (import: os ["#::." - (#static getcwd [] #io ffi.String) - (#static _exit [ffi.Integer] #io Nothing)]) + ("static" getcwd [] "io" ffi.String) + ("static" _exit [ffi.Integer] "io" Nothing)]) (import: os/path ["#::." - (#static expanduser [ffi.String] #io ffi.String)]) + ("static" expanduser [ffi.String] "io" ffi.String)]) (import: os/environ ["#::." - (#static keys [] #io (Array ffi.String)) - (#static get [ffi.String] #io #? ffi.String)])) + ("static" keys [] "io" (Array ffi.String)) + ("static" get [ffi.String] "io" "?" ffi.String)])) @.lua (as_is (ffi.import: LuaFile ["#::." - (read [ffi.String] #io #? ffi.String) - (close [] #io ffi.Boolean)]) + (read [ffi.String] "io" "?" ffi.String) + (close [] "io" ffi.Boolean)]) - (ffi.import: (io/popen [ffi.String] #io #try #? LuaFile)) - (ffi.import: (os/getenv [ffi.String] #io #? ffi.String)) - (ffi.import: (os/exit [ffi.Integer] #io Nothing)) + (ffi.import: (io/popen [ffi.String] "io" "try" "?" LuaFile)) + (ffi.import: (os/getenv [ffi.String] "io" "?" ffi.String)) + (ffi.import: (os/exit [ffi.Integer] "io" Nothing)) (def: (run_command default command) (-> Text Text (IO Text)) @@ -262,39 +262,39 @@ (in default))))) @.ruby (as_is (ffi.import: Env #as RubyEnv ["#::." - (#static keys [] (Array Text)) - (#static fetch [Text] #io #? Text)]) + ("static" keys [] (Array Text)) + ("static" fetch [Text] "io" "?" Text)]) (ffi.import: "fileutils" FileUtils #as RubyFileUtils ["#::." - (#static pwd Path)]) + ("static" pwd Path)]) (ffi.import: Dir #as RubyDir ["#::." - (#static home Path)]) + ("static" home Path)]) (ffi.import: Kernel #as RubyKernel ["#::." - (#static exit [Int] #io Nothing)])) + ("static" exit [Int] "io" Nothing)])) ... @.php - ... (as_is (ffi.import: (exit [Int] #io Nothing)) + ... (as_is (ffi.import: (exit [Int] "io" Nothing)) ... ... https://www.php.net/manual/en/function.exit.php - ... (ffi.import: (getcwd [] #io ffi.String)) + ... (ffi.import: (getcwd [] "io" ffi.String)) ... ... https://www.php.net/manual/en/function.getcwd.php - ... (ffi.import: (getenv #as getenv/1 [ffi.String] #io ffi.String)) - ... (ffi.import: (getenv #as getenv/0 [] #io (Array ffi.String))) + ... (ffi.import: (getenv #as getenv/1 [ffi.String] "io" ffi.String)) + ... (ffi.import: (getenv #as getenv/0 [] "io" (Array ffi.String))) ... ... https://www.php.net/manual/en/function.getenv.php ... ... https://www.php.net/manual/en/function.array-keys.php ... (ffi.import: (array_keys [(Array ffi.String)] (Array ffi.String))) ... ) ... @.scheme - ... (as_is (ffi.import: (exit [Int] #io Nothing)) + ... (as_is (ffi.import: (exit [Int] "io" Nothing)) ... ... https://srfi.schemers.org/srfi-98/srfi-98.html ... (abstract: Pair Any) ... (abstract: PList Any) - ... (ffi.import: (get-environment-variables [] #io PList)) + ... (ffi.import: (get-environment-variables [] "io" PList)) ... (ffi.import: (car [Pair] Text)) ... (ffi.import: (cdr [Pair] Text)) ... (ffi.import: (car #as head [PList] Pair)) diff --git a/stdlib/source/library/lux/world/shell.lux b/stdlib/source/library/lux/world/shell.lux index e04977d5e..216b2c856 100644 --- a/stdlib/source/library/lux/world/shell.lux +++ b/stdlib/source/library/lux/world/shell.lux @@ -203,12 +203,12 @@ (import: java/io/Reader ["#::." - (read [] #io #try int)]) + (read [] "io" "try" int)]) (import: java/io/BufferedReader ["#::." (new [java/io/Reader]) - (readLine [] #io #try #? java/lang/String)]) + (readLine [] "io" "try" "?" java/lang/String)]) (import: java/io/InputStream) @@ -218,15 +218,15 @@ (import: java/io/OutputStream ["#::." - (write [[byte]] #io #try void)]) + (write [[byte]] "io" "try" void)]) (import: java/lang/Process ["#::." - (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)]) + (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) @@ -275,13 +275,13 @@ (import: java/lang/ProcessBuilder ["#::." (new [[java/lang/String]]) - (environment [] #try (java/util/Map java/lang/String 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)]) + (start [] "io" "try" java/lang/Process)]) (import: java/lang/System ["#::." - (#static getProperty [java/lang/String] #io #try java/lang/String)]) + ("static" getProperty [java/lang/String] "io" "try" java/lang/String)]) ... https://en.wikipedia.org/wiki/Code_injection#Shell_injection (def: windows? |