(.module: [lux #* [control [monad (#+ do)]]] [// [runtime (#+ Compiler)] [primitive] [structure] [reference] [function] [case] [loop] ["." /// [synthesis] [extension]]]) (def: #export (translate synthesis) Compiler (case synthesis (^template [ ] (^ ( value)) ( value)) ([synthesis.bit primitive.bit] [synthesis.i64 primitive.i64] [synthesis.f64 primitive.f64] [synthesis.text primitive.text]) (^ (synthesis.variant variantS)) (structure.variant translate variantS) (^ (synthesis.tuple members)) (structure.tuple translate members) (#synthesis.Reference reference) (reference.reference reference) (^ (synthesis.branch/case case)) (case.case translate case) (^ (synthesis.branch/let let)) (case.let translate let) (^ (synthesis.branch/if if)) (case.if translate if) (^ (synthesis.loop/scope scope)) (loop.scope translate scope) (^ (synthesis.loop/recur updates)) (loop.recur translate updates) (^ (synthesis.function/abstraction abstraction)) (function.function translate abstraction) (^ (synthesis.function/apply application)) (function.apply translate application) (#synthesis.Extension extension) (extension.apply translate extension)))