aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/host.jvm.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/host.jvm.lux52
1 files changed, 26 insertions, 26 deletions
diff --git a/stdlib/source/lux/host.jvm.lux b/stdlib/source/lux/host.jvm.lux
index 84edbd1ed..0c648c037 100644
--- a/stdlib/source/lux/host.jvm.lux
+++ b/stdlib/source/lux/host.jvm.lux
@@ -11,7 +11,7 @@
[text "Text/" Eq<Text> Monoid<Text>]
text/format
[bool "Bool/" Codec<Text,Bool>])
- [compiler #+ with-gensyms Functor<Lux> Monad<Lux>]
+ [macro #+ with-gensyms Functor<Lux> Monad<Lux>]
(macro [ast]
["s" syntax #+ syntax: Syntax])
[type]
@@ -367,21 +367,21 @@
(def: (class-imports compiler)
(-> Compiler ClassImports)
- (case (compiler;run compiler
- (: (Lux ClassImports)
- (do Monad<Lux>
- [current-module compiler;current-module-name
- defs (compiler;defs current-module)]
- (wrap (fold (: (-> [Text Def] ClassImports ClassImports)
- (function [[short-name [_ meta _]] imports]
- (case (compiler;get-text-ann (ident-for #;;jvm-class) meta)
- (#;Some full-class-name)
- (add-import [short-name full-class-name] imports)
-
- _
- imports)))
- empty-imports
- defs)))))
+ (case (macro;run compiler
+ (: (Lux ClassImports)
+ (do Monad<Lux>
+ [current-module macro;current-module-name
+ defs (macro;defs current-module)]
+ (wrap (fold (: (-> [Text Def] ClassImports ClassImports)
+ (function [[short-name [_ meta _]] imports]
+ (case (macro;get-text-ann (ident-for #;;jvm-class) meta)
+ (#;Some full-class-name)
+ (add-import [short-name full-class-name] imports)
+
+ _
+ imports)))
+ empty-imports
+ defs)))))
(#;Left _) (list)
(#;Right imports) imports))
@@ -1328,7 +1328,7 @@
sleepers-count (java.util.List.size [] sleepers)]
(map (function [idx]
(let [sleeper (java.util.List.get [(l2i idx)] sleepers)]
- (Executor.execute [(@runnable (lux.Function.apply [(:! Object value)] sleeper))]
+ (Executor.execute [(runnable (lux.Function.apply [(:! Object value)] sleeper))]
executor)))
(i.range 0 (i.dec (i2l sleepers-count)))))
(:= .waitingList (null))
@@ -1359,7 +1359,7 @@
"(.resolve! container [value]) for calling the \"resolve\" method."
)}
(do Monad<Lux>
- [current-module compiler;current-module-name
+ [current-module macro;current-module-name
#let [fully-qualified-class-name (format (text;replace-all "/" "." current-module) "." full-class-name)
field-parsers (map (field->parser fully-qualified-class-name) fields)
method-parsers (map (method->parser (product;right class-decl) fully-qualified-class-name) methods)
@@ -1489,7 +1489,7 @@
#;None
(do @
- [g!obj (compiler;gensym "obj")]
+ [g!obj (macro;gensym "obj")]
(wrap (list (` (: (-> (host (~' java.lang.Object)) Bool)
(function [(~ g!obj)]
(;_lux_proc ["jvm" (~ (ast;text (format "instanceof" ":" (simple-class$ (list) class))))] [(~ g!obj)])))))))
@@ -1609,7 +1609,7 @@
(:: Monad<Lux> wrap (class->type mode type-params (get@ #import-method-return method)))
_
- (compiler;fail "Only methods have return values.")))
+ (macro;fail "Only methods have return values.")))
(def: (decorate-return-maybe member [return-type return-term])
(-> ImportMemberDecl [AST AST] [AST AST])
@@ -1912,7 +1912,7 @@
#Class))
(#;Left _)
- (compiler;fail (format "Unknown class: " class-name))))
+ (macro;fail (format "Unknown class: " class-name))))
(syntax: #export (jvm-import [#let [imports (class-imports *compiler*)]]
[long-name? (s;this? (' #long))]
@@ -2007,7 +2007,7 @@
(#;AppT F A)
(case (type;apply-type F A)
#;None
- (compiler;fail (format "Can't apply type: " (type;to-text F) " to " (type;to-text A)))
+ (macro;fail (format "Can't apply type: " (type;to-text F) " to " (type;to-text A)))
(#;Some type')
(type->class-name type'))
@@ -2019,7 +2019,7 @@
(:: Monad<Lux> wrap "java.lang.Object")
(^or #;VoidT (#;VarT _) (#;ExT _) (#;BoundT _) (#;SumT _) (#;ProdT _) (#;FunctionT _) (#;UnivQ _) (#;ExQ _))
- (compiler;fail (format "Can't convert to JvmType: " (type;to-text type)))
+ (macro;fail (format "Can't convert to JvmType: " (type;to-text type)))
))
(syntax: #export (array-load idx array)
@@ -2028,7 +2028,7 @@
(case array
[_ (#;SymbolS array-name)]
(do Monad<Lux>
- [array-type (compiler;find-type array-name)
+ [array-type (macro;find-type array-name)
array-jvm-type (type->class-name array-type)]
(case array-jvm-type
(^template [<type> <array-op>]
@@ -2057,7 +2057,7 @@
(case array
[_ (#;SymbolS array-name)]
(do Monad<Lux>
- [array-type (compiler;find-type array-name)
+ [array-type (macro;find-type array-name)
array-jvm-type (type->class-name array-type)]
(case array-jvm-type
(^template [<type> <array-op>]
@@ -2142,4 +2142,4 @@
(wrap fqcn)
#;None
- (compiler;fail (Text/append "Unknown class: " class)))))
+ (macro;fail (Text/append "Unknown class: " class)))))