aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source
diff options
context:
space:
mode:
authorEduardo Julian2017-09-08 19:19:22 -0400
committerEduardo Julian2017-09-08 19:19:22 -0400
commit06713336cdfd09db3eba26eda2c04db05bcd71e4 (patch)
treef775c46fd273c523e633e20386c332b925fe39e3 /stdlib/source
parent2697c570707ffa379225b6112b09fdec654eb0c8 (diff)
- Re-named "jvm-import" to "import".
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/host.jvm.lux14
-rw-r--r--stdlib/source/lux/world/blob.jvm.lux4
-rw-r--r--stdlib/source/lux/world/env.jvm.lux14
-rw-r--r--stdlib/source/lux/world/fs.jvm.lux14
-rw-r--r--stdlib/source/lux/world/net/tcp.jvm.lux14
-rw-r--r--stdlib/source/lux/world/net/udp.jvm.lux12
6 files changed, 36 insertions, 36 deletions
diff --git a/stdlib/source/lux/host.jvm.lux b/stdlib/source/lux/host.jvm.lux
index 62a3da2a6..ea4171184 100644
--- a/stdlib/source/lux/host.jvm.lux
+++ b/stdlib/source/lux/host.jvm.lux
@@ -1877,7 +1877,7 @@
(#;Left _)
(macro;fail (format "Unknown class: " class-name))))
-(syntax: #export (jvm-import [#let [imports (class-imports *compiler*)]]
+(syntax: #export (import [#let [imports (class-imports *compiler*)]]
[long-name? (s;this? (' #long))]
[class-decl (class-decl^ imports)]
[#let [full-class-name (product;left class-decl)
@@ -1888,7 +1888,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:"
- (jvm-import java.lang.Object
+ (import java.lang.Object
(new [])
(equals [Object] boolean)
(wait [int] #io #try void))
@@ -1897,24 +1897,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)."
- (jvm-import java.lang.String
+ (import java.lang.String
(new [(Array byte)])
(#static valueOf [char] String)
(#static valueOf #as int-valueOf [int] String))
- (jvm-import #long (java.util.List e)
+ (import #long (java.util.List e)
(size [] int)
(get [int] e))
- (jvm-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."
- (jvm-import java.lang.Character$UnicodeScript
+ (import java.lang.Character$UnicodeScript
(#enum ARABIC CYRILLIC LATIN))
"All enum options to be imported must be specified."
- (jvm-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/world/blob.jvm.lux b/stdlib/source/lux/world/blob.jvm.lux
index 4d7f78199..249cee9eb 100644
--- a/stdlib/source/lux/world/blob.jvm.lux
+++ b/stdlib/source/lux/world/blob.jvm.lux
@@ -7,14 +7,14 @@
[maybe]
["R" result]
text/format)
- [host #+ jvm-import]))
+ [host]))
(exception: #export Index-Out-Of-Bounds)
(exception: #export Inverted-Range)
(type: #export Blob host;Byte-Array)
-(jvm-import java.util.Arrays
+(host;import java.util.Arrays
(#static copyOfRange [Byte-Array int int] Byte-Array)
(#static equals [Byte-Array Byte-Array] boolean))
diff --git a/stdlib/source/lux/world/env.jvm.lux b/stdlib/source/lux/world/env.jvm.lux
index 29266cc84..a3a58bc61 100644
--- a/stdlib/source/lux/world/env.jvm.lux
+++ b/stdlib/source/lux/world/env.jvm.lux
@@ -5,25 +5,25 @@
(coll [list "L/" Functor<List>]
["d" dict]))
[io #- run]
- [host #+ jvm-import]))
+ [host]))
-(jvm-import java.lang.String)
+(host;import java.lang.String)
-(jvm-import (java.util.Map$Entry k v)
+(host;import (java.util.Map$Entry k v)
(getKey [] k)
(getValue [] v))
-(jvm-import (java.util.Iterator a)
+(host;import (java.util.Iterator a)
(hasNext [] boolean)
(next [] a))
-(jvm-import (java.util.Set a)
+(host;import (java.util.Set a)
(iterator [] (Iterator a)))
-(jvm-import (java.util.Map k v)
+(host;import (java.util.Map k v)
(entrySet [] (Set (Map$Entry k v))))
-(jvm-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/fs.jvm.lux b/stdlib/source/lux/world/fs.jvm.lux
index 665dfaea1..44f028f0b 100644
--- a/stdlib/source/lux/world/fs.jvm.lux
+++ b/stdlib/source/lux/world/fs.jvm.lux
@@ -10,13 +10,13 @@
["d" duration])
(world [blob #+ Blob])
[io]
- [host #+ jvm-import]))
+ [host]))
(exception: Could-Not-Read-All-Data)
(type: #export File Text)
-(jvm-import #long java.io.File
+(host;import #long java.io.File
(new [String])
(exists [] #io #try boolean)
(mkdir [] #io #try boolean)
@@ -33,20 +33,20 @@
(canWrite [] #io #try boolean)
(canExecute [] #io #try boolean))
-(jvm-import java.lang.AutoCloseable
+(host;import java.lang.AutoCloseable
(close [] #io #try void))
-(jvm-import java.io.OutputStream
+(host;import java.io.OutputStream
(write [Byte-Array] #io #try void)
(flush [] #io #try void))
-(jvm-import java.io.FileOutputStream
+(host;import java.io.FileOutputStream
(new [java.io.File boolean] #io #try))
-(jvm-import java.io.InputStream
+(host;import java.io.InputStream
(read [Byte-Array] #io #try int))
-(jvm-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 bb7a36c39..25d6bb6ae 100644
--- a/stdlib/source/lux/world/net/tcp.jvm.lux
+++ b/stdlib/source/lux/world/net/tcp.jvm.lux
@@ -8,27 +8,27 @@
(type opaque)
(world [blob #+ Blob])
[io]
- [host #+ jvm-import])
+ [host])
[..])
-(jvm-import java.lang.AutoCloseable
+(host;import java.lang.AutoCloseable
(close [] #io #try void))
-(jvm-import java.io.Flushable
+(host;import java.io.Flushable
(flush [] #io #try void))
-(jvm-import java.io.InputStream
+(host;import java.io.InputStream
(read [Byte-Array int int] #io #try int))
-(jvm-import java.io.OutputStream
+(host;import java.io.OutputStream
(write [Byte-Array int int] #io #try void))
-(jvm-import java.net.Socket
+(host;import java.net.Socket
(new [String int] #io #try)
(getInputStream [] #io #try InputStream)
(getOutputStream [] #io #try OutputStream))
-(jvm-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 4bf95a03e..e76a1e009 100644
--- a/stdlib/source/lux/world/net/udp.jvm.lux
+++ b/stdlib/source/lux/world/net/udp.jvm.lux
@@ -10,27 +10,27 @@
(type opaque)
(world [blob #+ Blob])
[io]
- [host #+ jvm-import])
+ [host])
[..])
-(jvm-import java.lang.AutoCloseable
+(host;import java.lang.AutoCloseable
(close [] #io #try void))
-(jvm-import java.io.Flushable
+(host;import java.io.Flushable
(flush [] #io #try void))
-(jvm-import java.net.InetAddress
+(host;import java.net.InetAddress
(#static getAllByName [String] #io #try (Array InetAddress))
(getHostAddress [] String))
-(jvm-import java.net.DatagramPacket
+(host;import java.net.DatagramPacket
(new #as new|send [Byte-Array int int InetAddress int])
(new #as new|receive [Byte-Array int int])
(getAddress [] InetAddress)
(getPort [] int)
(getLength [] int))
-(jvm-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)