aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/documentation')
-rw-r--r--stdlib/source/documentation/lux/ffi.js.lux35
-rw-r--r--stdlib/source/documentation/lux/ffi.jvm.lux62
-rw-r--r--stdlib/source/documentation/lux/ffi.old.lux62
-rw-r--r--stdlib/source/documentation/lux/ffi.py.lux34
-rw-r--r--stdlib/source/documentation/lux/ffi.rb.lux28
5 files changed, 111 insertions, 110 deletions
diff --git a/stdlib/source/documentation/lux/ffi.js.lux b/stdlib/source/documentation/lux/ffi.js.lux
index 66b629d22..81082ada3 100644
--- a/stdlib/source/documentation/lux/ffi.js.lux
+++ b/stdlib/source/documentation/lux/ffi.js.lux
@@ -1,31 +1,32 @@
(.using
- [library
- [lux {"-" int char type :as}
- ["$" documentation {"+" documentation:}]
- [data
- ["[0]" text {"+" \n}
- ["%" format {"+" format}]]]
- [macro
- ["[0]" template]]]]
- [\\library
- ["[0]" /]])
+ [library
+ [lux {"-" int char type :as}
+ ["$" documentation {"+" documentation:}]
+ [data
+ ["[0]" text {"+" \n}
+ ["%" format {"+" format}]]]
+ [macro
+ ["[0]" template]]]]
+ [\\library
+ ["[0]" /]])
(documentation: /.null
"The null pointer.")
(documentation: /.import:
"Easily import types, methods, functions and constants."
- [(import: Uint8Array)
+ [(import: Uint8Array
+ "[1]::[0]")
(import: TextEncoder
- ["[1]::[0]"
- (new [/.String])
- (encode [/.String] Uint8Array)])
+ "[1]::[0]"
+ (new [/.String])
+ (encode [/.String] Uint8Array))
(import: TextDecoder
- ["[1]::[0]"
- (new [/.String])
- (decode [/.String] String)])])
+ "[1]::[0]"
+ (new [/.String])
+ (decode [/.String] String))])
(documentation: /.type_of
"The type of an object, as text."
diff --git a/stdlib/source/documentation/lux/ffi.jvm.lux b/stdlib/source/documentation/lux/ffi.jvm.lux
index b3c628ffe..5bf182890 100644
--- a/stdlib/source/documentation/lux/ffi.jvm.lux
+++ b/stdlib/source/documentation/lux/ffi.jvm.lux
@@ -1,14 +1,14 @@
(.using
- [library
- [lux {"-" int char type :as}
- ["$" documentation {"+" documentation:}]
- [data
- ["[0]" text {"+" \n}
- ["%" format {"+" format}]]]
- [macro
- ["[0]" template]]]]
- [\\library
- ["[0]" /]])
+ [library
+ [lux {"-" int char type :as}
+ ["$" documentation {"+" documentation:}]
+ [data
+ ["[0]" text {"+" \n}
+ ["%" format {"+" format}]]]
+ [macro
+ ["[0]" template]]]]
+ [\\library
+ ["[0]" /]])
(template [<name>]
[(`` (documentation: <name>
@@ -179,44 +179,44 @@
"Allows importing JVM classes, and using them as types."
["Their methods, fields and enum options can also be imported."
(import: java/lang/Object
- ["[1]::[0]"
- (new [])
- (equals [java/lang/Object] boolean)
- (wait [int] "io" "try" void)])]
+ "[1]::[0]"
+ (new [])
+ (equals [java/lang/Object] boolean)
+ (wait [int] "io" "try" void))]
["Special options can also be given for the return values."
"'?' means that the values will be returned inside a Maybe type. That way, null becomes .#None."
"'try' means that the computation might throw an exception, and the return value will be wrapped by the Try 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
- ["[1]::[0]"
- (new [[byte]])
- ("static" valueOf [char] java/lang/String)
- ("static" valueOf "as" int_valueOf [int] java/lang/String)])
+ "[1]::[0]"
+ (new [[byte]])
+ ("static" valueOf [char] java/lang/String)
+ ("static" valueOf "as" int_valueOf [int] java/lang/String))
(import: (java/util/List e)
- ["[1]::[0]"
- (size [] int)
- (get [int] e)])
+ "[1]::[0]"
+ (size [] int)
+ (get [int] e))
(import: (java/util/ArrayList a)
- ["[1]::[0]"
- ([T] toArray [[T]] [T])])]
+ "[1]::[0]"
+ ([T] toArray [[T]] [T]))]
["The class-type that is generated is of the fully-qualified name."
"This avoids a clash between the java.util.List type, and Lux's own List type."
"All enum options to be imported must be specified."
(import: java/lang/Character$UnicodeScript
- ["[1]::[0]"
- ("enum" ARABIC CYRILLIC LATIN)])]
+ "[1]::[0]"
+ ("enum" ARABIC CYRILLIC LATIN))]
["It should also be noted, the only types that may show up in method arguments or return values may be Java classes, arrays, primitives, void or type-vars."
"Lux types, such as Maybe cannot be named (otherwise, they'd be confused for Java classes)."
(import: (lux/concurrency/async/JvmAsync A)
- ["[1]::[0]"
- (resolve [A] boolean)
- (poll [] A)
- (wasResolved [] boolean)
- (waitOn [lux/Function] void)
- ("static" [A] make [A] (lux/concurrency/async/JvmAsync A))])]
+ "[1]::[0]"
+ (resolve [A] boolean)
+ (poll [] A)
+ (wasResolved [] boolean)
+ (waitOn [lux/Function] void)
+ ("static" [A] make [A] (lux/concurrency/async/JvmAsync A)))]
["Also, the names of the imported members will look like Class::member"
(java/lang/Object::new [])
(java/lang/Object::equals [other_object] my_object)
diff --git a/stdlib/source/documentation/lux/ffi.old.lux b/stdlib/source/documentation/lux/ffi.old.lux
index 6f27cb3f6..56336a41b 100644
--- a/stdlib/source/documentation/lux/ffi.old.lux
+++ b/stdlib/source/documentation/lux/ffi.old.lux
@@ -1,14 +1,14 @@
(.using
- [library
- [lux {"-" int char type :as}
- ["$" documentation {"+" documentation:}]
- [data
- ["[0]" text {"+" \n}
- ["%" format {"+" format}]]]
- [macro
- ["[0]" template]]]]
- [\\library
- ["[0]" /]])
+ [library
+ [lux {"-" int char type :as}
+ ["$" documentation {"+" documentation:}]
+ [data
+ ["[0]" text {"+" \n}
+ ["%" format {"+" format}]]]
+ [macro
+ ["[0]" template]]]]
+ [\\library
+ ["[0]" /]])
(template [<name> <from> <to>]
[(documentation: <name>
@@ -142,44 +142,44 @@
(format "Allows importing JVM classes, and using them as types."
\n "Their methods, fields and enum options can also be imported.")
[(import: java/lang/Object
- ["[1]::[0]"
- (new [])
- (equals [java/lang/Object] boolean)
- (wait [int] "io" "try" void)])]
+ "[1]::[0]"
+ (new [])
+ (equals [java/lang/Object] boolean)
+ (wait [int] "io" "try" void))]
["Special options can also be given for the return values."
"'?' means that the values will be returned inside a Maybe type. That way, null becomes .#None."
"'try' means that the computation might throw an exception, and the return value will be wrapped by the Try 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
- ["[1]::[0]"
- (new [[byte]])
- ("static" valueOf [char] java/lang/String)
- ("static" valueOf "as" int_valueOf [int] java/lang/String)])
+ "[1]::[0]"
+ (new [[byte]])
+ ("static" valueOf [char] java/lang/String)
+ ("static" valueOf "as" int_valueOf [int] java/lang/String))
(import: (java/util/List e)
- ["[1]::[0]"
- (size [] int)
- (get [int] e)])
+ "[1]::[0]"
+ (size [] int)
+ (get [int] e))
(import: (java/util/ArrayList a)
- ["[1]::[0]"
- ([T] toArray [[T]] [T])])]
+ "[1]::[0]"
+ ([T] toArray [[T]] [T]))]
["The class-type that is generated is of the fully-qualified name."
"This avoids a clash between the java.util.List type, and Lux's own List type."
"All enum options to be imported must be specified."
(import: java/lang/Character$UnicodeScript
- ["[1]::[0]"
- ("enum" ARABIC CYRILLIC LATIN)])]
+ "[1]::[0]"
+ ("enum" ARABIC CYRILLIC LATIN))]
["It should also be noted, the only types that may show up in method arguments or return values may be Java classes, arrays, primitives, void or type-parameters."
"Lux types, such as Maybe cannot be named (otherwise, they'd be confused for Java classes)."
(import: (lux/concurrency/async/JvmAsync A)
- ["[1]::[0]"
- (resolve [A] boolean)
- (poll [] A)
- (wasResolved [] boolean)
- (waitOn [lux/Function] void)
- ("static" [A] make [A] (lux/concurrency/async/JvmAsync A))])]
+ "[1]::[0]"
+ (resolve [A] boolean)
+ (poll [] A)
+ (wasResolved [] boolean)
+ (waitOn [lux/Function] void)
+ ("static" [A] make [A] (lux/concurrency/async/JvmAsync A)))]
["Also, the names of the imported members will look like Class::member"
(java/lang/Object::new [])
(java/lang/Object::equals [other_object] my_object)
diff --git a/stdlib/source/documentation/lux/ffi.py.lux b/stdlib/source/documentation/lux/ffi.py.lux
index 6b24c1926..34a88e01d 100644
--- a/stdlib/source/documentation/lux/ffi.py.lux
+++ b/stdlib/source/documentation/lux/ffi.py.lux
@@ -13,26 +13,26 @@
(documentation: /.import:
"Easily import types, methods, functions and constants."
[(import: os
- ["[1]::[0]"
- ("static" F_OK Integer)
- ("static" R_OK Integer)
- ("static" W_OK Integer)
- ("static" X_OK Integer)
+ "[1]::[0]"
+ ("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" 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
- ["[1]::[0]"
- ("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)])])
+ "[1]::[0]"
+ ("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))])
(documentation: /.lambda
(format "Allows defining closures/anonymous-functions in the form that Python expects."
diff --git a/stdlib/source/documentation/lux/ffi.rb.lux b/stdlib/source/documentation/lux/ffi.rb.lux
index 33b4ef148..01b883a84 100644
--- a/stdlib/source/documentation/lux/ffi.rb.lux
+++ b/stdlib/source/documentation/lux/ffi.rb.lux
@@ -13,23 +13,23 @@
(documentation: /.import:
"Easily import types, methods, functions and constants."
[(import: Stat
- ["[1]::[0]"
- (executable? [] Bit)
- (size Int)])
+ "[1]::[0]"
+ (executable? [] Bit)
+ (size Int))
(import: File "as" RubyFile
- ["[1]::[0]"
- ("static" SEPARATOR ..String)
- ("static" open [Path ..String] "io" "try" RubyFile)
- ("static" stat [Path] "io" "try" Stat)
- ("static" delete [Path] "io" "try" Int)
- ("static" file? [Path] "io" "try" Bit)
- ("static" directory? [Path] "io" "try" Bit)
+ "[1]::[0]"
+ ("static" SEPARATOR ..String)
+ ("static" open [Path ..String] "io" "try" RubyFile)
+ ("static" stat [Path] "io" "try" Stat)
+ ("static" delete [Path] "io" "try" Int)
+ ("static" file? [Path] "io" "try" Bit)
+ ("static" directory? [Path] "io" "try" Bit)
- (read [] "io" "try" Binary)
- (write [Binary] "io" "try" Int)
- (flush [] "io" "try" "?" Any)
- (close [] "io" "try" "?" Any)])])
+ (read [] "io" "try" Binary)
+ (write [Binary] "io" "try" Int)
+ (flush [] "io" "try" "?" Any)
+ (close [] "io" "try" "?" Any))])
(.def: .public documentation
(.List $.Module)