From cd71a864ad5be13ed6ec6d046e0a2cb1087bdf94 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 10 Sep 2021 01:21:23 -0400 Subject: Migrated variants to the new syntax. --- .../source/luxc/lang/translation/jvm/common.lux | 40 +++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'lux-jvm/source/luxc/lang/translation/jvm/common.lux') diff --git a/lux-jvm/source/luxc/lang/translation/jvm/common.lux b/lux-jvm/source/luxc/lang/translation/jvm/common.lux index 8db12bd7e..2dade7a97 100644 --- a/lux-jvm/source/luxc/lang/translation/jvm/common.lux +++ b/lux-jvm/source/luxc/lang/translation/jvm/common.lux @@ -32,21 +32,21 @@ ... (All (_ a) (-> (Meta a) (Meta [Artifacts a]))) ... (function (_ state) ... (case (action (revised@ #.host -... (|>> (:coerce Host) -... (with@ #artifacts (dictionary.new text.hash)) -... (:coerce Nothing)) -... state)) -... (#try.Success [state' output]) -... (#try.Success [(revised@ #.host -... (|>> (:coerce Host) -... (with@ #artifacts (|> (value@ #.host state) (:coerce Host) (value@ #artifacts))) -... (:coerce Nothing)) -... state') -... [(|> state' (value@ #.host) (:coerce Host) (value@ #artifacts)) -... output]]) +... (|>> (:coerce Host) +... (with@ #artifacts (dictionary.new text.hash)) +... (:coerce Nothing)) +... state)) +... {#try.Success [state' output]} +... {#try.Success [(revised@ #.host +... (|>> (:coerce Host) +... (with@ #artifacts (|> (value@ #.host state) (:coerce Host) (value@ #artifacts))) +... (:coerce Nothing)) +... state') +... [(|> state' (value@ #.host) (:coerce Host) (value@ #artifacts)) +... output]]} -... (#try.Failure error) -... (#try.Failure error)))) +... {#try.Failure error} +... {#try.Failure error}))) ... (def: .public (load-definition state) ... (-> Lux (-> Name Binary (Try Any))) @@ -60,14 +60,14 @@ ... (case (do try.monad ... [field (Class::getField [..value-field] class)] ... (Field::get [#.None] field)) -... (#try.Success (#.Some def-value)) +... {#try.Success {#.Some def-value}} ... (wrap def-value) -... (#try.Success #.None) +... {#try.Success #.None} ... (phase.throw invalid-definition-value (%name def-name)) -... (#try.Failure error) +... {#try.Failure error} ... (phase.throw cannot-load-definition -... (format "Definition: " (%name def-name) "\n" -... "Error:\n" -... error)))))))) +... (format "Definition: " (%name def-name) "\n" +... "Error:\n" +... error)))))))) -- cgit v1.2.3