def key

ezx@1.11.0.0 · src/pub/world.bend:65

import ezx@1.11.0.0/src/pub/world.bend as World
import Base
import ezx@1.11.0.0/src/tool/world.bend as TW

65# the key a question is looked up by. A command uploads once, so the upload's
66# key does not name the entry: the planner looks its answer up without
67# knowing which entry the ledger names, and a law about that answer holds
68# whatever the ledger says.
69def key(ask: Ask) -> String:
70  match ask:
71    case Tool{q}:
72      TW.key(q)
73    case Tracked{}:
74      "tracked"
75    case Upload{_entry, _named, _says}:
76      "upload"
77    case Lock{}:
78      "lock"
79    case Hub{url}:
80      "hub " ++ url

Uses (4)

Used by (2)