Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ez.lock.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ hub = "https://hub.bend-lang.com"
[tools]
[tools.bolt]
git = "https://github.com/Emerging-Patterns/bolt"
rev = "9700daf3a447089a8795d311912014382a74a2a9"
tag = "v1.27.0"
rev = "dfb06d0e5d6362739231b90bb090535af493b8f0"
tag = "v1.65.0"
root = "."
narHash = "sha256-0S48j2dongVcvP5Oms5a+s5I12sIy91KAgwW0bP7pxM="
narHash = "sha256-39sCydxFW7dWmf69CTJOXuC+j884fEhHWFKctdWCkAg="
entry = "main.bend"
6 changes: 3 additions & 3 deletions ez.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ entry = "main.bend"
[tools]
[tools.bolt]
git = "https://github.com/Emerging-Patterns/bolt"
rev = "9700daf3a447089a8795d311912014382a74a2a9"
tag = "v1.27.0"
rev = "dfb06d0e5d6362739231b90bb090535af493b8f0"
tag = "v1.65.0"
root = "."
narHash = "sha256-0S48j2dongVcvP5Oms5a+s5I12sIy91KAgwW0bP7pxM="
narHash = "sha256-39sCydxFW7dWmf69CTJOXuC+j884fEhHWFKctdWCkAg="
entry = "main.bend"
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions laws/LongArgStep.bend
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ law long_arg_step:
for h_cut: {S.cut_eq(body) == (name, val) : String & Maybe<&2, String>}
for h_name: {String.is_empty(name) == False{} : Bool}
{S.parse.step("--" ++ body, S.St{S.Free{}, args, up, subs, path, bs, pos, False{}, seen})
== S.parse.take_long.found(S.by_long(args, name), name, val, "--" ++ body, args, up, subs, path, bs, pos,
False{}, seen) : S.St}
== S.parse.take_long.found(S.by_long(args, name), name, val, "--" ++ body,
S.Here{args, up, subs, path, bs, pos, False{}, seen}) : S.St}
4 changes: 2 additions & 2 deletions laws/PlainWordIsNeverOption.bend
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ law plain_word_step:
for +h_dash: {String.starts_with(tok, "-") == False{} : Bool}
for h_help: {Bool.and(String.eq(tok, "help"), Bool.not(seen)) == False{} : Bool}
{S.parse.step(tok, S.St{S.Free{}, args, up, subs, path, bs, pos, False{}, seen})
== S.parse.word.go(S.find_sub(subs, tok), tok, args, up, subs, path, bs, pos, False{}, seen) : S.St}
== S.parse.word.go(S.find_sub(subs, tok), tok, S.Here{args, up, subs, path, bs, pos, False{}, seen}) : S.St}

# LAW: in a free walker before `--`, the word `-` is read as a subcommand or a
# positional, never as an option
Expand All @@ -34,4 +34,4 @@ law dash_word_step:
for +pos: List<&2, S.Arg>
for +seen: Bool
{S.parse.step("-", S.St{S.Free{}, args, up, subs, path, bs, pos, False{}, seen})
== S.parse.word.go(S.find_sub(subs, "-"), "-", args, up, subs, path, bs, pos, False{}, seen) : S.St}
== S.parse.word.go(S.find_sub(subs, "-"), "-", S.Here{args, up, subs, path, bs, pos, False{}, seen}) : S.St}
390 changes: 226 additions & 164 deletions proofs/BindingsComeFromWords.bend

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions proofs/ChoiceRefused.bend
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ def choice_refused.step(
h_sub))
%e1 : {D1.dead_of(_) == Some{S.BadValue{path, name, tok}} : Maybe<&2, S.ParseErr>}
e2 = Equal.sym(Bool, S.allowed(cs, tok), False{}, h_bad)
%e2 : {D1.dead_of(S.parse.take_choice(_, name, tok, args, up, subs, path, bs,
S.parse.take_pos.keep(S.rest.is(S.Arg{name, sh, lo, kind, hp, req, dflt, cs}),
S.Arg{name, sh, lo, kind, hp, req, dflt, cs}, rest), False{}, True{}))
%e2 : {D1.dead_of(S.parse.take_choice(_, name, tok,
S.Here{args, up, subs, path, bs, S.parse.take_pos.keep(S.rest.is(S.Arg{name, sh, lo, kind, hp, req, dflt, cs}),
S.Arg{name, sh, lo, kind, hp, req, dflt, cs}, rest), False{}, True{}}))
== Some{S.BadValue{path, name, tok}} : Maybe<&2, S.ParseErr>}
{==}

Expand Down
13 changes: 7 additions & 6 deletions proofs/EnterMissing.bend
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ def enter.miss(
+bs: List<&2, S.Bind>,
+seen: Bool,
h_req: {S.parse.first_req(pos) == Some{nm} : Maybe<&2, String>}
) -> {D1.dead_of(S.parse.enter_or(S.parse.first_req(pos), sub, args, up, subs, path, bs, pos, False{}, seen))
) -> {D1.dead_of(S.parse.enter_or(S.parse.first_req(pos), sub, S.Here{args, up, subs, path, bs, pos, False{}, seen}))
== Some{S.Missing{path, nm}} : Maybe<&2, S.ParseErr>}:
er = Equal.sym(Maybe<&2, String>, S.parse.first_req(pos), Some{nm}, h_req)
%er : {D1.dead_of(S.parse.enter_or(_, sub, args, up, subs, path, bs, pos, False{}, seen))
%er : {D1.dead_of(S.parse.enter_or(_, sub, S.Here{args, up, subs, path, bs, pos, False{}, seen}))
== Some{S.Missing{path, nm}} : Maybe<&2, S.ParseErr>}
{==}

Expand Down Expand Up @@ -61,12 +61,13 @@ def Laws.enter_missing(
):
+st = {S.St{S.Free{}, args, up, subs, path, bs, pos, False{}, seen} : S.St}
e1 = Equal.sym(S.St, S.parse.step(tok, st),
S.parse.enter_or(S.parse.first_req(pos), sub, args, up, subs, path, bs, pos, False{}, seen),
S.parse.enter_or(S.parse.first_req(pos), sub, S.Here{args, up, subs, path, bs, pos, False{}, seen}),
Equal.trans(S.St, S.parse.step(tok, st),
S.parse.word.go(S.find_sub(subs, tok), tok, args, up, subs, path, bs, pos, False{}, seen),
S.parse.enter_or(S.parse.first_req(pos), sub, args, up, subs, path, bs, pos, False{}, seen),
S.parse.word.go(S.find_sub(subs, tok), tok, S.Here{args, up, subs, path, bs, pos, False{}, seen}),
S.parse.enter_or(S.parse.first_req(pos), sub, S.Here{args, up, subs, path, bs, pos, False{}, seen}),
M2.enter.word(tok, args, up, subs, path, bs, pos, seen, h_dd, h_help, h_dash),
M2.enter.go(tok, args, up, subs, path, bs, pos, seen, sub, h_sub)))
L1.refused(spec, pre, more, tok, st, S.Missing{path, nm}, h_at,
enter.dead(tok, st, S.parse.enter_or(S.parse.first_req(pos), sub, args, up, subs, path, bs, pos, False{}, seen),
enter.dead(tok, st, S.parse.enter_or(S.parse.first_req(pos), sub,
S.Here{args, up, subs, path, bs, pos, False{}, seen}),
S.Missing{path, nm}, e1, enter.miss(pos, sub, nm, args, up, subs, path, bs, seen, h_req)))
13 changes: 7 additions & 6 deletions proofs/EnterStep.bend
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ def enter.none(
+bs: List<&2, S.Bind>,
+seen: Bool,
h_req: {S.parse.first_req(pos) == None{} : Maybe<&2, String>}
) -> {S.parse.enter_or(S.parse.first_req(pos), S.Sub{name, about, next, kids}, args, up, subs, path, bs, pos, False{},
seen)
) -> {S.parse.enter_or(S.parse.first_req(pos), S.Sub{name, about, next, kids},
S.Here{args, up, subs, path, bs, pos, False{}, seen})
== S.St{S.Free{}, next, S.Level{args, bs} <> up, kids, List.append(&2, String, path, [name]), [], S.pos_of(next),
False{}, False{}} : S.St}:
er = Equal.sym(Maybe<&2, String>, S.parse.first_req(pos), None{}, h_req)
%er : {S.parse.enter_or(_, S.Sub{name, about, next, kids}, args, up, subs, path, bs, pos, False{}, seen)
%er : {S.parse.enter_or(_, S.Sub{name, about, next, kids}, S.Here{args, up, subs, path, bs, pos, False{}, seen})
== S.St{S.Free{}, next, S.Level{args, bs} <> up, kids, List.append(&2, String, path, [name]), [], S.pos_of(next),
False{}, False{}} : S.St}
{==}
Expand Down Expand Up @@ -57,9 +57,10 @@ def Laws.enter_step(
Equal.trans(S.St, S.parse.walk(List.append(&2, String, pre, [tok]), S.parse.start(spec)), S.parse.step(tok, st), rhs,
M1.kept.stepped(spec, pre, tok, st, h_at),
Equal.trans(S.St, S.parse.step(tok, st),
S.parse.word.go(S.find_sub(subs, tok), tok, args, up, subs, path, bs, pos, False{}, seen), rhs,
S.parse.word.go(S.find_sub(subs, tok), tok, S.Here{args, up, subs, path, bs, pos, False{}, seen}), rhs,
M1.enter.word(tok, args, up, subs, path, bs, pos, seen, h_dd, h_help, h_dash),
Equal.trans(S.St, S.parse.word.go(S.find_sub(subs, tok), tok, args, up, subs, path, bs, pos, False{}, seen),
S.parse.enter_or(S.parse.first_req(pos), sub, args, up, subs, path, bs, pos, False{}, seen), rhs,
Equal.trans(S.St, S.parse.word.go(S.find_sub(subs, tok), tok,
S.Here{args, up, subs, path, bs, pos, False{}, seen}),
S.parse.enter_or(S.parse.first_req(pos), sub, S.Here{args, up, subs, path, bs, pos, False{}, seen}), rhs,
M1.enter.go(tok, args, up, subs, path, bs, pos, seen, sub, h_sub),
enter.none(pos, name, about, next, kids, args, up, subs, path, bs, seen, h_req))))
8 changes: 4 additions & 4 deletions proofs/FlagLongValued.bend
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ def flag_long_valued.step(
) -> {D1.dead_of(S.parse.step("--" ++ body, S.St{S.Free{}, args, up, subs, path, bs, pos, False{}, seen}))
== Some{S.Unexpected{path, "--" ++ body}} : Maybe<&2, S.ParseErr>}:
e1 = Equal.sym(S.St, S.parse.step("--" ++ body, S.St{S.Free{}, args, up, subs, path, bs, pos, False{}, seen}),
S.parse.take_long.found(S.by_long(args, name), name, Some{vv}, "--" ++ body, args, up, subs, path, bs, pos, False{},
seen),
S.parse.take_long.found(S.by_long(args, name), name, Some{vv}, "--" ++ body,
S.Here{args, up, subs, path, bs, pos, False{}, seen}),
L1.long_arg_step(body, name, Some{vv}, args, up, subs, path, bs, pos, seen, h_dd, h_cut, h_name))
%e1 : {D1.dead_of(_) == Some{S.Unexpected{path, "--" ++ body}} : Maybe<&2, S.ParseErr>}
e2 = Equal.sym(Maybe<&2, S.Arg>, S.by_long(args, name), Some{S.Arg{nn, sh, lo, S.Flag{}, hp, req, dflt, cs}}, h_found)
%e2 : {D1.dead_of(S.parse.take_long.found(_, name, Some{vv}, "--" ++ body, args, up, subs, path, bs, pos, False{},
seen))
%e2 : {D1.dead_of(S.parse.take_long.found(_, name, Some{vv}, "--" ++ body,
S.Here{args, up, subs, path, bs, pos, False{}, seen}))
== Some{S.Unexpected{path, "--" ++ body}} : Maybe<&2, S.ParseErr>}
e3 = Equal.sym(Bool, S.bound(bs, nn), False{}, h_once)
%e3 : {D1.dead_of(S.parse.once(_, S.St{S.Dead{S.Unexpected{path, "--" ++ body}}, args, up, subs, path, bs, pos,
Expand Down
2 changes: 1 addition & 1 deletion proofs/HelpUnknown.bend
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def help_unknown.step(
) -> {D1.dead_of(S.parse.step(tok, S.St{S.Help{}, args, up, subs, path, bs, pos, raw, seen}))
== Some{S.Unexpected{path, tok}} : Maybe<&2, S.ParseErr>}:
ee = Equal.sym(Maybe<&2, S.Sub>, S.find_sub(subs, tok), None{}, h_sub)
%ee : {D1.dead_of(S.parse.step.help_path(_, tok, args, up, subs, path, bs, pos, raw, seen))
%ee : {D1.dead_of(S.parse.step.help_path(_, tok, S.Here{args, up, subs, path, bs, pos, raw, seen}))
== Some{S.Unexpected{path, tok}} : Maybe<&2, S.ParseErr>}
{==}

Expand Down
8 changes: 4 additions & 4 deletions proofs/HelpWordAsksForHelp.bend
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def dash_help.step(
) -> {S.parse.step("--help", S.St{S.Free{}, args, up, subs, path, bs, pos, False{}, False{}})
== S.St{S.Help{}, args, up, subs, path, bs, pos, False{}, False{}} : S.St}:
ee = Equal.sym(Maybe<&2, S.Arg>, S.by_long(args, "help"), None{}, h_none)
%ee : {S.parse.take_long.found(_, "help", None{}, "--help", args, up, subs, path, bs, pos, False{}, False{})
%ee : {S.parse.take_long.found(_, "help", None{}, "--help", S.Here{args, up, subs, path, bs, pos, False{}, False{}})
== S.St{S.Help{}, args, up, subs, path, bs, pos, False{}, False{}} : S.St}
{==}

Expand Down Expand Up @@ -89,12 +89,12 @@ def short_help.step(
== S.St{S.Help{}, args, up, subs, path, bs, pos, False{}, False{}} : S.St}:
e1 = Equal.sym(Maybe<&2, S.Arg>, S.by_short(args, "h"), None{}, h_short)
%e1 : {S.parse.take_short.go(Bool.and(True{}, Bool.and(True{}, Bool.and(Maybe.is_none(&2, S.Arg, _),
Maybe.is_none(&2, S.Arg, S.by_long(args, "help"))))), "h", "-h", args, up, subs, path, bs, pos, False{},
False{})
Maybe.is_none(&2, S.Arg,
S.by_long(args, "help"))))), "h", "-h", S.Here{args, up, subs, path, bs, pos, False{}, False{}})
== S.St{S.Help{}, args, up, subs, path, bs, pos, False{}, False{}} : S.St}
e2 = Equal.sym(Maybe<&2, S.Arg>, S.by_long(args, "help"), None{}, h_long)
%e2 : {S.parse.take_short.go(Bool.and(True{}, Bool.and(True{}, Bool.and(True{}, Maybe.is_none(&2, S.Arg, _)))),
"h", "-h", args, up, subs, path, bs, pos, False{}, False{})
"h", "-h", S.Here{args, up, subs, path, bs, pos, False{}, False{}})
== S.St{S.Help{}, args, up, subs, path, bs, pos, False{}, False{}} : S.St}
{==}

Expand Down
12 changes: 6 additions & 6 deletions proofs/LetterFlagAgain.bend
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ def Laws.letter_flag_again(
e0 = M1.cl.back(cc, rest, orig, args, up, subs, path, bs, pos, raw, seen, aa, h_found)
%e0 : {D1.dead_of(_) == Some{S.Repeated{path, nn}} : Maybe<&2, S.ParseErr>}
e2 = Equal.sym(Bool, S.bound(bs, nn), True{}, h_again)
%e2 : {D1.dead_of(S.cluster(rest, orig, S.parse.once(_, S.parse.take_flag(vv, nn, orig, args, up, subs,
path, bs, pos,
raw, seen), nn, path), String.starts_with(rest, "="))) == Some{S.Repeated{path, nn}} : Maybe<&2, S.ParseErr>}
M2.cl.dead(rest, orig, S.parse.once(True{}, S.parse.take_flag(vv, nn, orig, args, up, subs, path, bs, pos, raw,
seen), nn,
%e2 : {D1.dead_of(S.cluster(rest, orig,
S.parse.once(_, S.parse.take_flag(vv, nn, orig, S.Here{args, up, subs, path, bs, pos, raw, seen}), nn,
path), String.starts_with(rest, "="))) == Some{S.Repeated{path, nn}} : Maybe<&2, S.ParseErr>}
M2.cl.dead(rest, orig,
S.parse.once(True{}, S.parse.take_flag(vv, nn, orig, S.Here{args, up, subs, path, bs, pos, raw, seen}), nn,
path), String.starts_with(rest, "="), S.Repeated{path, nn},
L1.once_dead(S.parse.take_flag(vv, nn, orig, args, up, subs, path, bs, pos, raw, seen), nn, path))
L1.once_dead(S.parse.take_flag(vv, nn, orig, S.Here{args, up, subs, path, bs, pos, raw, seen}), nn, path))
6 changes: 3 additions & 3 deletions proofs/LetterFlagEq.bend
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ def Laws.letter_flag_eq(
e0 = M2.cl.back(cc, rest, orig, args, up, subs, path, bs, pos, raw, seen, aa, h_found)
%e0 : {_ == dd : S.St}
e1 = Equal.sym(Bool, String.starts_with(rest, "="), True{}, h_eq)
%e1 : {S.cluster(rest, orig, S.parse.take_arg.kind(S.Flag{}, nn, S.cluster.val.flag(_, rest), orig, args, up,
subs, path,
bs, pos, raw, seen), _) == dd : S.St}
%e1 : {S.cluster(rest, orig,
S.parse.take_arg.kind(S.Flag{}, nn, S.cluster.val.flag(_, rest), orig,
S.Here{args, up, subs, path, bs, pos, raw, seen}), _) == dd : S.St}
e2 = Equal.sym(Bool, S.bound(bs, nn), False{}, h_once)
%e2 : {S.cluster(rest, orig, S.parse.once(_, dd, nn, path), True{}) == dd : S.St}
L1.cluster_done(rest, orig, dd)
12 changes: 7 additions & 5 deletions proofs/LetterOptAgain.bend
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ def Laws.letter_opt_again(
e0 = M1.cl.back(cc, rest, orig, args, up, subs, path, bs, pos, raw, seen, aa, h_found)
%e0 : {D1.dead_of(_) == Some{S.Repeated{path, nn}} : Maybe<&2, S.ParseErr>}
e2 = Equal.sym(Bool, S.bound(bs, nn), True{}, h_again)
%e2 : {D1.dead_of(S.cluster(rest, orig, S.parse.once(_, S.parse.take_opt(vv, nn, args, up, subs, path, bs, pos, raw,
seen), nn, path), True{})) == Some{S.Repeated{path, nn}} : Maybe<&2, S.ParseErr>}
M2.cl.dead(rest, orig, S.parse.once(True{}, S.parse.take_opt(vv, nn, args, up, subs, path, bs, pos, raw, seen),
%e2 : {D1.dead_of(S.cluster(rest, orig,
S.parse.once(_, S.parse.take_opt(vv, nn, S.Here{args, up, subs, path, bs, pos, raw, seen}), nn,
path), True{})) == Some{S.Repeated{path, nn}} : Maybe<&2, S.ParseErr>}
M2.cl.dead(rest, orig,
S.parse.once(True{}, S.parse.take_opt(vv, nn, S.Here{args, up, subs, path, bs, pos, raw, seen}),
nn, path),
True{}, S.Repeated{path, nn}, L1.once_dead(S.parse.take_opt(vv, nn, args, up, subs, path, bs, pos, raw,
seen), nn, path))
True{}, S.Repeated{path,
nn}, L1.once_dead(S.parse.take_opt(vv, nn, S.Here{args, up, subs, path, bs, pos, raw, seen}), nn, path))
2 changes: 1 addition & 1 deletion proofs/LetterUnknown.bend
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ def Laws.letter_unknown(cc, rest, orig, args, up, subs, path, bs, pos, raw, seen
+dd = {S.St{S.Dead{S.UnknownFlag{path, orig}}, args, up, subs, path, bs, pos, raw, seen} : S.St}
e2 = Equal.sym(Maybe<&2, S.Arg>, S.by_short(args, SCon{cc, SNil{}}), None{}, h_none)
%e2 : {S.cluster(rest, orig,
S.parse.take_arg(_, S.cluster.val(_, rest), orig, args, up, subs, path, bs, pos, raw, seen),
S.parse.take_arg(_, S.cluster.val(_, rest), orig, S.Here{args, up, subs, path, bs, pos, raw, seen}),
S.cluster.ends(_, rest)) == dd : S.St}
L1.cluster_done(rest, orig, dd)
27 changes: 15 additions & 12 deletions proofs/LetterValue.bend
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def lv.ty(
+seen: Bool,
+nn: String
) -> Type:
{S.cluster(rest, orig, S.parse.take_arg.kind(kk, nn, S.cluster.val.kind(kk, rest), orig, args, up, subs, path,
bs, pos, raw, seen),
{S.cluster(rest, orig,
S.parse.take_arg.kind(kk, nn, S.cluster.val.kind(kk, rest), orig, S.Here{args, up, subs, path, bs, pos, raw, seen}),
S.cluster.ends.kind(kk, rest)) == S.St{S.Free{}, args, up, subs, path, S.Bind{nn,
rest} <> bs, pos, raw, seen} : S.St}

Expand Down Expand Up @@ -52,33 +52,36 @@ def lv(
case S.Opt{}:
+T = {S.St{S.Free{}, args, up, subs, path, S.Bind{nn, rest} <> bs, pos, raw, seen} : S.St}
e1 = Equal.sym(Bool, String.starts_with(rest, "="), False{}, h_noeq)
%e1 : {S.cluster(rest, orig, S.parse.take_arg.kind(S.Opt{}, nn, S.short_of.val(_, rest), orig, args, up,
subs, path, bs, pos, raw, seen), True{})
%e1 : {S.cluster(rest, orig,
S.parse.take_arg.kind(S.Opt{}, nn, S.short_of.val(_, rest), orig,
S.Here{args, up, subs, path, bs, pos, raw, seen}), True{})
== T : S.St}
e2 = Equal.sym(Bool, String.is_empty(rest), False{}, h_some)
%e2 : {S.cluster(rest, orig, S.parse.take_arg.kind(S.Opt{}, nn,
Bool.pick(Maybe<&2, String>, _, None{},
Some{rest}), orig, args, up, subs, path, bs, pos, raw, seen), True{}) == T : S.St}
Some{rest}), orig, S.Here{args, up, subs, path, bs, pos, raw, seen}), True{}) == T : S.St}
e3 = Equal.sym(Bool, S.bound(bs, nn), False{}, Walk.wk.not_true(S.bound(bs, nn), h_kind))
%e3 : {S.cluster(rest, orig, S.parse.once(_, S.parse.take_opt(Some{rest}, nn, args, up, subs, path, bs,
pos, raw, seen), nn, path), True{}) == T
%e3 : {S.cluster(rest, orig,
S.parse.once(_, S.parse.take_opt(Some{rest}, nn, S.Here{args, up, subs, path, bs, pos, raw, seen}), nn,
path), True{}) == T
: S.St}
e4 = Equal.sym(Bool, S.allowed(S.parse.choices(S.by_name(args, nn)), rest), True{}, h_ok)
%e4 : {S.cluster(rest, orig, S.parse.take_choice(_, nn, rest, args, up, subs, path, bs, pos, raw, seen),
%e4 : {S.cluster(rest, orig, S.parse.take_choice(_, nn, rest, S.Here{args, up, subs, path, bs, pos, raw, seen}),
True{}) == T : S.St}
L1.cluster_done(rest, orig, T)
case S.Many{}:
+T = {S.St{S.Free{}, args, up, subs, path, S.Bind{nn, rest} <> bs, pos, raw, seen} : S.St}
e1 = Equal.sym(Bool, String.starts_with(rest, "="), False{}, h_noeq)
%e1 : {S.cluster(rest, orig, S.parse.take_arg.kind(S.Many{}, nn, S.short_of.val(_, rest), orig, args, up,
subs, path, bs, pos, raw, seen), True{})
%e1 : {S.cluster(rest, orig,
S.parse.take_arg.kind(S.Many{}, nn, S.short_of.val(_, rest), orig,
S.Here{args, up, subs, path, bs, pos, raw, seen}), True{})
== T : S.St}
e2 = Equal.sym(Bool, String.is_empty(rest), False{}, h_some)
%e2 : {S.cluster(rest, orig, S.parse.take_arg.kind(S.Many{}, nn,
Bool.pick(Maybe<&2, String>, _, None{},
Some{rest}), orig, args, up, subs, path, bs, pos, raw, seen), True{}) == T : S.St}
Some{rest}), orig, S.Here{args, up, subs, path, bs, pos, raw, seen}), True{}) == T : S.St}
e4 = Equal.sym(Bool, S.allowed(S.parse.choices(S.by_name(args, nn)), rest), True{}, h_ok)
%e4 : {S.cluster(rest, orig, S.parse.take_choice(_, nn, rest, args, up, subs, path, bs, pos, raw, seen),
%e4 : {S.cluster(rest, orig, S.parse.take_choice(_, nn, rest, S.Here{args, up, subs, path, bs, pos, raw, seen}),
True{}) == T : S.St}
L1.cluster_done(rest, orig, T)
case S.Flag{}:
Expand Down
Loading
Loading