aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/target/jvm/reflection.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/target/jvm/reflection.lux')
-rw-r--r--stdlib/source/lux/target/jvm/reflection.lux46
1 files changed, 23 insertions, 23 deletions
diff --git a/stdlib/source/lux/target/jvm/reflection.lux b/stdlib/source/lux/target/jvm/reflection.lux
index b87230b07..12c310bca 100644
--- a/stdlib/source/lux/target/jvm/reflection.lux
+++ b/stdlib/source/lux/target/jvm/reflection.lux
@@ -12,10 +12,10 @@
[data
[number
["n" nat]]
- ["." text ("#//." equivalence)
+ ["." text ("#\." equivalence)
["%" format (#+ format)]]
[collection
- ["." list ("#//." fold functor)]
+ ["." list ("#\." fold functor)]
["." array]
["." dictionary]]]]
["." // #_
@@ -131,8 +131,8 @@
(:coerce (java/lang/Class java/lang/Object))
java/lang/Class::getName)]
(`` (if (or (~~ (template [<reflection>]
- [(text//= (/reflection.reflection <reflection>)
- class-name)]
+ [(text\= (/reflection.reflection <reflection>)
+ class-name)]
[/reflection.boolean]
[/reflection.byte]
@@ -180,15 +180,15 @@
(case [(array.read 0 (java/lang/reflect/WildcardType::getLowerBounds reflection))
(array.read 0 (java/lang/reflect/WildcardType::getUpperBounds reflection))]
(^template [<pattern> <kind>]
- <pattern>
- (case (host.check java/lang/reflect/GenericArrayType bound)
- (#.Some _)
- ## TODO: Array bounds should not be "erased" as they
- ## are right now.
- (#try.Success /.wildcard)
-
- _
- (:: try.monad map <kind> (..class' parameter bound))))
+ [<pattern>
+ (case (host.check java/lang/reflect/GenericArrayType bound)
+ (#.Some _)
+ ## TODO: Array bounds should not be "erased" as they
+ ## are right now.
+ (#try.Success /.wildcard)
+
+ _
+ (:: try.monad map <kind> (..class' parameter bound)))])
([[_ (#.Some bound)] /.upper]
[[(#.Some bound) _] /.lower])
@@ -210,8 +210,8 @@
(:coerce (java/lang/Class java/lang/Object))
java/lang/Class::getName)]
(`` (cond (~~ (template [<reflection> <type>]
- [(text//= (/reflection.reflection <reflection>)
- class-name)
+ [(text\= (/reflection.reflection <reflection>)
+ class-name)
(#try.Success <type>)]
[/reflection.boolean /.boolean]
@@ -244,8 +244,8 @@
(let [class-name (|> reflection
(:coerce (java/lang/Class java/lang/Object))
java/lang/Class::getName)]
- (if (text//= (/reflection.reflection /reflection.void)
- class-name)
+ (if (text\= (/reflection.reflection /reflection.void)
+ class-name)
(#try.Success /.void)
<else>))
@@ -280,14 +280,14 @@
class-params (array.to-list (java/lang/Class::getTypeParameters class))
num-class-params (list.size class-params)
num-type-params (list.size params)]
- (if (text//= class-name name)
+ (if (text\= class-name name)
(if (n.= num-class-params num-type-params)
(|> params
- (list.zip/2 (list//map (|>> java/lang/reflect/TypeVariable::getName)
- class-params))
- (list//fold (function (_ [name paramT] mapping)
- (dictionary.put name paramT mapping))
- /lux.fresh)
+ (list.zip/2 (list\map (|>> java/lang/reflect/TypeVariable::getName)
+ class-params))
+ (list\fold (function (_ [name paramT] mapping)
+ (dictionary.put name paramT mapping))
+ /lux.fresh)
#try.Success)
(exception.throw ..type-parameter-mismatch [num-class-params num-type-params class type]))
(exception.throw ..cannot-correspond [class type])))