Skip to content

D186, D188, D189: skip(n), Duration over i64 nanoseconds, no tuple-await arity cap - #2971

Merged
ehartford merged 3 commits into
mainfrom
d186-d188-d189
Nov 2, 2026
Merged

ehartford merged 3 commits into
mainfrom
d186-d188-d189

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

Implements three of the 2026-11-02 rulings (spec v7.35, #2970): D186 skip(n)/skip_while (#2961), D188 Duration as a value type over i64 ns with integer extensions, Instant, timeout and the §30-conformant lexer (#2957), D189 no tuple-await arity limit (#2963). New tests behav_d186_skip_adapter, behav_d188_duration, behav_d189_tuple_await_any_arity; sleep callers updated. Stage1 green on the targeted tests and test/lexer. Battery on the stack top.

Eric Hartford added 2 commits November 2, 2026 12:05
…ait arity cap

D186: the iterator adapter that skips the first n elements is skip(n) and
its predicate form skip_while; drop(value) stays the prelude's release
form (Sema stage symbols, BuiltinSigs, std.traits iter_skip*, the List
adapter types, the two tests that spelled drop).

D188: std.time.Duration is a value type over i64 nanoseconds on every
target (D114), with nanos/micros/millis/secs/minutes/hours constructors,
the same as extensions on isize/i64/i32 so 50.millis() reads as §14
writes it, arithmetic and comparison, as_* accessors, Instant.now() with
elapsed(), sleep(Duration) and timeout(Duration). The lexer follows §30
FLOAT_LIT: a dot after digits is part of the number only when a digit
follows, so 50.millis() is a member access; behav_float's 10.-3.5 becomes
10.0-3.5. Tests that passed a bare integer to sleep now pass a Duration.

D189: tuple .await has no arity limit; the two Sema checks that stopped at
12 stop only below 2.

Spec v7.35 (#2970) rules all three; §4 and §7 examples use Duration.secs.
An .await inside a std body made every program importing std.time a
concurrent one in Sema's eyes, and stage2 failed with E0921 data-race
diagnostics on the compiler's own globals. The evidence rule is filed;
timeout meanwhile sleeps the way sleep does.
@ehartford

Copy link
Copy Markdown
Contributor Author

Battery GREEN in ~/.local/with-staging/stack1 at 4f8…/HEAD (skip, Duration, arity; timeout without an await; the arity fixture retired, the temporary-exit library sleeps a Duration): with run tools/battery.w → status green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant