brittany icon indicating copy to clipboard operation
brittany copied to clipboard

Support for `ImportQualifiedPost` GHC extension

Open sonowz opened this issue 2 years ago • 1 comments

(This is a feature request)

GHC 8.10.1 introduced a new extension called ImportQualifiedPost. Basically what it allows is the following syntax:

import A qualified
import B qualified as C

Since the extension is included in the upcoming Haskell standard after Haskell2010, namely GHC2021, I think it would be nice for brittany to have an option to use the new syntax. Any thoughts?

sonowz avatar Apr 01 '22 11:04 sonowz

I think adding a config named like _lconfig_importQualifiedPost :: f (Last Bool) below could work...

https://github.com/lspitzner/brittany/blob/0aa04af4eba499b81fdfb401d98414e7731583cc/source/library/Language/Haskell/Brittany/Internal/Config/Types.hs#L41-L56

I'm feeling like this work needs few changes in the codebase and I can work on it. I'll try 😃

sonowz avatar Apr 05 '22 03:04 sonowz