Skip to content
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

Fix yet more fuzzing bugs #7510

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

joshuawarner32
Copy link
Collaborator

  • Also handle tuple accessors for multiline string checking
  • Fix a couple issues with multiline string literal formatting
  • Fix negative float and non-base-10 literal patterns
  • Force indent on where clause
  • Make nodes more strongly normalizing to fix confusion with outdentability
  • Move unit assignment handling to lifting phase
  • Unify Alias and Annotation formatting
  • Relax argument indentation requirements in closures

] where e
implements T
J :
[
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to maintain superfluous newlines inside of empty collections?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's something that I'd like to propose changing at some point, yes - but that's ideally a separate PR

@@ -0,0 +1,3 @@
return #
s
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to lose the record restructure?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's intentional (and was the behavior even prior to this PR). What's changing in this PR is that now we're not accidentally missing a case we should have been doing it in.

The intent was that early in the development of ! suffixes,users previously may have typed {} = foo! 1 2 3, in order to get around the requirement that all values are used. There was an effort to auto-upgrade any such usages via the formatter, since the assignment to the empty record was now implicit/fine with the next generation of puritty inference.

I'd be on board with re-opening the discussion of whether this "unit assignment removal" is actually pulling its weight (but again, separate discussion and separate PR I think).

[
] #
where e
implements
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like in other places implements is indented from the where when forced to a newline

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now, the only constraint is that in a where, everything after the original type ([] in this case) is indented further.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Definitely open to tweaking this!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants