Parse.dirs.go: def of yaml-for-bend@0.1.1.0 Import: import yaml-for-bend@0.1.1.0/parse.bend as Parse Lines 320-337 of yaml-for-bend@0.1.1.0/parse.bend: https://jend.leeeet.dev/read.txt?path=yaml-for-bend@0.1.1.0/parse.bend&start_line=320&end_line=337 import Base import yaml-for-bend@0.1.1.0/token.bend as T def dirs.go(toks: List<&2, T.Token>, +user: List<&2, Prefix>, +seen: Bool) -> Dirs: match toks: case Nil{}: Dirs{[], user} case Con{t, +rest}: match t: case T.Token{tok, +start, +end}: match tok: case T.VersionDir{+major, minor}: +bad = Bool.not(Nat.is_eq(major, 1n)) when(Dirs, seen, u => DirsBad{T.Error{"found duplicate %YAML directive", start, T.Syntax{}}}, u => when(Dirs, bad, u => DirsBad{T.Error{"found incompatible YAML document", start, T.Syntax{}}}, u => dirs.go(rest, user, True{}))) case T.TagDir{+h, p}: when(Dirs, is_found(prefix.find(user, h)), u => DirsBad{T.Error{"found duplicate %TAG directive", start, T.Syntax{}}}, u => dirs.go(rest, Prefix{h, p} <> user, seen)) case _: Dirs{Con{T.Token{tok, start, end}, rest}, user} Uses (13): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/parse.bend&name=Dirs https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/parse.bend&name=Prefix https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/parse.bend&name=is_found https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/parse.bend&name=prefix.find https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/parse.bend&name=when https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/token.bend&name=Cause https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/token.bend&name=Error https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/token.bend&name=Tok https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/token.bend&name=Token