Bend/tests/snapshots/compile_file__redex_order_recursive.bend.snap
2024-06-17 11:40:55 -03:00

174 lines
3.9 KiB
Plaintext

---
source: tests/golden_tests.rs
input_file: tests/golden_tests/compile_file/redex_order_recursive.bend
---
@Foo = (a (b (c ((a (b (c d))) d))))
@List.concat = ((@List.concat__C1 a) a)
@List.concat__C0 = (* (a (b (c e))))
& @List/Cons ~ (a (d e))
& @List.concat ~ (b (c d))
@List.concat__C1 = (?(((a a) @List.concat__C0) b) b)
@List.fold = ((@List.fold__C1 a) a)
@List.fold__C0 = (* (a (b ({(a (e f)) c} (d f)))))
& @List.fold ~ (b (c (d e)))
@List.fold__C1 = (?(((* (a a)) @List.fold__C0) b) b)
@List.len = ((@List.len__C1 a) a)
@List.len__C0 = (* (* (a c)))
& $(b c) ~ [+0x0000001]
& @List.len ~ (a b)
@List.len__C1 = (?((0 @List.len__C0) a) a)
@List.len_tr = ((@List.len_tr__C1 a) a)
@List.len_tr__C0 = (* (* (a (b d))))
& @List.len_tr ~ (a (c d))
& $(b c) ~ [+0x0000001]
@List.len_tr__C1 = (?(((a a) @List.len_tr__C0) b) b)
@List.map = ((@List.map__C1 a) a)
@List.map__C0 = (* (a (c ({(a b) d} f))))
& @List/Cons ~ (b (e f))
& @List.map ~ (c (d e))
@List.map__C1 = (?(((* @List/Nil) @List.map__C0) a) a)
@List.reduce = ((@List.reduce__C1 a) a)
@List.reduce__C0 = (* (d (a ({b (c (d e))} (c f)))))
& @List.reduce ~ (a (b (e f)))
@List.reduce__C1 = (?(((* (a a)) @List.reduce__C0) b) b)
@List.reverse_bad = ((@List.reverse_bad__C1 a) a)
@List.reverse_bad__C0 = (* (c (a e)))
& @List.concat ~ (b (d e))
& @List.reverse_bad ~ (a b)
& @List/Cons ~ (c (@List/Nil d))
@List.reverse_bad__C1 = (?((@List/Nil @List.reverse_bad__C0) a) a)
@List.reverse_over = ((@List.reverse_over__C1 a) a)
@List.reverse_over__C0 = (* (b (a (c e))))
& @List.reverse_over ~ (a (d e))
& @List/Cons ~ (b (c d))
@List.reverse_over__C1 = (?(((a a) @List.reverse_over__C0) b) b)
@List.reverse_tr = (a (* b))
& @List.reverse_over ~ (a (@List/Nil b))
@List.sum = ((@List.sum__C1 a) a)
@List.sum__C0 = (* ($([+] $(b c)) (a (b d))))
& @List.sum ~ (a (c d))
@List.sum__C1 = (?(((a a) @List.sum__C0) b) b)
@List/Cons = (a (b ((@List/Cons/tag (a (b c))) c)))
@List/Cons/tag = 1
@List/Nil = ((@List/Nil/tag a) a)
@List/Nil/tag = 0
@Tree.flip = ((@Tree.flip__C2 a) a)
@Tree.flip__C0 = (c (a e))
& @Tree/Node ~ (b (d e))
&!@Tree.flip ~ (a b)
&!@Tree.flip ~ (c d)
@Tree.flip__C1 = (* a)
& @Tree/Leaf ~ a
@Tree.flip__C2 = (?((@Tree.flip__C0 @Tree.flip__C1) a) a)
@Tree.height = ((@Tree.height__C1 a) a)
@Tree.height__C0 = (a (c f))
& $(e f) ~ [+0x0000001]
& @max ~ (b (d e))
&!@Tree.height ~ (a b)
&!@Tree.height ~ (c d)
@Tree.height__C1 = (?((@Tree.height__C0 (* (* 0))) a) a)
@Tree.leaves = ((@Tree.leaves__C1 a) a)
@Tree.leaves__C0 = (a (b d))
&!@Tree.leaves ~ (a $([+] $(c d)))
&!@Tree.leaves ~ (b c)
@Tree.leaves__C1 = (?((@Tree.leaves__C0 (* (* 1))) a) a)
@Tree.map = ((@Tree.map__C2 a) a)
@Tree.map__C0 = (a (d ({b e} g)))
& @Tree/Node ~ (c (f g))
&!@Tree.map ~ (a (b c))
&!@Tree.map ~ (d (e f))
@Tree.map__C1 = (* (a ((a b) c)))
& @Tree/Leaf ~ (b c)
@Tree.map__C2 = (?((@Tree.map__C0 @Tree.map__C1) a) a)
@Tree.nodes = ((@Tree.nodes__C1 a) a)
@Tree.nodes__C0 = (a (b e))
& $(d e) ~ [+0x0000001]
&!@Tree.nodes ~ (a $([+] $(c d)))
&!@Tree.nodes ~ (b c)
@Tree.nodes__C1 = (?((@Tree.nodes__C0 (* (* 0))) a) a)
@Tree/Leaf = (a ((@Tree/Leaf/tag (a b)) b))
@Tree/Leaf/tag = 1
@Tree/Node = (a (b ((@Tree/Node/tag (a (b c))) c)))
@Tree/Node/tag = 0
@add = ((@add__C0 ((a a) b)) b)
@add__C0 = (a (b d))
& @add ~ (a (((b c) (* c)) d))
@calc = l
& @Foo ~ (f (h (k l)))
& 1 ~ {$([+] $(e f)) {$([*] $(a {e {$([*] $(b {$([+] $(g h)) {$([*] $(c {g {$([*] $(d {$([+] $(j k)) {$([*] $(i j)) i}})) d}})) c}})) b}})) a}}
@fold_ = ((@fold___C1 (@fold___C0 a)) a)
@fold___C0 = (((* (a a)) b) (* b))
@fold___C1 = (a (c e))
& @add ~ (b (d e))
&!@fold_ ~ (a b)
&!@fold_ ~ (c d)
@main = *
@max = ({$([>] $(a ?(((* (b b)) (* (c (* c)))) (d (e f))))) d} ({a e} f))
@tail_recursive = ((@tail_recursive__C0 ((* 0) a)) a)
@tail_recursive__C0 = (a (b d))
& @tail_recursive ~ (a (c d))
& $(b c) ~ [+0x0000001]