def plan.has

ezx@1.11.0.0 · src/remove/plan.bend:150

import ezx@1.11.0.0/src/remove/plan.bend as Plan
import Base
import ezx@1.11.0.0/src/lock/plan.bend as P
import ezx@1.11.0.0/src/ledger/manifest.bend as M

150# the plan for a ledger that read: the edits when it names the dependency and
151# the ledger left can be written, a refusal when not
152def plan.has(has: Bool, +led: M.Manifest, +name: String, +ignore: String) -> P.Plan:
153  match has:
154    case True{}:
155      P.Plan{edits(led, name, ignore), P.Success{}}
156    case False{}:
157      P.Plan{[], P.Refused{refusal(named(deps.of(led), name), name)}}

Uses (10)

Used by (1)