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
1 change: 0 additions & 1 deletion quest/m3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ generic std gap is planned here even when moq never calls it.
- [Unsafe code the translator can model](/quest/m3/ts-unsafe.md) - a dependency using only `unsafe` the translator can model translates from source
- [The rest of Duration](/quest/m3/ts-duration.md) - compound assignment, float conversions, and `Sum` on a `Duration` translate
- [Trait objects](/quest/m3/ts-dyn.md) - `dyn Trait` and `Box<dyn Future>` translate, so a consumer neither rewrites nor binds them
- [The rest of format specs](/quest/m3/ts-fmt-specs.md) - precision, argument widths, `+`, and the other radixes format as `core::fmt` does
- [Waiting: type-check in process with tsrs](/quest/m3/ts-tsrs.md) - rust2-ts checks bindings through tsrs instead of `tsc` once it is a stable library
- [Fold matches across tests that aren't variant switches](/quest/m3/ts-fold-guards.md) - a match an `if` or guard decided drops its dead arms
- [A crate's own comparison operators](/quest/m3/ts-partial-ord.md) - an overridden `lt`/`le`/`gt`/`ge` is called where std calls it
Expand Down
23 changes: 0 additions & 23 deletions quest/m3/ts-fmt-specs.md

This file was deleted.

9 changes: 5 additions & 4 deletions ts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,9 @@ translate, as do `Display` and `Debug` impls, derived and thiserror's included.
runtime ports `core::fmt`, so the text matches native Rust's byte for byte. A placeholder
becomes a function writing its value, and `fmt::Arguments` an array of literal pieces
and such functions: `rt.fmtWriteFmt(f, ["code=", (f) => rt.u16Display(code, f)])`. A `&dyn
Debug` or `&dyn Display` is such a function too. Format specs take fill, alignment,
width, `#`, `0`, `x`, `X`, and `?`. `Debug` of a string or `char` escapes by the JS
Debug` or `&dyn Display` is such a function too. Format specs take every option but `{:p}`:
fill, alignment, `+`, `#`, `0`, `x?` and `X?`, a width and a precision, each also from an
argument, and `x`, `X`, `o`, `b`, `e`, and `E` for integers. `Debug` of a string or `char` escapes by the JS
engine's Unicode tables, so a character newer than its Unicode version is escaped where
Rust prints it. A caller prints a `printable` type as `to_string()` and `format!("{err:?}")`
would: `rt.fmtToString((f) => DecodeError.fmt$Display(err, f))` and
Expand Down Expand Up @@ -429,8 +430,8 @@ another type it borrows as through the crate's own `Borrow`, a `&mut` to a value
copies that std makes, other than a map's, or hands a closure, as `iter_mut` and
`and_modify` do, one into a `Result`'s payload passed on or kept, `Hasher::write` of bytes, the adaptors
without a mapping in `src/lower/iter.rs` (such as `cycle`, `unzip`, and `partition`), an
own `impl Iterator` with `next_back`, `len`, or another provided method of its own, other
format specs (a precision, `+`, `{:b}`, `{:x?}`, and widths from arguments), writing to a
own `impl Iterator` with `next_back`, `len`, or another provided method of its own,
a pointer's address (`{:p}`), writing to a
`String` with `write!`, a `str` pattern other than a
`char`, a `&str`, or a predicate, a mutable `str` slice, a copy of a closure that changes
what it captured, `mem::swap`, `replace`, or `take` of a reference's whole pointee,
Expand Down
8 changes: 4 additions & 4 deletions ts/fixtures/codec/expected/coding/decode.DecodeError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function fmt$Display(self: DecodeError, __formatter: rt.Formatter): rt.Re
}
if (self.tag === "InvalidMessage") {
const arg = self._0;
const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.u64Display(arg, f)];
const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.u64Debug(arg, f)];
return rt.fmtWriteFmt(__formatter, ["invalid message: ", args2[0]]);
}
if (self.tag === "InvalidSubscribeLocation") {
Expand Down Expand Up @@ -83,7 +83,7 @@ export function fmt$Debug(self: DecodeError, f: rt.Formatter): rt.Result<undefin
}
if (self.tag === "InvalidMessage") {
const _11: string = "InvalidMessage";
const _12: rt.Fmt = (f: rt.Formatter) => rt.u64Display(self._0, f);
const _12: rt.Fmt = (f: rt.Formatter) => rt.u64Debug(self._0, f);
return rt.debugTupleFinish(rt.debugTupleField(rt.fmtDebugTuple(f, _11), _12));
}
if (self.tag === "InvalidSubscribeLocation") {
Expand All @@ -104,9 +104,9 @@ export function fmt$Debug(self: DecodeError, f: rt.Formatter): rt.Result<undefin
if (self.tag === "MessageTooLarge") {
const _21: string = "MessageTooLarge";
const _22: string = "size";
const _23: rt.Fmt = (f: rt.Formatter) => rt.usizeDisplay(self.size, f);
const _23: rt.Fmt = (f: rt.Formatter) => rt.usizeDebug(self.size, f);
const _24: string = "max";
const _25: rt.Fmt = (f: rt.Formatter) => rt.usizeDisplay(self.max, f);
const _25: rt.Fmt = (f: rt.Formatter) => rt.usizeDebug(self.max, f);
return rt.debugStructFinish(rt.debugStructField(rt.debugStructField(rt.fmtDebugStruct(f, _21), _22, _23), _24, _25));
}
if (self.tag === "ExpectedData") {
Expand Down
2 changes: 1 addition & 1 deletion ts/fixtures/codec/expected/lib.SessionError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function fmt$Debug(self: SessionError, f: rt.Formatter): rt.Result<undefi
return rt.fmtWriteStr(f, "ProtocolViolation");
}
const _6: string = "App";
const _7: rt.Fmt = (f: rt.Formatter) => rt.u16Display(self._0, f);
const _7: rt.Fmt = (f: rt.Formatter) => rt.u16Debug(self._0, f);
return rt.debugTupleFinish(rt.debugTupleField(rt.fmtDebugTuple(f, _6), _7));
}

Expand Down
4 changes: 2 additions & 2 deletions ts/fixtures/lang/expected/chunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ export function chunks(kind: rt.u8, data: rt.ByteSlice, out: rt.ByteVec): void {
}
rt.byteVecExtendFromSlice(out, chosen2);
rt.byteVecPush(out, chosen2.data[chosen2.start + 1]);
const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtList(rt.byteSliceView(chosen2), f, rt.u8Display), (f: rt.Formatter) => rt.fmtList(rt.byteSliceView(lit), f, rt.u8Display)];
const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtList(rt.byteSliceView(chosen2), f, rt.u8Debug), (f: rt.Formatter) => rt.fmtList(rt.byteSliceView(lit), f, rt.u8Debug)];
rt.byteVecExtendFromSlice(out, rt.stringAsBytes(rt.fmtFormat([args2[0], " ", args2[1]])));
if (data.length >= 3) {
const chunk: rt.ByteSlice = new rt.ByteSlice(data.data, data.start, 3);
const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtList(rt.byteSliceView(chunk), f, rt.u8Display), (f: rt.Formatter) => rt.fmtList(rt.byteSliceView(chunk), f, rt.u8Display)];
const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtList(rt.byteSliceView(chunk), f, rt.u8Debug), (f: rt.Formatter) => rt.fmtList(rt.byteSliceView(chunk), f, rt.u8Debug)];
rt.byteVecExtendFromSlice(out, rt.stringAsBytes(rt.fmtFormat([args4[0], " ", args4[1]])));
}
} else if (_4 === 4) {
Expand Down
2 changes: 1 addition & 1 deletion ts/fixtures/lang/expected/cows.Named.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function fmt$Debug(self: Named, f: rt.Formatter): rt.Result<undefined, rt
const _4: string = "name";
const _5: rt.Fmt = (f: rt.Formatter) => rt.fmtStr(self.name, f);
const _7: string = "id";
const _8: rt.Fmt = (f: rt.Formatter) => rt.u8Display(self.id, f);
const _8: rt.Fmt = (f: rt.Formatter) => rt.u8Debug(self.id, f);
return rt.debugStructFinish(rt.debugStructField(rt.debugStructField(rt.fmtDebugStruct(f, _3), _4, _5), _7, _8));
}

Expand Down
45 changes: 29 additions & 16 deletions ts/fixtures/lang/expected/durations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,34 +139,47 @@ export function durations(kind: rt.u8, data: rt.ByteSlice, out: rt.ByteVec): voi
const _192: rt.Duration = rt.durationNew(rt.durationAsSecs(a), rt.durationSubsecNanos(a));
rt.byteVecPush(out, rt.hashContains(set, _192) ? 1 : 0);
} else if (_24 === 8) {
const _212: rt.Duration | undefined = b;
const c: rt.Duration = rt.durationNew(0, rt.durationSubsecNanos(b));
const d2: rt.Duration = rt.durationFromNanos(rt.u32Rem(n, 1000000) as rt.u64);
const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.durationDebug(a, f), (f: rt.Formatter) => rt.durationDebug(c, f), (f: rt.Formatter) => rt.durationDebug(d2, f), (f: rt.Formatter) => rt.fmtOption(_212, f, rt.durationDebug)];
const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.durationDebug(a, f), (f: rt.Formatter) => rt.durationDebug(c, f), (f: rt.Formatter) => rt.durationDebug(d2, f), (f: rt.Formatter) => rt.fmtOption(b, f, rt.durationDebug)];
put(out, rt.fmtFormat([args2[0], "|", args2[1], "|", args2[2], "|", rt.fmtSpec({ align: ">", width: 16 }, args2[1]), "|", rt.fmtSpec({ fill: "*", align: "^", width: 14 }, args2[2]), "|", rt.fmtSpec({ align: "<", width: 12 }, args2[1]), "|", rt.fmtSpec({ zero: true, width: 8 }, args2[0]), "|", args2[3]]));
const _234: rt.Duration | undefined = b;
const p: rt.usize = rt.u32Rem(n, 13) as rt.usize;
const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.durationDebug(a, f), (f: rt.Formatter) => rt.durationDebug(c, f), (f: rt.Formatter) => rt.durationDebug(d2, f), rt.fmtCount(p), (f: rt.Formatter) => rt.fmtOption(_234, f, rt.durationDebug)];
put(out, rt.fmtFormat([rt.fmtSpec({ precision: 0 }, args4[0]), "|", rt.fmtSpec({ precision: 3 }, args4[0]), "|", rt.fmtSpec({ precision: 1 }, args4[1]), "|", rt.fmtSpec({ precision: 12 }, args4[2]), "|", rt.fmtSpec({ plus: true }, args4[0]), "|", rt.fmtSpec({ plus: true, width: 12, precision: 2 }, args4[1]), "|", rt.fmtSpec({ align: "<", width: 10, precision: 1 }, args4[2]), "|", rt.fmtSpec({ precision: rt.fmtCountOf(args4[3]) }, args4[0]), "|", rt.fmtSpec({ precision: 1 }, args4[4])]));
const iter4: rt.Iter<rt.u64> = rt.iterSlice([1500000000, 2500000000, 1250000, 1350000, 999500, 1999999999]);
while (true) {
const _250: rt.u64 | rt.Done = iter4.next();
if (_250 === rt.DONE) {
break;
}
const part = rt.durationFromNanos(_250);
const args6: rt.Fmt[] = [(f: rt.Formatter) => rt.durationDebug(part, f)];
put(out, rt.fmtFormat([rt.fmtSpec({ precision: 0 }, args6[0]), " ", rt.fmtSpec({ precision: 1 }, args6[0]), " ", rt.fmtSpec({ precision: 2 }, args6[0])]));
}
} else {
const iter4: rt.Iter<rt.Duration> = rt.iterSlice([{ secs: 0, nanos: 0 }, { secs: { hi: 0xffffffff, lo: 0xffffffff } as rt.u64, nanos: 999999999 }, { secs: 0, nanos: 999 }]);
const iter5: rt.Iter<rt.Duration> = rt.iterSlice([{ secs: 0, nanos: 0 }, { secs: { hi: 0xffffffff, lo: 0xffffffff } as rt.u64, nanos: 999999999 }, { secs: 0, nanos: 999 }]);
while (true) {
const _225: rt.Duration | rt.Done = iter4.next();
if (_225 === rt.DONE) {
const _269: rt.Duration | rt.Done = iter5.next();
if (_269 === rt.DONE) {
break;
}
putDuration(out, _225);
putDuration(out, _269);
}
putDuration(out, { secs: 1, nanos: 500000000 });
putDuration(out, { secs: 0, nanos: 0 });
putOpt(out, rt.durationCheckedAdd({ secs: { hi: 0xffffffff, lo: 0xffffffff } as rt.u64, nanos: 999999999 }, rt.durationFromNanos(1)));
const _237: rt.Duration | undefined = rt.thenSome(rt.durationCmp(b, { secs: 1, nanos: 500000000 }) === 1, b);
const w: Window.Window = { start: a, len: _237 };
const _246: Window.Window = Window.default$Default();
rt.byteVecPush(out, Window.eq$PartialEq(w, _246) ? 1 : 0);
const _281: rt.Duration | undefined = rt.thenSome(rt.durationCmp(b, { secs: 1, nanos: 500000000 }) === 1, b);
const w: Window.Window = { start: a, len: _281 };
const _290: Window.Window = Window.default$Default();
rt.byteVecPush(out, Window.eq$PartialEq(w, _290) ? 1 : 0);
rt.byteVecPush(out, Window.cmp$Ord(w, { start: b, len: undefined }) < 0 ? 1 : 0);
const _258: Window.Window = copy$Window(Window.default$Default());
const _256: rt.Iter<Window.Window> = rt.iterSlice([copy$Window(w), copy$Window(w), _258]);
rt.byteVecPush(out, rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(Window.hash$Hash_DefaultHasher, Window.eq$PartialEq)) as rt.HashSet<Window.Window>, _256)) & 0xff);
const _271: Window.Window = Window.default$Default();
const args4: rt.Fmt[] = [(f: rt.Formatter) => Window.fmt$Debug(w, f), (f: rt.Formatter) => Window.fmt$Debug(_271, f)];
put(out, rt.fmtFormat([args4[0], "|", rt.fmtSpec({ alternate: true }, args4[1])]));
const _302: Window.Window = copy$Window(Window.default$Default());
const _300: rt.Iter<Window.Window> = rt.iterSlice([copy$Window(w), copy$Window(w), _302]);
rt.byteVecPush(out, rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(Window.hash$Hash_DefaultHasher, Window.eq$PartialEq)) as rt.HashSet<Window.Window>, _300)) & 0xff);
const _315: Window.Window = Window.default$Default();
const args8: rt.Fmt[] = [(f: rt.Formatter) => Window.fmt$Debug(w, f), (f: rt.Formatter) => Window.fmt$Debug(_315, f)];
put(out, rt.fmtFormat([args8[0], "|", rt.fmtSpec({ alternate: true }, args8[1])]));
}
}

Expand Down
6 changes: 3 additions & 3 deletions ts/fixtures/lang/expected/fmt.Fault.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ export function fmt$Debug(self: Fault, f: rt.Formatter): rt.Result<undefined, rt
}
if (self.tag === "Code") {
const _6: string = "Code";
const _7: rt.Fmt = (f: rt.Formatter) => rt.u16Display(self._0, f);
const _7: rt.Fmt = (f: rt.Formatter) => rt.u16Debug(self._0, f);
return rt.debugTupleFinish(rt.debugTupleField(rt.fmtDebugTuple(f, _6), _7));
}
if (self.tag === "TooLarge") {
const _11: string = "TooLarge";
const _12: string = "size";
const _13: rt.Fmt = (f: rt.Formatter) => rt.usizeDisplay(self.size, f);
const _13: rt.Fmt = (f: rt.Formatter) => rt.usizeDebug(self.size, f);
const _14: string = "max";
const _15: rt.Fmt = (f: rt.Formatter) => rt.usizeDisplay(self.max, f);
const _15: rt.Fmt = (f: rt.Formatter) => rt.usizeDebug(self.max, f);
return rt.debugStructFinish(rt.debugStructField(rt.debugStructField(rt.fmtDebugStruct(f, _11), _12, _13), _14, _15));
}
const _18: string = "At";
Expand Down
18 changes: 18 additions & 0 deletions ts/fixtures/lang/expected/fmt.Hex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@ export interface Hex {
_0: rt.u32;
}

export function fmt$Binary(self: Hex, f: rt.Formatter): rt.Result<undefined, rt.FmtError> {
return rt.u32Binary(self._0, f);
}

export function fmt$Octal(self: Hex, f: rt.Formatter): rt.Result<undefined, rt.FmtError> {
const arg = self._0;
const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.u32Octal(arg, f)];
return rt.fmtWriteFmt(f, [args2[0]]);
}

export function fmt$LowerExp(self: Hex, f: rt.Formatter): rt.Result<undefined, rt.FmtError> {
return rt.u32LowerExp(self._0, f);
}

export function fmt$UpperExp(self: Hex, f: rt.Formatter): rt.Result<undefined, rt.FmtError> {
return rt.u32UpperExp(self._0, f);
}

export function fmt$Display(self: Hex, f: rt.Formatter): rt.Result<undefined, rt.FmtError> {
if (!rt.fmtAlternate(f)) {
const arg2 = self._0;
Expand Down
6 changes: 3 additions & 3 deletions ts/fixtures/lang/expected/fmt.Kind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ export function fmt$Debug(self: Kind, f: rt.Formatter): rt.Result<undefined, rt.
}
if (self.tag === "One") {
const _8: string = "One";
const _9: rt.Fmt = (f: rt.Formatter) => rt.u8Display(self._0, f);
const _9: rt.Fmt = (f: rt.Formatter) => rt.u8Debug(self._0, f);
return rt.debugTupleFinish(rt.debugTupleField(rt.fmtDebugTuple(f, _8), _9));
}
const _13: string = "Many";
const _14: string = "count";
const _15: rt.Fmt = (f: rt.Formatter) => rt.u32Display(self.count, f);
const _15: rt.Fmt = (f: rt.Formatter) => rt.u32Debug(self.count, f);
const _16: string = "items";
const _17: rt.Fmt = (f: rt.Formatter) => rt.fmtList(rt.byteVecView(self.items), f, rt.u8Display);
const _17: rt.Fmt = (f: rt.Formatter) => rt.fmtList(rt.byteVecView(self.items), f, rt.u8Debug);
return rt.debugStructFinish(rt.debugStructField(rt.debugStructField(rt.fmtDebugStruct(f, _13), _14, _15), _16, _17));
}

Expand Down
2 changes: 1 addition & 1 deletion ts/fixtures/lang/expected/fmt.Manual.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface Manual {
}

export function fmt$Debug(self: Manual, f: rt.Formatter): rt.Result<undefined, rt.FmtError> {
return rt.debugStructFinishNonExhaustive(rt.debugStructField(rt.debugStructField(rt.fmtDebugStruct(f, "Manual"), "id", (f: rt.Formatter) => rt.u8Display(self.id, f)), "list", (f: rt.Formatter) => rt.fmtList(self.list, f, rt.u16Display)));
return rt.debugStructFinishNonExhaustive(rt.debugStructField(rt.debugStructField(rt.fmtDebugStruct(f, "Manual"), "id", (f: rt.Formatter) => rt.u8Debug(self.id, f)), "list", (f: rt.Formatter) => rt.fmtList(self.list, f, rt.u16Debug)));
}

//# sourceMappingURL=fmt.Manual.ts.map
2 changes: 1 addition & 1 deletion ts/fixtures/lang/expected/fmt.Nested.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as Shape from "./shapes.Shape.ts";

export function fmt$Debug(self: Nested, f: rt.Formatter): rt.Result<undefined, rt.FmtError> {
const names: string[] = ["name", "point", "shape", "tags", "pairs", "maybe", "none", "result", "list", "tuple", "single", "empty", "unit", "boxed"];
const values: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtStr(self.name, f), (f: rt.Formatter) => Point.fmt$Debug(self.point, f), (f: rt.Formatter) => Shape.fmt$Debug(self.shape, f), (f: rt.Formatter) => rt.fmtList(rt.byteVecView(self.tags), f, rt.u8Display), (f: rt.Formatter) => rt.fmtList(self.pairs, f, (value: Pair.Pair, f: rt.Formatter) => Pair.fmt$Debug(value, f)), (f: rt.Formatter) => rt.fmtOption(self.maybe, f, (value: Pair.Pair, f: rt.Formatter) => Pair.fmt$Debug(value, f)), (f: rt.Formatter) => rt.fmtOption(self.none, f, rt.u8Display), (f: rt.Formatter) => rt.fmtResult(self.result, f, rt.u8Display, rt.fmtStr), (f: rt.Formatter) => rt.fmtList(self.list, f, rt.i16Display), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.u8Display(self.tuple[0], f), (f: rt.Formatter) => rt.fmtBool(self.tuple[1], f), (f: rt.Formatter) => rt.fmtStr(self.tuple[2], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.u8Display(self.single[0], f)], f), (f: rt.Formatter) => rt.fmtList(rt.byteVecView(self.empty), f, rt.u8Display), (f: rt.Formatter) => rt.fmtUnit(self.unit, f), (f: rt.Formatter) => Kind.fmt$Debug(self.boxed, f)];
const values: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtStr(self.name, f), (f: rt.Formatter) => Point.fmt$Debug(self.point, f), (f: rt.Formatter) => Shape.fmt$Debug(self.shape, f), (f: rt.Formatter) => rt.fmtList(rt.byteVecView(self.tags), f, rt.u8Debug), (f: rt.Formatter) => rt.fmtList(self.pairs, f, (value: Pair.Pair, f: rt.Formatter) => Pair.fmt$Debug(value, f)), (f: rt.Formatter) => rt.fmtOption(self.maybe, f, (value: Pair.Pair, f: rt.Formatter) => Pair.fmt$Debug(value, f)), (f: rt.Formatter) => rt.fmtOption(self.none, f, rt.u8Debug), (f: rt.Formatter) => rt.fmtResult(self.result, f, rt.u8Debug, rt.fmtStr), (f: rt.Formatter) => rt.fmtList(self.list, f, rt.i16Debug), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.u8Debug(self.tuple[0], f), (f: rt.Formatter) => rt.fmtBool(self.tuple[1], f), (f: rt.Formatter) => rt.fmtStr(self.tuple[2], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.u8Debug(self.single[0], f)], f), (f: rt.Formatter) => rt.fmtList(rt.byteVecView(self.empty), f, rt.u8Debug), (f: rt.Formatter) => rt.fmtUnit(self.unit, f), (f: rt.Formatter) => Kind.fmt$Debug(self.boxed, f)];
return rt.fmtDebugStructFields(f, "Nested", names, values);
}

Expand Down
2 changes: 1 addition & 1 deletion ts/fixtures/lang/expected/fmt.Noted.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function fmt$Display(self: Noted, f: rt.Formatter): rt.Result<undefined,
const log: rt.ByteVec = new rt.ByteVec();
const _7: rt.u8 = note(log, self._0);
const _11: boolean = note(log, 1) === self._0;
const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.u8Display(_7, f), (f: rt.Formatter) => rt.fmtBool(_11, f), (f: rt.Formatter) => rt.fmtList(rt.byteVecView(log), f, rt.u8Display)];
const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.u8Display(_7, f), (f: rt.Formatter) => rt.fmtBool(_11, f), (f: rt.Formatter) => rt.fmtList(rt.byteVecView(log), f, rt.u8Debug)];
return rt.fmtWriteFmt(f, [args2[0], " ", args2[1], " ", args2[2]]);
}

Expand Down
4 changes: 2 additions & 2 deletions ts/fixtures/lang/expected/fmt.Pair.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import * as rt from "./rt.ts";

export function fmt$Debug(self: Pair, f: rt.Formatter): rt.Result<undefined, rt.FmtError> {
const _3: string = "Pair";
const _4: rt.Fmt = (f: rt.Formatter) => rt.u8Display(self._0, f);
const _6: rt.Fmt = (f: rt.Formatter) => rt.i64Display(self._1, f);
const _4: rt.Fmt = (f: rt.Formatter) => rt.u8Debug(self._0, f);
const _6: rt.Fmt = (f: rt.Formatter) => rt.i64Debug(self._1, f);
return rt.debugTupleFinish(rt.debugTupleField(rt.debugTupleField(rt.fmtDebugTuple(f, _3), _4), _6));
}

Expand Down
Loading