ndmitchell / hlint

Haskell source code suggestions
Other
1.46k stars 195 forks source link

"Use fewer imports" suggestion when importing multiple fields from the same record #1133

Open ChefYeum opened 4 years ago

ChefYeum commented 4 years ago

For instance, for the following line of code: import Test.Hspec.Formatters (Formatter(failedFormatter), Formatter(footerFormatter))

Suggest the following as alternative: import Test.Hspec.Formatters (Formatter(failedFormatter, footerFormatter))

Does it sound like a reasonable feature to add under "Use fewer imports" suggestion?

ndmitchell commented 4 years ago

Sounds reasonable - PR most welcome!

batkot commented 1 year ago

This issue will soon get 3yo, but if it's still reasonable, I'll give it a shot :sweat_smile:

zliu41 commented 1 year ago

@batkot Yes this is still relevant! HLint has a "Use fewer imports" warning when the same module is imported multiple times, but not in this case.