def run
bend-visgraph@2.0.0.0 · bend_visgraph.bend:263
import bend-visgraph@2.0.0.0/bend_visgraph.bend as BendVisgraph
import Base
import bend-visgraph@2.0.0.0/src/series.bend as Series
263def run(input: String, cfg: Config) -> IO(Unit):
264 match cfg:
265 case Usage{msg}:
266 IO.die(Unit, 2, msg ++ "\n" ++ usage())
267 case Config{+out, +xpath, g, dir, k, limit, mode}:
268 do IO<Unit>:
269 text : String <- Series.read_text(input)
270 x : XsIn <- read_xs(String.is_empty(xpath), xpath)
271 emit(out, report(Series.parse(text), x, g, dir, k, limit, mode))