(;module: lux (lux (control [monad #+ do] ["ex" exception #+ exception:]) (data [maybe] text/format (coll [dict]))) (luxc ["&" lang] (lang (host ["$" jvm]) ["ls" synthesis])) (. ["./;" common] ["./;" host])) (exception: #export Unknown-Procedure) (def: procedures ./common;Bundle (|> ./common;procedures (dict;merge ./host;procedures))) (def: #export (translate-procedure translate name args) (-> (-> ls;Synthesis (Meta $;Inst)) Text (List ls;Synthesis) (Meta $;Inst)) (<| (maybe;default (&;throw Unknown-Procedure (%t name))) (do maybe;Monad [proc (dict;get name procedures)] (wrap (proc translate args)))))