From 9a9b2493a8eda60f08809b4cb1e5bc49c5c3600c Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 3 Jul 2022 20:07:40 -0400 Subject: Re-named "do_to" to "to". --- stdlib/source/library/lux/ffi.jvm.lux | 2 +- stdlib/source/library/lux/ffi.old.lux | 2 +- stdlib/source/library/lux/meta.lux | 3 +- .../source/library/lux/meta/target/jvm/loader.lux | 10 ++--- .../language/lux/phase/generation/jvm/host.lux | 2 +- .../lux/tool/compiler/meta/packager/jvm.lux | 44 +++++++++++----------- 6 files changed, 32 insertions(+), 31 deletions(-) (limited to 'stdlib/source/library') diff --git a/stdlib/source/library/lux/ffi.jvm.lux b/stdlib/source/library/lux/ffi.jvm.lux index 43fcd5c3c..f465089d7 100644 --- a/stdlib/source/library/lux/ffi.jvm.lux +++ b/stdlib/source/library/lux/ffi.jvm.lux @@ -1461,7 +1461,7 @@ body .any]) (in (list (` ("jvm object synchronized" (, lock) (, body))))))) -(def .public do_to +(def .public to (syntax (_ [obj .any methods (<>.some partial_call^)]) (with_symbols [g!obj] diff --git a/stdlib/source/library/lux/ffi.old.lux b/stdlib/source/library/lux/ffi.old.lux index 99158d8a9..e9385c61a 100644 --- a/stdlib/source/library/lux/ffi.old.lux +++ b/stdlib/source/library/lux/ffi.old.lux @@ -1315,7 +1315,7 @@ body .any]) (in (list (` ("jvm object synchronized" (, lock) (, body))))))) -(def .public do_to +(def .public to (syntax (_ [obj .any methods (<>.some partial_call^)]) (with_symbols [g!obj] diff --git a/stdlib/source/library/lux/meta.lux b/stdlib/source/library/lux/meta.lux index 611028e8e..a1bb5d944 100644 --- a/stdlib/source/library/lux/meta.lux +++ b/stdlib/source/library/lux/meta.lux @@ -242,7 +242,8 @@ (case (|> lux (the [.#type_context .#var_bindings]) (type_variable var)) - (^.or {.#None} {.#Some {.#Var _}}) + (^.or {.#None} + {.#Some {.#Var _}}) {try.#Success [lux type]} {.#Some type'} diff --git a/stdlib/source/library/lux/meta/target/jvm/loader.lux b/stdlib/source/library/lux/meta/target/jvm/loader.lux index cb423bba7..627b10cd5 100644 --- a/stdlib/source/library/lux/meta/target/jvm/loader.lux +++ b/stdlib/source/library/lux/meta/target/jvm/loader.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except) - ["[0]" ffi (.only import object do_to)] + ["[0]" ffi (.only import object to)] [abstract [monad (.only do)]] [control @@ -76,10 +76,10 @@ (java/lang/Integer::TYPE))) (ffi.write! 3 (as (java/lang/Integer::TYPE))))] - (do_to (java/lang/Class::getDeclaredMethod (ffi.as_string "defineClass") - signature - (ffi.class_for java/lang/ClassLoader)) - (java/lang/reflect/AccessibleObject::setAccessible true))))) + (to (java/lang/Class::getDeclaredMethod (ffi.as_string "defineClass") + signature + (ffi.class_for java/lang/ClassLoader)) + (java/lang/reflect/AccessibleObject::setAccessible true))))) (def .public (define class_name bytecode loader) (-> Text Binary java/lang/ClassLoader (Try java/lang/Object)) 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 1212056f5..0e1ec0f97 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 @@ -1,7 +1,7 @@ (.require [library [lux (.except Definition) - ["[0]" ffi (.only import do_to object)] + ["[0]" ffi (.only import object)] [abstract [monad (.only do)]] [control 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 63e347408..b783f1262 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except Module Definition) - ["[0]" ffi (.only import do_to)] + ["[0]" ffi (.only import to)] [abstract ["[0]" monad (.only Monad do)]] [control @@ -136,19 +136,19 @@ (def (manifest program) (-> (Maybe unit.ID) java/util/jar/Manifest) (let [manifest (java/util/jar/Manifest::new) - attrs (do_to (java/util/jar/Manifest::getMainAttributes manifest) - (java/util/jar/Attributes::put (java/util/jar/Attributes$Name::MANIFEST_VERSION) - (ffi.as_string ..manifest_version)))] + attrs (to (java/util/jar/Manifest::getMainAttributes manifest) + (java/util/jar/Attributes::put (java/util/jar/Attributes$Name::MANIFEST_VERSION) + (ffi.as_string ..manifest_version)))] (exec (case program {.#Some program} - (do_to attrs - (java/util/jar/Attributes::put (java/util/jar/Attributes$Name::MAIN_CLASS) - (|> program - runtime.class_name - name.internal - name.external - ffi.as_string))) + (to attrs + (java/util/jar/Attributes::put (java/util/jar/Attributes$Name::MAIN_CLASS) + (|> program + runtime.class_name + name.internal + name.external + ffi.as_string))) {.#None} attrs) @@ -165,10 +165,10 @@ (do try.monad [_ (java/util/jar/JarOutputStream::putNextEntry (java/util/jar/JarEntry::new (ffi.as_string class_path)) sink)] - (in (do_to sink - (java/util/zip/ZipOutputStream::write content (ffi.as_int +0) (ffi.as_int (.int (binary.size content)))) - (java/io/Flushable::flush) - (java/util/zip/ZipOutputStream::closeEntry)))))) + (in (to sink + (java/util/zip/ZipOutputStream::write content (ffi.as_int +0) (ffi.as_int (.int (binary.size content)))) + (java/io/Flushable::flush) + (java/util/zip/ZipOutputStream::closeEntry)))))) (def (write_module static necessary_dependencies [module output] sink) (-> Context (Set unit.ID) [module.ID Output] java/util/jar/JarOutputStream @@ -260,10 +260,10 @@ (let [[entry_size entry_data] (read_jar_entry entry input)] (again (set.has entry_path entries) duplicates - (do_to sink - (java/util/zip/ZipOutputStream::write entry_data (ffi.as_int +0) (ffi.as_int (.int entry_size))) - (java/io/Flushable::flush) - (java/util/zip/ZipOutputStream::closeEntry))))) + (to sink + (java/util/zip/ZipOutputStream::write entry_data (ffi.as_int +0) (ffi.as_int (.int entry_size))) + (java/io/Flushable::flush) + (java/util/zip/ZipOutputStream::closeEntry))))) (again entries duplicates sink)))))))) @@ -286,9 +286,9 @@ [(set.empty text.hash) (set.empty text.hash) sink])) - .let [_ (do_to sink - (java/io/Flushable::flush) - (java/io/Closeable::close))]] + .let [_ (to sink + (java/io/Flushable::flush) + (java/io/Closeable::close))]] (in (|> buffer java/io/ByteArrayOutputStream::toByteArray {.#Left}))))) -- cgit v1.2.3