-
Notifications
You must be signed in to change notification settings - Fork 804
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
Add field names to types in TypedTree #10814
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is great. Thank you!
@vzarytovskii Great to hear! I'll probably do more follow-up PRs then :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, like the name changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Just a couple minor quibbles.
@@ -2359,18 +2363,18 @@ type TraitConstraintSln = | |||
/// ty -- the type and its instantiation | |||
/// vref -- the method that solves the trait constraint | |||
/// minst -- the generic method instantiation | |||
| FSMethSln of TType * ValRef * TypeInst | |||
| FSMethSln of ty: TType * vref: ValRef * minsts: TypeInst |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minst
@@ -4825,7 +4829,7 @@ type ValUseFlag = | |||
/// a .NET 2.0 constrained call. A constrained call is only used for calls where | |||
// the object argument is a value type or generic type, and the call is to a method | |||
// on System.Object, System.ValueType, System.Enum or an interface methods. | |||
| PossibleConstrainedCall of TType | |||
| PossibleConstrainedCall of typ: TType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ty
@ScottHutchinson Shall I correct them in a follow-up PR? |
I guess so, since this one has been merged. I don't know how else to do it. Sorry I didn't review this before it was merged. I have no authority here, so do as you think best. |
Will do. I was planning to do a follow-up anyway :) |
@ScottHutchinson I've fixed the issue you mentioned in https://github.com/dotnet/fsharp/pull/10820/files |
As suggested in the Learn me some F# compiler video, it would be beneficial to have field names added to discriminated union fields. This PR is a first attempt at doing so.
I've tried to add names to a fairly limited number of types, as I wanted to get some feedback on the naming that I've used. I've used the following to decide upon the naming:
I've also tried to use the abbreviations specified in the Coding standards and idioms guide where possible, but I don't know exactly when to deviate from that.
Let me know if this PR is headed in the right direction, or if this needs work.