You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The linear typechecker would need to infer that the None constructor is used implicitly in the else branch, and create a proof obligation that opt.None? is used in the else branch. However, I don't think this feature would be impossible.
The text was updated successfully, but these errors were encountered:
This would be nice to have, but it's probably complicated, and would likely require a more comprehensive proposal than is here.
It would be nice if I could "use" a linear datatype variable by using all of its fields without having to explicitly destruct it.
Here's a very simple example, with a single-constructor datatype:
Support this for a multiple-constructor datatype would be a far more advanced proposal. To see why it's hard, consider this example:
The linear typechecker would need to infer that the None constructor is used implicitly in the else branch, and create a proof obligation that
opt.None?
is used in the else branch. However, I don't think this feature would be impossible.The text was updated successfully, but these errors were encountered: