def move.found

ezx@1.11.0.0 · src/ws/moved.bend:127

import ezx@1.11.0.0/src/ws/moved.bend as Moved
import Base
import ezx@1.11.0.0/src/ledger/upgrade.bend as U

127# the member the lock records at a directory, against what it is now: it
128# moves when its hash is not the one the lock records, and it is chosen
129# (`--package`, or every member when none is given) or its hash is not the
130# one it had before any line was rewritten, which is a member whose files
131# the upgrade rewrote
132def move.found(
133  found: Maybe<&2, Held>,
134  +base: String,
135  +old: String,
136  +only: String,
137  rest: List<&2, Shift>
138) -> List<&2, Shift>:
139  match found:
140    case None{}:
141      rest
142    case Some{hd}:
143      Held{_hp, +name, +new} = hd
144      move.put(Bool.and(Bool.not(String.eq(new, old)),
145        Bool.or(U.chosen(only, name), Bool.not(String.eq(new, base)))), name, old, new, rest)

Uses (11)

Used by (1)