-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
E.x on error value should access error detail record field #221
Comments
Yes, I think that would work fine. If we do this, we should also make |
This suggestion led me to a long and productive train of thought: |
There's a complication. Consider
json is laxly typed, so j.x is compile-time OK but evaluates to an error e. Now if we make the change suggested in this issue, So the semantic has to be more that E.x is desugared into |
This interacts with nominal typing #413. If the error reason string becomes a brand, and we introduce branded records, then access to the fields of the error detail record should become similar to access to the fields of a branded record. |
I think we should not do this:
|
We decided not to do this. |
Example:
To access the message today we have to do this:
Can we allow:
I think the compiler can validate this correctly.
The text was updated successfully, but these errors were encountered: