import Base import ./lisp.bend as L import ./core.bend as C import ./stg.bend as S import ./stg_c.bend as G # bend-machines: Root-of-Lisp, Core, STG and STG->C, one package. # Publish as a whole: bend main.bend --publish # Use from the hub: import 0x/main.bend as M, then M.demo() def demo() -> (List<&2, L.LExp> & List<&2, C.CVal>) & List<&2, S.SVal>: ((L.l_batch(50n, [L.LCar{L.LCons{L.LQuote{L.LSym{"a"}}, L.LQuote{L.LSym{"b"}}}}]), C.c_batch(30n, [C.CAdd{C.CLit{2n}, C.CLit{3n}}])), S.s_batch(30n, [S.SLet{S.SLit{42n}, S.SAdd{S.SVar{0}, S.SVar{0}}}])) def demo_c() -> String: G.s_prog(G.demo84()) def main() -> IO(Unit): do IO: IO.print("lisp + core + stg packed; see demo(), demo_c().")