(;module: lux (lux (control monad) [meta] (meta [code] (type ["tc" check]))) (luxc ["&" base] (lang ["la" analysis #+ Analysis]))) ## [Analysers] (do-template [ ] [(def: #export ( value) (-> (Meta Analysis)) (do meta;Monad [expected meta;expected-type _ (&;with-type-env (tc;check expected ))] (wrap ( value))))] [analyse-bool Bool code;bool] [analyse-nat Nat code;nat] [analyse-int Int code;int] [analyse-deg Deg code;deg] [analyse-frac Frac code;frac] [analyse-text Text code;text] ) (def: #export analyse-unit (Meta Analysis) (do meta;Monad [expected meta;expected-type _ (&;with-type-env (tc;check expected Unit))] (wrap (` []))))