diff options
Diffstat (limited to 'stdlib/source/lux/tool/compiler/phase/extension/analysis')
-rw-r--r-- | stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux | 34 | ||||
-rw-r--r-- | stdlib/source/lux/tool/compiler/phase/extension/analysis/lux.lux | 6 |
2 files changed, 20 insertions, 20 deletions
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 fa31254c8..3acecec11 100644 --- a/stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux +++ b/stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux @@ -5,13 +5,13 @@ [abstract ["." monad (#+ do)]] [control + ["." try (#+ Try) ("#@." monad)] ["<>" parser ["<c>" code (#+ Parser)] ["<t>" text]] ["." exception (#+ exception:)] pipe] [data - ["." error (#+ Error) ("#@." monad)] ["." maybe] ["." product] ["." text ("#@." equivalence) @@ -829,7 +829,7 @@ (function (_ extension-name analyse [class field]) (do ////.monad [[final? fieldJT] (////.lift - (do error.monad + (do try.monad [class (reflection!.load class)] (reflection!.static-field field class))) fieldT (reflection-type luxT.fresh fieldJT) @@ -847,7 +847,7 @@ (do ////.monad [_ (typeA.infer Any) [final? fieldJT] (////.lift - (do error.monad + (do try.monad [class (reflection!.load class)] (reflection!.static-field field class))) fieldT (reflection-type luxT.fresh fieldJT) @@ -869,7 +869,7 @@ [[objectT objectA] (typeA.with-inference (analyse objectC)) [mapping fieldJT] (////.lift - (do error.monad + (do try.monad [class (reflection!.load class) [final? fieldJT] (reflection!.virtual-field field class) mapping (reflection!.correspond class objectT)] @@ -892,7 +892,7 @@ (analyse objectC)) _ (typeA.infer objectT) [final? mapping fieldJT] (////.lift - (do error.monad + (do try.monad [class (reflection!.load class) [final? fieldJT] (reflection!.virtual-field field class) mapping (reflection!.correspond class objectT)] @@ -921,8 +921,8 @@ (do ////.monad [parameters (|> (java/lang/reflect/Method::getGenericParameterTypes method) array.to-list - (monad.map error.monad reflection!.type) - (:: error.monad map (list@map jvm.descriptor)) + (monad.map try.monad reflection!.type) + (:: try.monad map (list@map jvm.descriptor)) ////.lift) #let [modifiers (java/lang/reflect/Method::getModifiers method) correct-class? (java/lang/Object::equals class (java/lang/reflect/Method::getDeclaringClass method)) @@ -958,8 +958,8 @@ (do ////.monad [parameters (|> (java/lang/reflect/Constructor::getGenericParameterTypes constructor) array.to-list - (monad.map error.monad reflection!.type) - (:: error.monad map (list@map jvm.descriptor)) + (monad.map try.monad reflection!.type) + (:: try.monad map (list@map jvm.descriptor)) ////.lift)] (wrap (and (java/lang/Object::equals class (java/lang/reflect/Constructor::getDeclaringClass constructor)) (n/= (list.size arg-classes) (list.size parameters)) @@ -1401,13 +1401,13 @@ (template [<name> <filter>] [(def: <name> (-> (java/lang/Class java/lang/Object) - (Error (List [Text Method]))) + (Try (List [Text Method]))) (|>> java/lang/Class::getDeclaredMethods array.to-list <filter> - (monad.map error.monad + (monad.map try.monad (function (_ method) - (do error.monad + (do try.monad [inputs (|> (java/lang/reflect/Method::getGenericParameterTypes method) array.to-list (monad.map @ reflection!.type)) @@ -1428,11 +1428,11 @@ (template [<name> <methods>] [(def: <name> - (-> (List Class) (Error (List [Text Method]))) - (|>> (monad.map error.monad (|>> product.left reflection!.load)) - (error@map (monad.map error.monad <methods>)) - error@join - (error@map list@join)))] + (-> (List Class) (Try (List [Text Method]))) + (|>> (monad.map try.monad (|>> product.left reflection!.load)) + (try@map (monad.map try.monad <methods>)) + try@join + (try@map list@join)))] [all-abstract-methods ..abstract-methods] [all-methods ..methods] diff --git a/stdlib/source/lux/tool/compiler/phase/extension/analysis/lux.lux b/stdlib/source/lux/tool/compiler/phase/extension/analysis/lux.lux index 2086a0fea..efd917bd2 100644 --- a/stdlib/source/lux/tool/compiler/phase/extension/analysis/lux.lux +++ b/stdlib/source/lux/tool/compiler/phase/extension/analysis/lux.lux @@ -4,12 +4,12 @@ ["." monad (#+ do)]] [control [io (#+ IO)] + ["." try] ["." exception (#+ exception:)] ["<>" parser ["<c>" code (#+ Parser)]]] [data ["." maybe] - ["." error] ["." text ["%" format (#+ format)]] [collection @@ -37,10 +37,10 @@ Handler)) (function (_ extension-name analyse args) (case (<c>.run syntax args) - (#error.Success inputs) + (#try.Success inputs) (handler extension-name analyse inputs) - (#error.Failure error) + (#try.Failure _) (/////analysis.throw ///.invalid-syntax [extension-name %.code args])))) (def: (simple inputsT+ outputT) |