diff options
author | Eduardo Julian | 2019-09-17 00:27:13 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-09-17 00:27:13 -0400 |
commit | 4049370ec0d0bec578b8fcb83700d020e81386c4 (patch) | |
tree | 16e0e6fbf1ac825e1ba318f32f57b25f5363f3d6 /stdlib/source | |
parent | c2577a665818b14adb7b0a0c1eaf326144d4447d (diff) |
Fixed some bugs related to JVM types.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/data/text/format.lux | 7 | ||||
-rw-r--r-- | stdlib/source/lux/target/jvm/loader.lux | 2 | ||||
-rw-r--r-- | stdlib/source/lux/target/jvm/type/alias.lux | 9 | ||||
-rw-r--r-- | stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux | 4 | ||||
-rw-r--r-- | stdlib/source/test/lux/target/jvm.lux | 2 |
5 files changed, 10 insertions, 14 deletions
diff --git a/stdlib/source/lux/data/text/format.lux b/stdlib/source/lux/data/text/format.lux index 99dbc2a73..9f47c4292 100644 --- a/stdlib/source/lux/data/text/format.lux +++ b/stdlib/source/lux/data/text/format.lux @@ -63,14 +63,9 @@ [instant instant.Instant instant.to-text] [duration duration.Duration duration.encode] [date date.Date (:: date.codec encode)] + [cursor Cursor .cursor-description] ) -(def: #export (cursor [file line column]) - (Format Cursor) - (|> (.list (..text file) (..nat line) (..nat column)) - (text.join-with ", ") - (text.enclose ["[" "]"]))) - (def: #export (mod modular) (All [m] (Format (modular.Mod m))) (let [[_ modulus] (modular.un-mod modular)] diff --git a/stdlib/source/lux/target/jvm/loader.lux b/stdlib/source/lux/target/jvm/loader.lux index ed82231e1..3e17d42c8 100644 --- a/stdlib/source/lux/target/jvm/loader.lux +++ b/stdlib/source/lux/target/jvm/loader.lux @@ -45,7 +45,7 @@ (invoke [java/lang/Object [java/lang/Object]] #try java/lang/Object)) (import: #long (java/lang/Class a) - (getDeclaredMethod [java/lang/String [(java/lang/Class java/lang/Object)]] java/lang/reflect/Method)) + (getDeclaredMethod [java/lang/String [(java/lang/Class [? < java/lang/Object])]] java/lang/reflect/Method)) (import: #long java/lang/Integer (#static TYPE (java/lang/Class java/lang/Integer))) diff --git a/stdlib/source/lux/target/jvm/type/alias.lux b/stdlib/source/lux/target/jvm/type/alias.lux index 9d92d7b6a..cd631a251 100644 --- a/stdlib/source/lux/target/jvm/type/alias.lux +++ b/stdlib/source/lux/target/jvm/type/alias.lux @@ -53,13 +53,14 @@ (<>.after (<t>.this //descriptor.class-prefix)) (<>.before (<t>.this //descriptor.class-suffix)))) -(template [<name> <prefix> <constructor>] +(template [<name> <prefix> <bound> <constructor>] [(def: <name> (-> (Parser (Type Class)) (Parser (Type Parameter))) - (<>.after (<t>.this <prefix>)))] + (|>> (<>.after (<t>.this <prefix>)) + (:: <>.monad map <bound>)))] - [lower //signature.lower-prefix ..Lower] - [upper //signature.upper-prefix ..Upper] + [lower //signature.lower-prefix //.lower ..Lower] + [upper //signature.upper-prefix //.upper ..Upper] ) (def: (parameter aliasing) diff --git a/stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux b/stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux index 2d1dec4b2..63f0561c0 100644 --- a/stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux +++ b/stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux @@ -1128,7 +1128,7 @@ [inputsT (|> (java/lang/reflect/Method::getGenericParameterTypes method) array.to-list (monad.map @ (|>> reflection!.type ////.lift)) - (////@map (monad.map @ (reflection-type mapping))) + (////@map (monad.map @ (..reflection-type mapping))) ////@join) outputT (|> method java/lang/reflect/Method::getGenericReturnType @@ -1139,7 +1139,7 @@ exceptionsT (|> (java/lang/reflect/Method::getGenericExceptionTypes method) array.to-list (monad.map @ (|>> reflection!.type ////.lift)) - (////@map (monad.map @ (reflection-type mapping))) + (////@map (monad.map @ (..reflection-type mapping))) ////@join) #let [methodT (<| (type.univ-q (dictionary.size mapping)) (type.function (case method-style diff --git a/stdlib/source/test/lux/target/jvm.lux b/stdlib/source/test/lux/target/jvm.lux index fc7c140b4..5ffe668fc 100644 --- a/stdlib/source/test/lux/target/jvm.lux +++ b/stdlib/source/test/lux/target/jvm.lux @@ -67,7 +67,7 @@ (invoke [java/lang/Object [java/lang/Object]] #try java/lang/Object)) (import: #long (java/lang/Class c) - (getDeclaredMethod [java/lang/String [(java/lang/Class java/lang/Object)]] java/lang/reflect/Method)) + (getDeclaredMethod [java/lang/String [(java/lang/Class [? < java/lang/Object])]] java/lang/reflect/Method)) (import: #long java/lang/Object (getClass [] (java/lang/Class java/lang/Object)) |