-
Notifications
You must be signed in to change notification settings - Fork 89
Add a new chapter to define concepts related to pattern-matching. #757
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
Conversation
Leaving notes for discussion Wednesday on how to add a chapter and ensure our tools work: The order of clauses is defined in clauses.json for the renumbering tool. The markdown converter relies on the section numbers added by the renumbering tool. Three other tools all have arrays of filenames in the shell scripts that run the tool: I can take on the task to update those tools. I'll propose keying all the tools off the |
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.
I do like the idea of a new clause for patterns. I had a few comments and nits, but otherwise this is great.
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.
Various comments, but I like having patterns in their own section. Let's talk in the meeting about concrete steps going from here to merged.
(This is the sort of thing where I'm a terribly judge of whether it's actually "done" or not - there are any number of paragraphs that Neal could have omitted and I'd never have noticed...)
|
|
||
Each pattern form defines the set of types for input values that the pattern may be applied to. We say a pattern `P` is *applicable to* a type `T` if `T` is among the types whose values the pattern may match. It is an error if a pattern `P` appears in a program to match a *pattern input value* of type `T` if `P` is not applicable to `T`. | ||
|
||
Each pattern form defines the set of values for which the pattern *matches* the value. |
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.
Say this is a runtime concept. (Not urgent, or even necessary)
My last commit gets the section renumber tool to work correctly (once #664 is merged). I'll make a fresh PR to get the other tools using the same config file for chapter sources |
I'm going to rebase this, fix the conflicts, and merge it, so that we've got it in the Word document draft. The remaining comments will still need to be addressed, but that can happen afterwards. |
I want to add a new chapter because this will get a lot more complicated later, for exanmple when we add recursive patterns.
Co-authored-by: Mads Torgersen <[email protected]>
Co-authored-by: Jon Skeet <[email protected]>
This fixes the section renumbering tool for the added new clause.
Add the new patterns clause to both the patterns generator and the validate grammar scripts.
Because the first line isn't an H1, the grammar validator is skipping this file.
Testing the regex for not skipping the new clause.
9fb12a8
to
5cd4522
Compare
Good plan. Can you ping me when you merge it? (@ - mention is fine). I'll likely have some downstream links to fix once it's merged, and the sections have been renumbered. |
@BillWagner: I've temporarily disabled the check for all conversations to be resolved (as we want to address those afterwards) but we need to get the renumbering working. Are you happy to pull this branch, fix that up and repush? I'm hoping the Word converter will work after the renumbering is done. |
Yes. I can do it. My comment #757 (comment) has my notes from earlier. |
b5f4149
to
3165b78
Compare
I want to add a new chapter because this will get a lot more complicated
later, for example when we add recursive patterns.
This is proposed to replace #61.