I took some time to improve atscc2erl and atscc2scm.
Now they both support code generated from patsopt when
tail-call optimization is turned on. Currently, mutually defined
tail-recursive functions are required to have the same number
arguments (in order for this support to work properly):
loop0(_: int, _: int): int = loop1(0, 0)
loop1(x: int, _: int): int = loop2(x, 0)
loop2(x: int, y: int): int = if x > 0 then loop2(x-1, y+y) else y
All of this work is preparation for atscc2clj, which compiles to Clojure.