Yaml.sized: def of yaml-for-bend@0.1.1.0 Import: import yaml-for-bend@0.1.1.0/yaml.bend as Yaml Lines 67-71 of yaml-for-bend@0.1.1.0/yaml.bend: https://jend.leeeet.dev/read.txt?path=yaml-for-bend@0.1.1.0/yaml.bend&start_line=67&end_line=71 import Base import yaml-for-bend@0.1.1.0/token.bend as T import yaml-for-bend@0.1.1.0/compose.bend as C # A text past the size limit is refused before it is read. def sized(+lim: C.Limits, +text: String, read: Unit -> Result<&2, &2, T.Error, List<&2, C.Doc>>) -> Result<&2, &2, T.Error, List<&2, C.Doc>>: when(Result<&2, &2, T.Error, List<&2, C.Doc>>, C.longer(text, C.limits.size(lim)), u => Fail{C.limit.error("found a text longer than the size limit of " ++ Nat.show(C.limits.size(lim)) ++ " characters", T.Mark{0n, 0n, 0n})}, read) Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.show https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/compose.bend&name=Doc https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/compose.bend&name=Limits https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/compose.bend&name=limit.error https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/compose.bend&name=limits.size https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/compose.bend&name=longer 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=Mark https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/yaml.bend&name=when