diff options
Diffstat (limited to 'stdlib/source/library/lux/ffi.old.lux')
-rw-r--r-- | stdlib/source/library/lux/ffi.old.lux | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/stdlib/source/library/lux/ffi.old.lux b/stdlib/source/library/lux/ffi.old.lux index 29c286b23..9acf8e055 100644 --- a/stdlib/source/library/lux/ffi.old.lux +++ b/stdlib/source/library/lux/ffi.old.lux @@ -1098,7 +1098,7 @@ .let [arg_decls' (: (List Text) (list\map (|>> product.right (simple_class$ (list))) arg_decls))]] (in (`' ((~ (code.text (format "jvm invokespecial" - ":" (get@ #super_class_name super_class) + ":" (value@ #super_class_name super_class) ":" name ":" (text.interposed "," arg_decls')))) (~' _jvm_this) (~+ args)))))))] @@ -1368,15 +1368,15 @@ (-> (List Type_Parameter) Import_Member_Declaration (List Type_Parameter)) (case member (#ConstructorDecl [commons _]) - (list\compose class_tvars (get@ #import_member_tvars commons)) + (list\compose class_tvars (value@ #import_member_tvars commons)) (#MethodDecl [commons _]) - (case (get@ #import_member_kind commons) + (case (value@ #import_member_kind commons) #StaticIMK - (get@ #import_member_tvars commons) + (value@ #import_member_tvars commons) _ - (list\compose class_tvars (get@ #import_member_tvars commons))) + (list\compose class_tvars (value@ #import_member_tvars commons))) _ class_tvars)) @@ -1398,7 +1398,7 @@ import_member_args)) arg_types (list\map (: (-> [Bit GenericType] Code) (function (_ [maybe? arg]) - (let [arg_type (class_type (get@ #import_member_mode commons) type_params arg)] + (let [arg_type (class_type (value@ #import_member_mode commons) type_params arg)] (if maybe? (` (Maybe (~ arg_type))) arg_type)))) @@ -1412,7 +1412,7 @@ (-> Class_Declaration Import_Member_Declaration Code Code) (case member (^or (#ConstructorDecl [commons _]) (#MethodDecl [commons _])) - (if (get@ #import_member_maybe? commons) + (if (value@ #import_member_maybe? commons) (` (??? (~ return_term))) (let [g!temp (` ((~' ~') (~ (code.identifier ["" " Ω "]))))] (` (let [(~ g!temp) (~ return_term)] @@ -1420,8 +1420,8 @@ (~ g!temp)))) (~ g!temp) (panic! (~ (code.text (format "Cannot produce null references from method calls @ " - (get@ #class_name class) - "." (get@ #import_member_alias commons)))))))))) + (value@ #class_name class) + "." (value@ #import_member_alias commons)))))))))) _ return_term)) @@ -1431,7 +1431,7 @@ (-> Import_Member_Declaration Code Code) (case member (^or (#ConstructorDecl [commons _]) (#MethodDecl [commons _])) - (if (get@ <tag> commons) + (if (value@ <tag> commons) <term_trans> return_term) @@ -1527,10 +1527,10 @@ (#ConstructorDecl [commons _]) (do meta.monad - [.let [def_name (code.identifier ["" (..import_name import_format method_prefix (get@ #import_member_alias commons))]) + [.let [def_name (code.identifier ["" (..import_name import_format method_prefix (value@ #import_member_alias commons))]) jvm_extension (code.text (format "jvm new" ":" full_name ":" (text.interposed "," arg_classes))) jvm_interop (|> (` ((~ jvm_extension) - (~+ (jvm_extension_inputs (get@ #import_member_mode commons) arg_classes arg_function_inputs)))) + (~+ (jvm_extension_inputs (value@ #import_member_mode commons) arg_classes arg_function_inputs)))) (decorate_return_maybe class member) (decorate_return_try member) (decorate_return_io member))]] @@ -1540,7 +1540,7 @@ (#MethodDecl [commons method]) (with_identifiers [g!obj] (do meta.monad - [.let [def_name (code.identifier ["" (..import_name import_format method_prefix (get@ #import_member_alias commons))]) + [.let [def_name (code.identifier ["" (..import_name import_format method_prefix (value@ #import_member_alias commons))]) (^slots [#import_member_kind]) commons (^slots [#import_method_name]) method [jvm_op object_ast] (: [Text (List Code)] @@ -1560,10 +1560,10 @@ (list g!obj)] ))) jvm_extension (code.text (format "jvm " jvm_op ":" full_name ":" import_method_name ":" (text.interposed "," arg_classes))) - jvm_interop (|> [(simple_class$ (list) (get@ #import_method_return method)) + jvm_interop (|> [(simple_class$ (list) (value@ #import_method_return method)) (` ((~ jvm_extension) (~+ (list\map un_quote object_ast)) - (~+ (jvm_extension_inputs (get@ #import_member_mode commons) arg_classes arg_function_inputs))))] - (auto_convert_output (get@ #import_member_mode commons)) + (~+ (jvm_extension_inputs (value@ #import_member_mode commons) arg_classes arg_function_inputs))))] + (auto_convert_output (value@ #import_member_mode commons)) (decorate_return_maybe class member) (decorate_return_try member) (decorate_return_io member))]] @@ -1717,7 +1717,7 @@ =members (|> bundles (list\map (function (_ [import_format members]) (list\map (|>> [import_format]) members))) - list.joined + list.together (monad.map ! (member_import$ (product.right class_decl) kind class_decl)))] (in (list& (class_import$ class_decl) (list\join =members))))) @@ -1741,9 +1741,9 @@ _ (in (list (` ("jvm anewarray" (~ (code.text (generic_type$ type))) (~ size))))))) -(syntax: .public (array_length [array <code>.any]) +(syntax: .public (length [array <code>.any]) {#.doc (example "Gives the length of an array." - (array_length my_array))} + (length my_array))} (in (list (` ("jvm arraylength" (~ array)))))) (def: (type_class_name type) @@ -1768,10 +1768,10 @@ _ (meta.failure (format "Cannot convert to JvmType: " (type.format type)))))) -(syntax: .public (array_read [idx <code>.any - array <code>.any]) +(syntax: .public (read! [idx <code>.any + array <code>.any]) {#.doc (example "Loads an element from an array." - (array_read 10 my_array))} + (read! 10 my_array))} (case array [_ (#.Identifier array_name)] (do meta.monad @@ -1796,13 +1796,13 @@ _ (with_identifiers [g!array] (in (list (` (let [(~ g!array) (~ array)] - (..array_read (~ idx) (~ g!array))))))))) + (..read! (~ idx) (~ g!array))))))))) -(syntax: .public (array_write [idx <code>.any - value <code>.any - array <code>.any]) +(syntax: .public (write! [idx <code>.any + value <code>.any + array <code>.any]) {#.doc (example "Stores an element into an array." - (array_write 10 my_object my_array))} + (write! 10 my_object my_array))} (case array [_ (#.Identifier array_name)] (do meta.monad @@ -1827,7 +1827,7 @@ _ (with_identifiers [g!array] (in (list (` (let [(~ g!array) (~ array)] - (..array_write (~ idx) (~ value) (~ g!array))))))))) + (..write! (~ idx) (~ value) (~ g!array))))))))) (syntax: .public (class_for [type (..generic_type^ (list))]) {#.doc (example "Loads the class as a java.lang.Class object." |