(;module: lux (lux (control monad) (data text/format (coll [list "L/" Functor])) [macro #+ Monad]) (luxc ["&" base] (lang ["la" analysis #+ Analysis] ["ls" synthesis #+ Synthesis]) ["&;" analyser])) (def: #export (synthesize analysis) (-> Analysis Synthesis) (case analysis (^template [ ] ( value) ( value)) ([#la;Unit #ls;Unit] [#la;Bool #ls;Bool] [#la;Nat #ls;Nat] [#la;Int #ls;Int] [#la;Deg #ls;Deg] [#la;Real #ls;Real] [#la;Char #ls;Char] [#la;Text #ls;Text] [#la;Relative #ls;Relative] [#la;Absolute #ls;Absolute]) (#la;Tuple values) (#ls;Tuple (L/map synthesize values)) (#la;Variant tag last? value) (undefined) (#la;Case pattern) (undefined) (#la;Function scope body) (undefined) (#la;Apply arg func) (undefined) (#la;Procedure name args) (#ls;Procedure name (L/map synthesize args)) ))