def widen
import bolt@1.27.0.0/src/rules/correctness/arms.bend as Armsimport Base
69# the widest n+p arm after this one
70def widen(ww: Maybe<&2, Wide>, aa: Arm) -> Maybe<&2, Wide>:
71 match ww aa:
72 case None{} APlus{k, text, l, c, n}:
73 Some{Wide{k, text}}
74 case Some{Wide{+k, +text}} APlus{+j, +t2, l, c, n}:
75 Bool.pick(Maybe<&2, Wide>, U32.is_lt(j, k), Some{Wide{j, t2}}, Some{Wide{k, text}})
76 case w2 a2:
77 w2