diff options
Diffstat (limited to 'stdlib/source/library/lux/meta/target/jvm/reflection.lux')
-rw-r--r-- | stdlib/source/library/lux/meta/target/jvm/reflection.lux | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/stdlib/source/library/lux/meta/target/jvm/reflection.lux b/stdlib/source/library/lux/meta/target/jvm/reflection.lux index a33bc6507..2a0ad37a8 100644 --- a/stdlib/source/library/lux/meta/target/jvm/reflection.lux +++ b/stdlib/source/library/lux/meta/target/jvm/reflection.lux @@ -6,7 +6,7 @@ ["[0]" monad (.only do)]] [control ["[0]" try (.only Try) (.use "[1]#[0]" functor)] - ["[0]" exception (.only exception)]] + ["[0]" exception (.only Exception)]] [data ["[0]" text (.use "[1]#[0]" equivalence) ["%" \\format (.only format)] @@ -96,12 +96,14 @@ (isArray [] boolean) (getComponentType [] (java/lang/Class java/lang/Object))) -(exception .public (unknown_class [class External]) +(exception.def .public (unknown_class class) + (Exception External) (exception.report (list ["Class" (%.text class)]))) (with_template [<name>] - [(exception .public (<name> [jvm_type java/lang/reflect/Type]) + [(exception.def .public (<name> jvm_type) + (Exception java/lang/reflect/Type) (exception.report (list ["Type" (java/lang/reflect/Type::getTypeName jvm_type)] ["Class" (|> jvm_type java/lang/Object::getClass java/lang/Object::toString)])))] @@ -267,23 +269,22 @@ {.#None} <else>))) -(exception .public (cannot_correspond [class (java/lang/Class java/lang/Object) - type Type]) +(exception.def .public (cannot_correspond [class type]) + (Exception [(java/lang/Class java/lang/Object) Type]) (exception.report (list ["Class" (java/lang/Object::toString class)] ["Type" (%.type type)]))) -(exception .public (type_parameter_mismatch [expected Nat - actual Nat - class (java/lang/Class java/lang/Object) - type Type]) +(exception.def .public (type_parameter_mismatch [expected actual class type]) + (Exception [Nat Nat (java/lang/Class java/lang/Object) Type]) (exception.report (list ["Expected" (%.nat expected)] ["Actual" (%.nat actual)] ["Class" (java/lang/Object::toString class)] ["Type" (%.type type)]))) -(exception .public (non_jvm_type [type Type]) +(exception.def .public (non_jvm_type type) + (Exception Type) (exception.report (list ["Type" (%.type type)]))) @@ -327,17 +328,16 @@ _ (exception.except ..non_jvm_type [type]))) -(exception .public (mistaken_field_owner [field java/lang/reflect/Field - owner (java/lang/Class java/lang/Object) - target (java/lang/Class java/lang/Object)]) +(exception.def .public (mistaken_field_owner [field owner target]) + (Exception [java/lang/reflect/Field (java/lang/Class java/lang/Object) (java/lang/Class java/lang/Object)]) (exception.report (list ["Field" (java/lang/Object::toString field)] ["Owner" (java/lang/Object::toString owner)] ["Target" (java/lang/Object::toString target)]))) (with_template [<name>] - [(exception .public (<name> [field Text - class (java/lang/Class java/lang/Object)]) + [(exception.def .public (<name> [field class]) + (Exception [Text (java/lang/Class java/lang/Object)]) (exception.report (list ["Field" (%.text field)] ["Class" (java/lang/Object::toString class)])))] |