Ignore.walk: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/ledger/ignore.bend as Ignore Lines 312-333 of ezx@1.11.0.0/src/ledger/ignore.bend: https://jend.leeeet.dev/read.txt?path=ezx@1.11.0.0/src/ledger/ignore.bend&start_line=312&end_line=333 import Base # every line, walked once. `fix` replaces a `.ez/` line. `blk` replaces the # first allowlist line, every later one is dropped, and `done` says the # block is already down; a file with no allowlist line gets it at the end. # Every other line is kept as it was. def walk(ls: List<&2, Line>, +fix: List<&2, String>, +blk: List<&2, String>, done: Bool) -> List<&2, String>: match ls: case []: placed(done, blk) case Line{k, +line} <> t: match k: case Other{}: line <> walk(t, fix, blk, done) case Dir{}: List.append(&2, String, fix, walk(t, fix, blk, done)) case Star{}: line <> walk(t, fix, blk, done) case Lib{}: line <> walk(t, fix, blk, done) case Pkgs{}: line <> walk(t, fix, blk, done) case Allow{_h}: List.append(&2, String, placed(done, blk), walk(t, fix, blk, True{})) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool 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=ezx@1.11.0.0/src/ledger/ignore.bend&name=Line https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/ledger/ignore.bend&name=Rule https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/ledger/ignore.bend&name=placed