aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/target
diff options
context:
space:
mode:
authorEduardo Julian2022-03-14 06:14:57 -0400
committerEduardo Julian2022-03-14 06:14:57 -0400
commit4965597043aca57a05760113f1851e96dad1eaf8 (patch)
tree8126d3e6394e38bc52918eea95a67546350bb95e /stdlib/source/library/lux/target
parentcfd438517a46e025b15345e3570b02f5ea6165c0 (diff)
Leaner syntax for the "for" macro.
Diffstat (limited to 'stdlib/source/library/lux/target')
-rw-r--r--stdlib/source/library/lux/target/jvm/constant.lux78
-rw-r--r--stdlib/source/library/lux/target/jvm/loader.lux10
-rw-r--r--stdlib/source/library/lux/target/python.lux16
3 files changed, 52 insertions, 52 deletions
diff --git a/stdlib/source/library/lux/target/jvm/constant.lux b/stdlib/source/library/lux/target/jvm/constant.lux
index 8f6358470..2dddcee7b 100644
--- a/stdlib/source/library/lux/target/jvm/constant.lux
+++ b/stdlib/source/library/lux/target/jvm/constant.lux
@@ -1,36 +1,36 @@
(.using
- [library
- [lux "*"
- ["@" target]
- ["[0]" ffi {"+" import:}]
- [abstract
- [monad {"+" do}]
- ["[0]" equivalence {"+" Equivalence}]]
- [data
- ["[0]" sum]
- ["[0]" product]
- ["[0]" text]
- [format
- ["[0]F" binary {"+" Writer} ("[1]#[0]" monoid)]]]
- [macro
- ["[0]" template]]
- [math
- [number
- ["[0]" i32 {"+" I32}]
- ["[0]" i64]
- ["[0]" int]
- ["[0]" frac]]]
- [type
- abstract]]]
- ["[0]" / "_"
- ["[1][0]" tag]
- ["/[1]" // "_"
- ["[1][0]" index {"+" Index}]
- [type
- ["[1][0]" category]
- ["[1][0]" descriptor {"+" Descriptor}]]
- [encoding
- ["[1][0]" unsigned]]]])
+ [library
+ [lux "*"
+ ["@" target]
+ ["[0]" ffi {"+" import:}]
+ [abstract
+ [monad {"+" do}]
+ ["[0]" equivalence {"+" Equivalence}]]
+ [data
+ ["[0]" sum]
+ ["[0]" product]
+ ["[0]" text]
+ [format
+ ["[0]F" binary {"+" Writer} ("[1]#[0]" monoid)]]]
+ [macro
+ ["[0]" template]]
+ [math
+ [number
+ ["[0]" i32 {"+" I32}]
+ ["[0]" i64]
+ ["[0]" int]
+ ["[0]" frac]]]
+ [type
+ abstract]]]
+ ["[0]" / "_"
+ ["[1][0]" tag]
+ ["/[1]" // "_"
+ ["[1][0]" index {"+" Index}]
+ [type
+ ["[1][0]" category]
+ ["[1][0]" descriptor {"+" Descriptor}]]
+ [encoding
+ ["[1][0]" unsigned]]]])
(type: .public UTF8
Text)
@@ -69,13 +69,13 @@
(Equivalence java/lang/Float)
(def: (= parameter subject)
- (for [@.old
- ("jvm feq" parameter subject)
-
- @.jvm
- ("jvm float ="
- ("jvm object cast" parameter)
- ("jvm object cast" subject))])))
+ (for @.old
+ ("jvm feq" parameter subject)
+
+ @.jvm
+ ("jvm float ="
+ ("jvm object cast" parameter)
+ ("jvm object cast" subject)))))
(import: java/lang/Double
["[1]::[0]"
diff --git a/stdlib/source/library/lux/target/jvm/loader.lux b/stdlib/source/library/lux/target/jvm/loader.lux
index 26e67f2e9..ce31e2e12 100644
--- a/stdlib/source/library/lux/target/jvm/loader.lux
+++ b/stdlib/source/library/lux/target/jvm/loader.lux
@@ -102,11 +102,11 @@
(def: .public (memory library)
(-> Library java/lang/ClassLoader)
- (with_expansions [<cast> (for [@.old
- (<|)
-
- @.jvm
- "jvm object cast"])]
+ (with_expansions [<cast> (for @.old
+ (<|)
+
+ @.jvm
+ "jvm object cast")]
(<| <cast>
(object [] java/lang/ClassLoader []
[]
diff --git a/stdlib/source/library/lux/target/python.lux b/stdlib/source/library/lux/target/python.lux
index 237baadd7..2e991c91f 100644
--- a/stdlib/source/library/lux/target/python.lux
+++ b/stdlib/source/library/lux/target/python.lux
@@ -34,10 +34,10 @@
(-> Text Text)
(text.enclosed ["(" ")"]))
-(for [@.old (as_is (ffi.import: java/lang/CharSequence)
- (ffi.import: java/lang/String
- ["[1]::[0]"
- (replace [java/lang/CharSequence java/lang/CharSequence] java/lang/String)]))]
+(for @.old (as_is (ffi.import: java/lang/CharSequence)
+ (ffi.import: java/lang/String
+ ["[1]::[0]"
+ (replace [java/lang/CharSequence java/lang/CharSequence] java/lang/String)]))
(as_is))
... Added the carriage return for better Windows compatibility.
@@ -48,10 +48,10 @@
(def: nested
(-> Text Text)
(.let [nested_new_line (format text.new_line text.tab)]
- (for [@.old (|>> (format \n+)
- (:as java/lang/String)
- (java/lang/String::replace (:as java/lang/CharSequence text.new_line)
- (:as java/lang/CharSequence nested_new_line)))]
+ (for @.old (|>> (format \n+)
+ (:as java/lang/String)
+ (java/lang/String::replace (:as java/lang/CharSequence text.new_line)
+ (:as java/lang/CharSequence nested_new_line)))
(|>> (format \n+)
(text.replaced text.new_line nested_new_line)))))