def sized
yaml-for-bend@0.1.1.0 · yaml.bend:67
import yaml-for-bend@0.1.1.0/yaml.bend as Yaml
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
67
68def 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>>:
69 when(Result<&2, &2, T.Error, List<&2, C.Doc>>, C.longer(text, C.limits.size(lim)),
70 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})},
71 read)