diff options
Diffstat (limited to 'stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/case.lux')
-rw-r--r-- | stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/case.lux | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/case.lux index d2bf439da..75e27d5bf 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/case.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/case.lux @@ -42,15 +42,15 @@ thenC (#///analysis.Bit when) - (///\map (function (_ then) - (#/.Bit_Fork when then #.None)) - thenC) + (///\each (function (_ then) + (#/.Bit_Fork when then #.None)) + thenC) (^template [<from> <to> <conversion>] [(<from> test) - (///\map (function (_ then) - (<to> [(<conversion> test) then] (list))) - thenC)]) + (///\each (function (_ then) + (<to> [(<conversion> test) then] (list))) + thenC)]) ([#///analysis.Nat #/.I64_Fork .i64] [#///analysis.Int #/.I64_Fork .i64] [#///analysis.Rev #/.I64_Fork .i64] @@ -58,16 +58,16 @@ [#///analysis.Text #/.Text_Fork |>])) (#///analysis.Bind register) - (<| (\ ///.monad map (|>> (#/.Seq (#/.Bind register)))) + (<| (\ ///.monad each (|>> (#/.Seq (#/.Bind register)))) /.with_new_local thenC) (#///analysis.Complex (#///analysis.Variant [lefts right? value_pattern])) - (<| (///\map (|>> (#/.Seq (#/.Access (#/.Side (if right? - (#.Right lefts) - (#.Left lefts))))))) + (<| (///\each (|>> (#/.Seq (#/.Access (#/.Side (if right? + (#.Right lefts) + (#.Left lefts))))))) (path' value_pattern end?) - (when> [(new> (not end?) [])] [(///\map ..clean_up)]) + (when> [(new> (not end?) [])] [(///\each ..clean_up)]) thenC) (#///analysis.Complex (#///analysis.Tuple tuple)) @@ -80,11 +80,11 @@ _ (let [right? (n.= tuple::last tuple::lefts) end?' (and end? right?)] - (<| (///\map (|>> (#/.Seq (#/.Access (#/.Member (if right? - (#.Right (-- tuple::lefts)) - (#.Left tuple::lefts))))))) + (<| (///\each (|>> (#/.Seq (#/.Access (#/.Member (if right? + (#.Right (-- tuple::lefts)) + (#.Left tuple::lefts))))))) (path' tuple::member end?') - (when> [(new> (not end?') [])] [(///\map ..clean_up)]) + (when> [(new> (not end?') [])] [(///\each ..clean_up)]) nextC)))) thenC (list.reversed (list.enumeration tuple)))) @@ -92,7 +92,7 @@ (def: (path archive synthesize pattern bodyA) (-> Archive Phase Pattern Analysis (Operation Path)) - (path' pattern true (///\map (|>> #/.Then) (synthesize archive bodyA)))) + (path' pattern true (///\each (|>> #/.Then) (synthesize archive bodyA)))) (def: (weave_branch weave equivalence [new_test new_then] [[old_test old_then] old_tail]) (All [a] (-> (-> Path Path Path) (Equivalence a) [a Path] (/.Fork a Path) @@ -227,7 +227,7 @@ (-> Phase Archive Synthesis Match (Operation Synthesis)) (do {! ///.monad} [headSP (path archive synthesize headP headA) - tailSP+ (monad.map ! (product.uncurried (path archive synthesize)) tailPA+)] + tailSP+ (monad.each ! (product.uncurried (path archive synthesize)) tailPA+)] (in (/.branch/case [input (list\mix weave headSP tailSP+)])))) (template: (!masking <variable> <output>) @@ -269,7 +269,7 @@ path (case input (^ (/.branch/get [sub_path sub_input])) - (///\in (/.branch/get [(list\compose path sub_path) sub_input])) + (///\in (/.branch/get [(list\composite path sub_path) sub_input])) _ (///\in (/.branch/get [path input]))))) @@ -357,7 +357,7 @@ (#/.F64_Fork forks) (#/.Text_Fork forks)) (|> (#.Item forks) - (list\map product.right) + (list\each product.right) (list\mix for_path path_storage)) (^or (^ (/.path/seq left right)) @@ -413,7 +413,7 @@ (set.union (|> synthesis_storage (revised@ #bindings (set.union (|> initsS+ list.enumeration - (list\map (|>> product.left (n.+ start))) + (list\each (|>> product.left (n.+ start))) (set.of_list n.hash)))) (for_synthesis iterationS) (value@ #dependencies))) |