|
impqualimpqual -> [qualified] as modid [imphiding]
| imphiding
imphiding -> hiding (import_1, ..., import_n [,] ) (n >= 0)
I haven't thought particularly hard about this BNF, though hopefully it gets across my idea. You'd also certainly want to mix in support (perhaps with deprecation?) for the existing syntax which places the 'qualified' before the module identifier, even though I've personally always found that awkward, as it makes imports hard to read and sort.
The other thing which would greatly ameliorate the annoyance with import lists would be the ability to import and then re-export modules in a way that retains the manner in which things were qualified. So one could, if one wanted, have a module which imports things like Map, Set, (lazy and strict) Text, (lazy and strict) ByteString, etc. re-exported qualified the way one wants, and then import that from the other modules in the project.
On Wed, Feb 01, 2017 at 04:18:13PM +0200, Vassil Ognyanov Keremidchiev wrote:
> Hello!
>
> What do you think about an idea to have multiple imports on a single line,
> like:
>
> module MyApp where
> import Data.Text, Data.Foldable, Control.Concurrent
> ...
Hello Vassil,
how would qualified/as work?
Would import statement like this:
import Data.Text, qualified Data.Foldable as F, Control.Concurrent
be allowed?
_______________________________________________
Haskell-prime mailing list
Haskell-prime@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime