diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/host.jvm.lux | 14 | ||||
-rw-r--r-- | stdlib/source/lux/lang/compiler/extension/analysis/host.jvm.lux | 24 | ||||
-rw-r--r-- | stdlib/source/lux/lang/compiler/translation/scheme/extension/common.jvm.lux | 2 | ||||
-rw-r--r-- | stdlib/source/lux/world/blob.jvm.lux | 2 | ||||
-rw-r--r-- | stdlib/source/lux/world/console.lux | 14 | ||||
-rw-r--r-- | stdlib/source/lux/world/env.jvm.lux | 12 | ||||
-rw-r--r-- | stdlib/source/lux/world/file.lux | 12 | ||||
-rw-r--r-- | stdlib/source/lux/world/net/tcp.jvm.lux | 12 | ||||
-rw-r--r-- | stdlib/source/lux/world/net/udp.jvm.lux | 10 |
9 files changed, 51 insertions, 51 deletions
diff --git a/stdlib/source/lux/host.jvm.lux b/stdlib/source/lux/host.jvm.lux index ae4b78aac..78a190505 100644 --- a/stdlib/source/lux/host.jvm.lux +++ b/stdlib/source/lux/host.jvm.lux @@ -1855,7 +1855,7 @@ (#.Left _) (macro.fail (format "Unknown class: " class-name))))) -(syntax: #export (import +(syntax: #export (import: {#let [imports (class-imports *compiler*)]} {long-name? (s.this? (' #long))} {class-decl (class-decl^ imports)} @@ -1867,7 +1867,7 @@ "Their methods, fields and enum options can also be imported." "Also, classes which get imported into a module can also be referred-to with their short names in other macros that require JVM classes." "Examples:" - (import java/lang/Object + (import: java/lang/Object (new []) (equals [Object] boolean) (wait [int] #io #try void)) @@ -1876,24 +1876,24 @@ "#try means that the computation might throw an exception, and the return value will be wrapped by the Error 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 + (import: java/lang/String (new [(Array byte)]) (#static valueOf [char] String) (#static valueOf #as int-valueOf [int] String)) - (import #long (java/util/List e) + (import: #long (java/util/List e) (size [] int) (get [int] e)) - (import (java/util/ArrayList a) + (import: (java/util/ArrayList a) ([T] toArray [(Array T)] (Array T))) "#long makes it so the class-type that is generated is of the fully-qualified name." "In this case, it avoids a clash between the java.util.List type, and Lux's own List type." - (import java/lang/Character$UnicodeScript + (import: java/lang/Character$UnicodeScript (#enum ARABIC CYRILLIC LATIN)) "All enum options to be imported must be specified." - (import #long (lux/concurrency/promise/JvmPromise A) + (import: #long (lux/concurrency/promise/JvmPromise A) (resolve [A] boolean) (poll [] A) (wasResolved [] boolean) diff --git a/stdlib/source/lux/lang/compiler/extension/analysis/host.jvm.lux b/stdlib/source/lux/lang/compiler/extension/analysis/host.jvm.lux index 1fb9d8d90..eb016a546 100644 --- a/stdlib/source/lux/lang/compiler/extension/analysis/host.jvm.lux +++ b/stdlib/source/lux/lang/compiler/extension/analysis/host.jvm.lux @@ -28,7 +28,7 @@ [///] ) -(host.import #long java/lang/reflect/Type +(host.import: #long java/lang/reflect/Type (getTypeName [] String)) (def: jvm-type-name @@ -404,38 +404,38 @@ _ (lang.throw /.incorrect-extension-arity [proc +2 (list.size args)])))) -(host.import java/lang/Object +(host.import: java/lang/Object (equals [Object] boolean)) -(host.import java/lang/ClassLoader) +(host.import: java/lang/ClassLoader) -(host.import java/lang/reflect/GenericArrayType +(host.import: java/lang/reflect/GenericArrayType (getGenericComponentType [] java/lang/reflect/Type)) -(host.import java/lang/reflect/ParameterizedType +(host.import: java/lang/reflect/ParameterizedType (getRawType [] java/lang/reflect/Type) (getActualTypeArguments [] (Array java/lang/reflect/Type))) -(host.import (java/lang/reflect/TypeVariable d) +(host.import: (java/lang/reflect/TypeVariable d) (getName [] String) (getBounds [] (Array java/lang/reflect/Type))) -(host.import (java/lang/reflect/WildcardType d) +(host.import: (java/lang/reflect/WildcardType d) (getLowerBounds [] (Array java/lang/reflect/Type)) (getUpperBounds [] (Array java/lang/reflect/Type))) -(host.import java/lang/reflect/Modifier +(host.import: java/lang/reflect/Modifier (#static isStatic [int] boolean) (#static isFinal [int] boolean) (#static isInterface [int] boolean) (#static isAbstract [int] boolean)) -(host.import java/lang/reflect/Field +(host.import: java/lang/reflect/Field (getDeclaringClass [] (java/lang/Class Object)) (getModifiers [] int) (getGenericType [] java/lang/reflect/Type)) -(host.import java/lang/reflect/Method +(host.import: java/lang/reflect/Method (getName [] String) (getModifiers [] int) (getDeclaringClass [] (Class Object)) @@ -444,14 +444,14 @@ (getGenericReturnType [] java/lang/reflect/Type) (getGenericExceptionTypes [] (Array java/lang/reflect/Type))) -(host.import (java/lang/reflect/Constructor c) +(host.import: (java/lang/reflect/Constructor c) (getModifiers [] int) (getDeclaringClass [] (Class c)) (getTypeParameters [] (Array (TypeVariable (Constructor c)))) (getGenericParameterTypes [] (Array java/lang/reflect/Type)) (getGenericExceptionTypes [] (Array java/lang/reflect/Type))) -(host.import (java/lang/Class c) +(host.import: (java/lang/Class c) (getName [] String) (getModifiers [] int) (#static forName [String] #try (Class Object)) diff --git a/stdlib/source/lux/lang/compiler/translation/scheme/extension/common.jvm.lux b/stdlib/source/lux/lang/compiler/translation/scheme/extension/common.jvm.lux index 140045aaf..02bdd6109 100644 --- a/stdlib/source/lux/lang/compiler/translation/scheme/extension/common.jvm.lux +++ b/stdlib/source/lux/lang/compiler/translation/scheme/extension/common.jvm.lux @@ -160,7 +160,7 @@ ))) ## [[Numbers]] -(host.import java/lang/Double +(host.import: java/lang/Double (#static MIN_VALUE Double) (#static MAX_VALUE Double)) diff --git a/stdlib/source/lux/world/blob.jvm.lux b/stdlib/source/lux/world/blob.jvm.lux index 4565e5499..3d30d2b93 100644 --- a/stdlib/source/lux/world/blob.jvm.lux +++ b/stdlib/source/lux/world/blob.jvm.lux @@ -17,7 +17,7 @@ (type: #export Blob (host.type (Array byte))) -(host.import java/util/Arrays +(host.import: java/util/Arrays (#static copyOfRange [(Array byte) int int] (Array byte)) (#static equals [(Array byte) (Array byte)] boolean)) diff --git a/stdlib/source/lux/world/console.lux b/stdlib/source/lux/world/console.lux index 49432f777..87e362a41 100644 --- a/stdlib/source/lux/world/console.lux +++ b/stdlib/source/lux/world/console.lux @@ -16,27 +16,27 @@ (close [] (Task Any))) (for {"JVM" - (as-is (host.import java/io/InputStream + (as-is (host.import: java/io/InputStream (read [] #io #try int) (available [] #io #try int) (mark [int] #io #try void) (reset [] #io #try void)) - (host.import java/io/Reader) + (host.import: java/io/Reader) - (host.import java/io/PrintStream + (host.import: java/io/PrintStream (print [String] #io #try void)) - (host.import java/lang/System + (host.import: java/lang/System (#static in java/io/InputStream) (#static out java/io/PrintStream)) - (host.import java/lang/Appendable + (host.import: java/lang/Appendable (append [CharSequence] Appendable)) - (host.import java/lang/String) + (host.import: java/lang/String) - (host.import java/lang/StringBuffer + (host.import: java/lang/StringBuffer (new [String]) (toString [] String)) diff --git a/stdlib/source/lux/world/env.jvm.lux b/stdlib/source/lux/world/env.jvm.lux index fab0de3cc..4db48fee6 100644 --- a/stdlib/source/lux/world/env.jvm.lux +++ b/stdlib/source/lux/world/env.jvm.lux @@ -6,23 +6,23 @@ [io #- run] [host])) -(host.import java/lang/String) +(host.import: java/lang/String) -(host.import (java/util/Map$Entry k v) +(host.import: (java/util/Map$Entry k v) (getKey [] k) (getValue [] v)) -(host.import (java/util/Iterator a) +(host.import: (java/util/Iterator a) (hasNext [] boolean) (next [] a)) -(host.import (java/util/Set a) +(host.import: (java/util/Set a) (iterator [] (Iterator a))) -(host.import (java/util/Map k v) +(host.import: (java/util/Map k v) (entrySet [] (Set (Map$Entry k v)))) -(host.import java/lang/System +(host.import: java/lang/System (#static getenv [] (java/util/Map String String))) (def: (consume-iterator f iterator) diff --git a/stdlib/source/lux/world/file.lux b/stdlib/source/lux/world/file.lux index 78640ad58..176f7ccf8 100644 --- a/stdlib/source/lux/world/file.lux +++ b/stdlib/source/lux/world/file.lux @@ -17,7 +17,7 @@ (exception: #export (not-a-directory {file File}) file) -(host.import #long java/io/File +(host.import: #long java/io/File (new [String]) (exists [] #io #try boolean) (mkdirs [] #io #try boolean) @@ -35,20 +35,20 @@ (canExecute [] #io #try boolean) (#static separator String)) -(host.import java/lang/AutoCloseable +(host.import: java/lang/AutoCloseable (close [] #io #try void)) -(host.import java/io/OutputStream +(host.import: java/io/OutputStream (write [(Array byte)] #io #try void) (flush [] #io #try void)) -(host.import java/io/FileOutputStream +(host.import: java/io/FileOutputStream (new [java/io/File boolean] #io #try)) -(host.import java/io/InputStream +(host.import: java/io/InputStream (read [(Array byte)] #io #try int)) -(host.import java/io/FileInputStream +(host.import: java/io/FileInputStream (new [java/io/File] #io #try)) (do-template [<name> <flag>] diff --git a/stdlib/source/lux/world/net/tcp.jvm.lux b/stdlib/source/lux/world/net/tcp.jvm.lux index a18b5e6de..539a1f8c6 100644 --- a/stdlib/source/lux/world/net/tcp.jvm.lux +++ b/stdlib/source/lux/world/net/tcp.jvm.lux @@ -11,24 +11,24 @@ [host]) [//]) -(host.import java/lang/AutoCloseable +(host.import: java/lang/AutoCloseable (close [] #io #try void)) -(host.import java/io/Flushable +(host.import: java/io/Flushable (flush [] #io #try void)) -(host.import java/io/InputStream +(host.import: java/io/InputStream (read [(Array byte) int int] #io #try int)) -(host.import java/io/OutputStream +(host.import: java/io/OutputStream (write [(Array byte) int int] #io #try void)) -(host.import java/net/Socket +(host.import: java/net/Socket (new [String int] #io #try) (getInputStream [] #io #try InputStream) (getOutputStream [] #io #try OutputStream)) -(host.import java/net/ServerSocket +(host.import: java/net/ServerSocket (new [int] #io #try) (accept [] #io #try Socket)) diff --git a/stdlib/source/lux/world/net/udp.jvm.lux b/stdlib/source/lux/world/net/udp.jvm.lux index 5f0f52831..a11405132 100644 --- a/stdlib/source/lux/world/net/udp.jvm.lux +++ b/stdlib/source/lux/world/net/udp.jvm.lux @@ -13,24 +13,24 @@ [host]) [//]) -(host.import java/lang/AutoCloseable +(host.import: java/lang/AutoCloseable (close [] #io #try void)) -(host.import java/io/Flushable +(host.import: java/io/Flushable (flush [] #io #try void)) -(host.import java/net/InetAddress +(host.import: java/net/InetAddress (#static getAllByName [String] #io #try (Array InetAddress)) (getHostAddress [] String)) -(host.import java/net/DatagramPacket +(host.import: java/net/DatagramPacket (new #as new|send [(Array byte) int int InetAddress int]) (new #as new|receive [(Array byte) int int]) (getAddress [] InetAddress) (getPort [] int) (getLength [] int)) -(host.import java/net/DatagramSocket +(host.import: java/net/DatagramSocket (new #as new|client [] #io #try) (new #as new|server [int] #io #try) (receive [DatagramPacket] #io #try void) |