diff options
Diffstat (limited to 'stdlib/source/specification/compositor/generation/case.lux')
-rw-r--r-- | stdlib/source/specification/compositor/generation/case.lux | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/stdlib/source/specification/compositor/generation/case.lux b/stdlib/source/specification/compositor/generation/case.lux index d699aa74b..eb27aea29 100644 --- a/stdlib/source/specification/compositor/generation/case.lux +++ b/stdlib/source/specification/compositor/generation/case.lux @@ -40,10 +40,10 @@ (def: .public (verify expected) (-> Frac (Try Any) Bit) - (|>> (case> (#try.Success actual) + (|>> (case> {#try.Success actual} (f.= expected (:as Frac actual)) - (#try.Failure _) + {#try.Failure _} false))) (def: case @@ -187,11 +187,11 @@ (def: special_path Path - (let [_end_ (synthesis.path/side (#.Left 0)) - _item_ (synthesis.path/side (#.Right 0)) - _head_ (synthesis.path/member (#.Left 0)) - _tail_ (synthesis.path/member (#.Right 0)) - _tuple_ (synthesis.path/side (#.Left 9))] + (let [_end_ (synthesis.path/side {#.Left 0}) + _item_ (synthesis.path/side {#.Right 0}) + _head_ (synthesis.path/member {#.Left 0}) + _tail_ (synthesis.path/member {#.Right 0}) + _tuple_ (synthesis.path/side {#.Left 9})] ($_ synthesis.path/alt ($_ synthesis.path/seq _item_ @@ -213,18 +213,18 @@ (def: special_pattern analysis.Pattern - (let [... [_ (#Tuple (#Item arg args'))] + (let [... [_ {#Tuple {#Item arg args'}}] head (<| analysis.pattern/tuple (list (analysis.pattern/bind 2)) analysis.pattern/variant [9 #0] analysis.pattern/variant [0 #1] analysis.pattern/tuple (list (analysis.pattern/bind 3) (analysis.pattern/bind 4))) - ... (#Item body #End) + ... {#Item body #End} tail (<| analysis.pattern/variant [0 #1] analysis.pattern/tuple (list (analysis.pattern/bind 5)) analysis.pattern/variant [0 #0] (analysis.pattern/unit))] - ... (#Item <head> <tail>) + ... {#Item <head> <tail>} (<| analysis.pattern/variant [0 #1] (analysis.pattern/tuple (list head tail))))) @@ -253,28 +253,28 @@ (_.test "CODE" (|> special_input (run "special_input") - (case> (#try.Success output) + (case> {#try.Success output} true - (#try.Failure _) + {#try.Failure _} false))) (_.test "PATTERN_MATCHING 0" (|> (synthesis.branch/case [special_input special_path]) (run "special_path") - (case> (#try.Success output) + (case> {#try.Success output} true - (#try.Failure _) + {#try.Failure _} false))) (_.test "PATTERN_MATCHING 1" (|> (synthesis.branch/case [special_input special_pattern_path]) (run "special_pattern_path") - (case> (#try.Success output) + (case> {#try.Success output} true - (#try.Failure _) + {#try.Failure _} false))) )) |