-
Notifications
You must be signed in to change notification settings - Fork 441
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
chore: indentation before |
#2581
base: master
Are you sure you want to change the base?
Conversation
This fixes indentation before `|` in places where the amount of spaces was not 0 or 2.
@@ -187,7 +187,7 @@ instance [One α] [One β] : One (α × β) where | |||
one := (1, 1) | |||
|
|||
theorem Product.ext : {p q : α × β} → p.1 = q.1 → p.2 = q.2 → p = q | |||
| (a, b), (c, d) => by simp_all |
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.
This whole file uses four-space indentation
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.
yes, and curly braces and semi-colons.
Do you propose to not change the indentation before |
in this file or to make the style of this file and KyleAlgAbbrev
to match the rest of the repo?
There are currently only 69 occurance of by \{\n
, one of them seems deliberate (because of the comment "Same example for curly braces and semicolons aficionados
")
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 can't speak for the lean4 developers, but I think the most sensible choice is either:
- Leave the file alone (reverting the changes here), adapt the rule to "one indentation level" rather than two spaces
- Make a separate PR to clean up files with four-space indents.
@@ -163,7 +163,7 @@ instance [One α] [One β] : One (α × β) where | |||
one := (1, 1) | |||
|
|||
theorem Product.ext : {p q : α × β} → p.1 = q.1 → p.2 = q.2 → p = q | |||
| (a, b), (c, d) => by simp_all | |||
| (a, b), (c, d) => by simp_all |
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.
As does this one.
This fixes indentation before
|
in places where the amount of spaces was not 0 or 2.I suppose this is the non-controversial part of #2580. Deciding for either 0 or 2 to make it consistent would be a much larger change.
Put an X in this bracket to confirm you have read the
External Contribution Guidelines.
Please put the link to your
RFC
orbug
issue here.PRs missing this link will be marked as
missing RFC
.RFC: style: number of spaces before
|
#2580