Format.print.step: def of bend-lint-rules@0.2.0.0 Import: import bend-lint-rules@0.2.0.0/layout/format.bend as Format Lines 1963-2006 of bend-lint-rules@0.2.0.0/layout/format.bend: https://jend.leeeet.dev/read.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&start_line=1963&end_line=2006 import Base def print.step( jobs: List<&2, Job>, out: List<&2, String>, pending: String, +col: U32, width: Maybe<&2, U32>, newline: String, fuel: Nat ) -> Print: match jobs: case Nil{}: Print{Nil{}, out, pending, col} case Con{Job{Str{+body, blank, w, tail}, indent, flat}, rest}: print.str(body, body, blank, rest, out, pending, col_of(tail, col, w)) case Con{Job{Line{text, w, hard, offset}, +indent, +flat}, rest}: print.line( Bool.not(hard) && (flat || is_unbounded(width)), text, (indent + offset: U32), rest, out, pending, col, w, newline ) case Con{Job{Nest{doc, amount, f}, indent, flat}, rest}: Print{Con{Job{doc, (indent + amount: U32), flat}, rest}, out, pending, col} case Con{Job{Grp{+doc, f}, +indent, +flat}, +rest}: Print{ Con{ Job{ doc, indent, print.is_flat(flat, fuel, width, col, Con{Job{doc, indent, True{}}, rest}) }, rest }, out, pending, col } case Con{Job{Cat{docs, f}, indent, flat}, rest}: Print{push(docs, indent, flat, rest), out, pending, col} Uses (19): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=Doc https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=Job https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=Print https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=col_of https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=is_unbounded https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=print.is_flat https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=print.line https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=print.str https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=push