(;module: lux (lux (control monad) (data text/format) [macro #+ Monad])) (type: #export Path Text) (type: #export Mode #Release #Debug) (def: #export (fail message) (All [a] (-> Text (Lux a))) (do Monad [[file line col] macro;cursor #let [location (format file "," (|> line nat-to-int %i) "," (|> col nat-to-int %i))]] (macro;fail (format "@ " location "\n" message))))