def decide.lock

ezx@1.11.0.0 · src/pub/plan.bend:1124

import ezx@1.11.0.0/src/pub/plan.bend as Plan
import Base
import ezx@1.11.0.0/src/pub/world.bend as PW

1124# the lock, read first when the package imports a package by name, since it
1125# holds the hash the name was resolved to
1126def decide.lock(need: Bool, got: PW.Heard, +world: PW.World) -> Verdict:
1127  match need:
1128    case False{}:
1129      decide.hub(hubbed(world), world)
1130    case True{}:
1131      match got:
1132        case PW.Open{}:
1133          Pending{[PW.Lock{}]}
1134        case PW.Heard{_a}:
1135          decide.hub(hubbed(world), world)

Uses (8)

Used by (1)