-
Notifications
You must be signed in to change notification settings - Fork 211
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
Adopt diff-friendly import style. #4173
Adopt diff-friendly import style. #4173
Conversation
9ee843c
to
4c69133
Compare
@@ -4,7 +4,7 @@ | |||
# https://github.com/jaspervdj/stylish-haskell/blob/master/data/stylish-haskell.yaml | |||
# for usage. | |||
|
|||
columns: 80 # Should match .editorconfig | |||
columns: 1 # Force diff-friendly import style (one line per symbol). |
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.
Note that this trick works with both older and more recent versions of stylish-haskell
.
( XPub, xpubToBytes ) | ||
( XPub | ||
, xpubToBytes | ||
) |
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 style has the final )
on a separate line -- this is the same as fourmolu
.
4c69133
to
bf69969
Compare
This commit changes our `stylish-haskell` configuration so that each imported symbol is listed on a separate line. This is identical to the style used by `fourmolu`. This configuration is respected by older and newer versions of `stylish-haskell` (specifically, versions `0.11.0.3` and `0.14.5.0`).
bf69969
to
406576c
Compare
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.
lgtm
Summary
This PR adjusts our
stylish-haskell
configuration to always import each symbol on a separate line. Example:Details
This change has several advantages:
0.11.0.3
and0.14.5.0
ofstylish-haskell
(current and latest versions respectively).fourmolu
. (See experimentalfourmolu
branch here.)Adopting this style will make it easier to move to GHC
9.2
or9.6
, both of which no longer work with our current version ofstylish-haskell
.Related Issues
Without this change in our configuration, upgrading
stylish-haskell
from version0.11.0.3
to0.14.5.0
exposes us to the following regression:haskell/stylish-haskell#462