Core.wf: def of bend-schema-lib@0.4.1.0 Import: import bend-schema-lib@0.4.1.0/core.bend as Core Lines 1833-1862 of bend-schema-lib@0.4.1.0/core.bend: https://jend.leeeet.dev/read.txt?path=bend-schema-lib@0.4.1.0/core.bend&start_line=1833&end_line=1862 import Base def wf(s: Schema) -> Bool: match s: case SOpt{+i}: Bool.and(Bool.not(nullable(i)), wf(i)) case SOptional{+i}: Bool.and(Bool.not(opt_at(i)), wf(i)) case SList{+e}: Bool.and(Bool.not(opt_at(e)), wf(e)) case SListLen{lo_, hi_, +s2}: Bool.and(Bool.not(opt_at(s2)), wf(s2)) case SStrLen{lo_, hi_, +s2}: Bool.and(Bool.not(opt_at(s2)), wf(s2)) case SField{+n, fs, +rest}: Bool.and(wf(fs), Bool.and(fresh_f(n, rest), wf(rest))) case SRule{+s2, tag}: Bool.and(Bool.not(opt_at(s2)), wf(s2)) case SStrict{+s2}: Bool.and(is_keyed(s2), Bool.and(Bool.not(opt_at(s2)), wf(s2))) case STagged{+k, +n, +cs, +rest}: Bool.and(Bool.not(opt_at(cs)), Bool.and(wf(cs), Bool.and(no_key(k, cs), Bool.and(fresh_t(k, n, rest), wf(rest))))) case SVariant{+n, +vs, +rest}: Bool.and(Bool.not(opt_at(vs)), Bool.and(wf(vs), Bool.and(fresh_v(n, rest), wf(rest)))) case STuple{+ts, +rest}: Bool.and(Bool.not(opt_at(ts)), Bool.and(wf(ts), Bool.and(Bool.not(opt_at(rest)), wf(rest)))) case SJson{}: True{} case SEither{+l, +r}: Bool.and(alt_ok(l), Bool.and(alt_ok(r), Bool.and(disjoint(l, r), Bool.and(wf(l), wf(r))))) case _: True{} 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.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=bend-schema-lib@0.4.1.0/core.bend&name=Schema https://jend.leeeet.dev/definition.txt?path=bend-schema-lib@0.4.1.0/core.bend&name=alt_ok https://jend.leeeet.dev/definition.txt?path=bend-schema-lib@0.4.1.0/core.bend&name=disjoint https://jend.leeeet.dev/definition.txt?path=bend-schema-lib@0.4.1.0/core.bend&name=fresh_f https://jend.leeeet.dev/definition.txt?path=bend-schema-lib@0.4.1.0/core.bend&name=fresh_t https://jend.leeeet.dev/definition.txt?path=bend-schema-lib@0.4.1.0/core.bend&name=fresh_v https://jend.leeeet.dev/definition.txt?path=bend-schema-lib@0.4.1.0/core.bend&name=is_keyed https://jend.leeeet.dev/definition.txt?path=bend-schema-lib@0.4.1.0/core.bend&name=no_key https://jend.leeeet.dev/definition.txt?path=bend-schema-lib@0.4.1.0/core.bend&name=nullable https://jend.leeeet.dev/definition.txt?path=bend-schema-lib@0.4.1.0/core.bend&name=opt_at