Open standard library error rows - #10632
Merged
Merged
Conversation
Contributor
Greptile SummaryThe PR opens concrete standard-library
Confidence Score: 5/5The PR appears safe to merge, with no concrete correctness, compatibility, or security failures identified. The changes consistently open composable concrete error rows, preserve intentionally closed internal contracts, and add direct regression coverage for the reported type-checking failure.
|
| Filename | Overview |
|---|---|
| src/build/roc/Builtin.roc | Opens concrete Try error rows across standard-library APIs and corresponding helpers while retaining intentionally closed sentinel and capability contracts. |
| src/check/test/repros_test.zig | Adds focused regression coverage proving two independent standard-library failures can compose through ? without type errors. |
| test/snapshots/repl/json_nominal_scalar_codec.md | Updates the expected encode_f64 diagnostic type to display its newly open error row. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A["Str.split_first(...)"] -->|NotFound| C["Open composed error row"]
B["U16.from_str(...)"] -->|BadNumStr| C
C --> D["Propagation through ?"]
D --> E["Caller specializes the resulting Try row"]
Reviews (1): Last reviewed commit: "Open standard library error rows" | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Standard library functions currently return a mix of open and closed concrete error rows, which prevents independent failures such as
Str.split_firstandU16.from_strfrom composing through?. This makes concreteTryreturn rows throughoutBuiltin.rocextensible, including internal low-level helpers so they specialize directly without retagging wrappers, and adds regression coverage for the reported composition failure.This keeps the existing closed-row language semantics unchanged; unlike the experiment in #10366, the change is confined to the standard-library API and its implementation contracts.
Closes #10490.