BendVisgraph.set: def of bend-visgraph@2.0.0.0 Import: import bend-visgraph@2.0.0.0/bend_visgraph.bend as BendVisgraph Lines 125-144 of bend-visgraph@2.0.0.0/bend_visgraph.bend: https://jend.leeeet.dev/read.txt?path=bend-visgraph@2.0.0.0/bend_visgraph.bend&start_line=125&end_line=144 import Base import bend-visgraph@2.0.0.0/visgraph.bend as VG def set(cfg: Config, flag: Maybe<&2, Flag>, +name: String, +value: String) -> Config: match cfg flag: case Usage{msg} _: Usage{msg} case Config{o, x, g, d, k, l, m} None{}: Usage{"unknown option: " ++ name} case Config{o, x, g, d, k, l, m} Some{Output{}}: Config{value, x, g, d, k, l, m} case Config{o, x, g, d, k, l, m} Some{XFile{}}: Config{o, value, g, d, k, l, m} case Config{o, x, g, d, k, l, m} Some{GraphType{}}: with_graph(lookup(VG.Visibility, value, graphs()), name, value, o, x, d, k, l, m) case Config{o, x, g, d, k, l, m} Some{Directed{}}: with_direction(lookup(VG.Direction, value, directions()), name, value, o, x, g, k, l, m) case Config{o, x, g, d, k, l, m} Some{Weighted{}}: with_weight(lookup(VG.Weight, value, weights()), name, value, o, x, g, d, l, m) case Config{o, x, g, d, k, l, m} Some{Limit{}}: with_limit(U32.read(value), name, value, o, x, g, d, k, m) case Config{o, x, g, d, k, l, m} Some{OutputMode{}}: with_mode(lookup(Mode, value, modes()), name, value, o, x, g, d, k, l) Uses (20): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.read https://jend.leeeet.dev/definition.txt?path=bend-visgraph@2.0.0.0/bend_visgraph.bend&name=Config https://jend.leeeet.dev/definition.txt?path=bend-visgraph@2.0.0.0/bend_visgraph.bend&name=Flag https://jend.leeeet.dev/definition.txt?path=bend-visgraph@2.0.0.0/bend_visgraph.bend&name=Mode https://jend.leeeet.dev/definition.txt?path=bend-visgraph@2.0.0.0/bend_visgraph.bend&name=directions https://jend.leeeet.dev/definition.txt?path=bend-visgraph@2.0.0.0/bend_visgraph.bend&name=graphs https://jend.leeeet.dev/definition.txt?path=bend-visgraph@2.0.0.0/bend_visgraph.bend&name=lookup https://jend.leeeet.dev/definition.txt?path=bend-visgraph@2.0.0.0/bend_visgraph.bend&name=modes https://jend.leeeet.dev/definition.txt?path=bend-visgraph@2.0.0.0/bend_visgraph.bend&name=weights https://jend.leeeet.dev/definition.txt?path=bend-visgraph@2.0.0.0/bend_visgraph.bend&name=with_direction https://jend.leeeet.dev/definition.txt?path=bend-visgraph@2.0.0.0/bend_visgraph.bend&name=with_graph https://jend.leeeet.dev/definition.txt?path=bend-visgraph@2.0.0.0/bend_visgraph.bend&name=with_limit https://jend.leeeet.dev/definition.txt?path=bend-visgraph@2.0.0.0/bend_visgraph.bend&name=with_mode https://jend.leeeet.dev/definition.txt?path=bend-visgraph@2.0.0.0/bend_visgraph.bend&name=with_weight https://jend.leeeet.dev/definition.txt?path=bend-visgraph@2.0.0.0/visgraph.bend&name=Direction https://jend.leeeet.dev/definition.txt?path=bend-visgraph@2.0.0.0/visgraph.bend&name=Visibility https://jend.leeeet.dev/definition.txt?path=bend-visgraph@2.0.0.0/visgraph.bend&name=Weight