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