-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adopt diff-friendly import style. (#4173)
## Summary This PR adjusts our `stylish-haskell` configuration to always import each symbol on a separate line. Example: ```hs import Some.Module.A ( SomeSymbolA1 , SomeSymbolA2 ) import Some.Module.B ( SomeSymbolB1 , SomeSymbolB2 , SomeSymbolB3 , SomeSymbolB4 ) ```` ## Details This change has several advantages: 1. **Better cross-version compatibility**: this configuration produces [almost exactly the same](731127c) output across versions `0.11.0.3` and `0.14.5.0` of `stylish-haskell` (current and latest versions respectively). 1. **Better cross-tool compatibility**: the output is almost identical to that produced by **`fourmolu`**. (See experimental `fourmolu` branch [here](https://github.com/cardano-foundation/cardano-wallet/pull/4061/files).) 1. **Improved diff-friendliness**: we virtually eliminate the problem where adding or removing a single import can lead to a multi-line diff. Adopting this style will make it easier to move to GHC `9.2` or `9.6`, both of which no longer work with our current version of `stylish-haskell`. ## Related Issues Without this change in our configuration, upgrading `stylish-haskell` from version `0.11.0.3` to `0.14.5.0` exposes us to the following regression: haskell/stylish-haskell#462
- Loading branch information
Showing
554 changed files
with
19,885 additions
and
7,639 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.