def alias.got
yaml-for-bend@0.1.1.0 · compose.bend:485
import yaml-for-bend@0.1.1.0/compose.bend as Compose
import Base
import yaml-for-bend@0.1.1.0/token.bend as T
485def alias.got(ma: Map<&2, Anchored> & Anchored, +co: Co, +limit: Nat, at: T.Mark) -> Result<&2, &2, T.Error, Co>:
486 (m, a) = ma
487 match a:
488 case Anchored{v, +size}:
489 when(Result<&2, &2, T.Error, Co>, Nat.is_gt(Nat.add(co.copied.count(co), size), limit),
490 u => Fail{limit.error("found more nodes through aliases than the alias limit of " ++ Nat.show(limit), at)},
491 u => Done{finish(co.copied(co, size), None{}, Item{v, False{}}, size, size)})