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/specification/compositor/generation/structure.lux | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'stdlib/source/specification/compositor/generation/structure.lux') diff --git a/stdlib/source/specification/compositor/generation/structure.lux b/stdlib/source/specification/compositor/generation/structure.lux index a70e61531..c98013875 100644 --- a/stdlib/source/specification/compositor/generation/structure.lux +++ b/stdlib/source/specification/compositor/generation/structure.lux @@ -42,7 +42,7 @@ #analysis.right? last?_in #analysis.value (synthesis.i64 value_in)]) (run "variant") - (case> (#try.Success valueT) + (case> {#try.Success valueT} (let [valueT (:as (Array Any) valueT)] (and (n.= 3 (array.size valueT)) (let [tag_out (:as java/lang/Integer (maybe.trusted (array.read! 0 valueT))) @@ -50,7 +50,7 @@ value_out (:as Any (maybe.trusted (array.read! 2 valueT))) same_tag? (|> tag_out ffi.int_to_long (:as Nat) (n.= tag_in)) same_flag? (case last?_out - (#.Some last?_out') + {#.Some last?_out'} (and last?_in (text\= "" (:as Text last?_out'))) #.None @@ -60,7 +60,7 @@ same_flag? same_value?)))) - (#try.Failure _) + {#try.Failure _} false))))) (def: (tuple run) @@ -71,14 +71,14 @@ (_.test (%.name (name_of synthesis.tuple)) (|> (synthesis.tuple (list\each (|>> synthesis.i64) tuple_in)) (run "tuple") - (case> (#try.Success tuple_out) + (case> {#try.Success tuple_out} (let [tuple_out (:as (Array Any) tuple_out)] (and (n.= size (array.size tuple_out)) (list.every? (function (_ [left right]) (i.= left (:as Int right))) (list.zipped/2 tuple_in (array.list tuple_out))))) - (#try.Failure _) + {#try.Failure _} false))))) (def: .public (spec runner) -- cgit v1.2.3