Effects.read_domains: def of near-v-framework@0.4.0.0 Import: import near-v-framework@0.4.0.0/domain/architecture/system/deployment/nix_darwin/setting/effects.bend as Effects Lines 12-21 of near-v-framework@0.4.0.0/domain/architecture/system/deployment/nix_darwin/setting/effects.bend: https://jend.leeeet.dev/read.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/deployment/nix_darwin/setting/effects.bend&start_line=12&end_line=21 import Base import near-v-framework@0.4.0.0/domain/architecture/system/effs/io.bend as X import near-v-framework@0.4.0.0/domain/architecture/system/deployment/nix_darwin/setting/type.bend as St import near-v-framework@0.4.0.0/domain/architecture/system/deployment/nix_darwin/setting/ops.bend as StO # ---- system.defaults: each domain's plist exported once, its options read from the XML ---- def read_domains(ds: List<&2, String>, +xs: List<&2, St.Setting>) -> IO(List<&2, St.Setting>): match ds: case []: IO.pure(List<&2, St.Setting>, []) case +d <> rest: do IO>: xml : String <- X.run("defaults", StO.export_args(d)) more : List<&2, St.Setting> <- read_domains(rest, xs) return List.append(&2, St.Setting, StO.read_domain(xs, d, StO.text_lines(xml)), more) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/deployment/nix_darwin/setting/ops.bend&name=export_args https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/deployment/nix_darwin/setting/ops.bend&name=read_domain https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/deployment/nix_darwin/setting/ops.bend&name=text_lines https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/deployment/nix_darwin/setting/type.bend&name=Setting https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/effs/io.bend&name=run