def src.pairs

ezx@1.11.0.0 · src/lock/lock.bend:427

import ezx@1.11.0.0/src/lock/lock.bend as Lock
import Base
import ezx@1.11.0.0/src/toml/toml.bend as T

427# the keys a source contributes to the lock
428def src.pairs(source: Src) -> List<&2, T.Kv>:
429  match source:
430    case Hub{}:
431      [T.Kv{"kind", "hub"}]
432    case Git{url, rev, entry, root, nar, tag}:
433      List.concat(&2, T.Kv,
434        [[T.Kv{"kind", "git"}], kv("url", url), kv("rev", rev), kv("entry", entry),
435         kv("root", root), kv("narHash", nar), kv("tag", tag)])
436    case Member{path, entry}:
437      List.concat(&2, T.Kv, [[T.Kv{"kind", "member"}], kv("path", path), kv("entry", entry)])

Uses (5)

Used by (1)