Skip to content

Conversation

@sellout
Copy link
Owner

@sellout sellout commented Apr 2, 2025

This contains some changes that have been bugging me for a while, but are just annoying enough to not get around to.

  • remove CPP that’s only used to get default impls in some cases,
  • separate field and method imports from type and class imports1,
  • move CPP blocks to end of sections (pragmas, imports)2, and
  • shorten long lines.

Footnotes

  1. This style of importing is slightly more robust, as it continues to work even when fields and methods are moved to top-level definitions.

  2. Ormolu can’t format within CPP blocks, so putting it in the middle of a section prevents automatic moving of elements from one side of the CPP to the other.

This contains some changes that have been bugging me for a while, but are just
annoying enough to not get around to.

- remove `CPP` that’s only used to get default impls in some cases,
- separate field and method imports from type and class imports[^1],
- move CPP blocks to end of sections (pragmas, imports)[^2], and
- shorten long lines.

[^1]: This style of importing is slightly more robust, as it continues to work
even when fields and methods are moved to top-level definitions.

[^2]: Ormolu can’t format within CPP blocks, so putting it in the middle of a
section prevents automatic moving of elements from one side of the CPP to the
other.
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